2 ms·
TDD is so tragically misunderstood. I don't think this dude knows what he is talking about. Case in point: you don't have to write your tests first. You can wr
by honkycat 7y ago
TDD is so tragically misunderstood. I don't think this dude knows what he is talking about.
Case in point: you don't have to write your tests first. You can write a quick spike first to feel out you API, then rewrite that code with TDD.
Why is this dude so desperate to have this function written quickly? This whole episode could not have taken more than 20 minutes. Sloppiness is the enemy with software development.
"But in real life, features are way more complex than Function X should take a name and output a greeting with that name. Often times the product request will change mid-work, or you’ll realize that the feature can’t work as requested. Maybe your original understanding was flawed and you have to start over."
Smoking gun right here. This is just wrong and stinks of amateur. Features are almost always made of many small functions that do little bits of easily tested work. And if you factor you code well, which is a large benefit of TDD: having well factored code, changes should not collapse you whole sand castle. If that is happening, maybe go back to school. Oh wait, you never went to school, just a 4 week course so you can have low level programming job to toil at...
What he is missing here is the alternative: a big ball of mud with giant functions and poor tests to validate behavior.