There’s something very fishy about the UK Agile Awards

Awards are a very interesting thing, especially the motivation for giving them. I’m particularly uneasy about the UK Agile Awards, which ran for the second time this year with the results being announced a few weeks ago. As far as I can tell pretty much all of this years winners have a relationship with one of the sponsors. Lets go through each of the winners and see:

 

Agile Project or Programme Manager of the Year: Chris Berridge

Works for Emergn, who were a sponsor.

Edit: Correction, Chris works for Maersk, who worked with Emergn, who were a sponsor.

Best Agile Project or Innovation: “Fixing the Flaws in Government IT” – The IfG Report 

IfG worked with Indigo Blue closely on the report, who were a sponsor.

Agile Consultancy of the Year: Indigo Blue

Who were a sponsor

Best Agile Team: The Guardian

Worked closely with Indigo Blue on their major redesign a year or so back, who were a sponsor.

Most Agile Aware Organisation: Simply Business

Not found a link, but not looked that hard. Anyone?

Edit: As per Paul’s comment below Simply Business are associated with Emergn, who were a sponsor

Most Engaged Management Team: IPC Media

A sponsor

Best Use of Agile in the Public Sector: DWP

Working closely with Emergn, who were a sponsor. I also find this one particularly irritating as they haven’t even delivered anything yet! As one of the principles of the Agile Manifesto states, “Working software is the primary measure of progress.”

Best Use of Agile in the Private Sector: BSkyB

Not found a link, but not looked that hard. Anyone?

Best Agile Coach/Mentor: Dot Tudor

Works for TCC, who were a sponsor.

Most Valuable Agile Player (UK)

Keith Richards, who was a sponsor.

 

I’ve no doubt that some of these organisations were approached after they were nominated, but looking at who the sponsors were for the previous year it’s mostly the same faces. Hmm.

Well… if it’s that easy then I hear by announce the Rob Bowley “Agile as Fuck” Award and the winner for 2011 is…

ME!

 

 

Estimation is at the root of most software project failures

Synopsis

I believe estimation, and the way it’s regularly misused, is at the root of the majority of software project failures. In this article I will try to explain why we’re so bad at it and also why, once you’ve fallen into the trap of trying to do anything but near future estimation, no amount of TDD, Continuous Delivery or *insert your latest favourite practice here* will help. The simple truth is we’ll never be very good at estimation, mostly for reasons outside of our control. However many prominent people in the Agile community still talk about estimation as if it’s a problem we can solve and whilst some of us are fortunate to work in organisations who appreciate the unpredictable nature of software development, most are not.

Some Background

I recently tweeted something which clearly resonated with a lot of people:

"With software estimation you've only realistically got a choice of 5 mins, 1 hour, 1-2 days, about a week, and then all bets are off."

It was in response to this article Mike Cohn posted proposing a technique for providing estimates for a full backlog of 300(!) stories when you haven’t yet gone any historical data on the team’s performance. The article does provide caveats and say it isn’t ideal, but I think it’s extremely harmful to even suggest that this is something you could do.

I’ve long had a fascination with estimation and particularly why we’re so bad at it. It started when I was involved in a software project which, whilst in many respects was a success, was also a miserable failure resulting in a nasty witch hunt and blame being put at the foot of those who provided the estimates.

I’ve previously written about the estimation fallacy, that formative experience, and ran my “Dealing with the Estimation Fallacy” session at 2/3 conferences including SPA 2009. There are also plenty more estimation related articles in the archive.

 

Why we’ll always be crap at estimating

“It always takes longer than you expect, even when you take into account Hofstadter’s Law.”
– Douglas Hofstadter, Godel, Escher, Bach: An Eternal Golden Braid

Since my rocky experiences with estimation and my subsequent research into the area I’ve gone to great lengths to try to improve the way estimations occurs. At my current organisation we collect data from all our teams on how long work items take (cycle time) and have this going back over two years. It’s a veritable mountain of data from which we’re able to ascertain the average and standard deviation for cycle times.

An example of some cycle times from a team's work data
We can then take a list of feature requests, do some high level t-shirt size estimation on them and should comfortably be able to give a range of dates within which the team is most likely to reach particular milestones (the range represents the uncertainty – low, medium and high based on the average +/- the standard deviation, smart eh?).

