4 ms·
> I'm sick of wasting time writing worthless tests. I'm sick of fixing more tests than bugs. I think as an industry we need to look at tests, particularly unit
by johncena33 6y ago
> I'm sick of wasting time writing worthless tests. I'm sick of fixing more tests than bugs.
I think as an industry we need to look at tests, particularly unit tests, and Test Driven Development (TDD) through critical lens. Writing unit tests is seen as a virtue while in reality how much value an individual unit test adds given the cost of writing, running and maintaining unit tests.
What baffles me the most is TDD. I have seen front end teams of startups doing very simple apps following TDD. I have delivered complex data pipeline project without writing a single unit test. I wrote functional tests and lot of monitoring tools for the pipeline. But not a single unit test. It worked perfectly fine in production. For technically simple projects I just don't see any value in following TDD. And the value of unit tests for simple projects should be very carefully thought through.
- rightbyte 6y agoIt is the processes around tests that mess up devs day I think. Having the rule of all tests need to pass for a submit and no way to just remove failing tests due too over zealous review process. Tests testing the implementation rather than the problem. Old tests on undocumented code. Etc.
- moron4hire 6y agoTDD only works when you're building something to a pre-defined spec. But so much of what we do has no spec, or a spec that is constantly in flux. Add on to that the fact that anything we would need that does follow a strict specification is probably already implemented, there ends up being very little need for TDD in the wild. It's great if you need it, but few people actually need it.
- soco 6y agoStill, if you start your day building one thing, I strongly assume you know what you're going to build that day. And you start with writing a test to confirm you actually built at the end of the day the thing you planned. Will you keep that test? Maybe yes, maybe not, but you got your confirmation at the end of the day. This is TDD for me.
- wolfgang000 6y agoI wholeheartedly disagree with TDD part, I get it unit tests are more fragile in fact, I prefer integrations and module tests over unit test but doing the test upfront it a worthy investment, because speed up the development (because you only have run the test to validate the new feature) and also more often than not after the feature is done without the tests then the tests are never made