No Time to Polish
aegisz: I'm having a damn hard time convincing people that TDD is the way to go.
andys evil clone: What's the argument?
andys evil clone: You'd think it'd be pretty easy to see that you would never run into the same bug twice ever.
aegisz: The common responses: "I wish I had the discipline for that", "Sounds like it takes a lot of time/work", and "What if you forget a test?"
andys evil clone: ah. The first one is a cop-out. :D
aegisz: Maybe I should write a journal entry debunking all of those.
aegisz: hehe, yeah.
andys evil clone: The second one is true.
andys evil clone: But it's still less work than doing it the hard way.
andys evil clone: The last one says that the test is necessarily unneeded.
andys evil clone: Because you'd add it as soon as you ran into a bug produced by that code.
andys evil clone: Test coverage tools help too.
aegisz: yeah
andys evil clone: heck, a profiler could do that.
andys evil clone: .... heh. profiling unit tests.
aegisz: haha
andys evil clone: I find that TDD is good for documentation too.
andys evil clone: It's easier to document code before you write it because you have an envisioned interface.
aegisz: yeah!
aegisz: and if you want to see how something is supposed to work, look at the test!
aegisz: it's a codification of what is known to work
andys evil clone: on that note, I still think that Knuth's Literate Programming concept is bullshit.
aegisz: thus, what your software IS
aegisz: thus, tests ARE the software
aegisz: hehe, go on
andys evil clone: Literate programming basically says that the documentation is more important than the code.
andys evil clone: That a 'program' should be documentation with code inserted into it, instead of the other way around.
aegisz: right
andys evil clone: But it's utter horseshit because the entire point of programming is communicating with people in a way that a machine can also interpret.
andys evil clone: If you forget that and push the computer to a second-tier, you're just fucked.
aegisz: I think it's like that one paper about how "the program is the design"
andys evil clone: Yeah! The code should be its own documentation.
aegisz: the documentation isn't precise enough
andys evil clone: People call it idealistic tripe, but it's an important fact.
aegisz: the code is
aegisz: hehe, yeah
aegisz: tests are runnable documentation :D
andys evil clone: That's one thing I liked using TDD to create a compiler.
andys evil clone: You have an assload of example code to look at.
aegisz: yeah
andys evil clone: And it all works exactly as promised, because it is used to verify that the compiler works right.
andys evil clone: (I think that's tautology. almost)
aegisz: agh, must get better at convincing people
aegisz: (there are definitely areas you can't apply TDD, but for most of the code written it certainly helps)
aegisz: I haven't had a single regression in Renaissance!
andys evil clone: Neat.
andys evil clone: Also, I'm not so sure about the "hardness" of TDD in certain areas anymore.
andys evil clone: Tyrant's GUI stuff was TDDable.
aegisz: well, maybe not difficulty, but applicability
andys evil clone: I didn't realize it until waaaaaay too late, but it was totally true.
aegisz: there are some areas where I just want to play around with a code structure and see what happens. and TDDing that would be a waste of time.
andys evil clone: oh, sure. Prototyping.
aegisz: yeah, exactly
andys evil clone: TDD is also useless for threading issues.
aegisz: sometimes I prototype in the project itself -- I know >_>
aegisz: hm, you're right.
aegisz: still haven't found that Empyrean bug
andys evil clone: heheheh.
aegisz: mind if I c&p the bulk of this conversation to my web site and then spam people with it? :P
Please link me to something that explains the concept more clearly, in practical terms (examples?)
http://www.gamesfromwithin.com/articles/cattestdrivendevelopment.html
You guys are ART.
What's that mean?