Right?

Wrong.

We were finding that unless we were talking about stuff coming up in the next few weeks – by which point we’d generally done more detailed analysis – we were either at the far end of the estimation range or missing the predicted milestones dates altogether. It was almost always taking longer than we expected. You could argue that it was poor productivity on the behalf of the developers, but the projections were based on their previous performance so it’s a difficult one to argue, especially as our data was also suggesting that the cycle times for work items had actually been going down!

There are two main reasons things were taking longer than expected:

1. Cognitive Bias

From Wikipedia“Cognitive bias is a general term that is used to describe many observer effects in the human mind, some of which can lead to perceptual distortion, inaccurate judgment, or illogical interpretation”.

In terms of estimation, cognitive bias manifests itself in the form of Optimism Bias“the demonstrated systematic tendency for people to be overly optimistic about the outcome of planned actions”.

There is also Planning Fallacy“a tendency for people and organizations to underestimate how long they will need to complete a task, even when they have past experience of similar tasks over-running”.

It’s a huge problem, especially when we’re trying to do long range high level estimation. Our brains are hard-wired, not only to be optimistic about our estimates, but also to tend towards only thinking of the best cases scenarios. There is very little we can do about this apart from be aware it happens.

It’s only when you get round to doing the proper analysis of the work that you start seeing other things you need to do. I remember Dan North once saying in a presentation that estimation is like “measuring the coast of Britain”, the closer you look the more edges you’ll see and the longer it gets.

2. “Known unknowns and unknown unknowns”

Donald Rumsfeld got soundly mocked for his infamous “unknown unknowns” quote, but he was right. With software development, just like any Complex Adaptive System, there are many things you simply cannot plan for. We can at best be aware there will be pieces of work we’ve not accounted for in our estimations (known unknowns), but we’ve got no way of knowing how much work they’ll represent. The best we can do is know they’re there. The unknown unknowns? Well they’re even harder to predict 🙂

Why estimation can be so harmful

Estimates are rarely ever just estimates

There is always a huge amount of pressure to know when things will be done and with good reason. People want to be able to do their jobs well and it’s hard if they can’t plan for when things they’re dependent upon will be ready. This is why an estimate is rarely ever “just” an estimate. People use this information, otherwise they wouldn’t be so keen to know in the first place. You can tell them all you like that they can’t be relied upon, but they will be. As Dan North recently tweeted, “people asking for control or visibility really want certainty. Which doesn’t exist”.

Some of us are fortunate to breath the rarefied air of an enlightened organisation where the unpredictable nature of software development is generally accepted, but lets face it, most are not.

Re-framing the definition of success (or highlighting the failure of estimation)

The most significant impact of providing estimates is that as soon as they’re in the public domain they have a habit of changing the focus of the project, especially when dates start slipping. Invariably a project of any reasonable duration, which started with the honourable objective of solving a business problem, quickly changes focus to when it will be completed.

Well, there’s actually a bigger problem here already. For most organisations the definition of success remains “on time and on budget”, not whether the project has made money, or improved productivity, or brought in new customers. It is often said the vast majority of software projects are considered failures and the Standish Choas Report is usually cited here. The problem is even they define success as meeting cost and time expectations. All this report is highlighting is the continued failure of estimation.

At best providing long range estimates just supports the “on time, on budget” mentality. At worst it takes projects started with the best intentions and drags them back down to this pit of almost inevitable failure and you – as the provider of the estimate – along with it.

The consequences…

All the typical issues dogging software development raise their heads when estimation lets us down. It’s the primary cause of death marches. Corners get cut, internal quality compromised (at the supposed sake of speed), people start focusing more on how the team works, pressure mounts to “work faster”, moral drops and so on – all resulting in a detrimental impact to the original objective (unless it was to be on time and on budget of course, but as we know even then…).

It’s a vicious cycle repeated in organisations all over world, over and over again. It’s my strong belief that the main reason it keeps occurring is because we can’t escape our obsession with estimation.

“But we can’t just not provide estimates”

This is the typical response when I say we should start being brave and just saying no to requests to provide estimates on anything more than 1 or 2 months (at most) work. My answer to that is if there’s as much chance of you coming up with something meaningful by rolling some dice or rubbing the estimate goat then what purpose are you satisfying by doing so?

