Sunday, December 15, 2013

My First Ever Coderetreat

Yesterday I was fortunate enough to attend the Summerside 'instance' of the Global Day of Coderetreat (my first ever) and already I can't wait for the next one.

The day is very difficult to describe without sounding like a cultist, to be honest :) There's something very awesome about being able to slowly, precisely and correctly write code without having any pressure to just 'get it done'.

For those that aren't familiar with the process, ours went something like this: partner up, write some code for 45 minutes then delete it. Add a constraint and repeat. While the goal seems to be "implement Conway's Game of Life", the actual goal, in a way, is to never quite get there :)

For our particular retreat, we started with basically just trying to implement GoL correctly. This means using TDD properly, and slowly implementing the code bit by bit. My first round I got to do it in Java, which is always fun.

After deleting the code, we added the constraint of 'no conditionals'. This time my 'pair' wrote in PHP and surprisingly enough got to the exact some point in the code as the first round (which I found humourous).

After lunch, we added 'use no primitives' (and 'no PHP' :) ). This time my partner and I decided to use Ruby, which was fantastic as I am an absolute beginner, and my team mate was definitely not an expert. We got to spend some time learning RSpec (for testing Ruby code) and we spent a lot of time simply discussing what the constraint meant. It was definitely a difficult thing to wrap our heads around, but this was the point where I suddenly realised that some of our constraints are not necessarily possible with all of the languages that we choose to use. This was definitely a pivotal moment for me. To be honest, it had been brought to my attention at the end of the first constraint, but this time it was me making the realisation by myself :)

Delete. Break. Try again. This time using JS and 'only return self'. Delete. Break. Back to Java and 'no more than 4 lines per method, ping pong coding' (and maybe something else). By this time, for sure, I was completely beat. My brain stopped working around 2:30PM and so to be honest it's quite possible that the constraints I listed may be out of order, wrong, or incomplete. Also, by the end of the day (and quite naturally) we were getting less and less code done, but there was more and more conversation around how we would do the code.

While these constraints may seem random or simply designed to annoy, each session ended with some really good discussion as to how these constraints actually make our code more testable, easier to develop (with some practice!) and ultimately better.

Lately I have been reflecting on my time at university. "Youth is wasted on the young", they say, and I believe, sometimes, that "university is wasted on the uneducated". The more I have been able to think about what I learned there, it seems, the more it is that I'm relearning all of these lessons again.

And that's a good thing.

I've also been reminded that I need to extend my knowledge of languages again!

Thanks especially to the City of Summerside for giving us the venue (and gigabit internet to boot!) and all of the organisers (especially Steven Baker and Derek Campbell).

I can't wait for the next one!

1 comment:

  1. This function enhances an already unique experience of reside dealer video games. Furthermore, there are sorts of|several sorts of|various kinds of} machine classes in slot video games with every machine having its personal limit of most stake. The most prize money from these machines varies from country to country. But what makes these video games so engaging 바카라 사이트 is the themes they offer.

    ReplyDelete