News for hackers. Stuff that matters.
Re:Ask HN: How do you familiarize yourself with a new codebase? by davelnewton on Friday June 26, 2015 @02:23PM (#9786704)
Some unit testing might be a joke, but not all unit testing. If you have small units-of-work they should be tested, or at least testable.

Integration testing often makes a lot more sense, though.

Re:Ask HN: How do you familiarize yourself with a new codebase? by kansface on Friday June 26, 2015 @09:29PM (#9788697)
I believe I'm in the minority, but I think unit tests are nearly universally worthless - exceptions being those for well defined APIs (eg math). Good unit tests must have an independent oracle of truth or else you aren't testing anything. As a practical matter you should only write tests for code that materially impacts the business (or you are just wasting everyone's time ). Instead of writing regression or integration tests, which are hard (hence the need for testing), people absent mindedly write unit tests and point at code coverage.
Re:Ask HN: How do you familiarize yourself with a new codebase? by davelnewton on Sunday June 28, 2015 @10:19AM (#9793534)
I'll need concrete examples of good/bad tests to have any idea what you're talking about at this point. You say they're worthless but then say they're good for well-defined APIs, which is precisely what unit tests are for.