...rediscover the joy of coding

Project Euler

Since they've just revamped their website, I thought it was probably about time I mentioned Project Euler.

Project Euler is a collection of maths-based puzzles which can be solved programmatically, ranging in difficulty from easy to "very". I've been using them to teach myself Haskell.

For example, problem 1 (a very easy problem) involves summing all the multiples of 3 and 5 below 1000:
main = print $ sum $ filter match [1..999]
  where match x = x `mod` 3 == 0
               || x `mod` 5 == 0
All problems have a "one minute rule" - all solutions should be computable using less than one minute of a standard PC's time. Each solution results in an integer value, which is used to determine whether your solution is correct or not.

Many of the problems seem simple, but turn out to be too large to solve with a "brute-force" approach - a clever algorithm is required - and that "aha" moment when you finally figure it out is very satisfying.

In summary: if you enjoy problem-solving, or want a series of puzzles with which to learn a new language, I thoroughly recommend Project Euler.