Competing to get better

I am always on the lookout for ways to enhance my proficiency with programming. In the last months I have come to agree with the common saying that, with programming languages, you only learn by doing.

One aspect of my training which I am focusing on at the moment is algorithm design. My training uses several resources that I wanted to briefly discuss, and I wanted to organize my thought about the way of my doing this.

TopCoder

One of the most popular places where programmers compete is surely TopCoder. Competitions involve solving 3 problems of increasing difficulty in 75 minutes. The computation of the final score is a complicated function of the time you spent to write a solution, and of the time taken by the other competitors. The participants are divided into 2 major divisions (division 1 being the harder one), and they are assigned to either according to their current ranking. Inside each division, people are further divided into rooms of 20 people (I might be imprecise on the numbers, but those are the orders of magnitude).

While this might not make you a better software developer, since it does not test your communication skills, and your ability to dive into large code bases and make meaningful and clear changes, it certainly helps to keep the mind sharp and to easily recognize an algorithmic problem when you see on. This is an especially handy skill for technical interviews at your favorite companies.

In the past months, I have started competing, and I am performing quite poorly, as you can see here; but I am getting better (even though the graph of my performance seems to confute my statement), and I am having a reality check of my ability as a problem solver.

Similar websites

There are two websites I want to try in the next days. CoderForces provides a setting similar to TopCoder, while SPOJ seems to make without the time limit constraint.

HackerRank and USACO

HackerRank is a nice idea. It still contains contests, but the practice area is quite welcoming, and the problems are nicely divided into areas, that makes finding them a breeze. In TopCoder the problems are tagged, but not in the Arena (the Java applet used to connect to the servers for the competitions), so you might be forced to wade through the website to find them. I am currently participating to the Weekly Challenges - Week 2, which consists in giving one problem per day, from Monday to Friday, from easiest to hardest. Its tough to juggle through the week and carve out the time to always be there, but that’s part of the fun!

Also on HackerRank, I go by the nickname sturmer.

Somehow similarly to HackerRank, USACO provides, among its training resources, a guided path to practice to become a top competitor in the American Computing Olympiads. They may be aimed at high school students, but the consistency of the explanations and the guided advancement through the problems proves to be a great tool for honing one’s skills in problem solving and gives a sense of accomplishment that might be lacking in more aggressive websites like TopCoder.

Conclusions

No code for this blog post. I have been spending a lot of time in competitive programming, and I feel that my algorithm design skills are constantly improving. I will probably discuss some of the interesting problems in the posts to come.