Showing posts with label competition. Show all posts
Showing posts with label competition. Show all posts

Friday, 31 December 2010

On being outclassed

I got a kick out of solving puzzles. The feeling of churning (rusty) gears in my head is a great feeling - and many times unstoppable. That's why I could, after a nice lunch in our Common Room, go on with various Sudoku versions for ages. But as I find many games boring after a while, programming never really got to that point so far. That's why programming + puzzles is such a tempting combination for me.

Not that I'm really good at it, au contraire. All I said is I enjoy them. The place which grew synonymous to programming puzzles for me is TopCoder, a site with regular "single round matches" or SRMs, which are basically frantic 75 minutes coding fests, for score and glory. And learning. I'm on TopCoder since 2003, but only took part in a handful of SRMs, about one a year, while they are held almost every week. The schedule of the one this week was kind to my timezone, 10am is good to do anything that requires great deal of thinking. It was really fun, and while I haven't got a great score, I got some (unlike in the last few matches :P ) and it was interesting to see the differences between good and great coders.



The ranking system divides people into two divisions based on their scores. In every SRM there are three problems, in increasing difficulty, Level One, Two and Three. Divison Two's Level Two and Three problems are the same as Division One's Level One and Two, thus one can see how people in the different division solve the same question. Oh, because you can see, check and challenge every submitted code.

This time I finished the easiest problem, but run out of time on the second one (see links to the problems and explanation in the SRM 492 Match analysis). So I was really curious how does the best solution (highest score) looks like in my division. It's two pages of code with multiple helper functions, global variables and the likes. Even the second and third were similar in essence.
Then I took a look at the best solution of the top people: about 3/4 of a page, single function, concise, organized.... And all that had to be written in a very short time to have such high score. (Could check some of this out from the SRM 492 Match statistics).

All this got me thinking, there has to be a qualitative difference between the good and great people, not just the "quantitative" difference in the score. To solve the problems you are given (in this competition, or any programming) most programmers who try hard enough would get somewhere. But what makes a person who can code so clearly? More practice? Or is it more like going from Siddhattha to Buddha, a transition that goes one way: you are either enlightened, or not, and if you are, you'll never look at the world the same way.

Thinking about it, this qualitative difference must be here present in many other things as well. Like all the "good" coffees that I drink to fuel the brain, but that cannot prepare me for the occasional find of "great" coffee. The two share almost only the name. Just like programmers: same title, different universe.

Probably I'll never get great, but I'll sure will try. And how? Practice and learn more from people ahead of me (not hard, on TopCoder I'm currently at the 13th percentile, such a crying shame:). There are other places as well to solve maybe different kind of problems Coderloop and Facebook engineering puzzles. But once, just once, I'd like to do the TopCoder Marathon Match. But that's for a different post.

Ps: the coffee example just popped up because I had a really great one yesterday. Almost 24h ago and I can still feel its effect.