Coding

Google Code Jam 2004, The Middle

Published · 2min

Coding’s finished, and I’m not happy with myself.

I was in group 8 and only got one of the problems done. I spent about 30 minutes staring at the problem, trying to understand what they were asking, but for some reason my brain failed to comprehend anything.

Queue 15 minutes, feverishly beavering away at code. I forgot that the Java compiler on the other end was Java 1.4, so I didn’t realise there was a split() method on the String class, so I had to go splitting strings myself (why oh why couldn’t they just have passed in a two dimensional array of integers).

Then I’d 15minutes left for the last problems, which was calculating optimal gear ratios. I’d not a clue how to do it in time, but I tried and the bloody thing timed out.

I’m going to console myself by blowing virtual people up in a video game now.

The worst thing about it is that I know I’m capable of doing far better. I guess this is just an excuse to enter more of these kind of things like I used to when I was in secondary school. I need the practice.

On the bright side, there are guys there who knocked together lumps of code in ridiculously short amounts of time and have high scores right now. I’m hoping for a bit of schadenfreude from that where their code falls over in the automated testing later and they have to forego their points. My code, on the other hand, is rock solid.