I’m blogging after a long time today. Actually, life hasn’t been anything out of the ordinary for me,to write something about it(at least apart from the personal things in life, which I wouldn’t like to share). The annual Google coding competition, Google Code Jam , took place last week and I had planned on participating, for the first time. So this post is going to be a gist of the significant events, since I started coding up to this point.
So, let me first explain what exactly Code Jam is all about. According to wiki,
Google Code Jam is an international programming competition hosted and administered by Google. The competition began in 2003 as a means to identify top engineering talent for potential employment at Google. The competition consists of a set of algorithmic problems which must be solved in a fixed amount of time.
Who’s eligible?
This Contest is open to individuals who are 18 years of age or older as of August 8, 2013.
Which means, I just fit in. Now, lets examine the actual details of the contest.
Code Jam is divided into different rounds, and in each round there are eliminations, based on your rank and/or the points you’ve scored. The round which took place last week, was the Qualification Round. This round consisted of a set of 4 problems, each of which had 2/3 data sets(think of a problem with partial marking, the small dataset is an easier subset of the main problem and the big dataset is a harder subset). The small dataset gave you 10 points for a correct submission, while the large one gave you 35/45/60 points, based on the problem you’re solving. The round was on for 24 hours. A score of 35+ is needed to qualify for the next round. There are a total of about 4 rounds(the next one is the first round, this was kinda the 0th round) and if you achieve a rank < 1000, in the 2nd round,you get a t-shirt from Google and some bigger prizes depending on your rank. The top rankers get huge cash prizes(1st rank = 15000 $)
Since this was my first ever serious coding competition, the goal I had in mind, was to try my best to score more than 35 points, which means solve 2-3 problems correctly. I’d solved a couple of past year problems before, and they seemed quite hard for a beginner ,especially when it has been less than a year since you wrote a C program for “Hello World!”.
The contest was to begin at 4:30 am IST. I was up at 3:30 in the morning(I slept at 8 the previous night
), because I had my college physics prelim exam at 10:30 am, and I hadn’t even searched for my text book yet. So after brushing ,while sipping coffee I decided to check my mobile for any impending notifications. And there it was, a mail from Google, received the previous night :
Hello Nishad94,
We hope you’re ready: the Qualification Round for Google Code Jam 2013 starts in under 24 hours.
And that pretty much was the end of my search for the Physics text book, and my earlier purpose of studying for my exams. I immediately switched on my laptop, and headed straight to the website. So I was solving my first problem by 5 am. And I was getting it. That was a huge morale boost. In about 45 minutes , I’d coded the solution, and I submitted it to the Google server. And there was the response, in green, Correct! I’d gained the first 10 points. And the thing is , there are real time stats on the screen(Observe the left most panel in the screenshot below). So my rank, which was 16k(the competition had just started, so only a few people were in at 5am,overall there were 45k competitors this year) suddenly rose to 8k. My morale went up like crazy.
By 9 am, I’d abandoned the thought of getting up from my PC, let alone going to college and giving the exam
(I don’t really care about my University results) . By 10:30 , I’d scored 40 points, and I’d qualified
. Yet, I wanted to see the best I can do, so I continued till late evening. Yeah, evening. The last problem was really hard, and only 329 contestants had got it right. I wanted to crack it. But , I couldn’t. So , having exhausted my mind out of its limits, I stopped with a final score of 85. But I later found out, my 35 point solution to a problem, was slightly wrong. So in the end, the next day , my final score was 50 points, and my rank was 12142. Had my score been 85, my rank would have been < 6000. Nonetheless, I was really happy.
Lets look at the contest analysis by Google for GCJ ’13 :
Google Code Jam 2013 is off and running! We have 17059 advancers out of 21962 people who correctly solved at least one input, and 45754 registrants. All those numbers are records for us!
We started with Tomek’s variation on a game for children , and then quickly delved into the riddles of lawnmowers, palindromes, and pirates. Overall, it was a pretty tough set this year, with problem D in particular being something that could have been a Finals problem.
It was tougher than before, and I’d managed to get through
. Here at some interesting region wise statistics: (figures to the right indicate total participants, and the left indicate the people who qualified):
USA 2057 2093 CHINA 2100 2386 INDIA 2943 4109
These were the top 3 countries in terms of number of people who participated. And my India rank is around 1732 . And the people I know who’ve qualified are a year elder to me. Knowing that you’re better than most of your peers in such a short span of time, does give you quite an emotional high
. So overall, GCJ was great, and I exceeded my expectations. The next round is in 10 days, and its going to be of 2 hours and 30 minutes. And its going to be real hard, as hard as the last problem in the qualifiers.
After this nice result, I have been really motivated to practice harder and much more seriously. Let me tell you the story till now:
I’ve always been passionate about computers and mathematics. That is the reason I’m doing engineering. I had dreams of getting into IIIT Hyderabad, last year. I’m in PICT. Needless to say, I screwed up bad in the competitive exams. Thing is I can go on for hours doing a thing I’m interested in, but I just cannot spend even an hour’s worth of time on something I’m utterly uninterested in. And morally I justify that point in my mind, so I can’t even get myself to do things that are easily achievable and which have a huge benefit in certain situations. Last year, that was chemistry. It is the reason for the whole screw up. Anyway, I’m not going to rant more about it, as doing that won’t change things. So , if we subtract the average time a student spends on chemistry from his total schedule, we get quite a few hours. I had quite a lot of such hours, which I spent doing mathematics. So, I have a pretty good base in math. And, its safe to say , I’m comfortable and confident with it. Its been my favorite subject since chuldhood. Thus , when I entered my engineering course less than a year back, I knew I could handle the mathematics part of computer science well. And , from what I know, most of CS is based on mathematics. Its very math intense. I have been an active member IEEE member in my college, and have attended loads of seminars, workshops,etc and all of this introduced me to programming. Thus , I immediately began coding, in the 2nd or 3rd week of college. It started with a basic book on C , getting acquainted with the basics of the language. I really liked the problem assignments in the book . And PICT, being a computer institute, had a lot of people who were interested in programming. So there was a lot of discussion, and the motivation and passion to code kept on increasing. After getting comfortable with the basics, after two or three weeks, I parallely started solving problems from Codechef. Its an Indian competitive programming website, with monthly contests.( I recommend anyone who’s interested, to register there and solve those problems) .
Programming resonates perfectly with my interest of mathematics. All that I needed to know, was whether I can code well. Whether I can get as good at it as I’m comfortable with mathematics. And now, I can finally say, yeah I can code at that level. I’m quite at comfort with it. Now, I need to get perfect at it. What I take an hour to code right now, must happen in under 10 minutes. I need to express code as good as I express English. At the same time, I need to learn a hell lot of mathematics . By mathematics, I mean algorithms. You need to have them at the back of your mind. I should be able to code a quick sort or a merge sort in no time at all, without giving it too much of thought. And this will all take loads of hours of practice. A single algorithm, could take hours to digest. A hard problem, usually requires more than an hour to get right. It can even take 5 or 6 hours. (Which means, I lose out on my college grades. But then, gladly it doesn’t matter to me. Maybe , most people judge you on the basis of your marks, but do you really need to care about the opinion of others?) But the great thing is , I love doing it. Which means, I wont ever get tired and frustrated about it. So obviously, the next thing I have in mind, is to score big in the next ACM-ICPC , that’s the IIT-JEE-equivalent of the programming world . I have a year’s time to do that. Hopefully, I’ll be good at it. Oh, and one more added benefit, and this one is huge, software biggies like Google, Facebook are always on the lookout for this specific set of people. Google specifically started this competition, to hire top talent. (same with Facebook Hacker Cup,another similar competition with the same motive)Thats the big thing , you code for passion, and getting a job out of it would be a by-product of it. It should not be the other way round. Getting a high pay should not be the very reason you code, it won’t get you too far without frustrating the hell out of you.
Plus, if you’re doing this, the courses in college won’t seem boring and/or hard. You’ll actually be applying practically what you learn. So if you’re passionate about it, and at the time of reading this, you haven’t yet started coding seriously, what are you waiting for? Start now.
Here are a few resources for those who are interested:
Codechef : A good place to practice problems, and compete in contests.
USACO Training Pages: Detailed structured course for training student for the International Informatics Olympiad. I just started it , and it seems pretty good.
Coursera : Loads of courses you can enroll in.


