I was doing a quick research for this article using Google trying to find arguments standing for the claim that "quality is expensive". I was trying to find some resources saying that care for quality in the early stages of the software projects doesn't make sense and doesn't pay - I find it very difficult and I cannot share with you any reasonable links (maybe except for this one which refers to another post saying that "Quality Sucks").
What does it mean? It means that software people know that quality is very important. Why then quality of software products sucks in more cases than it rocks?
In many big corporations following waterfall model there is a special team named QA (Quality Assurance). This team's responsibility is (not surprisingly) to assure appropriate level of quality in the software product. This is fine, this is perfectly OK, except that QA is considered as a separate activity. This is the "Verification" or "Testing" box in the waterfall model diagram.
The biggest problem with this attitude is that QA team gets the product after it has been implemented and this is the root cause of all evil. QA is considered as something separate - we first do the product and then we care about the quality. This way of thinking is wrong. You should care about quality from the day one, before you write a single line of code.
Software teams should "build quality in" their products and QA should not be considered as a separate activity. Quality Assurance should be constant process of improving the product - QA activities and people should be involved in the development of the product during the development, not after when the developers are moved to another projects or even teams.
In this post I will try to explain "Build Quality In" principle from "Implementing Lean Software Development - from Concept to Cash" book. I will present few practices that will help your team build software with quality built in.
In order to achieve high quality in your software you should start worrying about it before you write single line of working code. It means that you should write test first and use all the frameworks that will facilitate your test suite (e.g. use mock objects). Track your code coverage - don't be too anal about it because 100% code coverage should not be the goal of your software but use it as an indicator to see which parts of you system should be tested more. And use all other tools that you feel are necessary to test your software thoroughly - unit testing is very often not enough.
Reduce partially done work - tasks that are 90% done usually takes another 90% of total time to finish - keep focused on one task and make it complete, then you can go to the next one. Try not putting defects on a list - stop and fix them the moment you discover them. Known bugs residing in your software will cause more defects in the future - don't allow this to happen (however issue tracking system can be sometimes useful e.g. for collecting requests from your customers).
Integrate your code as soon and as extensively as possible - commit your changes to CVS, SVN, etc. at least once a day and ensure all the tests give you green light. Don't wait with synchronization because it will hurt - you will spend more time on integration than on development. And you will get frustrated.
Even the best engineers make mistakes - you cannot avoid it - they are not robots (that may make mistakes too, btw.). Eliminate risk of mistakes by automating everything that is routine-work. Almost everything that is a repetitive work can be automated. And you should do this as soon and as early as possible - the best is to have continuous integration engine before committing a single line of code.
You should automate testing, building, installations, anything that is routine, but do it smartly, do it in a way people can improve the process and change anything they want without worrying that after the change is done the software will stop working. Automate in order to make people feel comfortable improving the software, tests, installation process, etc. by changing whatever they feel is necessary.
Code in your software product should be as clean and as simple as possible. You can easily ensure it using static code analysers - they really work and can be a real pain in the ass for lousy developers (that's good because they will learn how to write clean code and follow the conventions).
Eliminate code duplication to ZERO - every time it shows up refactor the code, the tests, and the documentation to minimize the complexity. Using modern IDEs it's pretty simple and gives developers fun.
I hope pieces of advice given above will make it easy to understand how to put "Build Quality In" principle in practice. If you need more detailed description with more examples and more sophisticated explanation you should definitely go to "Implementing Lean Software Development - from Concept to Cash" book.
PS. Other articles in this series can be found here:
Comments
Quality sucks
December 4, 2008 by sginter, 31 weeks 5 days ago
Comment id: 2079
Quality sucks, because it requires expensive to learn and troublesome to sustain practices:
1. You need to be proficient in the technology you use. In Java, you need to learn about concurrency, you need to understand how JVM works, you need to know and use some design patterns - that is just overhead you need only when you want the quality thing in your code.
2. Writing unit tests takes time you could spend on writing new features or fixing bugs (and you need to learn test frameworks, *Mocks, write your code so it is well structured and testable - total waste of time)
3. You need to communicate with other developers to write coherent code, which harms your focus and sometimes makes you change your mind and rewrite code that you said you have already DONE
4. You need to integrate your code continuously, which is a major waste of time, as this should be done just before the project is due (every project has a scheduled schedule slip just for integration anyway)
5. If you test your code (and automatic testing is esp. harmful), you may spot regression bugs that would force you to revisit code that is DONE. It's just easier not to know about bugs at all then conceal known bugs or, worse, spend time fixing them.
6. Refactoring is just plain evil. Why touch code that (mostly) works?
Just study Toyota production
December 4, 2008 by pbielicki, 31 weeks 5 days ago
Comment id: 2080
Just study Toyota production system or another "lean" source and you will understand that "quality is cheaper". If you don't care about quality from the very beginning your technical debt is growing and eventually you end up with crap.
That's my point
December 4, 2008 by sginter, 31 weeks 5 days ago
Comment id: 2081
I would like to get a penny each time I hear "we have so much technical debt that we don't have time to deal with the technical debt".
It's phrased differently, of course, but the actual meaning is the same.
Seriously (this time ;-) ) : quality really pays off, but you don't get it for free, and you have to invest effort now to get most of benefits in the future.
It's just difficult to convince yourself (or others) that it's worth it. Just like diet :-)
Now you're talking :) Of
December 4, 2008 by pbielicki, 31 weeks 5 days ago
Comment id: 2082
Now you're talking :) Of course quality is NOT FREE. But all in all quality is CHEAPER than lack of it. Not all investments pay off but the one in quality ALWAYS does.
Cars versus Toys
December 6, 2008 by Anonymous (not verified), 31 weeks 3 days ago
Comment id: 2091
Thing is many software financers are perfectly find with producing toys from China. Cheap knockoffs that generally work but not for long just enough to get by. Sometimes its an issue of, why should I pay $500 for this bicycle when I can get one for $50. And in reality if you don't plan to use the bike very often and are just purchasing it to see if you like bikes maybe it makes sense. On the other hand, if you want a well built car that is going to last you for 20 years its generally worth it to spend the bit extra instead of getting a Kia. Of course some buyers want a Porche for Kia cost, but that is a different issue.
Good and simple article
December 9, 2008 by Anders Nyberg (not verified), 31 weeks 11 hours ago
Comment id: 2094
Hi,
Thanks for a good and simple article about Quality in Lean and Agile software development. I started to care about and implement Lean and Agile principles in my software development section within Sony Ericsson about 1,5 years ago, and I can really see the difference since we started to work with what you are mentioning in your article. Now-a-days my developers for example make statements like
"I can't understand how I could work without continous integration before". We also went trhough a huge clean-up of our technical debt and gigant backlog of work in progress by using kanbans and a good team effort. It made a bid difference being able to reduce the number of open issues to a number that is managable and possible to overview. We still have a way to go with the unit testing since a lot of our old legacy code is untested, but we are working on it.
If you are interested you can check out how we work with Scrum, Kanban, continous integration and other Lean and Agile tools on my blog, http://aenyberg.blogspot.com/
Best regards,
Anders Nyberg
Post new comment