Monday, September 26, 2011

Chicken Scheme on OS X 10.7 (Lion)

I'm making another attempt at going through SICP doing all of the exercises. I've decided that chicken scheme is going to be the way I will do it. But to get it going on Lion there are some hoops to jump through thanks largely to a new version of gcc.

The method I have found that works is.

1) Download the source from the chicken scheme website.

2) Following the advice here you should pass new compiler options to make:
make C_COMPILER=gcc-4.2 PLATFORM=macosx

3) To install the additional eggs you will need to pass new options to csc like so:
CSC_OPTIONS='-cc gcc-4.2' chicken-install

Sunday, September 25, 2011

Software Craftsmanship & The Second Chasm

I've just been reading William Pietri's post Agile's second chasm in which he discusses why ideas, such as agile get watered down as they get taken up by the mainstream. I think there's some stuff hear that applies to the craftsmanship movement. You could probably argue whether or not the craftsmanship movement has passed the first chasm yet, But for the moment lets suppose that it has. What are the chances that we might fall into the second one that William describes in his post?

A Common theme

First off, both ideas have a manifesto - this in itself isn't a bad thing, manifestos are great at getting like minded people talking. The problem is it allows people to 'sign up' to an idea that they have no intention of fulfilling. I've seen CVs that boast about being signatories of the agile manifesto, but have never been part of an agile team. I've been invited to "daily scrum" meetings that were 2-hour-sit-down-and-go-through-spreadsheets-and-gantt-charts meetings. It seems to me that Craftsmanship also has the same "difficult to test" quality to it. Craftsmanship isn't so much a title - as a way of doing things. So you won't really know if someone is a craftsman unless you watch them doing their job over time. I wonder how long it is before I see a CV with a "Software Craftsman" certification, but is willing to implement a mess in order to meet a schedule?

A Difference

The way I see it, there is one important difference with the craftsmanship movement. Its focus is on individuals and their interactions, not teams. Ok, I know words like 'partnership' and 'community' are used in the manifesto, But the point is that it's up to the individual to better themselves and the code they work on, productive customer partnerships are something the individual should seek because it helps them better understand what it is they are being asked to do. The community is all about individuals meeting other individuals to help themselves improve. So how do I think this helps? Because it operates at a completely different level.

Agile has continuous improvement built into it, and of course, if you're doing it properly you will always change and adapt. But it has a core set of practices that are easy to get started with that allow you to call yourself an agile team. But Craftsmanship doesn't have this (at the moment). Try to do a quick google search for what software craftsmanship is, and you'll struggle for a firm definition. The best I've found so far is Uncle Bob's but even that doesn't have any specifics. Really, the only idea behind software craftsmanship is: "We will write the best code we can by constantly reviewing how to write the best code we can". It's a continuous learning process (one that is built into the medical profession by law). Continuous improvement on a personal level is not something that's so easy to fake

Wednesday, September 14, 2011

Python Shelving

I discovered the cool shelve module earlier. Sometimes it's nice to be able to store python objects using the pickle module. The shelve module builds on this by providing a dictionary that you can put objects into and access later. Check out this gist

Tuesday, September 13, 2011

Dojos and Katas

I recently got back from a very successful Socrates 2011 (Software craftsmanship and testing camp) where I spent just over 2 days hanging around with a bunch of smart people and spent the whole time either writing code, or talking about code. I was involved in a lot of discussions about software craftsmanship as well as a few coding dojos. Dojos and Katas were always something I've done when I've felt like it, but never as part of a habit. Following the conference I started using Stefan Roock's great site codersdojo. It allows you to work on a kata, and upload it to the site when you're done. It provides statistics about how long each step took as well as when the tests were passing or failing: Thanks to Stefan for a great site and helping me add Haskell Support! Take a look at my haskell fizzbuzz kata below and please checkout Stefan's site.