4 ms·
You are essentially describing 'test driven development', and many of us have either been taught the methodology, or stumbled on to it.[1] [1] https://en.wikip
by nickff 10y ago
You are essentially describing 'test driven development', and many of us have either been taught the methodology, or stumbled on to it.[1]
[1] https://en.wikipedia.org/wiki/Test-driven_development https://en.wikipedia.org/wiki/Test-driven_development
- AnimalMuppet 10y agoNo, abc_lisper is describing decomposition of the problem. That may or may not be implemented in a TDD environment; it may not even involve tests at all.
- nickff 10y agoabc_lisper specifically said: "every problem you do can be broken down into smaller problems, which can be worked independently and tested independently". Unless you delete or ignore "and tested" from that post, abc_lisper's approach definitely involves tests.
- AnimalMuppet 10y agoI stand corrected; what abc_lisper said definitely involves tests. That's not necessarily TDD, though; see my post at https://news.ycombinator.com/item?id=13465459 https://news.ycombinator.com/item?id=13465459 for the difference.
- nickff 10y agoI agree that abc_lisper did not 'exactly' describe test driven development, which is why I said he 'essentially' described test driven development. I am a believer in test driven development, yet I often write a bit of application code before I write the tests; I acknowledge that probably makes me a pariah, but I still keep tests (and TDD) in mind.
- AnimalMuppet 10y agoMeh, I think TDD has value, but I don't think a methodology should become a religion. Write a bit of application before your tests, write most of the tests before the code, you're good to call it TDD in my book. (Of course, being non-religious about methodology may make me a pariah, and not just on TDD; but I can't work up the energy to care...)
- thibauts 10y agoTesting does not automatically imply automated tests. I do break down problems and follow the same kind of process, yet my goal is less automated testing than it is raw flexibility, ability to recombine pieces of code at will and move fast. Chasing automated tests, even if it supposedly yields this kind of composite constructs is in my opinion taking an interesting side-effect of good craft for an end in itself. Then of course, saying the code can be tested in isolation doesn't imply coding is driven by tests. TDD, in my opinion, like all idols in the history of cults is, as an end, the dawn of critical thinking and progress.
- abc_lisper 10y agoI agree decomposing and testing go hand-in-hand, but it wasn't even apparent to me decomposition is the way to go. I guess I didn't know it is possible to design solutions to problems while breaking them down. Btw, I discovered (He hee) testing of modules independently very shortly after I found out about decomposing.