Code Retreat in Winchester

All day today there was a Code Retreat at Eden Development. About 20 people came, from all over the country, and we spent an excellent Saturday pair programming together, sharing ideas, having stimulating conversations and getting to know each other much better.

At a code retreat everybody works on a single problem: Conway’s Game of Life. You pair with different people in each 45 minute session. You have to TDD the development, but you can use whichever programming language you choose as a pair. At the end of each session all the code must be deleted. You do a retrospective as a group, have a little break, then go and pair with somebody else.

We got through 6 sessions, which means i pair programmed with 6 people i didn’t know very well before today. It was great! The first two sessions i paired with Paul and then Quentin. To start with, we were pretty much feeling our way through the problem, implementing the rules of the game, and then getting stuck with determining the position of each cell.

In the third session i paired with Ben and we decided to try a completely different approach: dealing purely with coordinates to represent the positions of live cells. It actually worked quite nicely, although implementing the rule logic became quite difficult.

After lunch we were invited to try “TDD as if you mean it” which has very strict rules about where and when you should create your code, and when you can move it. It’s quite restricting the rules seemed to hold us back from getting very far. I was with Louis that time, who was very good at helping me to program in Java, which i’m not so familiar with.

At the 5th session we were allowed to just do whatever we want, so long as it was still test driven. I paired with Paweł and we just went a bit wild with linking cells to each other and getting them to link back respectively. We were going with North, South, East, West, but we eventually realised that you could really link any cell to any other, and the direction doesn’t matter. At that point it becomes more of a network problem. You could say that as a software coder i live or die depending on the community and people i know. That was an interesting insight.

In the final session I was with Clive and it turned out to be our best session of all. We were extremely controlled in our TDD, making sure we understood the code at each stage, and only taking small steps, and predicting at each test run whether it would pass or fail and what the failure message would be. We had cells that knew their positions, and could receive other cells and decide whether or not to attach to them as neighbours. Meaning we could pass every cell to every other cell and get them to connect based on their positions, then we could count how many neighbours they each have.

I mostly programmed in Ruby today, but there were people coding in Java, C++, C#, Python, and i think Scala, Clojure and PHP. We learnt a lot about how to program the game of life, and more importantly, how not to! A code retreat is a great opportunity to have fun, get to know other people, and code in an environment where it’s safe to try things out and make mistakes.

To find a code retreat near you, look on coderetreat.com or consider running your own!

Advertisements

Alphabetical Pagination, version 0.2.3

Thanks to a few people’s input we’ve got a few improvements and fixes to our alphabetical pagination plugin.

There is now a handy helper you can use for the pagination links:

<%= alphabetically_paginate(@pins) %>

At a request from our user experience guru, it lists all the letters of the alphabet and links the active letters. For example:

New alphabetical pagination helper

The best news is, the old way still works, so it’s backwards compatible. You don’t have to use the helper if you don’t want to.

The Wessex Wyvern as SVG

I needed to find a good quality image of a Wyvern, the symbol of Wessex, ancient kingdom of the West Saxons. The best i could find was the image on the Wessex Flag, below, but it is poor quality and can’t be scaled up. So i had to learn a bit about path tracing and scalable vector graphics.

Wessex Wyvern (low quality)

Wessex Flag by Chrys Fear, found at fotw.net/flags/gb-wessx.html

I used a combination of the free open source graphics tools GIMP, Inkscape and Potrace to trace the shape into vector format. Even at the same size, it’s already much better, saved here in PNG format:

Wessex Wyvern (higher quality)

The SVG is infinitely scalable and you can download it here: wessex-wyvern.svg

Here you can see the quality improvement:

Before and after - close up

Here is a close up of the eye, which took a bit of work to get the paths just right:

Close up of the Wyvern's eye

I needed the Wyvern to form part of the Bi Wessex flag. Here is what we are affectionately calling the Bivern!

The Bivern (Bi Wessex Wyvern)

The Bi Wessex flag is also available as SVG, should you want it: bi-wessex-flag.svg

If you need to improve the quality of an image, i hope you will feel encouraged that it is possible, with a little bit of effort and experimentation.