How to use BDD to discover value-add for your startup
blog.interfacevision.com
blog.interfacevision.com
I'm not saying that you must use BDD, only that to me it's very useful to do so for my own startup, that's all.
Reading the other posts it also seems that people spends a lot of time testing unnecessary things, like a facebook login. Guys, just shoot a mock object that returns true or false, Facebook works, trust me :)
I agree with the article about all the other points.
Why this confusing initialism? Oh wait, silly me. For a second there I forgot that the intersection between people who chase such faddish mirages as behavior-driven development and people who know a bit of computer science is approximately zero.
Testing is fine. Process buzzword bingo is silly. Of the exceptional programmers I know, not one worries about any of this.
Argument: “BDD assumes you know the problem and are coding to
create a solution. In startups, however, you do not know the problem.”
Counter argument: If you don’t know the problem then why are you even coding?
Simply restating the questioned assumption does not a counter argument make.I'll fix it.
tldr, BDD can make coding a far more relaxing experience whilst helping you focus on adding value, not waste.
There is something very relaxing about knowing that no matter what I do to the code I know I'm not breaking the software.
It really is a liberating experience.
When I hear people say "We have 80% test coverage" I just shake my head. What in the heck does that mean? It means that when I make changes to system, I can still break the behavior. And it is expensive to get 100% test coverage. In a startup, I agree, in many cases it might not be worth the investment.
With BDD, it is very easy to get 100% behavioral coverage. 100% coverage means that there is no way I can break the software (the behavioral aspect). And, using off the shelf DSLs, I can often write scenarios that require me to write 0 lines of "test code". So, I get that coverage for free (which is why it can be very useful for Startups).
Of course, if someone lays out a web page which somehow hides the submit button. Well... Then I guess other tools are needed...
I would like to try and not group TDD and BDD as similar things because in my eye they really aren't: they both provide very different approaches to solving a problem. If you were to simply cover TDD then I would agree with you that it is something that focuses on programming and the programmer and operates within that area of software engineering.
BDD, on the other hand, really has little to do with telling a programmer how to test their code or even how to program. About the only thing BDD "requires" a programmer to do is implement the Behavior described. There are a lot of ways to do this, but BDD adds a lot of other cool things too (like you can verify the requirements provided too).
So, when you mention that "The 'good' programmers all do things this certain way" and see BDD as a tool forcing that. Well, I don't think that is the case.
The funny thing is that BDD isn't even a new thing because it relies on scenarios. It is very similar to Use Cases with one minor, but important, difference: there was no standardization on Use Cases (Writing Effective Use Cases by Alistair Cockburn is a great book). Cockburn left the way scenarios are written open to the engineers whereas BDD provides a simple language, Gherkin, that can be used consistently across different tools (Cucumber, Behat, Specflow are a few examples).
So, from that aspect, this isn't some new "fad" that is being sold to developers. It is just a few changes to a well known tool: Use Case.
Clearly I've been in school for too long.