Via Hacker News, Zach Shapiro has some thoughts on how to learn to program. One of the points he makes is about Code Academy, a resource I recently wrote about.
Zach thinks CA is a less optimal way to learn because it's all done inside a web browser and doesn't teach you how to set up a real development environment i.e. the tools and resources you need to program properly standalone.
Learning some basics using a simple browser based environment can definitely be a useful start though.
If you're interested in learning to code, the post is worth reading.