Recently, I was made aware of a website called Project Euler through a friend. One of his status updates on a popular social networking site showed a screen shot of his progress. Having spent a considerable amount of time in Switzerland and Swiss schools as a child, the name Euler was quite familiar to me. I decided to click on the link on his status update, something that I rarely do. I did not regret it.
See, Project Euler is a website that allows you to work on various algorithmic problems and track your progress. You can use any programming language that you want, since the answers to the problems are always a single number that you type in a text box. If you have the patience, you could actually solve some of the problems with paper and pencil, which is great.
I was quite impressed when I realized that a total of 369 problems were available for people to work on. On my train ride back from work (I regularly commute between San Jose and San Francisco), I decided to give it a shot. In a span of half an hour, I solved 3 problems and I was hooked. It was a Friday, and the weekend was spent on Project Euler problems. It was great fun, but I started to wonder why these problems are so exciting to work on.
I’m sure that everybody has their own reasons. For me personally, I believe that the most exciting part of it is that I get to work on very isolated problems. When writing code for work, the most important thing to keep in mind is usually security, followed by modularity/reusability, maintainability etc. With the Project Euler problems however, it is okay to solve just the problem at hand. If I need to operate on an array of size 100, I know that it will always be of size 100 simply because I write all the code from scratch for every single problem. It makes coding fun, and when I’m back to writing safe, reusable and maintainable code, I feel less bored.
Working on these problems has obviously many more benefits to us Software Development Engineers than just the fact that it gives us a nice way to unwind: One night I was working on a problem that required me to scan and format a long string of ASCII characters. Since I had become a bit rusty with the string formatters for scanf(), I decided to invest the time and read up on them before solving the problem. The most exciting thing happened the next day at work however: I had to write a routine that could scan a bunch of text using scanf()!
I’m wondering: Are you familiar with Project Euler? If yes, do you consider yourself passionate about solving the problems? What are your reasons for liking/disliking Project Euler? Are there any other websites like this that you’re aware of?
I’d be curious to read your thoughts in the comments section!