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 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.
Our 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!