Lately I’ve been thinking a lot about beginners and the very understandable struggle to grasp programming that many of them face. This post is mostly aimed at those who currently find themselves in this position.
When it comes to creating, there is no substitute for hands-on experience and the same rings true for programming as well.
If you can spend three months reading a 1,000 page reference book on a given programming language, you’ll almost certainly walk away with some theoretical knowledge. Useful, but not very practical on its own. You’ll get the big picture, no doubt, but you won’t be productive or have much confidence in your newfound knowledge until you actually start writing code.
To me this is akin to reading a large DYI book cover to cover. I won’t be an expert on mending a fence, turning a table leg on lathe, or putting up storm drains simply because I know how such things are done in theory. It’s possible, nay, likely that when the first problem arises, I won’t know how to handle it, save for employing common sense. I’ll have to figure things out, try, make mistakes, and (hopefully) ultimately fix them. It is in this struggle that real skill is developed, honed, and ultimately mastered.
For that reason, I’m a huge fan of seeing beginners get their hands dirty. To this day even, when I’m learning a new programming language or framework, I like to solve practical problems as a way to quickly get acquainted with the ins and outs of said language.
Being passionate about mathematics, my go-to place when I’m learning a new programming language is Project Euler. 
Click for a larger image
I like the approach that it presents for for several reasons:
The self-contained problems go from extremely obvious to fairly hard. The progression is gradual.
In the process of solving problems, you will, out of necessity, end up learning about numbers, string manipulation, files, conditionals, functions, classes, etc. All of the basics that you should master in order to get started on real projects will be exercised to some degree.
The emphasis is on getting the result, but many problems will not be solvable with naive algorithms, particularly when using scripting languages like Ruby and Python. This is an opportunity to learn more about algorithms (if you are a beginner) or more about optimizing code in a given language (if you are learning that language, but are otherwise an experienced programmer).
You can look at other people’s solutions, which are often posted in a forum that’s accessible to those who have solved the problem themselves. You’ll learn about algorithms, more elegant ways to accomplish the same result, and even discover new languages you haven’t heard of before.
There is an element of gamification. It’s fun to see yourself go up in the leaderboard as you solve more problems.
The only downside is that it’s quite math heavy and that can scare away some beginners. If this doesn’t put you off tough, I highly recommend giving it a shot.  Be forewarned though, it can be rather addictive. 🙂
Antonio Cangiano is a Software Development Manager at IBM. He authored Ruby on Rails for Microsoft Developers (Wrox, 2009) and Technical Blogging (The Pragmatic Bookshelf, 2012, 2019). He is also the Marketing Lead for Cognitive Class, an educational initiative which he helped grow from zero to over 1 Million students. You can follow him on Twitter.