Been wondering about this for a long time. The way I see it, best way to make money online as a developer to have a solid idea and develop an app(mobile or web) along with a certain service. Another way is to do freelance work on sites such as
Freelancer.com