5

Tests only make sense in TDD.

Comments
  • 15
    This is why we get things like 8 million computers bsoding
  • 0
    Bullshit
  • 1
    @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.
  • 4
    tests only make sense if you're not an idiot, and your project is more complicated than a piece of toast.
  • 2
    @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.
  • 0
    @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.
  • 1
    @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.
  • 1
    @Lensflare To be honest I haven't researched it at all. I'm on vacation mode 😎
  • 1
    What if you use RDD (reation driven development)?
  • 2
    Clickbait
  • 2
    @devdiddydog that butthead just dropped this bomb and then is enjoying the chaos without engaging himself 😂
  • 0
    I’d agree for unit testing specifically
  • 1
    @Lensflare Yep, next it will be "Linux is not for production, Windows is for trad wives. Change my mind."
Add Comment