I have been reading quite a bit recently about TDD and such and I'm not quite sold on it just yet.. I make a lot of small hobby projects(just me) and I'm concerned if trying to do TDD is overkill for such a thing. Though I have seen small open source projects with like 3 developers that do TDD. (though I have seen a few one-person projects that also do TDD)
So is TDD always a good thing to do or at what threshold does it make sense to use?
When Not to Use Test Driven Development. Test-driven development can backfire when the environment is not suitable or it is used incorrectly. One should consider these topics when planning to use TDD: Cost of implementing functionality.
Conclusion. In my personal experience, I've seen many organizations and "professionals" claim that TDD is absolutely necessary for software development, but I've never seen it strictly mandated. It is still up to the developer or team to follow through on it.
TDD is Time Consuming and Costly, in both Short Term and Long Term. In previous section we've already discussed why TDD is time consuming in short term: you have to spend significant time on refactoring and rewriting your code. But in the long term it will cost more time as well. Remember, test cases are code, too.
TDD disadvantagesForget to run tests frequently. Write too many tests at once. Write tests that are too large. Write tests that are overly trivial.
Small Projects can have a habit of turning into big projects without you realizing, then you wish you'd started with TDD :)
TDD shines in small projects. It's often much easier to adhere to TDD in a small project, and it's a great time to practice and get the discipline required to follow TDD.
In my experience larger projects tend to be the ones that abandon TDD at some threshold. (I'm not suggesting this is a good thing).
I think larger projects tend to abandon it for a couple of reasons:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With