Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

Point Of View Blog
Use Autospec to Your Advantage

I like Autotest because it allows me to stay within my code editor and let my test suite run automatically in the background. After each run I get a nice, unobtrusive, growl notification informing me whether my most recent change caused the tests to fail or pass.

It used to be that setting up and configuring Autotest for the OS X with pretty growl notifications was a nontrivial task. I remember that I spent several hours getting it working a year ago. However, there has been several developments with Autotest in recent months that greatly simplify the process. One of those enhancements is that Autotest can now use FSEvent introduced in OS X Leopard so that it no longer has to continuously poll the filesystem. This has the advantage of vastly reducing Autotest's CPU usage when idle.

Read More

git config push.default matching

Upgraded to git 1.6.3 yet? You should, and Jason Rudolph says why (and if you're on a Mac, Rob Sanheim says how.)

Sadly, after you do upgrade, when you start doing "git push", your console will start to be littered with the following oddly patronizing message:

warning: You did not specify any refspecs to push, and the current remote
warning: has not configured any push refspecs. The default action in this
warning: case is to push all matching refspecs, that is, all branches
warning: that exist both locally and remotely will be updated.  This may
warning: not necessarily be what you want to happen.
warning: You can specify what action you want to take in this case, and
warning: avoid seeing this message again, by configuring 'push.default' to:
warning:   'nothing'  : Do not push anything
warning:   'matching' : Push all matching branches (default)
warning:   'tracking' : Push the current branch to whatever it is tracking
warning:   'current'  : Push the current branch

While I'm generally in favor of verbose warnings, this one is kind of bizarre. Essentially, it's saying, "Warning! The command you just ran will continue to operate exactly as it did before!" Guys, telling us about new options is great but that's what release notes are for.

Worse, they don't provide keystroke-level instruction beyond the offhand gerund "configuring" on how to shush it. Here's the result of my 8-minute speluking inside the output of "git help config":

git config push.default matching

[Or, thanks to Alastair Brunton below

git config --global push.default matching


There, now, that wasn't so hard after all, was it?

Read More

Standup 03/09/2009


How do you make a Mac not sleep?

Use the Energy Saver section of the System Preferences.


  • RubyMine 749 is out. Many of the existing bugs have been fixed, but a few new ones have been found. Notably, running specs with a "#" character in the describe string has problems.

  • The USPS has a nifty web service for addresses. The zip code lookup (which gives you zip+4) and the address standardization services were found to be useful.

Read More

Best Remote Pairing Settings 2008

About a year and a half ago, I made two posts on the "Best Remote Pairing Settings".

A Remote Pair

The world has moved on, and so has the state of the art in remote pairing. I work remote 75% of the time, so this is an important topic for me. The setup we have now is working pretty good, so I wanted to describe it for the benefit of other remoties. Also, I'm only going to describe one specific setup - the one that is currently working best for me. So, here it is:

Computer and OS

Macintoshes running OS X 10.5 (Leopard) and maxed out on ram (at least 2 gig+), with a second monitor, ideally a 24".

Pivotal uses 24" iMacs exclusively. This lets you have your remote pair's screen up on the second monitor, while still having the primary iMac screen available for local work (configuration, looking stuff up, temporary soloing, etc). You must be very disciplined and up-front - you should be explicit about when you are paying attention to your pair and when you are not, but that's a whole other topic.

Also, at my home office, I have an iMac which I use for screen sharing, but I usually run the Skype audio/video on my MacBook. This takes the CPU load off of the iMac, which is important, because Skype is a CPU hog (more on that later).

Screen Sharing Software

Apple Screen Sharing which comes with Leopard.

Apple has done a nice job making the screen sharing app perform well, and the most important feature for any remote pairing screen sharing tool is performance. In my opinion, it performs better than any other VNC client on any platform, assuming you have a good connection (possibly excluding some windows native-video-hook solutions like UltraVNC or Remote Desktop, but there's no way I would ever use Windows for development). All VNC clients which use the standard RFB Protocol can only be tweaked so much, and will only give you mediocre performance. However, there are several annoying bugs and gotchas with Apple Screen Sharing:

  • It is hard to find. Look under /System/Library/CoreServices/Screen It is easiest to use Spotlight/Quicksilver or drag it to your dock. Supposedly you can start it with iChat but this never worked for me, I had to run the app directly.
  • Most of the useful features are disabled by default with no way to access them via menu or toolbar buttons. This is an amazingly annoying decision by Apple, but it is fairly easy to hack the toolbar buttons back into existence. Here is a Macworld tutorial showing two options.

In general, it seems that the best remote-control tools are those with some sort of native/low-level GUI integration: Leopard Screen Sharing, NoMachine NX, UltraVNC, Windows Remote Desktop, etc. Higher-level platform agnostic tools (like standard VNC/RFB protocol) just don't perform as well - no matter how much you tweak the available color/depth/etc settings.

Audio/Video Hardware

Plantronics GamePro USB Headset

This is a great headset, and you need a really good headset if you are going to wear it all day, every day. Cloth earpieces, mic cover, very long cord, and I believe it also has some echo cancellation built in (there's a huge box inline in the cord that does something). Unfortunately, I don't see the exact model on the Plantronics website anymore. It may be replaced by the "GameCom" model, but I haven't tried this.

Built-in iMac Microphone/Speaker

The built-in microphone and speaker on iMacs is really good. If you want to talk to a group of people remotely (for example, project standup), this is the way to do it. However, if the ambient noise gets too much, you can switch back to the headset.

You can even combine the two. For example, if you want to hear the surrounding conversations, but your pair is having trouble hearing you over the noise, then can wear the headset, but still keep the input set to the built-in iMac mic.

Sometimes you will need to adjust the input/output levels to reduce echo, and the remote pair should handle this themselves - they know what it sounds like.

Built-in iMac camera

Just like the built-in iMac mic and speaker, the iSight is a great camera. A detached iSight is just as good, if you want to be able to move it around or aim it without moving the computer.

Audio/Video Software


Skype is the best I've found. It does have drawbacks: it crashes rather frequently, it sucks a lot of CPU, it can do bad things to your network if you become a supernode, and it doesn't support video in conferences.

However, it has great echo cancellation, it is free, and easy to use. The echo cancellation is really the most important thing - all other audio conferencing tools I've tried seem to have much more issues with echoes - even when you are using echo-cancelling hardware devices or speakerphones.

Some people seem to like iChat, but I have not had good luck with it. It takes longer than Skype to connect, the echo cancellation is not as good (sometimes it is, sometimes not), and most annoyingly, it doesn't always close. I often end up having to force quit it - which is even more annoying when it is stuck on a freeze-frame of me making a stupid face or scratching my nose. Skype never does this - video always goes away when you shut your video or kill the call.

iChat has video conferencing, though, which is a benefit. You can sort of work around this by putting up the video preview in iChat, and having multiple remote people connect to view it via screen sharing, if you only want to see video for one of the participants (e.g. a couple of remote people calling in to a company meeting).

Network, Network, Network

This is the last but most important component to usable remote pairing. A fast, low-latency network connection is critical. I don't have any numbers, but I believe that low latency is at least as important as high bandwidth. I also (without proof) believe that ping is not necessarily a good indicator of latency - I bet it is possible to have a good ping (ICMP) but still have issues with TCP/UDP latency. Who knows what's going on in the tubes between you and your pair? Any data, tools, or insight on this would be very welcome.

As empirical evidence, for the first year or two at Pivotal I had DSL, which was pretty fast with low ping, but had continual problems with performance. Then, I switched to corporate-grade cable with a significantly higher bandwidth limit. My experience improved dramatically and my problems decreased greatly. This was about the same time I switched to Leopard screen sharing, so I think that had something to do with it, but the better connection definitely made a huge difference. Again, sorry I don't have more concrete numbers, but I will guarantee that the better your connection, the better your experience will be.

Also, if you are in a corporate network, this may cause you problems. Even if there is a big pipe to your location, there may be saturation on your local LANs or intranet. Again, no hard data, but this is backed up by experiences of having consistently better performance when connecting to another remote at-home pair with a good connection as opposed to connecting to the Pivotal office which has a much larger pipe.

Remote Pairing Presentation at RailsConf 2008

  • At RailsConf 2008, Michael Buffington and Joe O'Brien did a good presentation on Remote Pairing. This is a very good presentation which covered many important aspects of remote pairing, as well as presenting some innovative ideas. Unfortunately, I don't see a link to the preso, please post one in the comments if you have it.


This isn't meant to be the be-all, end-all set of recommendations, it's just what is working pretty well for me now. By "pretty well", I mean that I can be an efficient pair, even when I'm driving the remote machine.

However, I've learned to cope with a lot, and adapted my work habits. It has forced me to become much better at communication, and describing what, why, and how I am programming. In general, though, I believe that remote pairing is physically, emotionally, and intellectually taxing. Regardless, I personally deal with it because Pivotal is such an awesome place to work and Pivots are such incredible developers. Most importantly, I come out in person for a week every month, attend retrospectives and brownbags, have some beers, and generally stay "entangled" with the rest of the team in person. If I was 100% remote, I don't think I could handle it long-term.

So, I hope this helps out all the other remoties out there. Please let me know what you think, your experiences, and what works well for you.

Read More

How to tell Apple/DotMac/MobileMe Backup that .Trash is trash

First of all, fie on Apple for giving both their cloud storage service and their backup program names that are almost completely google-proof. They've recently corrected one of those by renaming "dot mac" to "MobileMe" but calling your backup program "Backup" is a great way to make it really hard to investigate. It's like, imagine how hard it would be to do a background check on someone named John Doe.

So I use the Dot Mac Backup and it works pretty smoothly, which is the second most important feature in a backup program. (The most important feature is the ability to actually restore files.) But then one day it said that to incrementally back up my "Home Minus Media" set -- the set containing my Home Folder, but excluding big-ticket items like Music, Movies, Backups, Downloads, and so on -- would require 63 DVDs. WTF?

It turned out that the problem occurred after I trashed a few old DVD rips that I had finished watching, and the culprit was the directory /Users/chaffee/.Trash. Seems like the UI was helpfully excluding it from the list of subdirectories of /Users/chaffee, it being a system file and all, so I couldn't mark it to exclude. That's OK, I think, I'm a power user, so I'll just check the box that says "Show invisible system files."

Except there's no such box. Try as I might, I can't find a way to exclude the Trash folder from the UI. I had to dig into the file system and edit Backup's own data file, as follows.

Read More


For the millionth time, cause I always forget...

Put this in ~/.bashrc:

export JAVA_HOME=/Library/Java/Home

[UPDATE: or this, which according to Mike Swingler, follows the Java version chosen in Java Preferences:

export JAVA_HOME=`/usr/libexec/java_home`


Also, run "sudo visudo" and add the line

Defaults        env_keep += "JAVA_HOME"

or else commands like "sudo gem install" won't be able to find Java.

Without the above, I got the following error (which seemed to have been run through a baby-talk filter) when running "sudo gem install rjb":

extconf.rb:44: JAVA_HOME is not setted. (RuntimeError)

Read More

Removing Old Ruby Source Installation After a Leopard Upgrade

Removing Ruby

I just upgraded to Leopard on my Mac. Previously, on Tiger, I had installed Ruby from source, in the default /usr/local/lib prefix. After reading the discussion on the Apple-provided Ruby installation, I decided to try it - mainly to ensure that my apps, such as GemInstaller, play well with it (on Pivotal's Mac pair workstations, we still install Ruby from source, so everything matches our demo/production environments as closely as possible, and things are in consistent locations).

So, I wanted to uninstall the old Ruby source installation, and only have the Apple-provided Ruby on disk. Googling for a few minutes did not provide exact instructions for this, so I'm writing up what I did, in hopes that it will help you!

I didn't use the "--prefix" option when I originally installed Ruby from source, so it was in the default location of /usr/local/lib/ruby, with binaries in /usr/local/bin.

WARNING: Use 'rm -rf' at your own risk - a sleep-deprived encounter with 'rm -rf' and a stray file named '~' is what "motivated" my Leopard upgrade in the first place...

First, I deleted the old ruby libraries/gems, which was easy enough, because they all lived under /usr/local/bin/ruby:

sudo rm -rf /usr/local/lib/ruby

However, this left all the old ruby/gems executables in /usr/local/bin. This resulted in errors when trying to run executable gems that I had not yet installed under the Apple Ruby installation:

$ cheat
/usr/local/bin/cheat:9:in `require': no such file to load -- rubygems (LoadError)
from /usr/local/bin/cheat:9

Instead of a cryptic rubygems error, I should get a 'file not found error':

$ sudo rm /usr/local/bin/cheat
$ cheat
-bash: /usr/local/bin/cheat: No such file or directory

So, I want to purge everything ruby-releated from my /usr/local/bin folder. I whipped up a quick ruby one-liner which just prints out (almost) all ruby-related files in /usr/local/bin:

ruby -e "old_ruby_execs = `egrep 'rubygems|bin/ruby|env ruby' /usr/local/bin/*`; require 'pp'; pp old_ruby_execs.split("n").collect{|line| line.split(':').first}.uniq"

Yeah, I know, ugly and obtuse, but one-liners are kind of fun, and help me remember that Ruby is great tool for sysadmin scripts. Feel free to put it in a class and test it if you are so inclined.

Even though I tried to make a fairly specific regexp for egrep, when inspecting that list, I did find a 'jgem' file, which was part of JRuby. I'm planning on reinstalling JRuby anyway, so I didn't care if that got deleted along with the other ruby stuff.

Anyway, if the output of that looks like everything you want to delete, then run this one-liner to do the actual deed (the 'sudo echo' is to 'prime' the sudo auth, so you don't get a noninteractive password prompt):

sudo echo; ruby -e "old_ruby_execs = `egrep 'rubygems|bin/ruby|env ruby' /usr/local/bin/*`; old_ruby_execs.split("n").collect{|line| line.split(':').first}.uniq.each { |exec| p 'removing ' + exec; `sudo rm #{exec}`}"

After that, the only thing that I saw left was the 'ruby' executable itself, which I whacked as well:

$ sudo rm /usr/local/bin/ruby

That seems to be about it, as least good enough to get all the old invalid executables off my path. I'm sure this could have been done cleaner if I had taken more care with the original source install. However, a good brute-force approach never hurt anyone. Much. Feel free to post links to relevant and helpful stuff.

Read More

CPU Leak

I just had to quit Firefox for the umpteenth time because it was taking up 25% of my CPU and 1.5 GB of virtual memory. It makes my lap hot and burns down my battery and activates my fan and slows down my click response time. I have no idea if it was Gmail or Google Reader or one of the other JS-heavy apps and frankly, I'm sick of guessing.

Let's face it: the browser is an operating system. It's time it started acting like one.

Here's what I want my next browser to do:

  • Put every tab's JS in its own thread or process space
  • Pause that process when I switch tabs (i.e. I don't want Gmail to check for incoming mail or chats unless it's in a visible tab)
  • Show me a list of the CPU and memory usage of each JS slice like "top" or the Windows process monitor and allow me to kill them without restarting my browser
  • Same goes for Flash but even moreso: I want every seizure-inducing, focus-stealing, ringtone-blaring flash app to be individually killable and blockable
  • Show me the content of the page now even if some stupid ad or web bug or analytics script on a different server is slow to load

And for Santa's sake when I tell you to quit don't swap in every little JS object and free it individually. Throw the whole heap away and quit, damn your eyes!


Read More

Multi-clipboard for Mac

IntelliJ IDEA has a great feature: if you hit control-shift-V you see a list of the ten most recent selections you cut or copied onto the clipboard. Here are two ways to get the same thing on all Mac OS X apps.

Quicksilver's "Clipboard" and "Shelf" plugins

Bottom line:

  1. In QS preferences, go to (top menu) Plugins / (left menu) AllPlugins
  2. Check the 'Clipboard Module' and the 'Shelf Module' so that they get installed
  3. Bounce QS
  4. Go back into QS preferences and go to (top menu) Preferences / (left menu) Clipboard to tweak your clipboard size and behavior
  5. Now copy some text from some app
  6. Now hit Command-Space, then immediately afterwards once QS comes up Command-L to see the Clipboard History window pop up for you.

I think the Shelf module lets you store clips permanently, but I haven't figured out how to use it yet.


A scissors icon will appear in your menu bar. Whenever you cut or copy a text item, it'll be added to that menu. Clippings can also be accessed by a hotkey (default is Control-Option-V.) A little window like the one you see when using the application switcher or the brightness controls will appear. While holding the modifier keys , use the arrow keys to scroll through the stack.

Read More

Automatic invocation of multiple OS X terminal windows

As the righteous wave of Intel iMacs surges into the Pivotal Labs offices, more Pivots are finding themselves working with multiple OS X Terminal windows. The opening and positioning of terminal windows often follows the same pattern: cd into project directory, run mongrel, open next window, cd into project directory, tail the test log, etc.. To avoid violating DRY, I've hacked up some simple ruby scripts that automate the process. See my original post for details and links to the scripts.

Now it's just a matter of running one command: $ terminals.rb myproject This opens up all of the standard windows from the project in their specified positions and running the right processes.

Read More