Monday, April 7, 2014

Google Code Jam - Learn to be a better programmer

In three days Google Code Jam starts! It's an annual programming contest held by Google, started in 2008. It serves them as a means of finding new talents to hire. For most, however, it's a great occasion to test their algorithmical skills and have some fun with other geeks. I've already signed up. Have you?

If you're still undecided or you just think that the knowledge of algorithms is not important, you should definitely give the subject a closer look. After all, a company such as Google rarely takes ill-conceived decisions, and they find new workers based on their ability to understand, analyze and design algorithms. In my opinion, being familiar with at least the basics in this subject distinguishes professional programmers from self-taught hacker wannabies (and I don't mean that it's bad to learn how to code at home). Other than that, it opens your mind on the world of deep understanding why some libraries have been designed in a particular way and which data structure you should use in your app. Finally, it is fun (at least for me and for a bunch of other people) and gives extreme satisfaction whenever you find a solution to a unique problem.

Anyway, I'm not here to try to convince you that learning algorithms is useful. I want to give you some resources that you can use to practice and learn. I'm pretty sure you'll find them quite interesting.

First of all, you should take a look at the Google Code Jam's practice section. There you can find all the problems from previous contests and you can try to submit your own solutions. You can also read the analysis of each problem, which is a great way to learn, when you're not able to solve something yourself.

The biggest site I know is Timus. It's run by Russians and it contains more than a thousand problems. They can be grouped by type, difficulty, or just by their adding date. Oh, and they're still adding new ones. You submit your code and it runs on the server against multiple test inputs. If it's fast enough, doesn't use too much memory, and, what is probably the most important, produces correct answers, you get an "Accepted" result. Easy enough? Perhaps with the easiest problems. Then they become much more challenging...

Other interesting site that has consumed loads of my time and has given me sleepless nights is Projec Euler. It's different from Timus, because it offers problems that are more mathematical in nature. They don't expect you to upload your code - an answer is good enough. This way, you can use whatever programming language you want or such software as Excel, Mathematica or Matlab. Sometimes a pencil and a piece of paper is enough. After you've solved a problem, you can see other people's solutions, which might be quite surprising and inspiring... and you see how they code and structure their programs, which is very educative as well.

Lastly, I would like to tell you about a site I was using during my university years - Usaco. Their training section was great, because it gave you hints if you had a hard time solving a problem and it showed to you the exact test case your program was failing to cope with. This way it was much harder to get stuck. They had a nice system, in which you had to solve all the problems from a section to be able to get to the next one. Each section gave you slightly more difficult problems as well as a theoretical introduction of a new algorithmical technique. I have to say that I haven't used this site for a long time, and I can't even remember my password, but I'll try to recover it in one way or another, because I used to like it a lot.

I hope you agree with me on the importance of algorithms now and that you'll choose a training site for yourself (if you aren't using one already). Who knows, maybe Google is going to contact you as well. I've had recruiters contacting me based on my good ranking on such sites, so it's not just an urban legend. I even put some information about them in my CV. It's always nice to find out that your interviewer uses the same site that you do... and even nicer to see that he's lower in the ranking than you ;)

If you use any other interesting sites, please let me know. See you on the Google Code Jam eliminations this weekend and feel free to brag in the comments section if you do particularly well.

No comments:

Post a Comment