2
meraklis
108d

Immediately after the last major release, I enabled CheckStyle to fail on unused methods and variables, and then I proceeded to delete all dead code. The test suite passed and I got approval to merge. Two months later, the next major release went out the door…guess how that went :)

Using TDD or at the very least writing unit tests ensures your code won’t break, or go missing!

Comments
  • 3
    Unless you know that you have 100% test coverage you cannot only trust the tests.

    But if it survived one release it either had to be rarely used code or some other change that caused the problem.

    TDD is i interesting but I at least feel it less useful for big systems, you can test modules and especially hard logic.

    But once you add IO and GUI pure TDD is much much more work and since especially gui often goes through many tweaks and iterations TDD can add quite a lot of extra work.
Add Comment