Makers Academy: Games Week

Three weeks down, nine to got. It feels like I’ve been here much longer. Monday, after refusing the politics of picking teams, we were split into random groups. The project was to write the classes necessary to play battleships. Working in groups of 4 half the challenge was to work out how to organise ourselves. Our group started coding as two pairs. This allowed us to use the magic of Git to work on completely separate aspects of the problem. However with the our coding skills still in their infancy very quickly we were stumped on all aspects. It did not take long for all four of us to migrate around one screen and solve the problem together. Although this method was slow it was steady and completed the task, uploading our code to a server and playing several rounds. My fleet was repeatedly sunk. As fun as the task was it still amazes me how much we do not know. The server running the game is still a mysterious black box provided by someone else.

This week was the last focused on ruby. To round off we covered Procs/lambda’s which seam remarkably similar. They are! We also were introduced to recursion which is an interesting topic and powerful technique. It is common to many languages, far more universal than many constructs in ruby. Recursion I find really satisfying when I manage to get it to work, although I struggle to explain why it is so satisfying. I think its something to do with the ability to go repeatedly go through an algorithm without counting as such.

RubyGems and Bundler round off our whirlwind introduction to Ruby . They are tools for sharing ruby code. Like all genius ideas they make is so easy you quickly forget just how good they are.

Well one game was never going to be enough to make games week so we were also tasked with writing a Sudoku solver. To a computer this breaks neatly into two classes of problems. Those you can solve without guessing (easy) and those that require a guess (hard). The easy one was not that easy but I got through it after the best part of a days work. The ‘hard’ one is misnamed, devilish, infuriating or some such would be better. It took most of the week are several screens of scrolling numbers to master this one. I also came across some wonderful websites giving all sorts of Sudoku knowledge I never realised I needed. Here is quite an interesting page on minimum Sudoku.

As always I round off with the most interesting links I have discovered over the course of the week. So first is to a very useful cheat-sheet for Rspec. I am frantically writing test code but when I’m trying to get something finished it still feels like adding a test suit turns solving one problem into solving two problems.

Staying with Test Driven Development (TDD) these two blog posts were sent around in a discussion on London Software Craftsmanship Community. They definitely provided food for thought. I think they give a good overview of what might be on the road ahead as we try and get proficient at testing.

  1. TestDouble
  2. 8th Light

Coming to Makers I had set myself the challenge of committing to github everyday. This Saturday I forgot and broke my run after 30days. Originally disappointed it is actually a great relief not to be pressuring myself all the time. 30 was very helpful in developing a habit and certainly honed my understanding of Git. I would recommend this kind of challenge to anyone.After wondering what was the longest streak on github I found this blog post on the subject.