News for hackers. Stuff that matters.
Re:I have complicated feelings about TDD by no_wizard on Thursday August 18, 2022 @06:21PM (#32515558)
thats kind of TDDs core point. you don't really know upfront, so you write tests to validate what you can define up front, and through that, you should find you discover other things that were not accounted for, and the cycle continues, until you have a working system that satisfies the requirements. Then all those tests serve as a basic form of documentation & reasonable validation of the software so when further modifications are desired, you don't break what you already know to be reasonably valid.

Therefore, TDD's secret sauce is in concretely forcing developers to think through requirements, mental models etc. and quantify them in some way. When you hit a block, you need to ask yourself whats missing, then figure out, and continue onward, making adjustments along the way.

This is quite malleable to unknown unknowns etc.

I think the problem is most people just aren't chunking down the steps of creating a solution enough. I'd argue that the core way of approaching TDD fights most human behavioral traits. It forces a sort of abstract level of reasoning about something that lets you break things down into reasonable chunks.

Re:I have complicated feelings about TDD by pjmlp on Thursday August 18, 2022 @06:38PM (#32515663)
I doubt ZFS authors would have succeeded designing it with TDD.
Re:I have complicated feelings about TDD by no_wizard on Thursday August 18, 2022 @06:53PM (#32515786)
What's inherent about this problem that wouldn't benefit from chunking things into digestible, iterative parts that lend themselves nicely to the TDD approach as I described?
Re:I have complicated feelings about TDD by pjmlp on Friday August 19, 2022 @02:51AM (#32518161)
Don't write any code without tests doesn't provide a path to data structure design, or device drivers infrastructure.
Re:I have complicated feelings about TDD by no_wizard on Saturday August 20, 2022 @07:36PM (#32536088)
What about behaviors and expectations? At the end of the day you’re verifying behaviors and expectations of software. I mean when designing a solution you need to think these things through. TDD compliments this just the same