Counting the cost

This week I was helping someone with some debugging work, and I was shocked to watch his workflow.  Here's what it looked like:

  1. Working in a Windows shareware "editor," (I use this term loosely) that asked us to buy the full version every few times we saved, we worked on a script that needed a bunch of trial and error hacking.
  2. Copy the script to a remote box in order to run it (Windows doesn't have it built-in) using a graphical (I'm not making this up) scp client
  3. Login to the remote box with PuTTY and run it.  Unfortunately the wireless connection dropped frequently, so this needed a lot of environment re-setup.
  4. Copy the script's output file (plain text) back to the Windows box using the graphical scp client again
  5. Open the output file in the editor, clicking "Not Now" on the upgrade dialog once again.
    I didn't say anything at the time, because this was clearly an entrenched way of working for him, and I wanted to focus on the code and not the process.  However, I want to say something now.

For comparison, here's how I would have done it:

  1. ssh -C dave@remotebox
  2. screen
  3. emacs our-script
    At this point I need nothing more.  I can run the script on the remote box, either from within emacs itself (M-x shell) or using screen to create a new virtual terminal (C-a c).  There's a cost to this approach.  I had to learn how to use ssh, screen, emacs, and various command line tools (grep, more, find, sed, etc.).  But it was a one-time cost (or near one-time, since I still have to look things up from time to time on man pages).

On the other hand, the workflow I saw this week costs you every time you use it.  You have the context switch of app to app, machine to machine, network lag, disconnect costs (with screen I can re-attach and keep going from where I was before I lost network), the cost of mouse + keyboard.  But it's easy.  I mean after you install a handful of nag-ware apps you can drag and drop to your heart's content.

I'm going to tell you a secret.  There's a reason that most of the productive developers I know use the command line, gdb, emacs/vi, screen, etc.  Once you pay the up-front cost to learn how to use them, you can work anywhere and be productive.  There's a reason why I see students coming to me and saying things like, "So-and-so is working on computer X and I need to use it, so I'll have to come back later."  Are you kidding me?  It will cost you a few minutes to learn how to use ssh and X11 forwarding, but once you do, you can use that computer from anywhere.

There's cost no matter what you do.  Do you want to pay-as-you-go for your time or just buy the knowledge and own it out-right?

Show Comments