About Retrospectives and Accepting Criticism

I believe the most important point in any agile methodology is the possibility of improvement that is offered to the team through constant feedback and also practices like retrospectives.

However, I notice that sometimes teams are not used to question their own behavior, and make the same mistakes over and over again. This was also brought to my attention in one of the mailing lists I participate, where was questioned if teams do enough continual improvement.

These days, while reading the Toyota Way, I got some better understanding about it . According to the author:

Teamwork never overshadows individual accountability at Toyota. Individual accountability is not about blame and punishment, but about learning and growing.

And more important, in the words of Andy Lund, who is a program manager at Toyota and grew up in Japan:

People who have not been to Japan may not understand that the objective is not to hurt that individual but to help that individual improve – not to hurt the program but to show flaws to improve the next program. If you understand that deeply, you can get through that constructive criticism. No matter how good a program or a presentation someone makes, we believe there is always something that can be improved, so we feel it is our obligation. It is not an “obligatory negative”, but an obligatory opportunity to improve–it is the heart of kaizen

And that is exactly what happens in practice. People interpret suggestion and observations as negative criticism, and don’t see that the only way for a team to continually improve is to continually question its own behavior and face its weakest points.

Cheers.

Student Syndrome

One of the good concepts I’ve found while reading Goldratt’s books was the Student Syndrome, which Wikipedia defines like this:

Phenomenon that many people will start to fully apply themselves to a task just at the last possible moment before a deadline. This leads to wasting any buffers built into individual task duration estimates.

During the recent discussions about estimations, which happened in many posts, Chris Leishman wrote about the 3 reasons (P’s) for estimation (which are extremely correct, in my opinion), and selected performance as one of them. As Chris wrote:

The throughput (velocity) of a team is determined by the amount of ‘work’ being done over a given time-period and is measured in terms of the estimate.

After reading this post, I realized that measuring only delivered story points in an iteration (one thing I always thought was right), might not be enough to enable the full capacity of a team.

Explaining, story points are used as de facto standard in agile projects because they provide the separation between time and effort. This way, when I estimate a story as a developer, I have no time commitment to implement that story, and therefore cannot be blamed if I take more/less time than expected (what is probable, since estimation is just an educated guess).

While this practice is good because protects the developer from bad managers, at the same time it provides a lot of room for the occurrence of the Student Syndrome, since nobody knows if the story was completed in the predicted time or not, and all the buffers that were mentally created by the developers during estimation get lost in non necessary activities, like gold plating, for example.

And what I have been noticing in projects, is that stories that get played at the beginning of an iteration generally receive a lot more attention (necessary or not) that the ones that are being done close to the iteration’s end, which proves the concept that more work could be done, if we had some intra iteration kind of measure.

Despite being against the addition of any unnecessary metric to a project, I’m starting to believe that something should be done in this case, like reestimate stories in hours, or measuring cycle time instead of story points, or any other kind of practice that brings awareness to the difference between our estimations and what is actually happening in a story level.

Cheers.

Uncertainty

Project Uncertainty PrincipleThis came to my mind when I was watching this lecture, given by Ricardo Semler at the MIT Sloan School of Management, in 2005.

At some point in the lecture, Ricardo talks about intuition, and how intuition is very useful to solve problems, but still is not accepted in the corporate world.

In his words, talking about the chess match between Kasparov and Deep Blue:

How is it possible, at all, for something with 4 moves (Kasparov) to play something with 4.000.000 moves (Deep Blue)?

…. There is only one thing that he has that the machine has not, and that  is intuition.

…. Where are we putting intuition to play in the corporate world?

And this thought stayed in my head. Why the majority of people find it so difficult to accept intuition and to deal with uncertainty? In Ricardo’s words, why are we willing to trick ourselves and everybody else into thinking that we have control?

And why is this topic relevant to software development?

Because that’s one of the reasons that make agile methods so difficult to be accepted. Most people are not prepared to accept that the project duration can’t be precisely measured. Or that the scope should be flexible, because we still don’t know (oh my God!) what is important and what isn’t. And that the decisions we make should not be based on a complex function point calculation, but in simply in the team’s intuition?

Instead, they prefer to develop software in ways that have failed for many and many years, but still thinking on having control over all the project. They find easier to believe in an excel-calculated estimate for the total project of 170.1234hs than in an estimate that says “roughly 1 month”, and they hope to deliver software within fixed budget, size, scope and quality (good luck with that).

