I don't visit the Programming Diversions forum often, but here's something that really belongs here: Project Euler.
What is Project Euler?
Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.
The motivation for starting Project Euler, and its continuation, is to provide a platform for the inquiring mind to delve into unfamiliar areas and learn new concepts in a fun and recreational context.
I've just discovered that website myself and haven't looked at any of the puzzles yet, but it does sound interesting.
Project Euler is a very cool site. Its language agnostic, you can even solve the problems with a pen and paper (if you're a glutton for punishment). When I am starting to pick up a new programming language, one exercise I like to do is run through a few P.E. problems in the language. It helps me feel my way around the new syntax while still allowing me to feel like I'm doing something worthwhile. Actually, I've done the first 30 problems (mostly in Haskell and Scala, with 3 or 4 done in Java) and I'm currently stuck trying to figure out an algorithm for 31. I may just skip it and move on.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
I have solved the first 33, plus #67 (it's trivial if you've done #18 'correctly' - I didn't have to change a thing in my program, i just passed a new file name as a parameter).
I'm working on #34. What's interesting is that right now, my program finds exactly ONE Factorion (note - link gives you the final answer if you read enough). For some reason, my code fails to find the second (i'm not counting 1 or 2, since the direction explicitly exclude them).
I am really enjoying this. Even though I've worked with java for about 7 years, I'm learning a lot going through these.
I'm tempted to try them in Haskell, but I also would like to finish them through once in a single language, else i never will.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
that's one of those facts i knew at one point, but forgot.
What's nice about a lot of these problems is you can use some of your code over again. My next problem asks about all primes below 1,000,000. One of the earlier problems asked about all primes below 2,000,000. should be simple(r).