Author Archives: Rob

embed sprint 3: whiteboard power

The biggest lesson I’ve learnt is that the whiteboard is by far the most effective method of communication available. Requirements gathering with the customer in insanely fast times, meeting notes all can see and contribute to and the great thing is, they stay there for a few days where we can all see them. If I could programme on a whiteboard I would.

Meetings

Unsurprisingly, in our first retrospective together, Mike said he felt there were too many meetings. Essentially, this was because of the sprint planning meeting which involved a lot of estimating. We’ve now split the meeting in two – a prioritisation meeting with Mike in the preceeding sprint and then a planning, analysis and estimation meeting when we begin the sprint which we have at our desks so we can ask Mike questions if we need him.

The power of perception

On a very positive note, Mike is delighted with our progress and is feeling things are really getting done. Of course its not like we weren’t doing anything before (in fact, our team is now barely a quarter of the size it was before we moved in with them) its just that now they are deciding what we do on a bi-weekly basis and seeing the results in very little time.

Team Leading

I’m still hardly doing any coding, but that’s OK, its a bad idea to “own” any work as I can’t guarantee I’m able to complete it. When I do have the time I am using it to pair programme. This way I spread knowledge and best practices and can be across as much as possible without being too controlling.

The Estimation Fallacy

I’ve had a lot of reasons to think about estimation recently and I’ve come to a firm conclusion – it’s a complete waste of time. There are so many things you could be doing that will add value to your project – estimating adds nothing. In fact it has has the adverse effect of making your project less likely to succeed. I will explain why:

We cannot predict the unpredictable

More often than not, the factors that have the biggest impact on the duration of a project we simply did not see coming. Afterwards we look back and say “ah, well we know that for next time so we won’t make the same mistake again”. We investigate the reasons things went wrong, blame people or processes and move on to the next challenge confident this time it will be a success. This is the fatal flaw. What we don’t recognise is that the problem was not the particular event that delayed the project,but that something unexpected happened at all. This is an extremely costly mistake which eventually ends with people losing their jobs and a lot of money being thrown away. Some people may argue that when they estimate they allow for this by applying a “margin of error”. How much then? 5, 10, 20 percent? The problem with these unpredictable events or Black Swans is that no margin of error could possibly account for them, especially so if the object of your estimate is to win business or commit your organisation’s finances for the next X months. Unfortunately its in the nature of our business that we will constantly be presented with “unknown unknowns” and the sooner we realise this the better.

Even without these “unpredictable” events. We are useless at predicting the future

Until recently, I was a believer in McConnell’sCone of Uncertainty which argues that the further away you are from a project deadline the more exponentially unreliable your estimates will be (this is not improved by putting more effort into the estimation process). Well I now think this is invalid. For one thing the graph is symmetrical. If this was based on reality it would mean we overestimate as much as we underestimate. If that was the case we would deliver early on as many projects as we deliver late (stop laughing). Also, it suggests that our estimates get better as the project progresses. Even with iterative development and when we estimate at the last responsible moment (e.g. the week before) and assuming no big surprises came our way (which always do), I have found we are mostly way out (I would consider anything above a 10% error margin to be enough to make it a worthless exercise). On the project I’ve been working on for over a year now, with roughly the same team (a really good team, the best I’ve ever worked with), the accuracy of our estimation has not improved in the slightest.* All we can say is (assuming no Black Swans come our way which as I’ve stressed, always do) the closer we get to the finish line (i.e. the less work there is in the backlog) the less there is to go wrong.

It is not in the interests of the customer

If the idea is to give our customers something they can use to forecast budgets then we’re not doing it. As we cannot predict the future, what we end up giving them is next to useless, in fact its likely to have a detrimental effect by lulling them into a false sense of security and dissuading them from allowing for uncertainty in their budgeting.

Dr Dobbs’ Journal did a survey on how we define success. They found:

