Preferences

zoover2020 parent
Why would you skip unit tests? Especially in the AI age. You can quickly verify your behavior. Also, by not writing them you're also missing out on opportunities to modularize your code.

Obviously, this assumes you write enterprise grade code. YMMV


ozim
You can write modular code without writing tests - I write testable code - I don't write tests. When I need I can always add them back, but I tend to skip it as mostly it doesn't make sense.

But still cottage industry of "clean code" is pushing me into self doubts and shame.

capyba
I’m a mechanical engineer, not a software person, but I write a lot of (hopefully close to professional quality) code for my work. writing tests while in the beginning/middle of my development cycle has been the best change I’ve made in how I do things in quite a long time. Since I’m a self-taught amateur often working solo, its invaluable for helping me gain confidence that everything I’m doing is working correctly as I learn the language/libraries necessary for me to build each new program.

I’m not saying that you yourself have this attitude - but the “tests are for suckers, I just ship” crowd really grinds my gears because to me it says “ha! Why do you care about getting things right?”

Totally get where you’re coming from though, sometimes the expected behavior is trivial to verify or (in the case of GUIs) can be very difficult and not worth the effort to implement.

esafak
If it's testable it's trivial to write tests for! You don't want the next person to introduce a bug, do you?
ozim
Read my original post again. We don’t have bugs that all those “do it right way” people claim doing it for 15 years with good track record.

You just contribute to BS scare tactics of people selling “clean code”.

esafak
How do you know you don't have bugs? Is everything instrumented (observable)? I could just as easily say you're peddling ignorance as bliss!
ozim
You can have a lot of other processes and tests on other levels than unit tests ;)
sigwinch
That’s how I do it. 100% test coverage doesn’t make bug reports irrelevant. Every test should have a reason.

This item has no comments currently.