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
![](/static/devrant/img/pipeless-devrant-banner-white.png)
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Lensflare1588948d@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. -
tosensei803047dtests only make sense if you're not an idiot, and your project is more complicated than a piece of toast.
-
Lensflare1588947d@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. -
Jabb0323847d@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. -
Lensflare1588947d@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. -
@Lensflare To be honest I haven't researched it at all. I'm on vacation mode 😎
-
Lensflare1588947d@devdiddydog that butthead just dropped this bomb and then is enjoying the chaos without engaging himself 😂
-
devdiddydog147646d@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