Skip to main content

Ruby: My Take on Pivotal Labs, Part II

As I mentioned in my previous post, I have tremendous respect for how Pivotal Labs builds software. In this blog post, I want to cover why practices used at Pivotal Labs may not always be appropriate at other companies. The core of my argument is that Pivotal Labs is a consultancy; hence, their priorities are not always the same as the priorities for a startup building its own software.

First of all, let me talk about full-time pair programming. In the book Professional Software Development, Steve McConnell states that NASA discovered that the single most effective way to reduce defects (in manufacturing, etc.) is to always have a second pair of eyes present (i.e. to work in pairs). However, NASA must go to extreme lengths to avoid defects because lives are on the line. That's rarely the case with most startups. Most defects are merely embarrassing. In many cases, code review may be more efficient than full-time pair programming. In some cases involving purely aesthetic matters, it may sometimes be acceptable to even skip the full code reviews and settle for aesthetic reviews instead.

Full-time pair programming is also a great way to train newbies. It's definitely in Pivotal Lab's interest to have all of its employees extremely well trained and interchangeable. However, it's really the customer that's paying for this training, and it's certainly expensive. In a startup building its own code, this expense may not be warranted. Certainly, there's huge value in having overlap between employees so that no one employee who gets hit by a bus can take out the entire company. However, some specialization may be appropriate. When I worked at IronPort, we had a low-level, FreeBSD kernel guy. He spent a lot of time tweaking the kernel in a way that only a FreeBSD kernel guy can. We also had people who specialized in JavaScript. Expecting every person to be capable of pair programming on FreeBSD kernel development as well as ajax hacking is simply asking for too much, and it's too expensive in terms of programmer time. Sometimes a little specialization can be helpful.

Full-time pair programming may also help a particular task get done faster. However, if you have a limited number of engineers at a small startup, certainly the total time to completion for all programming tasks will go down if all programming must be done in pairs. Pivotal Labs has the advantage that they can scale up the number of people on a project if a job calls for it, and they make more money when they do so. It's the opposite at a small startup. The number of programmers at a small startup is often somewhat limited and fixed, and there are economic advantages to getting more done with fewer people. If you only have two programmers, and one of them is a Ruby expert and the other an ActionScript expert, it might be best to just let them do their thing individually so that at least two things are getting done at the same time.

Don't get me wrong. I'm not saying that pair programming isn't extremely valuable. I'm just saying that full-time pair programming is extremely expensive, and sometimes the cost isn't justifiable for smaller startups that aren't consultancies.

The next thing I'd like to cover is tests. Pivotal Labs writes a lot of tests. It makes sense for them because they get paid to write them, and they never want to get caught with their pants down. If Pivotal Labs has a choice of implementing two features with a 30% chance of having a defect or of implementing one feature with a 2% chance of having a defect, they're only going to implement one feature. Since they don't get paid by the feature, they get paid the same either way.

The economics just aren't the same at a startup building its own software. Don't get me wrong--I really appreciate the value of testing, but I also try to keep in mind the cost. My approach to building software at a small startup is to consider the return on investment when writing tests. Some tests provide a very high return on investment. They catch a lot of potential bugs and require very little work. I'm thinking of high-level Cucumber and Webrat tests. Some tests require a lot of work, but don't catch very many actual bugs. I'm thinking of view tests. A view test neither tests that a view looks right, nor does it test that its interface with the controller is correct. My point is that it may be in Pivotal Lab's best interest to implement view tests, but if I'm working at a small startup that isn't a consultancy, it probably isn't in my interest to implement view tests.

So what's my point in bringing all of this up? As much as I appreciate how Pivotal Labs does things, I understand that those practices may not always be appropriate for a small startup building its own software. It reminds me of that old essay, The Rise of "Worse is Better". As much as I hate to admit it, sometimes worse is better.


Popular posts from this blog

Drawing Sierpinski's Triangle in Minecraft Using Python

In his keynote at PyCon, Eben Upton, the Executive Director of the Rasberry Pi Foundation, mentioned that not only has Minecraft been ported to the Rasberry Pi, but you can even control it with Python. Since four of my kids are avid Minecraft fans, I figured this might be a good time to teach them to program using Python. So I started yesterday with the goal of programming something cool for Minecraft and then showing it off at the San Francisco Python Meetup in the evening.

The first problem that I faced was that I didn't have a Rasberry Pi. You can't hack Minecraft by just installing the Minecraft client. Speaking of which, I didn't have the Minecraft client installed either ;) My kids always play it on their Nexus 7s. I found an open source Minecraft server called Bukkit that "provides the means to extend the popular Minecraft multiplayer server." Then I found a plugin called RaspberryJuice that implements a subset of the Minecraft Pi modding API for Bukkit s…

Apple: iPad and Emacs

Someone asked my boss's buddy Art Medlar if he was going to buy an iPad. He said, "I figure as soon as it runs Emacs, that will be the sign to buy." I think he was just trying to be funny, but his statement is actually fairly profound.

It's well known that submitting iPhone and iPad applications for sale on Apple's store is a huge pain--even if they're free and open source. Apple is acting as a gatekeeper for what is and isn't allowed on your device. I heard that Apple would never allow a scripting language to be installed on your iPad because it would allow end users to run code that they hadn't verified. (I don't have a reference for this, but if you do, please post it below.) Emacs is mostly written in Emacs Lisp. Per Apple's policy, I don't think it'll ever be possible to run Emacs on the iPad.

Emacs was written by Richard Stallman, and it practically defines the Free Software movement (in a manner of speaking at least). Stal…

ERNOS: Erlang Networked Operating System

I've been reading Dreaming in Code lately, and I really like it. If you're not a dreamer, you may safely skip the rest of this post ;)

In Chapter 10, "Engineers and Artists", Alan Kay, John Backus, and Jaron Lanier really got me thinking. I've also been thinking a lot about Minix 3, Erlang, and the original Lisp machine. The ideas are beginning to synthesize into something cohesive--more than just the sum of their parts.

Now, I'm sure that many of these ideas have already been envisioned within, LLVM, Microsoft's Singularity project, or in some other place that I haven't managed to discover or fully read, but I'm going to blog them anyway.

Rather than wax philosophical, let me just dump out some ideas:Start with Minix 3. It's a new microkernel, and it's meant for real use, unlike the original Minix. "This new OS is extremely small, with the part that runs in kernel mode under 4000 lines of executable code." I bet it&…