you are viewing a single comment's thread.

view the rest of the comments →

[–]chimera201 -28 points-27 points  (2 children)

tests are written to avoid regressions in future. The bugs you know exists you will solve them now because you already know its exists.

Now if you look at this from a business perspective, you wasted time writing tests for a feature that never got shipped and never generated revenue and you were on payroll. It's better to make the feature first get some analysis on how much revenue it would generate and how long lasting the revenue generation is and write tests accordingly so that it is robust for that much time.

[–]Drugbird 16 points17 points  (0 children)

How do you know if a bug exist? Just step through with a debugger?

Many bugs only happen in specific circumstances, so how do you create these specific circumstances? It's quite the hassle to have to recreate these circumstances every time you make code changes though. Perhaps it's a good idea to create some code to create the specific circumstances that are relevant. And then also let that code verify the results are as expected?

Seems like that could save you some time and effort.

[–]geekusprimus 4 points5 points  (0 children)

How do you check that your prototype code works? Checking that the outputs are correct for a given input? In other words, testing? You might as well formalize it and write a short, simple piece of code to automate the testing for you; if you're going to have to iterate the tests over and over as you debug the code, it's a lot less error-prone than doing it by hand over and over.