The Minisculus Challenge – Winner Announced!

On Friday 7th October, at Software Craftsmanship 2010, eden announced Minisculus – a series of encoding, decoding and code breaking challenges, loosely based on the historic challenges faced during the second world war.

Minisculus SpyMinisculus was set by Steve and Todd. I took the challenge in the week before SC2010 and really enjoyed it. There is enormous satisfaction in figuring out the answer, posting it to the server, and if you got it right, receiving the secret URL to the next question. The progression of the challenge provides new insights and plenty of opportunities for refactoring to keep your code clean and simple.

We ran Minisculus as a competition for a £100 Amazon voucher. We had 12 entries; most written in Ruby, but also including solutions in Java, Clojure, PHP and Python. It is fascinating to see the different ways that people implemented their solutions.

Luke RedpathOur winner is Luke Redpath, who is a freelance Ruby and iPhone developer in London. Luke wrote the solution in Ruby, nicely specified using RSpec. The code is particularly clean, easy to read, well refactored to be very simple. Luke has good use of object orientation, using a ShiftCypher that can accept any number of wheels, which have their own configurations for encoding and decoding, a great example of the Strategy Pattern. Luke also included a code breaker using keyword matching, and automated the communication with the Minisculus server to send answers and receive the next question.

Luke’s was also one of the first entries we received, and a nice little touch helped seal it for Luke: the inclusion of a MarkIII machine that raises an exception when called: “Not Implemented due to budget overruns!” – a joke that shows the attention paid to the story told by the challenge. Have a look at Luke’s code at github.com/lukeredpath/minisculus.

You can see a Hall of Fame on the Minisculus website, showing everybody who completed the challenge, including source code for many of the entries.

Although the competition is now over, the challenge remains for anyone who wants to try it! Thanks to everyone for participating so far!

minisculus.edendevelopment.co.uk

Advertisements

Presentation of my apprenticeship task

Here is a presentation i made to some of my colleagues on friday explaining my first apprenticeship task, my wiki, how i went about it, the problems i encountered and what i learnt from the whole experience.

See my Apprenticeship task presentation on youtube.

Design Patterns study group

A new thing at Eden is we have started a study group and we are currently studying the Gang of Four Design Patterns book. I’ve read this before but i’ve not studied it. I guess i got an overview and thought to myself, “Well, i know where to look if i ever want to look up a pattern …” – Have i ever looked up a pattern since? No! ;)

So i’m really glad to be studying it this time and really getting to know the patterns properly so that i can use them readily whenever appropriate. It’s good to have the opportunity to discuss one pattern at a time in a group. Here’s a photo from the first study group last week:

Design Patterns Study Group

As part of my studying, i am implementing examples of the patterns in Ruby. Last week i coded the Factory Method example. It’s funny how i can skim over the code in the book and convince myself that i understand it, but coming to implement it for myself in a different language was a challenge. One that i thoroughly enjoyed, i have to say! :) I’m happy to say that i now fully understand the factory method!

I’ve also been writing tests to ensure the code works as i expect. This has been useful because i’ve learned about Test::Unit which was previously unknown to me. When i joined Eden i learned RSpec and Cucumber (or story_runner or whatever it was called back then). Other than that i’d never tested Ruby before.

This week i have been implementing sorting algorithms as strategies. I wasn’t too impressed with the code examples in the book for the Strategy pattern, largely because they left out all the code that actually differs between the strategies! So i decided to make up my own example. It has been good to refresh my memory on sorting algorithms at the same time as clarifying how the Strategy pattern works.

You can follow along with my workings on sermoa/ruby_design_patterns.