Learn New Programming Languages with Project Euler

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. [1]

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. [2] Be forewarned though, it can be rather addictive. 🙂

UPDATE: Follow up post about alternative programming challenges sites.


  1. They got hacked at some point, so I no longer have my existing account. I created a brand new one while writing this post. ^
  2. Of course, Project Euler isn’t exactly unknown at this point. So if you’re an existing programmer, your reply to this might be “duh!”. ^

Get more stuff like this

Subscribe to my mailing list to receive similar updates about programming.

Thank you for subscribing. Please check your email to confirm your subscription.

Something went wrong.

3 Comments

  1. Steve Gilham December 2, 2014
  2. bob wilkinson December 4, 2014

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.