What’s the least worst situation to be in? Having an uncomfortable situation with your boss now or when – based on your estimates – the project’s half a million over budget and 6 months late?

Conclusion

Some people still seem to want to cling on to the idea that estimation is still a valuable activity and particularly that we are able to provide meaningful long range estimates, but as I’ve explained here it’s a fools errand. My advice to anyone who’s put in the situation of providing long range estimates is to be brave and simply say it’s not something we can do, and then do your best to explain why. It’s against the spirit of Agile software development, but that’s not even the point, mostly it’s just in no one’s best interests – well, unless you’re a software agency who rely on expensive change requests to keep the purse full, but that’s a whole different story.

Epilogue – what do we do instead?

It’s obviously no good to just say “no” and walk away and I’m certainly not advocating that, but it’s also not the point of this article to try and explain what the alternatives are. There are a plethora of options out there, especially in Agile & Lean related literature and from well known Agile and Lean proponents, but crikey, if there’s one thing that everyone within our passionate communities can agree it’s that the best software comes from iterative, feedback driven development, something which is completely at odds with the way estimation is currently being used by most organisations.

 

 

Self-organisation and team size

In my last post I talked about how self-organisation occurs and how we can try to make the most of it. This time I want to talk more specifically about team size and how I think it impacts self-organisation.

I would argue that the difference between a group of individuals and a team is the ability of the group to adapt to maintain its interests. For example, an amateur football team needs to adapt to the opposition’s tactics to try and win games and stay competitive. If they couldn’t do this effectively they’d probably lose all their games, get relegated and eventually get so fed up they’d disband and spend their weekends playing golf instead.

As we know from my last article, that ability to adapt is when self-organisation occurs and therefore we can say self-organisation is a key component of effective team dynamics.

Too big?

A significant factor in being able to self-organise is for the people who make up a group to be able to communicate & collaborate effectively and form the shared identity and shared goals which determine the group’s boundaries. This is one reason why agile proponents favour co-located teams and open plan offices, but there’s only so much that will help – 100 people working in the same office on the same project are going to struggle to maintain the types of quite intimate relationships which are required for self-organisation to emerge.

Too small?

Most attention seems to be focused on how large a group can become be before it starts to lose its ability to self-organise and work as a team, but I think it’s just as important to consider how small an effective team can be. If we look to sport we very rarely (if ever) see teams of less than 5 people and when we do it’s in sports such as rowing, where the complexity of the interactions between team members is low. When you only have 3 or 4 people in a team (as opposed to 10) the flexibility of the group to adapt to situations is limited by the number of ways the group can organise itself.

For example, in a game of 3-a-side football (soccer) someone is invariably going to have to be responsible for guarding the goal to prevent the opposition just shooting from long range or provide some defence if one of the opposition breaks away whilst your team is attacking. This leaves the other two players little option but to pass it back and forth between each other, making it rather predictable for the opposition and frankly, not much of a spectator sport.

Adding one more person doubles the number of possible connections between the group. Adding two more almost quadruples it. As this is exponential the possible connections increases greatly with each new addition to the group, but this then comes back to how many people you can realistically maintain a relationship with within the boundaries of the group and the context of its environment, so clearly there’s a balance between the two.

Software teams

From what I can see the main objective of working in teams is for the whole to be greater than the sum of its parts. I’m not saying a “team” of 3 people won’t do a good job, but it will find it hard to behave like a team as it will struggle to reach and maintain the behaviours it needs to self-organise well – the limitations of the group become more acute. For example, when someone is on holiday or off sick it’s much harder to adapt to this and if you have junior or inexperienced people in the team you are very limited about how you can share work, as neither of them can work very well on their own or together.

Scrum proponents suggests the most effective size for software teams is between 5-9 people. Jeff Bezos introduced the concept of Two Pizza Teams – team’s are at the best size when comfortably fed by two large pizzas. In fact, doing a general search for optimum or effective team sizes finds that many people have come to a similar conclusion on the effectiveness of team sizes (see here and here)  – that the team only really becomes a team with around 5 members, but starts to degrade when you reach 9.

If a small team (e.g. 2-3 people) is your only option then it’s certainly no disaster, but if your decision was how to best organise a larger number of people into contextual groups then it may be better to aim for somewhere a bit higher as the overhead of managing all the small teams combined with the increased complexity of the communication networks between the teams and the risk of knowledge silos may well outweigh any perceived benefits.

