Although late to the game, I'm in the process of working through the Software Underground's "Kata" challenges. These are a series of challenges in geocomputing to sharpen skills.
I have written mine in Python, but any language would do. I have made no special attempts to make things super-concise, as I generally lean towards readability. I've commented so it's possible to understand what I've done, but if there's any confusion, just ask!