5 ms·
TDD kills creativity.
by blackrock 6y ago
TDD kills creativity.
- optimuspaul 6y agohow so?
- necovek 6y agoPlease elaborate! I'd really love to learn how a method for creating a particular code structure leads to less creativity! I mean sure, it doesn't really allow you to be creative with eg. using global variables, but I am assuming you mean the end result (product and product ideas), so I am genuinely curious.
- blackrock 6y agoSoftware development is a very creative endeavor. It’s the interplay of data structures and algorithms that brings a program to life. Often times, you know what needs to be solved, that you have to get from point A to B. But you don’t really know how to get there. So you break down your problem even further. And A to B, gets split up into 5 more pieces. And each piece gets split up into another 5 pieces. So in the end, you may have 25 or so individual pieces. Now, how do you TDD this? There is no way that you can know what all those little pieces are, ahead of time. And if you do, then maybe your program is not really that difficult. Or maybe it was already a solved problem, that you can use an existing example to learn from. However, you can do functional unit testing, to ensure that those individual pieces does exactly what it was expected to do. TDD, or Test Driven Development, puts the cart before the horse. It requires you to build all this testing scaffolding for something that might not work. Granted, it may work, but it add a tremendous amount of overhead work to solving something. You still need Functional Unit Testing of course. This is the magic that keeps software reliable, and humming along.
- necovek 6y agoThat's exactly how TDD does not work. You work against requirements (A to B), and you solve the problem incrementally. The main mantra of TDD is refactor constantly. That means that you are never writing tests for things you do not know you need, but that you are building up your solution from small parts that get turned into more complex parts (and get refactored) as you go. And with just a little bit of practice, that refactoring effort becomes a second nature and means no overhead at all: you are just expressing your iterative, creative process through code.
- kords 6y agoI think it's the other way.