Self-organisation: it’s not a case of whether to, but making use of the fact it occurs

“The best architectures, requirements, and designs
emerge from self-organizing teams”

Principles Behind the Agile Manifesto

I’ve often had people say to me that we’re not really self-organising because we’re not all taking part in all the decisions made at our organisations, such as how the company is run or what products we should be making. This is a misunderstanding of how self-organisation occurs. The fact is we’re constantly self-organising, it’s just most of the time we’re completely oblivious to the fact it’s happening.

For example, within a group of people (such as a workplace) there are many social sub-groups, such as the early morning runners, the ones that go to lunch together and the after work drinkers. They all naturally self-organise around shared goals & desires. Even within a team where a highly autocratic management approach is in place, members of the team will self-organise around anything they can (such as making the tea or going out to buy some biscuits). The thing with self-organisation is it’s actually harder not to be doing it!

If you define self-organisation as when everyone in a team is able to control everything that affects it where do you stop? Your team? Your department? Organisation? City? Country? See where I’m going?

Self-organisation always occurs within boundaries defined by it’s context. For example, a football team might be a football pitch for 90 minutes, a group of friends on holiday the holiday villa they’re staying in or your department at work by the responsibilities it has. Something or someone always sets these boundaries. If they did not exist self-organisation couldn’t occur.

What causes self-organisation?

A complex system* will always be vulnerable to external events which are outside of it’s control, such as the opposite team, the weather or your customers or stakeholders. Self-organisation emerges when it becomes important to respond to these uncontrollable events in a manner which benefits the system. The ability to do so results in the system being adaptive. We know that software development is complex so we can determine we’re in a complex adaptive system. It’s a huge subject and not the particular focus of this article so I won’t try to go into any more detail, but if it’s a new concept to you I strongly encourage you to investigate further.

How to take advantage of the fact that it occurs

When self-organisation is on your side it can be extremely valuable. If you’re working in a complex adaptive system it’s shown that by far the most effective way to allow that system to operate is to allow it to self-organise, because that’s what it will naturally try to do.

The problem is it’s not always on your side (if you’re an oppressive Arab dictator, for example) and will often work against your goals and objectives. I’ve often seen self-organisation criticised because this happens. I’ve also seen it criticised because a team is unable to self-organise effectively when allowed to do so. In both cases you may be tempted to blame the individuals in the team. This would be unjust because in reality it is the system to blame (and probably you as the controller of the system).

To enable self-organisation to work in your favour you need to understand and ideally define the system – set it’s boundaries and try to organise it in a manner which will encourage self-organisation to occur in a way which supports your objectives. This is often called Systems Thinking. Again this is a large and well documented subject so there’s no need for me to elaborate further (if you’re looking for a good place to start though I thoroughly recommend Jurgen Appelo‘s excellent book, Management 3.0).

 

*It’s widely held that software development in general exhibits the properties of being complex (as described in the Cynefin Model).

SPA 2011: a quite unique conference

SPA is like no other conference. Nowhere else do you get a programme so diverse and immersive. Over the last two years I’ve:

Rather uniquely, all sessions at SPA are interactive and involve participation. I find it’s a much richer learning experience (than presentations where you end up spending half your time day-dreaming and, since the advent of smart phones, twittering and checking your email) and also a great way to meet and socialise with peers.

Lead a session

There’s no better way to attend than leading a session. As well as getting the opportunity to share your passion with an enthusiastic and diverse bunch ranging from industry thought-leaders to academics you get to attend for free. If you’ve never run a session before don’t be afraid, we have an eager band of reviewers who will help you groom your proposal and if accepted, a flock of shepherds (SPA veterans) who’ll be able to offer advice and guidance to shape your session and ensure it’s full of “SPA-ness”.

More details are on the SPA website. The deadline for proposals is 28th February, but get them in nice and early if you want to benefit from getting lots of feedback.

Register now (it’s a real bargain!)

If you don’t fancy running a session standard tickets are currently only £350 (+VAT) for four days of absorbing sessions including lunch and some evening meals!

If you’ve been saving up to go to QCon, why not come to SPA2011 and spend the money you’ve saved on a skiing Holiday or a couple of iPads instead?


