This year, I didn’t get Kanzu Code’s core team from last year together in time so I joined a former colleague’s team. We’ve worked together before in MTN Uganda on some amazing things so it felt like the good old days putting our heads together to battle yet another real world problem.
- Get into the Algorithm & data structures groove. If possible, get a couple of buddies and meet regularly to hash through some difficult problems. The accountability will help in making sure you find a way to put some time into your preparation
Just before the competition
- Write out the code that’s going to receive the input data. The input format is usually files who’s content you need to manipulate a bit into meaningful variables. Go through past problems and prepare this logic accordingly. The only goal is that your algorithm is optimum so debugging code that’s only doing the input is a waste of precious time. It is key to mention here that there’s been a change in the way input data is provided by Google in Google Code Jam, a separate competition they run. I suspect they’ll make a similar change to Google Hash Code next year, eliminating the need for this input code altogether
- Create a repo for this code and make sure all of you on the team have access to it and have your development environments set up
- Get a whiteboard or huge sheets of paper. They help in visualizing while discussing the problem
- [Nice Bonus] If you have access to a huge screen, get one and hook it up to a machine of someone on the team. It helps when you start discussing & debugging the code jointly
- Watch the opening ceremony intently not because you’ll get tips but because it is an intense competition. Do everything with intensity. If you break for a snack, eat with intensity too.
- Read the problem separately as soon as it is released (15 minutes)
- Discuss it together to ensure you’ve all captured all aspects of it (10 minutes)
- Discuss your algorithm. At the very least, get the greedy approach (15 minutes – 45 minutes)
- Split now. Let the designated coder start testing your code against the data and writing out the initial implementation as the rest look to refine it further
- Another person can also split off and start coding another solution too
- It is very key to submit a working algorithm early. It might take a bit of debugging to get there so do it early. There’s also something that seeing those initial scores does for your morale so get something in early.
- Split or continue discussing on the board as appropriate to your scenario to optimize your algorithm further
- Towards the end, you should all be submitting solutions. Scores are given for the best solution on your team so create separate branches, discuss, optimize, make changes, build and submit. Repeat.