As Ricardo cited, it doesn’t matter if you are wrong, but you have to be precisely wrong.

Cheers

Velocity, Capacity and Productivity

This topic comes from some discussions that went on in a mailing list I participate, and also between me and my flatmate, about how productivity should be measured in agile projects, and how is it related to capacity.

I wanted to write this post for some time right now, but today I’ve realized that somebody had already written about it, so I decided to give my opinion too :-) .

I totally agree with Simon when he says that velocity is not productivity. As I mentioned in another post, one should be very careful when applying any measure, specially productivity measures, and capacity isn’t one of them, in my opinion.

One simple example that makes me reach this conclusion is bug fixing. If you consider capacity = productivity, how should you count bug fixing stories? They are certainly not adding business value, they are actually delivering business value that was supposedly already delivered, but you can’t deny that the team spent time fixing bugs, and that these points should be considered in the estimation and also in the team’s velocity.

Simon also wrote about how to measure productivity, or even better, how to say if a team is performing well. In his post, he wrote

I prefer to measure productivity in terms of the goal and getting stories done is not the goal, generating revenue is. Getting stories done is the means to achieve the goal.

Productivity is perhaps better represented by the revenue generated per iteration per unit of story estimation, e.g. £10,000 per ideal pair day.

This topic was also covered by Martin Fowler in this post. As Martin said,

So maybe you can’t measure the productivity of a team until a few years after a release of the software they were building.

Despite understanding what both says, I find kind of difficult to specify the performance of a software development team if you link it to the revenue generated by the project. I agree that in order to obtain the best results, the considered system should be as broader as it can be (as Deming proposed).

But I also believe (along with Goldratt) that a team has to have a goal, and this goal should be very carefully considered, since it will drive all team’s actions when they are developing software. Including the client’s business in this equation makes it too complicated, since you don’t have any control in how the client is using your work to generate revenue, and as Martin said, it could take years in order to obtain a good result.

If a team doesn’t have a goal, how could it pursue its objectives? Which are the objectives? If agile is about constant and rapid feedback, should I receive feedback based on which criteria? What should the team try to improve when performing retrospectives?

In my opinion, if you have a client that is specifying which stories are more important to the project, and that is why it is really important to bring the client inside the project, at this moment should the measure end, on stories accepted, which will deliver business value (but might not, if for some business reason the software isn’t used anymore, for example).

Until this point a team has the conditions to change and adapt itself to get better results, and deliver more business value. After it, not anymore.

Cheers.

Quality of Life? Does it Exist?

Today I just want to write about some thoughts that came to my head after reading the InfoQ article about Scrum adoption in China.

The article itself is very interesting, since it shows the benefits (and also problems) that companies have had when adopting Scrum. But what triggered this post was the chart shown below, provided by one of the interviewed companies, when they were asked What’s the benefit that Scrum brought to your project, your company?

What this chart shows is that Scrum improved the quality of worklife of most members of the team. And I am writing about it because I think this is one of the aspects of agile methodologies that isn’t perceived as much as it should.

When you work with agile, instead of working alone, you work in pairs, instead of holding all the problems by yourself, you share it and discuss it, instead of working as an individual, you are part of a team.

And that makes all the diference from when you work in non-agile environments, sit alone in your cubicule and interact only with your computer during all day. That makes a diference in your life.

So, if you don’t want to try agile because of the productivity aspect, at least try it for the sanity of the persons working for you.

Software (Engineering or Development?)

One thing that always interests me about software is the eternal discussion, that has been going for some years now, about the relationship between software development and other engineering disciplines.

On one side stand the traditional approach folks, claiming that software projects are the same as any other engineering projects, and because of that, should be managed as other engineering projects (the favorite one is civil engineering, with house building…)

On the other, the agile practitioners don’t accept software development to be called “engineering”, and say that this is probably one of the reasons software development is in this situation nowadays (not a good one, as you may conclude).

So, what is the right answer? In my opinion, both! To the explanation…

Martin Fowler wrote something about it in this article (everybody knows which side he is in :-) ), where he explains why the traditional civil engineering approach can not work in software development. Quoting one of his sentences

Can you get a design that is capable of turning the coding into a predictable construction activity? And if so, is cost of doing this sufficiently small to make this approach worthwhile?

And I totally agree with him. If you look at UML models and other software design methodologies, there is no way to design a software in such detail so that the construction phase could be a less skilled activity, with predictable results. All you get in projects with long design phase is a lot of rework in the construction phase.

