September 13, 2009

Google Code Jam 2009 experience

   I participated in Google code Jam 2009 and tried to solve such problems for the first time in my life. As expected I could go only till Round 1 but it has been a great experience to participate in this event.

   It was amazing to see people solving the problems within few minutes which I had no idea where and how to start. I was particularly impressed by "ACRush" (Winner of Google Code Jam 2008) - before I could even understand the "The next number" problem in Round 1B he submitted the solution for it in 6 mins.  Google has again amazed me by providing such a platform for people to compete. The best part of it was making the solution submitted by all users available for download once the competition is over.  

   Having considerable professional experience in IT, I was hoping to fair better. But while attending the contest I felt that it had its own deterring factors. I was trying to visualize everything as Java objects and wasting time in modularizing code and naming it properly. Also having no exposure to such problems took its toll while racing against time. When I looked at the solutions from other users, most of them have used multi-dimensional arrays to solve the problems. Apart from my college days, I had almost never used multi-dimensional arrays in any of the professional projects. "Complex business logic" would typically involve complex queries and triggering different actions when an event occurs. We don't write algorithms or solve problems like these in a typical web application. Also maintaining state in multi-dimensional arrays is more prone to defect which would explain my lack of exposure to it.

  Another interesting thing about Google Code Jam is the competition statistics - by Country and Programming language. I was surprised to find that only 1220 contestants from India competed in the qualifiers second to China which had 1324 contestants. But in round one, only 6 from India had the "Perfect Score". I assume most of the university students are not aware of this competition. Google should promote this event better as it is a great platform for students to compete against the world's top coders.
Programming language: Java - 499 people but C++ - 1200 people. C++ has comfortably outnumbered Java as the preferred programming language in the code jam competition. Not happy to see this as a java developer :)  

I would never miss Google Code Jam competition again. I hope that I would fair better in 2010 competition. Congratulations to all the participants of the code jam and thanks to Google for providing this opportunity. Keep going.