We Can’t Measure Anything in Software Development
Join the DZone community and get the full member experience.Join For Free
baccarat is an interesting card game that you’ll find at many casinos. the objective of the game is to correctly predict whether the bank or player will win a hand.
in baccarat the scoring for a hand is very simple, add up all the cards at their face value with face cards being worth 10 and only count the total in the ones column.
6 + 7 + j = 23 = 3
a + 4 = 5
the highest possible hand is 9 and whoever has the highest hand wins. if the player and banker have the same hand, it is a tie.
i won’t go into the details of how the number of cards are drawn is determined, but if you are interested you can find that information on wikipedia . basically, you end up having pretty close to a 50 / 50 chance of either the player or banker winning a hand. (of course the house edge still is about 1.06% in the best case .)
the interesting thing about baccarat though, is that despite the odds, despite common sense, despite the understanding that the game is completely random, people will still sit there and record every single hand and score trying to use it to look for patterns to predict future results.
these poor deluded souls actually think they are measuring something on these score cards, as if what happened in the last hand will in any way affect what will happen in the next hand.
after many years of trying to find the secret formula for measuring software development activities, i’ve come to the conclusion that trying to measure just about any aspect of software development is like trying to measure the odds of a future baccarat hands based previous baccarat hands.
why we want to measure software development
it’s understandable why we want to measure software development—we want to improve. we want to find out what is wrong and fix it and we want to know when things go wrong.
after all, who hasn’t heard the famous quote:
“what gets measured gets improved.”
don’t we all want to improve?
somehow we get stuck with this awful feeling that the opposite is true—that what doesn’t get measured doesn’t get improved.
and of course we feel guilty about it, because we are not doing a good job of measuring our software development practices.
just like the avid baccarat gambler, we want to believe there is some quantifiable thing we can track, which will give us information that can give us the edge.
sometimes the reason for wanting to measure is more
practical, we want to evaluate the individuals on our team to see who is the best and who is the worst.
if we could figure out how to measure different aspects of software development, a whole world of opportunities open for us:
- we can accurately give customers estimates
- we can choose the best programming language and technology
- we can figure out exactly what kind of person to hire
- we can determine what kind of coffee produces the best code
how we try
i’ve been asked by many managers to come up with good metrics to evaluate a software development team.
i’ve tried just about everything you can think of:
- lines of code written
- bugs per developer
- bugs per line of code
- defect turn around time
- average velocity
- unit test code coverage percentage
- static analysis warnings introduced
- build break frequency
i’ve built systems and devised all kinds of clever ways to measure all of these things.
i’ve spent countless hours breaking down backlogs to the smallest level of detail so that i could accurately estimate how long it would take to develop.
i’m sure you’ve probably tried to measure certain aspects of software development, or even tried to figure out what is the best thing to measure.
it’s just too hard
no matter what i measure or how i try to measure it, i find that the actual data is just about as meaningless as notebook full of baccarat hands.
one of the biggest issues with measuring something is that as soon as you start measuring it, it does start improving.
what i mean by this is that if i tell you that i am going to start looking at some metric, you are going to try and improve that metric. you won’t necessarily improve your overall productivity or quality, but you’ll probably find some way—intentional or not—to “game the system.”
some managers try to get around this issue by just not telling the team what they are being measured on. but, in my opinion, this is not a good idea. holding someone accountable to some realistically arbitrary standard without telling them what, is just not very nice at all, to put it mildly.
but really the biggest reason why it is too hard to measure aspects of software development, is that there are just way too many variables.
- each software development project is different
- each feature in a project is different
- software developers and other team members are different
- from day to day even the same software developer is different. did jack’s wife just tell him she was cheating on him? did joe just become obsessed with an online game? is mary just sick of writing code this week?
- as you add more unit tests the build time increases
- different team members go on pto
- bob and jim become better friends and chat more instead of work
the point is everything is changing every day. just about every aspect of software development is fluid and changing.
there is not one metric or even a set of metrics you can pick out that will accurately tell you anything useful about a software development project. (at least i have never seen one at any software development shop i’ve ever been at on consulted at.)
if you were building widgets in a factory, you could measure many qualities about that widget making process, because much of it would be the same from day to day, but with software development, you are always exploring new territory and a 1000 different variables concerning how you are developing the software changing at the same time.
measuring without measuring
so am i basically saying that metrics in software development are completely worthless and we shouldn’t bother to track anything?
no, not exactly.
what i am saying is that trying to use metrics int the same way that we measure the average rainfall in a city, or running pace improvement by looking at its average over time, doesn’t really work in software development.
we can track the numbers, but we can’t draw any good conclusions from them.
for example, say you track defects per lines of code and that number goes up one week, what does it mean? any number of things could have caused that to happen or it could just be a totally random fluke. you can’t really know because there isn’t a knob you can turn and say “ah, i see we turned up the coffee bitterness factor to 3 and it resulted in more bugs.” instead there are 500 knobs and they all changed in random directions.
so, i am saying don’t look at how the numbers of any particular metric are moving from day to day or week to week and expect that it means anything at all, instead look for huge deviations, especially if they are sustained .
if all of a sudden your average team velocity dropped down to almost nothing from some very high number, you won’t know what caused it, but you’ll know that it is much more likely that there was one single knob that got cranked in some direction and you’ll at least have some idea what to look for.
you really have to treat the software development process more like a relationship than like a factory.
i don’t have a series of metrics i use to evaluate my relationship with my wife or my friends. i don’t secretly count how many times my wife sighs at me in a day and track it on a calendar to determine our relationship quality factor.
instead what i do is talk to her and ask her how things are going, or i get a more general idea of the health of the relationship by being involved in it more.
team retrospectives are a great way to gauge the temperature of the team. ask the team members how things are going. they will have a pretty good idea if things are improving or slowing down and what the effectiveness level is.
measure not, but continuously improve, yes
so kick back, don’t worry so much. i promise i won’t tell six sigma that you aren’t using metrics.
instead focus on continuously improving by learning and applying what you learn. if you can’t notice enough of a difference without metrics, metrics wouldn’t have helped you anyway , because the difference would just be lost in variance anyway.
Published at DZone with permission of John Sonmez. See the original article here.
Opinions expressed by DZone contributors are their own.