Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Lensflare17475153d@ScriptCoded that particular one was a null pointer error and could have been prevented by using a language which has non-nullable types. No tests needed.
Otherwise, the first line of defence against null pointer are assertions.
Tests should be used for higher level problems/bugs. -
tosensei8453153dtests only make sense if you're not an idiot, and your project is more complicated than a piece of toast.
-
Lensflare17475153d@jestdotty seriously? Have you ever heard of regressions?
The tests make sure that things don’t break when the code base changes.
Also tests can be a kind of documentation about the expected behavior.
Even for yourself in 3 months when you forget what the fuck that code should be doing. -
Jabb03265153d@jestdotty
> but if I run the test once and know it works why would I keep the test after that
I can't really tell, but hopefully it's a joke. -
Lensflare17475153d@jestdotty for the vast majority of code, you are right. But there definitely are some rare cases where tests absolutely make sense.
I think the main issue is that many people don’t understand it and then write test for the sake of testing or try to reach a specific % number of test coverage.
If they then don’t see the point of testing, it’s completely understandable.
But dismissing testing entirely is also the wrong approach. -
ScriptCoded18848153d@Lensflare To be honest I haven't researched it at all. I'm on vacation mode 😎
-
Lensflare17475152d@devdiddydog that butthead just dropped this bomb and then is enjoying the chaos without engaging himself 😂
-
devdiddydog1486151d@Lensflare Yep, next it will be "Linux is not for production, Windows is for trad wives. Change my mind."
Tests only make sense in TDD.
rant