We improve ourselves by victories over ourselves. There must be contest, and we must win.
Have you ever competed in a programming contest? If not, you must have deliberately rejected the opportunity, because there is an amazing number and variety of competitions for programmersmore, it seems, than for just about any other (nonsports) professional.
If you haven't competed, you may not be aware that it's possible to make a six-figure income purely from contestsor that there are companies whose entire business model consists of running programming contests as the sole means of producing commercial software. There's a whole subculture of competitive software development within the industry, and it has many parallels with professional sports. (Except that nobody in competitive programming is talking about banning the use of performance-enhancing caffeinated beverages.)
This is not to suggest that programming contests are all just for pros: There are also contests specifically intended for college programmers and for high school students. The ACM International Collegiate Programming Contest is in its 32nd (!) year and just finished its World Finals in Banff, Alberta.
There are, in fact, all kinds of contests: regional and national and international contests, contests where you may compete in teams, contests where team programming is a requirement, and contests for solitary coders. There are 90-minute or five-hour dashes, 24-hour codeathons, month-long competitions, and continuous contests.
The rules and problems differ greatly, but the BME International 24-hour Programming Contest, put on by the Electrical Engineering Students' Hungarian Association and the Karoly Simonyi College for Advanced Studies, can serve as an example of one kind of contest. This event winnows out hundreds of participants from dozens of countries in an online challenge, reducing the field to 27 competitors (plus the three best from the previous year) who make their way to Budapest, where they spend 24 hours from 9:00am to 9:00am coding for glory and 5000 euros in prizes. There's even a book about the contest, including the problem sets from the first five years. The problem sets are definitely challenging: One year the teams had to design an integrated circuit chip design program and also create an AI agent that can play a simple strategy game against another AI agent. Other challenges involve controlling robots, managing virtual worlds, and cryptography. This year, the onsite competition took place May 2-4.
Often the choice of language is up to you, but not always. Pick a platform or a language and there's a contest for users of that platform or language: Java, C++, Ruby, Haskell, Mathematica. For a few years there was a competition for Eiffel programmers called the Eiffel Class Struggle, but I think that's over. You can compete to solve multicore or mobile problems, artificial life or fractal coding or robotics challenges, or participate in a Super Mario contest. I'm not sure what that last one is.
If you feel like brushing the cobwebs off your Apple II chops, you can easily find an Apple II competition. If you get bit by that "running light without overbyte" bug, there's a contest in which your entry must solve a set problem in no more than 1K of 6502 code. And 4K of Java. Dr. Dobb's has put on a variety of programming contests over the years: Currently, the Dr. Dobb's Challenge has a prize pool of $10,000.
Some contests are just not all that seriouslike the International Obfuscated C Code Contest. The fact that the rules contain deliberate typos tells you a lot about that competition, which was jointly inspired by the Bulwer-Lytton fiction contest and some execrable examples of C code.
Then there's OMGWTF, the "Olympiad of Misguided Geeks at Worse Than Failure Programming Contest," where the goal is to solve a simple problem in the most obscenely convoluted way possible.
More seriously, there's the Loebner Prize competition. Win the ultimate challenge there and you'll get $100,000, a gold medal, and considerable famebecause the ultimate challenge-winning code merely has to pass the Turing Test. Programmers Heaven holds weekly contests. In short, there is no lack of opportunities to test or flaunt your programming skills.