Home > News content

Do not pay attention to the cost of TDD and Code Review

via:博客园     time:2016/12/21 15:30:28     readed:644

English Original:The Outrageous Cost of Skipping TDD & amp; Code Reviews

In recent years, more and more people have begun to consult with me the benefits of test-driven development (TDD). The so-called TDD, is deployed in the code before the use of a variety of automated testing to ensure that the code can work properly. In the test, you need to find where the test failed, and then continue to modify, if necessary, also need to rewrite the code.

Practice has proved that, TDD software development process is an indispensable part. But it can also help businesses and employees save a lot of time.

What you need to know is that TDD can help you reduce code repair time by 40-80%. Be aware that the more bugs in the production code, the higher the maintenance costs you will need to pay.

BM System Sciences Institute's research shows that the time to repair code in the production phase is more than 100 times the repair time in the design phase, more than 15 times the world of the deployment phase fix code.

Using this set of data, let's see if we do not spend TDD, we need to spend much time cost. Without TDD, your project will take 1,000 hours in the deployment phase, which does not include maintenance time costs:

In other words, TDD can help you save 623 hours, if your engineering team has four individuals, which means that can help you save a month's development time. US developers average annual salary of 95,000 US dollars, and then count the welfare of these people, TDD can help you save 37,000 US dollars.

Of course, this is only a rough calculation, TDD can help you how much cost savings, but also depends on many other factors.

But the importance of TDD is still evident, it can really help you save a lot of time and economic costs.

The Role of Code Review

Like TDD, Code Review has a similar role. In fact, some studies show that, Code Review even more than TDD can help you save costs. A 1988 study showed that an hour of Code Review can help you save 33 hours of code maintenance time later.

This figure looks amazing, right? But I personally think that in the search for bugs, Code Review and no automation tools easy to use. So what is the usefulness of Code Review?

Knowledge sharing. After the introduction of Code Review, your team will automatically begin to share their knowledge, experience and working style with each other. As a result, everyone in the team will begin to grow faster, and the initial engineers will continue to learn from the senior engineers, and the team will continue to grow. For the enterprise, with an excellent engineering team, is one of the most important assets of the enterprise.

Developers are most afraid of disturbing

What are the costs of fixing bugs? In the production stage to repair the code, in fact, the cost is much higher than in the development stage to fix bugs, and make developers very headache.

In the production stage found bug, the developer must put down the work at hand to solve this bug. In other words, the developer was immersed in a work, but had to jump out of the current situation into the bug fix the situation. After fixing the bug, jump back to the previous situation.

Switching the scene takes approximately 20 minutes. And even worse, after a bug is found, many times means that the developer had to do the work will be affected by the bug, a lot of their work needs to be pushed to the re-. Researchers at Microsoft Research show that after being bothered, developers need to double the expected time to complete the task, and the chance of error will be doubled.

It's not a good idea to get developers to handle multitasking. In order to improve their work efficiency, it should let them focus on one thing.

to sum up

If someone tells you that they do not have the time or budget to use TDD and Code Review, you may want to talk to him about TDD and Code Review to help him save much time and economic costs.


Author: Lu Xingyun (compilation)

China IT News APP

Download China IT News APP

Please rate this news

The average score will be displayed after you score.

Post comment

Do not see clearly? Click for a new code.

User comments