News for hackers. Stuff that matters.
Re:Write tests. Not too many. Mostly integration by hacker_9 on Friday October 27, 2017 @10:04AM (#15568341)
No with TDD you don't need to go in with a structure in mind, the structures arise as you write more tests and get a proper understanding of what components you'll require. Red, green, refactor - each refactor brings you closer to the final design.
Re:Write tests. Not too many. Mostly integration by meheleventyone on Friday October 27, 2017 @11:23AM (#15569277)
That's the mantra often quoted but it always makes me think of the famous Sudoku example from Ron Jeffries. Basically as a mantra it falls down if you don't understand the problem domain. It's popular because it works for the sort of simple plumbing that makes up a lot of programming work. This problem is particularly true for anything creative you're trying to express as the requirements are often extremely fuzzy and require a lot of iteration.

If you don't know how to solve a problem you actually need to do some research and possibly try a bunch of different approaches. Over encumbering yourself with specific production focused methodologies hurts. If you're doing something genuinely new this can be months of effort.

After the fact you should go back and rewrite the solution in a TDD manner if you think it benefits your specific context.

Re:Write tests. Not too many. Mostly integration by seanwilson on Friday October 27, 2017 @01:24PM (#15570419)
> After the fact you should go back and rewrite the solution in a TDD manner if you think it benefits your specific context.

Why? Why not add tests to your existing code?

Re:Write tests. Not too many. Mostly integration by seanmcdirmid on Friday October 27, 2017 @01:32PM (#15570486)
Because it was never meant for production at all.
Re:Write tests. Not too many. Mostly integration by seanmcdirmid on Friday October 27, 2017 @10:17AM (#15568504)
That really isn’t exploratory programming. The end result should be code that you throw away en masse (it should in no case reach production). Otherwise, production practices will seep in, you’ll become attached to your code and the design it represents, hindering progress on the real design.

When I was a UX prototyper, none of my code ever made it into production.