Ok, so software is not civil engineering, but is it not engineering at all? That’s what got clearer after reading the appendix F of the Rogers Commission Report, written by Richard Feynman, which investigated the Challenger Space Shuttle disaster, in 1986.

Now, if you are still paying attention, you should be asking: “What space shuttles have to do with software?”

Simple, it’s engineering. And not just that, it is high technology engineering.

Take a look at what Dr. Feynman said in his report about the space shuttle main engine (quoted from this other blog, where I’ve found all the material):

The Space Shuttle Main Engine was handled in a different manner, top down, we might say. The engine was designed and put together all at once with relatively little detailed preliminary study of the material and components. Then when troubles are found in the bearings, turbine blades, coolant pipes, etc., it is more expensive and difficult to discover the causes and make changes.

Anything rings a bell? How about that?

The usual way that such engines are designed (for military or civilian aircraft) may be called the component system, or bottom-up design. First it is necessary to thoroughly understand the properties and limitations of the materials to be used (for turbine blades, for example), …

With this knowledge larger component parts (such as bearings) are designed and tested individually. As deficiencies and design errors are noted they are corrected and verified with further testing. Since one tests only parts at a time these tests and modifications are not overly expensive. Finally one works up to the final design of the entire engine, to the necessary specifications. There is a good chance, by this time that the engine will generally succeed, or that any failures are easily isolated and analyzed because the failure modes, limitations of materials, etc., are so well understood.

Well, I don’t know what are you thinking, but when I read that, it seemed to me that somebody was talking about iterative software development. And that’s the whole point about it, software development can be compared to an engineering discipline, but to an advanced engineering discipline.

If you try to compare developing software to building houses, you try to compare 2000 years of experience to something we started to do in the last century. But even in software, if you go to well known domains, with well known technologies (not easy to find projects like that… :-) ), you can probably automate the process with different tools, making it a “less skilled task” and also a lot easier.

But in the great majority of projects, developing software is still about messing with recent discovered technologies and changing domains, and that what makes it so hard.

So, just to make a final point, software development is rocket science!

Cheers!

“Tell me how you’ll measure me…” (2)

Coincidence or not, after writing the last post, I’ve just received the InfoQ newsletter, which contains this article, about bonus distribution within agile teams. And what does it have to do with measures and incentives?

Well, if you want to have some great individuals, reward them based on individual performance, if you want a great team, don’t try to establish some weird criteria, and measure everyone’s performance based on the team result.

Like Mary Poppendieck cited on her book, distribution of bonus to an Agile team is like playing with dynamite.

Duas Cabeças Pensam Melhor Que Uma?

A fagulha necessária para a criação de um post surgiu na leitura de alguns posts por aí (como esse), que me fizeram lembrar de um assunto sobre o qual eu tenho vontade de escrever a algum tempo: programação em pares.

Uma das razões para eu escrever sobre isso é o fato de eu já ter experimentado a programação em pares em duas oportunidades, a primeira na minha empresa no Brasil, e a segunda agora na ThoughtWorks University, e nesses dois períodos eu tenho percebido muito mais vantagens do que desvantagens nessa prática.

Programar em duplas, embora possa parecer anti-econômico à primeira vista, resulta em código muito melhor, aumenta a produtividade dos desenvolvedores (que não tem tempo para ficar lendo e-mails e falando no msn) e, principalmente, propicia o compartilhamento de informações e habilidades entre todos os membros da equipe, um dos problemas abordados nesse outro post.

Por sinal, o compartilhamento de informações é auxiliado por uma outra prática, que é a troca freqüente de pares, o que é detalhado no artigo Promiscuos Pair Programming, de Arlo Belshee, que também incentiva uma terceira prática, que é de o driver da dupla (o desenvolvedor que está efetivamente teclando) , seja aquele que possui menos experiência no que está sendo feito, para que assim este aprenda novos conceitos o mais rápido possível. Citando o artigo acima:

Promiscuity, it turns out, is a good way to spread a lot of information through a group quickly. Rapid partner swapping ensures that a good idea, once envisioned, is soon practiced by every pair. Replacing individual accountability with team accountability empowers each person to do those tasks at which he excels – and allow someone else to take over for his weaknesses.

