4 ms·
gah! but all those steps make the whole process harder than just thinking hard and writing down the correct function to start with. Or to write several test cas
by tjpick 17y ago
gah! but all those steps make the whole process harder than just thinking hard and writing down the correct function to start with. Or to write several test cases to start with (because you know many of the expected outputs up front) and writing a single function that passes them all.
TDD should make the process EASIER and MORE efficient.
>>> This isn't a perfect example of TDD, but that's not the point.
Illustrating a process by applying it to a problem that doesn't need it is surely the wrong way to go about it. Unfortunately "the point" is mostly dwarfed by the imperfect example.
- garybernhardt 17y agoThis post was aimed at the person who is interested in TDD, but hasn't had their first big insight into how it works. It's about "do the simplest thing", not about a full TDD process to build a working production system. As I said to someone else in this thread, such a blog post would be huge. No one would read it. We wouldn't be here talking about it. :)