From: "David A. Black" Date: 2008-08-16T21:01:38+09:00 Subject: Re: BDD and TDD - What are they for? Hi -- On Sat, 16 Aug 2008, Clinton D. Judy wrote: > BDD looks like a way to make it easy for non-programmers to do > programming, but not having people keep several functions in mind at any > one time. And it also does TDD? Am I close? I wouldn't say that it makes it easy for non-programmers to program. At its best, it can provide output and summaries that non-programmers can easily read, understand, and amend. But the programming part of BDD is truly programming. This is actually at the root of why a lot of people, including me, find it hard to bond with RSpec. In some respects, the syntax tries to look and read like English, but it's still 100% programming and there are serious impedance mismatches between English and Ruby. But RSpec generates summaries that are purely in English, and that describe the program's requirements in such a way that any stakeholder in the project, programmer or not, can read them. I would not expect a non-programmer to be able to read RSpec code. You should, however, check out RSpec if you're interested in BDD. It represents a fantastic achievement (my problems with it are at the level of my own stylistic preferences), and has a huge following. > But everyone continually praises TDD and BDD, which leads me to believe > I'm missing something profound that could make me a better programmer. > So what's the big deal? It scales. If you're doing something small, you can run it and eyeball the results and that's fine (and that is, in fact, a test). Like everything else in programming, though -- calculations, data munging, administrative tasks -- testing your code benefits from being automated when you have to do more than a miniscule amount of it. It's really that simple, and everything else proceeds from that. David -- Rails training from David A. Black and Ruby Power and Light: * Advancing With Rails August 18-21 Edison, NJ * Co-taught by D.A. Black and Erik Kastner See http://www.rubypal.com for details and updates!