An unfortunate admission - I'm not doing TDD on the new version of MtgDiscovery.
I have excuses.
- I'm doing A LOT of experimentation.
- I don't have to make sure it works.
- I've got a massive ego and assume the shit I do works.
- I don't wanna log into work to check how we structured similar.
- ... I have plenty more...
Do as I say not as I do.
<tangent> I may have mentioned it before, but I have an understanding of what DHH says when he proclaims TDD is dead. If you can write GOOD object oriented code (if you think that's you - it's not) and do end-to-end or integration tests... and be good... Maybe. I think DHH said he did TDD for a decade before becoming disillusioned and declaring that TDD induces design damage.
I agree. Blind TDD fucks up the code. Red-Green-Repeat fucks up code. Refactoring is important.
I had a point... Right - when I cram out code like this, it's following the practices I've developed over the course of strict application of TDD. Which means when I get around to slathering it in tests, I won't have a lot of hard to test areas.
So - having said I'm not doing TDD on this... a lot like working solo... I'm encountering a point where I wish I had tests.
I'm getting into implementing functionality that's 99% the same as functionality I've implemented. The "slight" alters are a PAIN IN THE ASS to make sure you get right via running it. The problems show up in series. :( Taking a long time to fix them all.
While I was working on this I had the though, "What next?" and ... if I had tests, I'd know. If I had tests I could refactor the fuck out of the code and and not have the little fear of something being broken.
Right now, I gotta run the app, click through stuff, poke around, make sure things are doing what I expect... tests... click a button and a few seconds later I'm moving onto the next thing.
I do this to myself; ... silver lining is that I get something out of it. As I'm sure we all do - I know what it takes to ensure functionality in non-TDD (or just well tested) code and I know that you're never quite sure. Refactoring ALWAYS carries risk without tests. With tests, it carries, at worst, mild inconvenience.
On my own stuff I often work solo, I don't write tests... and every fucking time... I wish I was mob programming with TDD. SIGH.
Anyway, just a small thing that stood out as I'm rolling my face on the keyboard, tests help me know what's next and when I'm done with something.