article thumbnail

TDD and Legacy Code

Net Objectives

TDD is a powerful way to develop new code. However, most organizations have significant existing code that was not developed this way. This “legacy code” is often difficult to test because it was not designed to be testable in the first place.

article thumbnail

TDD and Code Coverage Tools

Net Objectives

In TDD and Code Coverage, we established that code coverage tools do not provide useful project metrics, in and of themselves. In TDD, we don’t use code coverage tools for this purpose because we don’t need to. Continue reading "TDD and Code Coverage Tools". .

Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

TDD and Code Coverage

Net Objectives

It’s not unusual these days for development organizations to adopt a code coverage requirement. This is usually expressed as a percentage: at least X% of all code developed must be covered by tests.

article thumbnail

What Is TDD?

Net Objectives

I am heartened by the surge in TDD training. To me TDD is the 2nd most important thing for devs to learn-ATDD being the 1st TDD’s not just the automation of unit testing. TDD’s formulation of tests, prior to code, drives design. High quality code is easy … Continue reading "What Is TDD?".

article thumbnail

TDD Replicating Algorithms

Net Objectives

Developers often remark that the tests may contain the same algorithms that the production code does. This feels like redundancy and makes them wonder if TDD is promoting bad practices. The code would contain something like this: return (F - 32) * 5/9; The test might contain … Continue reading "TDD Replicating Algorithms".

article thumbnail

TDD Yields Velocity

Net Objectives

When TDD was first suggested, there were many who were dubious about the wisdom of having developers write tests of their own code. Among the objections raised was that developers will slow down if you burden them with new tasks, namely writing the tests as well as the code. This seems logical.

article thumbnail

TDD and Reported Defects

Net Objectives

Typically, a “trouble ticket” or similar artifact is generated, and someone is assigned the task to 1) locate and then 2) fix the errant code. TDD views this very differently. In TDD, a “defect” is code that … Continue reading "TDD and Reported Defects".