Absolutely. In fact, there are a lot of good online courses that teach you how to code from a very beginning level up to a master developer.
Coursera, Udacity and universities like Stanford have some good lessons about that.
When you acquire the required skills, work from home will be just the next step (the easy one imo).
Good luck!