Notional Slurry Logo

Archive for Go see this

@cucumber should_behave like “I want”

When I first heard about test-driven development, it not only made perfect sense, I realized it was something I had been trying to implement (without the benefit of dynamic automated tests) by had in weird-ass languages like Prograph and R. Hearing about it just made sense, though it took me some time to climb on board the languages in which it was (back then) simplest to implement.

But I never got over the ass-backwardsness of assertion-driven TDD’s workflow: the sense that every unit test is a little magic trick. “Observe, as I create this NewObject. [applause] Nothing inside, nothing outside! I assert that NewObject.inside is aValue. No? It is not? [amused laughter] But where is aValue? Ah… but watch, watch carefully as I type, and… voila! My assertion is now correct!”

Close. I understand, I understood, I had been trying to do something like that in many ways, back long long ago.

But not quite. Especially, I’ve found, for the accumulation of unwritten tests. Yes, as you move forward with traditional test-driven development you will think of other things you should do. It should check for errors. It should fail gracefully when it can’t connect to the pipe. It should be an integer, not a float. &c &c

A while back (more than a year?), I installed and worked for a while with rspec and cucumber. I had been lured to Ruby years back by Ron and Chet, but never really got too far along my path that way. This was… different.

And then, a big bunch of Python. That’s slowed down, and now with Barbara I’m coming back to Ruby (and Rails, but not so much as Merb). And BDD is there, ready for me, and greatly improved.

No, really: rspec is exactly how the smallest increment of automated test-driven unit testing should work. Cucumber is [almost] exactly the way the smallest, simplest increment of automated acceptance test-driven project management should work.

The problem? The rituals of file linking. You have a specs file; you have a features file; you have a steps file; you have your actual code; you have your helper files…. Somewhere in that mess, you have a mesh of spaghetti, all sorts of stuff referring to other stuff. And that’s confusing. A little, teeny bit disappointing, even.

Don’t get me wrong: the latest rspec/cucumber release is the next resonant “yes” in a chain of substantial improvements in the way code can be written. Because with rspec you can gracefully and communicatively catch those incidentals: “it ’should check for errors’… it ’should fail gracefully’” You can say that in rspec’s cunning framework; you can let the customer say what it is they want, with Cucumber.

Because he’s a good man who’s actually written a good book

A few days back, I was flattered to have Dave Pollard ask me to read his new book, Finding the Sweet Spot: The Natural Entrepreneur’s Guide to Responsible, Sustainable, Joyful work.

My review copy came today because of a mixup down at the Post Office, but I’ve had access to an earlier online version for a few days and looked that through in some detail. Here’s the simplest thing I can possibly say about it:

It’s an act of high hubris to ask a vitriolic critic of print publishing, and of professional advice-giving, and of mindless entrepreneurship to read… what? Your forthcoming book. Of advice. For entrepreneurs. Unless it’s a good and useful book, like this one. No advice can change the world, if you leave it on the shelf. But if you read this you can see the crucial threads Dave Pollard has woven together. And then maybe you can change the world. Go do that.

You want advice? You want to understand things about work, about life, and about some of the realistic, friendly, purposive lifestyles your habits and prejudices blind you to?

Go get a copy and read it. I don’t do this as a habit, and even when I do most folks regret asking me.

But I’m tired of people asking me for specific, prescriptive advice on what to do with their lives. Not because I don’t value their searches, but… come on, people—as if I was anywhere near as well-spoken and philosophically apt, let alone friendly, as Dave. I’m not. He is.

Go. Get it.

links for 2007-07-16

links for 2007-07-15

links for 2007-07-14

links for 2007-07-13

links for 2007-07-12

links for 2007-07-11

links for 2007-07-10

links for 2007-07-09

links for 2007-07-08

Older entries »