Tuesday, April 1, 2025

When 'Best Practices' Bite You

I know it's a cliché, but there's no silver bullet. Is refactoring always worth it? No. Is Test-Driven Development always beneficial? Of course not. Should you always add test scenarios to cover every known gap? No. Should automated tests be your goal in every project? Again, no.

Don't get me wrong, I'm far from advocating against these solutions. In fact, I recommend quite the opposite; you should have a compelling reason not to use them. And trust me, your project is likely not as unique as you think. In most cases, developers' arguments against these practices are excuses, not justifications.

However, we should give each decision a moment of reflection and assess whether the benefits truly outweigh the costs. Even your favorite approaches can increase costs and slow down implementation at best, or render it unprofitable at worst.