E colocando o chapéu de desenvolvedor, para mim o principal benefício da programação em pares é um ambiente de trabalho muito melhor, e uma maior integração entre todos os membros da equipe. Faz diferença trabalhar ao lado de alguém, podendo conversar, trocar idéias e criar um relacionamento, ao invés de simplesmente chegar na empresa, sentar na frente de um computador e ficar lá até a hora de sair, sem falar com ninguém, como eu já vi em alguns ambientes onde eu trabalhei.

É claro que podem também surgir problemas na programação em pares, como é ressaltado nesse post, onde a troca excessiva de pares pode ser um problema. No entanto, ainda acho que esse e outros problemas podem ser resolvidos com bom senso, e os benefícios da prática são muito maiores.

Mas o que me incomoda um pouco (e também é uma das razões desse post), é que no Brasil pouco se tem falado sobre a utilização de programação em duplas. Em todas as listas e blogs que eu acompanho, essa prática era ressaltada a algum tempo atrás, mas parece que foi perdendo força aos poucos e hoje quase não é citada. Além disso, não tenho ouvido muitas notícias de empresas no Brasil adotando essa prática, ao contrário do que acontece no exterior.

Espero que eu esteja errado, e que as empresas estejam percebendo as vantagens de programar em duplas, e de como essa prática pode ser fundamental na formação de uma boa equipe de desenvolvimento de software.

Então, o que vcs acham, duas cabeças pensam melhor do que uma?

Abraços.

Behaviour Driven Development

Para os que não sabem, atualmente eu estou em Bangalore, na Índia, participando do treinamento que a Thoughtworks oferece aos seus novos graduates, a ThoughtWorks University.

Bom, ontem, depois de assistir a uma sessão opcional do curso, apresentada pela Liz Keogh, eu finalmente posso dizer que entendo o que é Behaviour Driven Development, o famoso BDD. Essa é uma das buzzwords do mundo do software que circula ha algum tempo, mas devo confessar que nunca consegui parar para verificar o que era, e sempre imaginei que fosse mais uma metodologia ágil, tipo o FDD.

Acontece que o Behaviour Driven Development é algo talvez até mais simples, mas nao por isso menos interessante :-) .

BDD nada mais é do que uma “otimização” do desenvolvimento orientado a testes, que tem como sua principal característica, e ainda mais importante, benefício, o fato de codificar as aplicações em uma linguagem voltada para o que é mais importante e muitas vezes esquecido, o resultado que a aplicação tem para o cliente.

Olhando por aí, uma justificativa interessante que eu achei foi a seguinte, no blog do Dan North:

As a final thought, while I was thinking about this I realised the term “behaviour-driven” contrasts with “test-driven” in a similar way. My goal as a developer is to deliver a system that behaves in a particular way. Whether or not it has tests is an interesting metric, but not the core purpose. “Test-driven” development will cause me to have lots of tests, but it won’t necessarily get me nearer the goal of delivering business value through software. So you can use goal-oriented vocabulary in your development process as well as your code to help maintain perspective on what you are trying to achieve.

Já que todos (todos?) concordamos que entregar valor de negócio para o que cliente é o que realmente importa no desenvolvimento de uma aplicação, porque não desenvolver essa aplicação de acordo com a linguagem do cliente, de forma que até ele possa entender (mesmo que em um nível básico) o que a aplicação está fazendo, e para que serve aquele código.

É claro que não é só esse o benefício, já que muitos de vcs devem estar pensando: para que diabos o meu cliente que ver o código-fonte do software?

Mas desenvolver código-fonte de acordo com a linguagem do negócio também auxilia o desenvolvedor a entender e discutir as funcionalidades que ele está desenvolvendo, e realmente saber qual é o objetivo de ele sentar na frente do computador 8 horas por dia, o que invariavelmente resulta em código de melhor qualidade.

Comentários?

Um abraço.

Empresas x Funcionários (Round 3)

O post de hoje surgiu de uma discussão que está havendo em uma das listas em que eu participo (round 1), onde o assunto principal é como as empresas devem lidar com a questão do conhecimento, ou seja, como fazer com que o funcionário (que pode ir embora a qualquer momento) não seja detentor de tudo o que uma empresa de tecnologia tem de maior valor: seu capital intelectual.

Como a lista é de métodos ágeis, vcs podem imaginar que o tópico esteja girando em torno da documentação, e de como ela é (é mesmo?) necessária para que a empresa não seja refém (esse é o termo sendo utilizado…) dos seus funcionários.

