The google codejam occurs about once a year ( http://code.google.com/codejam ). If you make it past the qualification round and the first round, and you place in the top 500 of the second round, then you get a codejam tshirt. (This year, I placed around 1300, which is good, but not good enough!)
Getting that tshirt is my goal - a nice, tangible way to symbolize the massive amount of algorithmic things that I'm attempting to learn. A year ago, I couldn't solve a single problem in round 2.
Practicing for this sort of thing is a lot of fun. Programming competitions offer bite-sized questions to think about, and I believe that solving these types of questions really helps my coding style. If you don't write the best, most straightforward program to solve the problem, then you're going to run into costly bugs.
I'm interested in this sort of competition, but honestly, I don't know enough to even begin. What do you recommend to someone who'd like to learn enough to participate in these competitions?
Hey, cool. I know just how to answer this question.
The absolute best resource for competitions - well, that I've found so far - is a little website called train.usaco.org . It gives you a ton of practice, starting out easy and growing slowly more difficult, but it always helps you along the way. It's for high school students, but don't let that trick you into thinking it's easy. It's preparation for the IOI, probably one of the hardest coding competitions in the world.
The websites topcoder.com and codeforces.com host weekly programming competitions. These are great practice as well to see how you stand and where you can improve. I signed up for both and added them to my calendar.
Topcoder also has a wealth of old problems - somewthing on the order of a few thousand. These are great for speed trials. Plus, you can check other coder's solutions to see how they solved certain things. One of the best ways to learn new tactics is to browse through the code of people who solved a problem faster than you. I've picked up some amazing tricks this way.
The uva online judge and sphere online judge have literally thousands of problems to solve. I can't say as much about them, since I haven't really delved too deeply into the problemsets on those websites yet - I've mostly stuck to usaco for now.
You'll come to value a straightforward approach over using language tricks, especially things that you don't fully understand. If you don't know exactly what your code is doing, debugging (and you will debug it if you don't understand it) becomes a nightmare.
I would recommend learning C++. As much as HN tirades against it, it's definitely the fastest language, and it's really not all that bad once you know your way around. Codeforces allows for python, but I've had problems with solutions that take too long sometimes :(
Email me at johnfn at gee mail dot com. I'm always looking for people to compete with, and I would be glad to provide hints and tricks if you run into problems :)
Getting that tshirt is my goal - a nice, tangible way to symbolize the massive amount of algorithmic things that I'm attempting to learn. A year ago, I couldn't solve a single problem in round 2.
Practicing for this sort of thing is a lot of fun. Programming competitions offer bite-sized questions to think about, and I believe that solving these types of questions really helps my coding style. If you don't write the best, most straightforward program to solve the problem, then you're going to run into costly bugs.