News for hackers. Stuff that matters.
Re:Why Most Unit Testing is Waste [pdf] by mattmanser on Thursday March 06, 2014 @11:42AM (#7354770)
The last programmer was terrible...The code had unit tests, however, and that made it salvagable

This doesn't make sense, how could you trust his unit tests?

Re:Why Most Unit Testing is Waste [pdf] by ecoffey on Thursday March 06, 2014 @01:31PM (#7355616)
Because if they're falsely passing, hopefully between the code, and tests you could gleam more intent than just through the code itself
Re:Why Most Unit Testing is Waste [pdf] by couchand on Thursday March 06, 2014 @05:18PM (#7357009)
Exactly. Even poorly written tests are far better than none at all.
Re:Why Most Unit Testing is Waste [pdf] by kashif on Friday March 07, 2014 @07:44AM (#7359869)
No.
Re:Why Most Unit Testing is Waste [pdf] by oakwhiz on Thursday March 06, 2014 @05:17PM (#7357003)
By reading the unit tests and code comments, and comparing them against bits of the actual codebase, you can gain a better understanding of what the previous programmer was thinking and what he was trying to accomplish.
Re:Why Most Unit Testing is Waste [pdf] by scotty79 on Thursday March 06, 2014 @07:27PM (#7357575)
That's the most obvious benefit of having tests for me. Documentation can be outdated and even if it isn't it very rarely contains examples of use. Passing tests are for me exactly that. An up to date example of how the thing should be used and what can I expect from it.
Re:Why Most Unit Testing is Waste [pdf] by PaulHoule on Thursday March 06, 2014 @02:03PM (#7355828)
In the old system a lot of things worked right.

For better or worse, this system had a number of data-centric objects; these objects passed many correct tests, but they failed to be deserializable from XML (because of the way collections were handled) as well as having other deficiencies.

The tests meant I could fix those deficiencies quickly and have faith that I fixed them correctly. Of course, I added new tests to test that the system did the things it had to do.