5 ms·
What has always bothered me, is that the ratio of people consistently talking/blogging/tweeting about how important TDD is to the number of actual resources tha
by AlwaysBCoding 14y ago
What has always bothered me, is that the ratio of people consistently talking/blogging/tweeting about how important TDD is to the number of actual resources that can help a junior developer learn and practice good testing habits is a million to one.
I truly believe that TDD works. I truly believe that the jury is already in and that anyone who is serious about becoming a software professional should write tests for every line of code. I really really believe it and want to use it.
That being said, it is so fucking hard to get started with TDD. Oh god, it's so difficult. I've done the katas, done an apprenticeship, read the RSpec book, watched every screencast I could find, everything you can reasonably ask a learning developer to do, and I still find it incredibly impractical to practice TDD when working on most projects, not because I don't want to, but because it's so difficult and time consuming and the resources just aren't there to help make my process quicker.
Here's an idea for the TDD crowd. Every time you're about to write a blog post about why people should use TDD, instead write a blog post about a situation where you applied TDD, the tests you wrote and the code it lead to. We need more examples of TDD in progress, more code snippets, more screencasts. I'm telling you the problem is that the resources just aren't there to encourage these habits. Instead of continuing to have this debate at a semantic level, if there were more testing resources available I think people would naturally flock to it and TDD would win out. Until then, I think it's twitter fights and bad habits for the foreseeable future.
*This comment applies verbatim to security best practices as well.
- joshuacc 14y agoAgreed. This has been the hardest part of learning TDD for me. I'm working on a presentation on TDD in JS which is probably a little simplistic, but goes through each and every step, explaining as I go along.
- MartinCron 14y agoI put together a "getting started with pragmatic test automation" training seminar a few years ago that was based exclusively around real-world examples from my day-to-day life writing real production code. I thought it was good, and got some good feedback. I'll see if I can dig that up and translate that in a way that's actually useful to an asynchronous audience.
- jdlshore 14y agoShameless plug, since you asked for it: Let's Code Test-Driven JavaScript is an extensive and in-depth screencast series about doing TDD in practice. I promise you've never seen a TDD screencast that goes this deep. http://www.letscodejavascript.com/ http://www.letscodejavascript.com/ And if Java and Swing are more your thing, Let's Play TDD is its less-polished progenitor. http://www.jamesshore.com/Blog/Lets-Play/ http://www.jamesshore.com/Blog/Lets-Play/ You're right, by the way. It's much harder to do TDD for real than it is to do all those toy problems that involve maybe one class, some calculations, and nothing else. That's why I created the screencasts.
- AlwaysBCoding 14y agoThese look really really cool. I can't speak to the quality because I haven't watched them yet, but I'll definitely check them out, this is exactly the kind of thing that I'm looking for.
- jdlshore 14y agoThanks! Glad to hear it. Email me any time if you have questions. (My address is in my HN profile.) There's a 7-day free trial so you can try out the show and I'm more than happy to cancel it for you if it's not a good fit.