News for hackers. Stuff that matters.
Re:Cruz: I Never Put Java in My Resume No Matter How Much Ex... by PaulHoule on Wednesday October 05, 2022 @03:38PM (#33100325)
So you think unit tests are a bad idea?
Re:Cruz: I Never Put Java in My Resume No Matter How Much Ex... by hbrn on Wednesday October 05, 2022 @03:57PM (#33100530)
As a matter of fact I do think unit tests generally cause more harm than good.

They are great for libraries with well defined and slowly evolving interfaces. But unless you're doing open-source, you will rarely work on those.

Write tests. Not too many. Mostly integration.

https://kentcdodds.com/blog/write-tests

Re:Cruz: I Never Put Java in My Resume No Matter How Much Ex... by quantified on Wednesday October 05, 2022 @04:12PM (#33100707)
Any internal library used by multiple other teams has friction on its evolution and refactoring, and don't change interfaces all that much.

Perhaps this turns into another round of clarifying what the discussion participants deem "unit" vs "integration".

Re:Cruz: I Never Put Java in My Resume No Matter How Much Ex... by hbrn on Wednesday October 05, 2022 @04:20PM (#33100822)
Every company is different, but my preference is to break into teams by domain/network boundary. In this case sharing libraries is extremely rare. Teams could easily be on different tech stacks.

Edit: my experience is mostly between seed - series B startups. If you're Google, then of course you're going to have a ton of internal libraries. But I'd put it in the same category as open source.

Re:Cruz: I Never Put Java in My Resume No Matter How Much Ex... by PaulHoule on Wednesday October 05, 2022 @04:21PM (#33100828)
One role of tests is documentation. If you have a large number of examples of how to use an API you know they keep working. Any code snippet used for documentation should have a corresponding test because otherwise the docs will probably break someday. It’s the best case for ‘literate programming’ that there is.