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

Ubuntu 20.04 on a 2015 15" MacBook Pro

I decided to give Ubuntu 20.04 a try on my 2015 15" MacBook Pro. I didn't actually install it; I just live booted from a USB thumb drive which was enough to try out everything I wanted. In summary, it's not perfect, and issues with my camera would prevent me from switching, but given the right hardware, I think it's a really viable option. The first thing I wanted to try was what would happen if I plugged in a non-HiDPI screen given that my laptop has a HiDPI screen. Without sub-pixel scaling, whatever scale rate I picked for one screen would apply to the other. However, once I turned on sub-pixel scaling, I was able to pick different scale rates for the internal and external displays. That looked ok. I tried plugging in and unplugging multiple times, and it didn't crash. I doubt it'd work with my Thunderbolt display at work, but it worked fine for my HDMI displays at home. I even plugged it into my TV, and it stuck to the 100% scaling I picked for the othe

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.&quo

Haskell or Erlang?

I've coded in both Erlang and Haskell. Erlang is practical, efficient, and useful. It's got a wonderful niche in the distributed world, and it has some real success stories such as CouchDB and Haskell is elegant and beautiful. It's been successful in various programming language competitions. I have some experience in both, but I'm thinking it's time to really commit to learning one of them on a professional level. They both have good books out now, and it's probably time I read one of those books cover to cover. My question is which? Back in 2000, Perl had established a real niche for systems administration, CGI, and text processing. The syntax wasn't exactly beautiful (unless you're into that sort of thing), but it was popular and mature. Python hadn't really become popular, nor did it really have a strong niche (at least as far as I could see). I went with Python because of its elegance, but since then, I've coded both p