Re:Test-driven development: A great idea hiding behind a ter...
by eza on Sunday September 15, 2019 @06:46AM
(#20976610)
Agreed, it increases linearly. But now think about the cost of change without tests. The longer you wait to introduce the change the more you will have to change (increases exponentially). If this code was fully tested and maybe refactored (isolated) when the need arises, the cost of change would almost go to 0 because you would only have to implement a new feature without touching the old code.
[ Parent
| on HN ]
Re:Test-driven development: A great idea hiding behind a ter...
by okl on Sunday September 15, 2019 @06:51AM
(#20976627)
You assume that changing a software that has tests is free, which is wrong.
Your previous-to-last sentence applies equally to a software project with or without tests.
Re:Test-driven development: A great idea hiding behind a ter...
by okl on Sunday September 15, 2019 @07:00AM
(#20976662)
> If this code was fully tested and maybe refactored (isolated) when the need arises, the cost of change would almost go to 0 because you would only have to implement a new feature without touching the old code.
You don't even know the "change", you just assume that it will be a change that takes zero effort to implement, to satisfy your argument.
Re:Test-driven development: A great idea hiding behind a ter...
by BigJono on Sunday September 15, 2019 @07:18AM
(#20976721)
I don't really get what testing has to do with whether or not a piece of code is isolated or not? For example if you're making a change to a 4 line function with a clearly defined interface, the change is probably going to be trivial, regardless of whether the interface is defined by a set of unit tests or a short comment above the function declaration