sabato 25 giugno 2011

Professionalism is all about taking responsibility - First : Do Not Harm to Function

I just started reading the new Uncle Bob's Book "The Clean Coder".

From the beginning it seems another great book.

Actually I'm reading the first chapter titled "Professionalism".

I completely agree with Bob when he write "professionalism is all about taking responsibility"


How do we take responsibility?

Uncle Bob says "First, Do Not Harm" :

  • do not harm to Function
  • do not harm Structure
Do not harm to Function, by being responsible for your errors.

because the only way to not harm the function of our SW is not creating bugs therefore to be professional we must not create bugs .

You must apology for every bug QA or even worst users find.
But this is not enough, you have to struggle for decreasing your bug rate towards the asymptote of zero.... we know zero is impossible but this is not an excuse for not trying to be as close as possible to it.  

He tell us that it's unprofessional to send to QA "code you aren't certain about".

YOU MUST KNOW IT WORKS and you have only a way to be sure it works:

You have to Test it, Test it and Test it .

Uncle Bob demand, not only suggest, for 100% test coverage.

Naturally he tell us 100% is an asymptote as for 0 bugs.

He tell us that if code is hard to test the only reason is that "code has been designed to be hard to test" so  "design your code to be easy to test".

Uncle Bob naturally tell us which is the best way to design our code for easy testing, "write your test first".

Here ends the first part of the story, in a future post I will talk about the Uncle Bob advise on how Do Not Harm Structure.

This is only a very short and raw summary of the Do Not Harm to Function topic, the book is full of explanations, examples and great stories... so I can only say buy the Book The Clean Coder Book and start reading it, for me is a must.

A second advice is to visit The Clean Coders Web Site the videos are cheap and great.

Nessun commento:

Posta un commento