Saturday, April 21, 2007

Gotta get going...

"Excuse me, sir. I think you got the wrong shoes on!"
"What do you mean?"
"Looks like you put the right foot into the left shoe and vice versa."
"Yeah, looks like you're right. That's why they were hurting so badly."
"Aren't you switching them?"
"No, I'm late, I gotta get going now."

One of the strongest advantages of iterative development is that the concept of iteration leads also to the concept of checkpoint. The moment you release an intermediate milestone is also a moment to think and verify if you're going in the right direction. That's also a moment where you take a breath and think instead of just doing things.

Put in another way, iteration doesn't mean repetition. Splitting the project time line in iterations means that there should be fixed moment reserved to approaching the project from another angle. SCRUM makes this "what's the biggest slowing factor of the project?" question at the center of the project lead on a daily basis. Long lasting waterfall projects normally place this question far too late.

If you are in an agile or iterative project, and there's no difference, or perceived change from iteration n to iteration n+1, this is generally a bad smell. Normally it means that this is not an agile project or, more precisely, that it's not an adaptive one. Checkpoints are probably used only to track the elapsed effort and delays, and to re-adapt estimates. A more pervasive, SCRUM like, survey might lead instead to a different way of doing certain things, or to a suggestion about how to improve them.

It's just a larger scale application of the tuning methodology: test (iterate), measure (finish the iteration), diagnose (the iteration meeting), and correct (plan for the next iteration). If the iterations borders are blurry, you have a lot less test information, if you're not having a meeting, you're probably not getting all the information you need for a good diagnose, if you never stop and plan for a change, you'll never improve. If you keep on postponing needed changes, just because you are too busy, ... you'll always be.

Monday, April 16, 2007

My personal workplace survey

Being a consultant, I frequently have the chance to work in different organizations, and see different approaches to software development. Being a reader of Alistair Coburn's Agile Software Development, and Tom DeMarco and Timothy Lister's Peopleware, I have a strong personal feeling on the way workplaces affects software development.

Some basic principles first...
For those who are not familiar with the topic, I'll squeeze the information a fer lines. Mr. Coburn puts a great emphasis on the way communication takes place in a software development team. Communication is meant as sharing of common useful information, and it's probably one of the biggest efficiency booster in a software development team. If you start analyzing what developers do during the day, you'll note that coding is actually only a small part, communicating can be often as big as coding. Differently from coding, though, communication time is not really tracked in productivity reviews, so most of is effect is below the observability source. He also introduces the notion of information radiators, those artifacts, such as writeboards, diagrams, calendars and so on that help indirect information diffusion in the workplace.

DeMarco and Lister, focus on the effects of the workplace on individual productivity. A developer, and, more in general, a knowledge worker, does a very special job which is a mixture of knowledge and creativity. This type of job is influenced a lot by environmental factors (researches show a factor 13 between the best and wort measured individual productivity). The underlying model is that a knowledge worker is getting in the productive state of flow only after about 15 minutes after an activity is started. Every time his/her concentration is interrupted by something, 15 minutes are lost.

... and then the survey
For places I've seen, the situation is pretty close to a Waterloo. One thing that must be considered anyway is that, being a consultant I was not a full time employee (so I didn't have the same rights of my employed peers). Also, we normally help organizations in trouble; healthy organizations normally don't need us, so we probably see places a little bit below the average. I tried to define workplaces according to the main distinction of software or non software company, meaning that in some cases developing software was the core asset of the company, while in some others it was just something that needed to be done. Anyway here's the survey...
  • Small financial company IT department, small room (few people in it). We were free to attach papers on the wall (but looked suspiciously), the place was basically silent. High overall efficiency.
  • Big financial company IT department, very large scale project, huge open space. No walls, so nothing could be attached on it; quite a few meeting room not to disturb the colleagues. Messy shared information system based on notes. Structured documentation, but very few readers, improved over time. Lots of windows, but they couldn't be opened for security reasons. Smoking forbidden only in the open space. Headache basically every evening. Very low overall efficiency, boosts during somebody's holidays.
  • Average Financial company IT department. Small room, silent, about ten people in it. Meeting room available, but seldom used (maybe too formal). People often talking less than necessary.
  • Software company. Average size open space. Lots of people talking loud. Whiteboards available in separate rooms. Low efficiency.
  • Software company. Average size open space, high background noise. Lots of whiteboards available. High overtime ratio, to maximize silence's effects.
  • Part of big financial company IT department. Small rooms, some people worked for years in a servers room (no windows), high background noise. Headaches. Only junk food available in the surroundings.
  • Software company. Small rooms. Boss smoking in the aisles, and changing requirements. Extremely high overtime, enough to define efficiency as non measurable.
  • Software company. Small room, many people. Whiteboards forbidden, meeting rooms sometimes available, very few people taking notes on paper. Later, the whole department moved to a single room, formerly a shop. No whiteboards, no meeting room, increased quit ratio.
  • Software company. Small room, smaller desks, very high background noise. Only paper whiteboards (non-erasable). High overtime ratio, low productivity.
