“We Can’t Measure Anything in Software Development”, de John Sonmez
1Baccarat 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 sinisterpractical, 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 thatthere 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.
8a Corrida das Pontes
0
Ontem fui para a 1a corrida do ano, a tradicional Corrida das Pontes. Apesar das falhas da organização na entrega do kit (acabou o estoque de camisas tamanho M), no dia da prova foi tranquilo no guarda volumes e retirada da medalha.
Não consegui correr bem ontem: muito calor e poucos treinos levaram meu tempo para acima de uma hora (pace de 6’21″). No geral, o isolamento estava perfeito e a hidratação ocorreu sem problemas. Agora é recomeçar os treinos para encarar pelo menos duas meias-maratonas até o final do ano.
1a Corrida dos Guararapes
5
Disputei no último sábado (04/12) a 1a Corrida dos Guararapes. Foi a minha primeira prova noturna de 10 KM, realizada em Piedade, Jaboatão dos Guararapes. Confesso que não estava muito empolgado para correr à noite, principalmente depois que minha miopia voltou a dar sinais de vida (estava com medo de não ver os buracos no meio do caminho
), mas a prova até que foi divertida. Depois de um atraso de meia hora, largamos na beira-mar de Piedade, passando por um pequeno trecho de areia. A prova consistia de duas voltas de 5KM, boa parte na Av. Bernardo Vieira de Melo, juntinho dos carros. A guarda municipal de Jaboatão mandou um efetivo pequeno para a corrida e em alguns momentos tivemos que dividir o espaço com um carro que invadia a faixa.
Não houve cronometragem com chip, com o tempo sendo registrado de forma manual na chegada. Fiz incríveis 48’28″, o meu melhor tempo para essa distância. Uma vantagem de correr à noite é que o desgaste é bem menor que as corridas diurnas. Só tomei um gole de água durante todo o percurso. Na chegada, o filhão e a esposa me esperavam
As fotos (ruins
)foram tiradas no celular de Carol, que esqueceu a máquina em casa.
Corrida de rua agora, só no ano que vem!
Tutorial – ETL com Pentaho Data Integration – Aula 03
0Finalizando a série de slides, é apresentado o estudo de caso (fictício) da WCM e algumas soluções de automação do PDI. Apenas relembrando, o material com os exercícios foram publicados no post da 1a aula.
Tutorial – ETL com Pentaho Data Integration – Aula 02
1Na 2a aula do tutorial são mostradas as principais técnicas de manipulação de dados e fluxo de controle, além de apresentar algumas técnicas de transformação dos dados. No fim, é mostrado como validar e tratar erros com o PDI. O roteiro e o material para os exercícios foram publicados na 1a aula dessa série.
Tutorial – ETL com Pentaho Data Integration – Aula 01
4Nesse semestre eu reduzi a zero o número de aulas nas faculdades onde ensinava. As atividades no MCT e no doutorado estão tomando todo o meu tempo de trabalho e ficou inviável continuar lecionando. De qualquer forma, vou começar a publicar nesse espaço o material dos últimos cursos e disciplinas que ministrei. Minha intenção inicial sempre foi produzir um conjunto de apostilas para servir de apoio aos meus alunos, mas por enquanto vou publicar apenas os slides das aulas.
O primeiro conjunto de slides é sobre um tutorial do Pentaho Data Integration. Esse material foi mostrado na cadeira de Banco de Dados para Suporte a Decisão, do Prof. Robson Fidalgo. Fiquem à vontade para criticar e sugerir modificações no material.
O roteiro dos exercícios encontra-se disponível nos slides abaixo:
As bases de dados dos exercícios podem ser baixadas aqui.
Meia Maratona Internacional Maurício de Nassau
2
Participei na última segunda, 15/11, da meia maratona internacional da Maurício de Nassau. A primeira edição do evento contou com a participação de Frank Caldeira, que venceu a prova da maratona (42 KM) com um tempo de 2:21:34. O meu tempo no percurso de 21 KM foi de 02:13:43. O tempo quente e abafado atrapalhou um pouco o desempenho de todos os participantes, mas consegui chegar inteiro no final da corrida. Fiz um tempo bom (abaixo de 6′/KM) até a altura dos 12 KM. Depois desse ponto o meu rendimento começou a cair muito rápido, cravando um pace final de 6’26″/KM na chegada. A trilha sonora da corrida incluiu Monster Magnet, Foo Fighters, Incubus, Body Count e Metallica.
A prova teve uma largada tranquila (1.500 participantes), com boa hidratação e marcação do percurso. O isolamento da corrida foi um pouco complicado, principalmente no trecho da praia de Boa Viagem, onde os agentes da CTTU tiveram muito trabalho para evitar que os banhistas invadissem a área dos corredores.
O ponto negativo do evento foi o kit distribuído na chegada: sem isotônico, sem uma fruta, apenas uma barrinha de cereais. Muito pouco para uma prova “top” do circuito que teve a inscrição mais cara do ano. Mesmo com esses pequenos problemas, acho que no geral valeu a pena ter corrido essa prova. Espero voltar no ano que vem.
Próxima parada (e última do ano): Corrida dos Sinos, em Dezembro.
Novo Ubuntu: 10.10
0
A nova versão do Ubuntu foi lançada no dia 10/10 pela Canonical. Como sempre faço a cada seis meses, me preparei para passar um dia inteiro recompilando drivers e instalando as novas versões de algumas aplicações. Fiz um backup de quase 120 GB e comecei o processo de atualização. Da última vez, tive que fazer uma instalação limpa, pois vários drivers de meu HP Pavilion dv5 apresentaram problemas de incompatibilidade com a versão do novo kernel.
Para minha grata surpresa, o processo de atualização rodou rápido e sem apresentar praticamente nenhum problema. A nova versão, 10.10, mostrou-se muito estável. O único problema foi a recompilação de alguns módulos do VMWare Player que apresentou a mensagem “Unable to build kernel module – See log file…” durante o processo de inicialização. A falha foi resolvida com o patch fornecido por Matt Rudge (acesse o procedimento aqui).
Na minha última atualização de versão, meti o pau na Canonical pela falhas, mas dessa vez tenho que parabenizá-los pelo excelente trabalho feito.
“Entrega o chip, entrega o chip!”
1
Calma. Isso não foi um anúncio de assalto. Era apenas a frase que os organizadores da 1a Corrida das Farmácias Pague Menos disparavam para os corredores que passavam pelo pórtico de chegada. Nunca tinha visto isso antes, nem mesmo nas corridas com organização mais acanhada.
No dia anterior, fiquei até com uma boa impressão da organização da prova por causa do excelente kit. Eles souberam aproveitar a participação dos patrocinadores e encheram a sacola com bugigangas. O problema começou quando informaram que o chip só seria entregue no dia seguinte, entre 06:30 e 07:30 da manhã. Fiquei imaginando o tamanho das filas para os 2.000 participantes. No dia da prova, acordei cedo, fui para o Marco Zero e não precisei enfrentar a fila. Achei estranho quando deixei os meus pertences no guarda-volumes e o atendente colocou o número de identificação dentro do saco plástico. Fiquei imaginando a mágica que eles fariam para encontrar a numeração e devolver os pertences após a prova.
Na hora de alinhar para largar, senti falta da separação dos atletas por faixa de pace. Na última corrida das Farmácias Bompreço nos deram uma fitinha para identificar o ritmo de prova e evitar atropelos na largarda. Para piorar, largamos juntos com o pessoal que iria correr 1 KM e 4 KM. Resultado: largada tumultuada e com alguns atropelos. Mas o pior ficou para o final. Depois de uma prova extenuante, com um calor infernal, tivemos que entrar em uma fila logo após a chegada para entregar o chip. Sem água, sem descanso. “Entrega o chip, entrega o chip!”, bradava os organizadores, como se após correr 10 KM você não precisasse de um pouco de água e alguns minutos de descanso.E como eu previa, a entrega dos pertences do guarda-volumes foi caótica e sem nenhuma organização.
Fica a lição. Se houver uma segunda edição do circuito, aprendam com o circuito do concorrente (Bompreço)








