Background
This is observed in one project that the amount code for bug fixis almost as much as the amount of code for feature.
Conclusion
If we don't have those bugs, wecan save effort, 2 times effort for feature development.
So, the conclusion is that the bugfix is waste.
However, to me, I come to acompletely different idea this morning when I was brushing my teeth, in thisparticular circumstances,the effort paid for feature development isactually the waste.
Reason
All code in feature developmentare proved wrong, as each line of code in feature development needs one line tofix. The final working software is coming from the bug fix, not from thefeature development.
Argument
If the amount of code forfeature is about 90% of the total, and amount of code for bug fix is only 10%of the total, then which one is the waste?, this argument is raised by Mr.Zhang Gang.
My response will be:
How do you know that 10% amountof code won't do all the feature work? though actual 90% code was put in place,maybe, 80% of them is waste, plus, the rest 10% need to be fixed, then all 90%code for feature development is waste.
Key point
Knowledge is the key point.
- you know your code is in need,not useless
- you know your code is corrector not
Difference between bug fix and feature development is aboutknowledge
Bug fix
we know it's in need, or else,there won't be a bug report in first place, and we know the code is correct, asfinally the bug report closed after validation
Feature development
In our current developmentprocedure, we don't have either knowledge, we assume we have, because we haveFS, functional specification, which took a lot of effort and time to generate,as well as a lot of effort and time to be reviewed, also, we have our codegenerated with a lot of effort and time, and reviewed with a lot of effort andtime. Which are all proved wrong at last by the amount of code is as much asthe feature code
What we do
Start test as early as possible,even ATDD, which makes the feature development gains the same knowledge as thebug fix procedure
If we take the cost of delayinto consideration, ATDD not only saves our effort in coding, it also saves thecost of delay
At least, please start testearly.