As you might notice, the picture is somewhat desolating. I managed to see a better place, where developers had better rooms, whiteboards, space and silence. But that was not in Italy, so it can't be included in my survey. But the facts that only a few of the company manage to reach a sufficient score (and none of them is even close to excellency) really makes me wonder...

Saturday, April 14, 2007

The dark art of cheating software estimates - Part two.

Just a quick addendum to my previous post about software estimates (and how to fool yourself cheating with them).

The most effective trick to miss a deadline (and the following one) is to put unrealistic estimations over developers activities. To achieve this result you have basically two ways.

Define the estimates at the wrong level
This normally happens when the team leader defines the activities and assigns them over the head of the developers. Experienced developers know better what should be done and which activities take time, so you should rely on their point of view, after all they're the experts in their domain. Imposing an estimation on the developer's head has also the undesired effect to cause an emotional drift in case of activities taking longer than expected. A young developer could assume that he is the problem (and maybe the real problem is just something forgotten at a higher level) and feel responsible for the delay. If you just say "You have 3 days to finish this" you might end up having the only crappy piece of software the developer was able to write in those three days.
And, of course, skills and environmental factors are different, so the same activity could take 2 days if assigned to one developer and 4 to another one. If the estimates are coming from above, it's easier to forget about that, when quickly reassigning activities.

Ok, this is just something that might happen. I am not saying that one should completely rely only on developers' numbers. A good team leader has its own estimates in place, that can be used manage risk related to optimistic developers, and so on. But this is an activity that should be performed behind the scenes (my first team leader always added 30% to my developer estimations). Comparing developers estimates with yours could also help to spot potential problems, like activities that shouldn't take that much.
By comparing different developers estimations on similar tasks, you could also spot if somebody found a smarter way to do something, and have him teach to the others (or discover that somebody is not finishing the activity and leaving some dirt under the carpet as an undesired gift for the following iteration). Put in another way you should rely on the developers on the estimations and take yourself the burden of find out how to speed up activities.

Asking estimations in the wrong way
One thing you should never do is ask "Will it be finished for Tuesday?" and - even worse - the follow-up "You told me this was going to be finished for Tuesday". Of course, in the middle, everything can happen. If you want to be hated you can ask the question one day, then interrupt with a higher priority task, then on Tuesday ask the follow-up, with a blaming pitch.
The point is that, as a leader, you shouldn't forget the effect of your role. A milestone should be a leader's problem, not a developer's problem (and shouldn't be managed in terms of blame anyway). Asking a question in this way is no different from a woman coming out from the hairdresser with a new "transgressive" haircut asking "How do I look?". It's just a compelling invitation to lie.
At the end, the numbers are exactly the ones the team leader wanted, but in this case the blame is all on the developer. Playing this trick, is unfair, doing it repeatedly is just a way to increase pressure and to threaten team alchemy.

The right way to put question is "How much time you need to do this?" and then do everything possible to ensure that all of this time will be spent on that activity. A good leader manages pressure from above and should shield team from it. If the collected numbers are too high, there is probably a problem, which needs to be investigated and possibly solved, soon.

Don't forget that providing a detailed estimation of the activity, is an activity itself. It shouldn't take a day, but be careful when you get an immediate reply; it's a sign that somebody isn't probably thinking enough. So leave your developers the time to think about what should be do and how much time will be needed. As Joel Spolsky states, this is design activity, after all.