SPA 2011

June 12-15th, BCS, London

spaconference.org


A formative experience

It may surprise some, but I’ve been at this agile lark for less than 4 years (or maybe that’s a lot?). I’ve been motivated by Jason Gorman’s recent post and case study (and some subsequent twitterings) to share some of my thoughts from working at BBC Worldwide1 at that time, a particular project I worked on which has influenced me far more than anything I’ve been involved with before or since and how it all changed me (for the better).

The Online Catalogue (OLC) project

Shortly after I started at Worldwide I was moved into a team doing a re-write of the Online Catalogue (now renamed BBC Wordwide Sales – essentially a sales device so broadcasters can find and view details on shows produced by the BBC they could purchase and broadcast on their own channels). It was the company’s first foray into Agile and both a great success and complete disaster.

It was a success because we were a great group of people being given the opportunity to determine how we wanted to work. We made many, many mistakes (inc. classics such as “done” being development complete i.e. not tested or released), but crucially we were learning and improving all the time.2 It was an extremely empowering and motivating experience and created an incredible bond between the people in the team (although I don’t see them often I still consider many of them great friends today). The highly collaborative nature of the way we worked meant I learnt more in the first year than all of my career up to that point. The wonders of TDD, refactoring and pair programming were truly opened up to me. It wasn’t so much a jump as a giant leap. The news of our successes spread quickly and it wasn’t long before Agile software development was the de-facto approach.

No doubt you’re probably far more interested in why it was not a success and you’d be right to be (I learnt far more from what went wrong that what went well).

Crucially before development started a year had already been spent on analysis resulting in a use-case requirements document a good inch thick so we weren’t iterating on functionality, only incrementing in two weeks sprints (and knowing the audience I don’t think I need to explain further). Also the expectations on the project’s delivery were very optimistic. The combination of these two and the political and bureaucratic culture of the organisation meant failure was baked in from the start.

Shortly after development began it was evident it was going to take a lot longer than expected, but by that time the project had gathered too much momentum and too much money had been spent. At each management review the estimated completion date got longer and longer but each time no one was prepared to cut the scope or do the honourable thing and kill it. As is typical with death marches failure isn’t an option until it’s the only one left. The initial estimate was 3 months and the project was eventually completed 18 months (and well over a million pounds) later. The product itself? To it’s credit it was a much better engineered application than it’s predecessor and was a good foundation for future development, but in many ways it had less functionality than the product it was replacing.

The subsequent witch hunt was extremely unpleasant with the blame eventually being laid at the foot of the Lead Developer and Project Manager. Their estimates weren’t good enough. Fortunately our PM (who was actually excellent and by far the best I’ve ever worked with) had already left, which unfortunately meant the Lead Developer bore the brunt of it and his contract wasn’t renewed, which was undoubtedly a political gesture to higher management. There was no interest or barely any investigation into the root causes. When we did eventually do a project review the findings were filed away. It didn’t matter any more as blame had already been assigned and everyone had moved on.

I wouldn’t say we were completely without fault, there were many things within our power we would have done differently if in the same situation again, but I could say that about all the projects I’ve worked on since.

The community

Pete Camfield and Jason Gorman built a brilliant community, among other things introducing lunchtime sessions where they managed to get in many well known faces to do talks, but also encouraged us to do our own. I did my first ever presentation on “Test Smells” inspired by the xUnit book and have since presented at numerous conferences and events, something I can’t imagine I’d ever have had the courage to do without this opportunity. We also started a design patterns study group and a library (which I proudly curated).

Additionally the lead developers, coaches and some others (like myself) who were motivated to change things got together regularly to discuss how to do so (during the time I wrote an article which I think sums up the mood quite well).

Of course it’s no community without brilliant people, of which there were many (I daren’t name check for risking excluding or offending anyone).

Why I left

I think I’ve already alluded enough to the fact there were significant systemic issues with the organisation. I guess it’s somewhat inevitable (and not exclusive to BBCWW) that larger companies suffer somewhat from bureaucracy and the political environment that generates.

Most people I worked with were decent and just trying to do a good job, but the nature of the environment brought out the worst in people (in the same way buying a house in the UK seems turns everyone into cold-hearted monsters)3 and this went all the way up the chain. We were able to optimise the way we worked within teams but efforts to change things beyond this were exhausting and mostly futile. It was ultimately an environment which suited politically minded career types rather than people who wanted to make a difference. I eventually got too frustrated with banging my head against the ceiling.4

