News for hackers. Stuff that matters.
Re:Write tests. Not too many. Mostly integration by seanmcdirmid on Friday October 27, 2017 @08:56AM (#15567817)
Maybe writing code for exploration and production should be considered separate activities? The problem with these coding ideologies is that they assume there is only one type of programming, which is BS, the same as assuming a prototype is the same as a working product.
Re:Write tests. Not too many. Mostly integration by seanwilson on Friday October 27, 2017 @01:22PM (#15570407)
What's exploratory programming though? Unless you're writing something that's very similar to something you've written before and understand it well, most programming involves a lot of exploration.
Re:Write tests. Not too many. Mostly integration by seanmcdirmid on Friday October 27, 2017 @01:50PM (#15570650)
Well, UX prototypes for one. In research, most projects never go into production, those that do do so without researcher code. Heck, even in a product team, if you are taking lots of technology risks in a project, you are going to want to work those out before production (and it isn’t uncommon to can the project because they can’t be worked out).
Re:Write tests. Not too many. Mostly integration by hacker_9 on Friday October 27, 2017 @09:29AM (#15568045)
To be fair, TDD is quite good for exploratory programming, as it makes you think about the intent or your API up front.
Re:Write tests. Not too many. Mostly integration by seanmcdirmid on Friday October 27, 2017 @09:37AM (#15568099)
Not really. It makes you commit to an API upfront, this is the exact opposite of what exploratory programming should be (noncommittal, keep everything open).
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.