RailsConf 2007: The case of the missing BDD

May 19th, 2007 | 4 comments

Looks like the RSpec folks dropped 1.0. Awesome! Congratulations!

Hmm, where’s the applause? This is the good shit. People should be knowing about this. So, as I sit here at RailsConf 2007 looking over the schedule, I’m not seeing any talks scheduled for BDD or RSpec. That’s regrettable. So, my goal will be to embarrass, cajole, entice, encourage (pick your emotional poison) you into trying RSpec. Not sure if it’s right for you? Try it. Not sure if it will work well? Try it. Don’t get it yet? Try it, already!

And while you’re trying it, think about this: How can descriptions of the behavior of a system form the common language that spans the spectrum of development from clients to developers. Do you think your clients care about how many def test_should_be_super_duper methods are in your tests? Why would they?

Would your customer care about something like this?

The Home page
- has an entry field for username labelled 'User name'
- has an entry field for password labelled 'Password'
- has a submit button labeled 'Log in'
- has a link to retrieve a lost password FAILED

1) The Home page has a link to retrieve a lost password FAILED
   <insert client comprehensible failure message here>

Do you think this could form the basis of a dialogue with your clients? Would it be easier to trouble shoot this over a client saying, “The lost password link doesn’t work.” Do you see how this could make everyone’s life easier?

Is this all there is to BDD and RSpec? No, not by a long shot. So… yeah, you guessed it. Try it.

Oh, _why!

May 19th, 2007 | 0 comments

This post has no nutritional value. Feel free to put it over there by the jelly-filled pastry, bearclaw, and glazed pop tart, go back to your granola. You health nuts, you.

Now, to the jelly filling. Seems that _why dropped by #rubinius, not once, but twice yesterday. I missed it, but hopefully he’ll be back. For your viewing pleasure (no names have been changed to protect the innocents).

19:06   _why >> whoa
19:06   _why >> well fellows
19:06   _why >> i am blown away!
19:07   _why >> looks like things are really comin along
...
19:30   _why >> oh backflip
19:30   _why >> interpolation works, splat works, IO works
19:30   Vagabond >> spat is pretty new
19:30   Vagabond >> I think it's not completely tested
19:30   shadowfiend >> Yeah, like a couple of hours old :-)
19:31   Vagabond >> it's remarkable how much is actually implemented though
19:31   _why >> yeah it's got that new splat smell

Ctrl-C is deprecated

May 8th, 2007 | 2 comments

Well, not exactly. But here’s a nice anecdote that will give you pause then next time you sprint for the ^C escape hatch.

Yesterday, while compiling Subversion 1.4.3 from source on Ubuntu 6.06, I had invoked the command sudo checkinstall make install-swig-rb and, thinking it was going to overwrite my previous .deb package for subversion, hit ^C. Now that’s something I’ve done a million times, I’m sure. It’s the panic, “Oh shit, I don’t really want to do that” button. When you realize in a split second that there may be dire consequences from that ill-thought command, it’s a natural reflex.

But on that fine day, ^C left me with a root directory that had 700 permissions. The consequence was that nothing except a root shell could spawn. I couldn’t even su <user> as root. Yeah, that’s right. Insane. And this was on a VPS. Lucky for me, Quantact has their Xen VPS setup configured so you can actually access a console remotely without needing to go through your VPS’s networking. Tim at Quantact took a look and suggested that the permissions could be causing the issue. He was right and boy, was I happy that’s all it was.

Most likely, something in checkinstall misbehaved, but needless to say, I didn’t try to reproduce the problem. Now, whenever I head for ^C there will undoubtedly be a microsecond pause to evaluate the relative merits. Hopefully, that won’t result in a Buridan’s Ass dilemma.

The Dev'ilz in ur projects, trackin' ur changz

May 7th, 2007 | 0 comments

The Dev’il is out; get it while it’s hot. What’s that? you’re wondering.

This is the story behind it. The Rubinius project (where The Best Ruby VM of All Time ™ is being built) had tried a couple project collaboration tools before Evan gave me the ok to try something different. My goal was a project collaboration tool that collected the relevant information in one place, making it easy to access and modify. Communication is key, so I decided to build on the excellent Beast forum.

The big question is: What is relevant information? I have some opinions about that. We have a liberal commit bit policy, which encourages a lot of participation. To balance that, we need to always stay on top of what is being committed. In my experience, that means RSS and graphical browsing of Subversion changes. We need tickets to track bugs. However, our tickets are super light. Basically, a ticket has a title, body, and status. A user can take a ticket to indicate that she is working on it. There are no comments, and no priorities. Tickets are versioned, so a user cannot destroy pertinent information. The ticket body should always be the definitive statement of the problem. No browsing through comments and attachments trying to figure out what is relevant. I’ll be writing more about the design decisions in the Dev’il docs.

I do owe a big debt to Trac , Collaboa, Devalot , Retrospectiva, mostly for showing me (especially Trac) what I did not want to do, which can be a great source of inspiration. The name itself came from a combination of pure frustration working on Devalot and Evan’s quote about rubinius having “a little evil built in”. It was mostly a response to the “alot” in Devalot. I wanted something much lighter and easier to understand and use. Anyway, if you’re offended by the name, it’s very easy to change: drop a file named project.rb in your lib directory that contains your project name.

The project is still under development. I’ve released the source because a few folks were clamoring for it. Drop by the Dev’il forums for features in the works and to offer up some feedback.