5 ms·
> If you don't know what you want to accomplish, what are you writing code for? Often times you write to find what you want to accomplish. It sounds backwards
by wvenable 4y ago
> If you don't know what you want to accomplish, what are you writing code for?
Often times you write to find what you want to accomplish. It sounds backwards, perhaps it is backwards, but it's also very human. Without something to show the user, they often have no idea what they want. In fact, people are far better at telling you what's wrong with what's presented to them then enumerating everything they want ahead of time.
TDD is great but also completely useless for sussing requirements out of users.
- randomdata 4y agoIt does not sound backwards at all. That is what TDD is for: To start writing the visible portions of your program to see how it works and adjust accordingly as user needs dictate. Once your program does what the user wants, all you have to do is backfill the "black box" implementation, using test cases created during the discovery phase to ensure that the "black box" provides what the user came to expect. The scenario you present is exactly what TDD was envisioned for. If you know the exact requirements upfront, you don't really need TDD. You can simply write the code to those requirements and, perhaps, add in some automated acceptance testing to help catch mistakes. TDD shines when you are unsure and exploring options.
- deleted 4y ago[deleted]