61.3 percent of respondents said that it is more important to deliver a system when it is ready to be shipped than to deliver it on time.87.3 percent said that meeting the actual needs of stakeholders is more important than building the system to specification.79.6 percent said that providing the best return on investment (ROI) is more important than delivering a system under budget.87.3 percent said that delivering high quality is more important than delivering on time and on budget.

So why are we so obsessed with it? The most common criticism I hear of agile methodologies is if a customer is given the choice between a company that says they’ll deliver in X months and cost £X and one that will not promise anything (sic) they’re bound to go with the former. Well, the survey above would suggest otherwise, as would I. In my last job I was in the position of choosing an agency to build a website and can assure you the last thing on our mind was how good they were at meeting deadlines. We were most impressed by the agency (sadly now defunct) who, for their pitch, did research into our customers and actually started building the site rather than knocking up any estimates.

What about when projects deliver on time and on budget?

Whilst some projects do deliver on time and on budget much of this can accounted for by chance rather than excellent estimation skills. These projects get scrutinised for what went so well (at least they should if your organisation is in any way decent) and the lessons are taken away to the next project. However whilst some of the lessons learnt may well be valid, no consideration is given to the enormous impact of blind luck! Adversely to when projects go bad, people and processes are given too much credit for success. This all results in aconfirmation bias. Every time you do this is like looking for a higher piece of cliff top to balance on the edge of.

Conclusion

Estimates are good for one thing – showing how pointless estimating is. We are able to use them track a project’s progress and show where events took it on a different course that no one had expected.

Only working in an iterative process where you’re presenting your productivity to the customer on a regular basis are they going to be in a position where they can make informed decisions on the effectiveness and ongoing viability of the work being undertaken. Fail faster, fail better.

* Instead of trying to improve our estimates (again) we decided to spend less time doing it. In our sprint planning meeting we no longer break our stories down into tasks. Therefore we do not measure our progress during the sprint in such detail. So far this has had no adverse effect, but has had the effect of freeing up many hours of development time.

embed – sprint 1

This week the project manager arrived to complete the small team I am in. What makes our project interesting is we are going to be “embedded” with the customer (who is internal). As far as can tell this is supposed to be the ultimate environment for successful agile software development. I intend to write about my experiences here.

The other interesting news is I will be the team leader. Whilst I was a team lead in my previous job it was really only by default and I intentionally avoided this position when I came back from my travels. Now I’m more than ready, but there will be plenty of challenges along the way and I’ll do my best to write about them as well.

We’ve completed one sprint and already I’ve found the customer (to be known as Mike) to be very resistant to getting involved in the process of creating their product. Mike clearly has a very busy job and is hoping we’ll just be reporting back once every couple of weeks with lots of amazing things that exactly fit his expectations (as we have amazing mind reading skills). We’ve asked him to get involved with planning, retrospectives and stand ups and he’s expressed a keen desire not to be involved. It will be very interesting to see how we will get around this resistance. To create brilliant software the customer has to be involved and I will consider it a personal failure if we do not succeed in drawing them in.

On the team lead front, unsurprisingly, I have found I am spending very little time coding and have been struggling to keep on top things. You simply cannot do everything that is asked of you so to keep my head above the water I’ve been concentrating my efforts on recognising what is most important and doing that well. This is quite a skill as some people are very good at making a lot of noise, whilst other more important issues may timidly bubble under the surface (waiting to explode like a geyser). I’ve also tried to delegate as much as I can to the other members of my team which makes me feel uncomfortable, but I know it has to be done. The urge to constantly check up on their progress is hard to resist but they’re good people and I trust them so I’m doing my best not to be too much of a nag.

Over the next few sprints I’ll be focusing on getting Mike more interested in taking part and bringing our PM (who is new to agile) up to speed. Hopefully I’ll also get to cut a bit more code…

the responsibilities an agile team needs to be successful

Why do we need roles in an agile team?
Self-organisation is the goal of an agile team, but this does not happen unless the environment is provided. It is the responsibility of the leaders in a team to create and maintain this environment. However, we need to avoid creating bureaucracy and dogma so should try and steer clear of tightly defined roles and responsibilities. The boundaries need to be loose enough so we can get the most out of individuals and customise the roles to the requirements of the specific team.