How it changed me

The combination of my experiences on the OLC project and the environment created by Pete and Jason changed me unrecognisably. I learnt that in an agile environment being a super brain developer (which I’ll never be) is really not that important. It matters far more if you give a shit and want to make things better. As my confidence in my abilities grew I became more vocal about what was wrong, at the beginning within our team, but soon (as most agile teams quickly realise) about what was wrong with the organisation which was causing many of our problems. Among other subjects my experiences on the OLC project inspired countless articles and conference sessions about (and a fascination with) estimation and predictability.

Most of all it showed me that, unlike my previous belief, most organisations are not ran very well, in fact they’re being run very badly, which means billions upon billions of pounds are increasingly and needlessly being wasted on software projects and thousands upon thousands of people are being stressed, frustrated and depressed by being involved in them. It showed me that there is a better way and that I get huge satisfaction from being involved in trying to improve that situation (well, at least not making it any worse).

Conclusion

Agile environments make people care. It means you’re much more exposed to your customers and stakeholders and spend a lot more time (than most people in your organisation) engaged in retrospecting and discussing problems. I’ve also noticed recently that people are much more critical on agile teams – something I thought was a bad sign but I’ve now realised the opposite is true5

It has it’s downsides of course. More emotional engagement means more emotional attachment. I ride the peaks and troughs a lot and find it difficult to switch off.

It’s not as much the project or organisation it makes me care about as much as the people I work with, it just makes it all more human.

 

 

 

Footnotes

1 BBC Worldwide is the commercial arm of the BBC, a wholly owned subsidiary and quite separate from the publicly funded corporation (although all it’s profits go back to fund the BBC).

2 Matt Wynne and I presented our experiences of evolving from Scrum to Lean at XPDay 2008. Here’s a write up and here’s the slides.

3 This kind of behaviour is well documented by complexity sciences but most famously by the Stanford Prison Experiment.

4 I’d like to think this doesn’t have to be the case. I think at least part of the problem at BBC Worldwide was it suffered from having too many long termers (10 years was quite normal) meaning people were quite protective of their positions or not keen to make any noise/get off their comfy chairs with the consequence the status quo was very difficult to change. Also, within the development team the ratio was weighted too far towards contractors than permanent staff (I was perm) with the result that people either didn’t care or weren’t around long enough to make it stick. I understand the IT department has recently been through a major overhall with many people having left via redundancy and new management at the top, so I doubt my experiences are still relevant, however I’ve not heard anything to say it’s improved either.

5 A recent experience report published by Benjamin Mitchell found that a team involved in a System’s Thinking based approach were the most motivated but also more critical (than other areas of the business) of how well they were satisfying customers.

Register now for XPDay 2010 on 29th-30th November

This year XPDay is taking a radical turn. It will predominantly be an open space conference with one track of experience reports:

“Agile is no longer a niche development approach. Agile is now mainstream with industry leaders like IBM and Google adopting it. XPDay has evolved away from its roots as a place where people come to learn about basic Agile practices to a conference that brings together leading practitioners so that they can learn from their peers, and help develop the next generation of practices. Now that all participants are expected to provide content and learning, the decision has been taken to provide the event for free.”

How to attend

a) Register and tell us why you want to come

To register add your name to the waiting list here, but you must also enter a short paragraph as to why you should attend here. These short paragraphs will be reviewed by the XPDay organising committee to help in the selection process. Registration closes on Sunday 17th October. Please see the XPDay Eventbrite registration page for more details.

b) Submit an experience report

Given the importance of actual practitioner experience to Agile, there will be a track of “experience reports” throughout the conference. These experience reports will be selected by the XPDay committee prior to the conference. You can submit an experience report here. Having an experience report accepted will obviously guarantee attendance, but please don’t forget to register as well.


The lucky recipients of the golden tickets will be informed at the end of October. I hope to see you there 🙂



Experience Report: Pair Programming Interviews

Ivan Moore wrote an article a while back on how he runs pair programming interviews. After introducing them to the recruitment process at my company I have to agree with Ivan that they’re incredibly valuable – among other things they’re a great way for a potential employee to show they have a developer conscience. I wanted to share some of our learnings too.