Essa discussão já gerou um outro post (round 2), onde o Flávio comenta como isso é ainda mais preocupante em pequenas (ou micro) empresas, que realmente não têm todo esse fôlego para pensar em grandes alternativas. Citando o Flávio:

Vejam, falamos de situação em que micro-pequenas empresas precisam sobreviver dia-a-dia ao mercado burocrático e sufocante que o governo provê… são raríssimas as empresas que conseguem parar, respirar, organizar e seguir adiante. É tudo feito sob-demanda.

Então, a solução, é claro, é fazer as “vontades” dos funcionários. Tornar a empresa atrativa para que estes se sintam satisfeitos e reconhecidos, e assim, permaneçam na empresa.

Realmente, eu tenho que concordar com o Flávio. Já tive a minha micro empresa e sei como é esse cenário que ele está descrevendo. No entanto, eu acho que a solução para esse caso é o mesmo do que para as grandes empresas (claro que um pouco mais difícil… :-) )

No meu ponto de vista, realmente a empresa não deve se preocupar em se tornar “refém” dos seus funcionários, simplesmente pelo fato de que ela sempre o é. Eu não tenho dúvidas de que qualquer grande, média ou pequena empresa (de tecnologia), se perder grande parte dos seus funcionários, não terá mais como seguir competindo no mercado. Eu acho que a preocupação que cada empresa deve ter é de não ser refém de um ou poucos funcionários, porque nesse caso sim, a perda de um funcionário específico (o que pode acontecer com certa freqüência), é um grande problema para a empresa.

É claro que o primeiro passo para que isso não aconteça, assim como alguns participantes da discussão levantaram, é fornecer um bom ambiente de trabalho para todos que estão na empresa. Não acho que se deva ser refém do funcionário, nem fazer todas as vontades dele, mas sim respeitá-lo e valorizar o trabalho que ele está fazendo, e isso não passa apenas pelo seu salário, como alguns podem entender. Se dermos uma olhada na Pirâmide de Maslow , que lista as necessidades que as pessoas desejam satisfazer, pode-se notar que a renda (ou segurança de recursos, como está na pirâmide) está apenas no segundo nível de necessidades, e que existem outros três níveis acima, sendo que esses também devem ser providos pela empresa onde essa pessoa está trabalhando (ok, intimidade sexual talvez não…).

Agora alguém deve estar pensando:

Ok, estou fazendo tudo isso, mas nada impede de alguma empresa vir aqui e oferecer um cargo muito melhor para meu funcionário, certo?

Certo. Nada impede isso, e daí que entramos no segundo ponto que eu considero importante. Conforme eu li em algum livro (não me lembro qual), há uns tempos atrás, o dono da empresa (ou gerente da equipe, como era o exemplo do livro) deve sempre saber qual é o Truck Number de sua empresa, ou seja, quantas pessoas devem ser atingidas por um caminhão para que a empresa afunde.

Se esse é um número pequeno, realmente a sua empresa tem problemas. E para resolver isso, nada melhor do que espalhar o conhecimento entre seus funcionários, ou seja, criar uma cultura de troca de conhecimento, e também exigir que os funcionários mais capacitados (os seqüestradores, seguindo a analogia.. :-) ) passem o seu conhecimento para os demais membros da equipe.

E nesse ponto eu discordo de alguma opiniões que eu li durante a discussão, onde se afirmou que deve-se então criar documentos e documentos para armazenar o conhecimento das pessoas. É claro que talvez sejam necessários documentos, mas deve-se ter uma grande atenção na quantidade e também no tipo de documentação que se está criando, já que, assim como em projetos, escrever documentos para ficarem no armário não serve para nada.

O principal é não ter um ambiente (como alguns onde eu já trabalhei), onde cada funcionário é dono do seu nariz, detentor do seu conhecimento e não faz a mínima questão de passar isso adiante, com medo de que se torne substituível por outro. Na minha opinião não serve ter uma pessoa extremamente capacitada se ela não estiver pronta para compartilhar isso com outros.

O mais importante, é realmente criar um ambiente onde o conhecimento seja compartilhado entre os funcionários, seja através de programação em pares, seja através de reuniôes freqüentes, mini-workshops internos ou um wiki da empresa, ou qualquer outro método que se considere interessante, mas ao mesmo tempo não atrapalhe demais o andamento do trabalho, e que realmente seja útil quando aquele funcionário for embora.

Acho que era isso o que eu tinha a dizer, espero que vcs tenham opiniões a respeito!

Um abraço.