Why add more roles at all then?
In my organisation either you’re a Developer or a Team Lead. This is not a fair reflection of the value our colleagues bring to the organisation. A great developer is worth exponentially more than an average developer and excellence needs to be appreciated. Also, what makes a developer good are not necessarily the same skills we’re looking for in a team lead.

The responsibilities an agile team needs to be successful
Below I’ve listed responsibilities desired in an agile team. Whilst I have grouped them by the roles of Team Leader and Lead Programmer they are by no means mutually exclusive and do not even have to be the responsibilities of either. We want to be creating teams that have senior people capable of taking on as many of these responsibilities as possible and then allowing them to decide who is best suited to do what. This will have the dual effect of empowering our teams (therefore reducing their dependency on management) and allowing people the flexibility to develop themselves in the areas they enjoy the most rather than feeling they are competing for a single position or even worse, not seeing one that’s suited to them at all.

Team Leader
Communication champion.
Gets the most out of the team.
Empowers the team.
Provides direction (can be technical and process).
Resolves conflict.
Removes blockages.
Makes sure everyone is happy.
Ensures standards and processes agreed within the team are maintained.
Ensure all members of the team have a proper understanding of the customer’s requirements.

Lead Programmer
Code champion.
Responsible for the quality of the code base.
Responsible for the underlying architecture for the software.
Responsible for technical decisions.
Ensure all members of the team have a proper understanding of the technical vision.
Train and informs developers on coding best practices.

testing private methods

I’ve being doing TDD for a year or so and the part I have struggled with the most is testing private methods. Should you test them at all? If so, how do you test them?

Michael Feathers’ book “Working Effectively with Legacy Code” has this to say about it:

“This question comes up over and over again from people new to unit testing: “How do I test private methods?”. Many people spend a lot of time trying to figure out how to get around this problem, but […] the real answer is that if you have the urge to test a private method, the method shouldn’t be private; if making the method public bothers you, chances are, it is because it is part of a separate responsibility: it should be on another class.”

times they are a changin’ (don’t get militant)

I was looking for people’s experience on managing change when trying to improve software development processes and I came across James Shore’s Change Diary he wrote about trying to persuade a company to adopt agile methodologies. It’s full of useful advice, particularly about how you deal with your colleagues and frustrations.

At my company we’ve been going through a lot of change. I’ve only been there a year and it’s already moved beyond recognition. When I started there were a couple of projects, with the support of some of the management, trying to break away from the traditional approach to software development. There was a lot of excitement about Scrum, Agile and XP, enthusiasm abounded and slowly a movement emerged . As it caught on it became more and more apparent that the big problems lay outside of our control. It was all well and good having “sprints”, doing “pair programming” and so on, but as long as we were being tied to unrealistic fixed deadlines and budgets, projects were being to set up to fail from their inception and no amount of refactoring or retrospectives was going to do anything about it.

The movement became militant. We felt that our concerns were not being addressed and started to blame other people for our problems. We came up with a manifesto of how we wanted to build software. The plan was to send it out to all the developers, get them to sign it and present it to the management. Thankfully more considerate members of our community persuaded us all this wasn’t a good idea and the conversation turned about face. How can we engage the people we need to get involved in the discussions we were always having? The most important thing was that all the people involved in the process of building software are able to talk frankly and honestly. We realised it was our fault that we weren’t engaging with the people that mattered. We’ve organised a Goldfish Bowl discussion with the people we have been blaming for all our problems and the mood of the community has changed significantly. The militancy has gone.

It’s easy to see where this could have gone if we’d published our manifesto. OK, I’ll be honest, it was my idea, but everyone really liked it and we were all frustrated with how things were going. It was a worthwhile exercise and we all got something from it, but it took no account of the considerations of half the people we worked with so was therefore irrelevant.

Enthusiasm is great, but be careful with it. I think we were very lucky we saw reason in time.

Look for the signs, don’t get militant.