Real Code

We use real code and real problems we’ve already had to solve. I know others like to use programming exercises, but we like to see how candidates deal with problems which are more relevant to the job they’re applying for such as dealing with legacy code and unit testing.

Code Review

We start by walking the candidate through the code and it’s context, give them 10 minutes to review the code by themselves and then discuss their thoughts. Outside of the actual pairing exercise this is a great opportunity for them to show us how well they understand OO principles and practices by identifying any code smells. We’re also looking out for how well they explain their answers as an ability to communicate well is essential.

The Exercise

Next we roll up our sleeves and start programming. We set the candidate a challenge (in the same code base), work with them as much as possible without making it too easy, explain anything they’re unclear of and help them with any tools they’re not familiar with. Whenever we come to a tricky or challenging situation we ask them what options we have. If they’re totally stuck we will suggest possible solutions, but ultimately they’re the one making the decisions. The exercise continues until the allotted time runs out (1 hour normally).

It’s about what you do not how you do it

We explain to the candidate at the beginning of the interview that there is no finishing line. What we’re looking for most is how they approach a problem and how well they work with others. Often people who get the furthest do so by making risky refactorings and poor design decisions.

Pair pair programming

It’s always good to have more than one opinion so generally there will be two people in the interview aside from the candidate. One takes part in the exercise whilst the other acts as an observer. This allows the navigator to focus on the exercise. After the interview we get together and discuss our thoughts. Often one of us will have forgotten or not noticed something from the interview and this ensures we get the most balanced and fair view possible.

Does it work?

So far everyone who we’ve recruited who has taken part in the pairing exercise has lived up to, if not excelled our expectations of them based on how they performed. One drawback is although we do try to keep the interview as relaxed as possible it can be quite intimidating for some, however having done quite a few now I cannot imagine recruiting a developer without using this technique as part of the interview process.

Group for people interested in changing the face of UK Govt. IT

At SPA2010 last week Matt Wynne organised a BoF session around how we can change the way the UK government delivers software. We had a really constructive discussion and lots of actions came out of it, one of them being to set up a group for people who are interested in getting involved to effectively communicate and bring together our collective knowledge and abilities, create a bit of a movement.

If you are interested in actively getting involved (rather than just commenting from the sidelines) please sign up:

http://groups.google.com/group/uk-soft-pract-esd

In a few days I will publish the actions we identified from the discussion and we will be looking for people eager to take on some of the tasks.


P.S. Don’t worry about the name if you don’t like it. It is likely to change and not the most important thing to be discussing at these early stages.

Thoughts on TDD as if you meant it

I’ve now been to Keith Braithwaite’s TDD as if you meant it session twice and also ran a series of coding katas in this style at work using Conway’s Game of Life.

Here’s the concept:

1) write exactly ONE failing test
2) make the test from (1) pass by first writing implementation code IN THE TEST
3) create a new implementation method/function by:
3.1) doing extract method on implementation code created as per (2), or
3.2) moving implementation code as per (2) into an existing implementation method
4) only ever create new methods IN THE TEST CLASS
5) only ever create implementation classes to provide a destination for extracting a method created as per (4).
6) populate implementation classes by doing move method from a test class into them
7) refactor as required
8 ) go to (1)

What I’ve learnt

  • It’s really hard to get going.
  • At first it feels ridiculous and pointless effectively testing things like true == false and having the code under test actually in the fixture.
  • A recurring theme has been throwing away lots of code. Focusing on trying to do the simplest possible thing often means your understanding and your solution frequently changes and continuously becomes redundant. It’s a very frustrating experience.
  • I don’t think it’s at all a practical way to write production code.

If I’m not going to use it what’s the point?

As Keith has repeatedly stated, he would not recommend you went back to your job and started coding this way. What it is though is an excellent training exercise, the equivalent of a musician practicing scales. It emphasises the core principles of TDD more than anything else I’ve tried or read.

Therefore I’d highly recommend it as something to do on a relatively regular basis to help refresh your TDD muscle memory and it’s a great way to introduce the concepts of TDD to the uninitiated.

As Queen Elizabeth II once said, “It’s all to do with the training: you can do a lot if you’re properly trained.”