Luddites or weenies?

Tim Bray: “here it is nearly thirty years into my programming career and I’m still debugging with print statements“. That didn’t jump out at me, but Ian Murdock saw it, and agrees. In such distinguished company as Tim and Ian, I think I can admit to my own luddite tendencies with a shell, vi, and a whole bunch of commandline utilities like make and svn. At the same time, I take much more advantage of a decent GUI than most, which is why I hate restrictive, labour-intensive desktop environments like Windows[1] and Mac[1].

As for debugging, yes, I sometimes use print statements. Where I can get away with it I prefer something more interactive like gdb, and even a level up from there a thin GUI is nice (whatever happened to xdbx? A google search finds no new version since 1992, a very long time before gdb could be said to be a serious competitor to dbx).

From time to time I do use a full-blown IDE. On Windows I use MS Visual studio, not out of choice but because there’s no half-decent commandline environment. While it has some useful features, I find these heavily outweighed by labour-intensive hoops I have to jump through to import a project into the studio, the lack of control, etc. I use cygwin (the primitive best-available shell) alongside it, and heartily curse the defective GUI that won’t let me have both visible and usable at the same time on any realistic size of desktop.

When I first programmed Java in the 1990s I used Sun’s studio and workshop projects, and they certainly helped bootstrap my knowledge of the language. But within a couple of months I’d reverted to the commandline toolkit for getting any real work done. The nice GUIs are good for playing with prototypes and (in cases like glade) creating some really useful skeleton code. But when GUI becomes IDE, it tends to get way too restrictive for real work.

Which leads me to wonder: where’s the middle-ground in development? There’s the choice of IDE or DIY toolkit, and of course there’s the DIY IDE (aka emacs). But what happened to the idea of a tool that simplifies things that can be simplified, without putting the programmer in a straitjacket? What happened to simple but useful productivity tools like xdbx, or is gdb (wrapped in a GUI or otherwise) really the only show in town?

Ho, hum. This feels like a “getting old” rant. On reflection, this middle ground is there, and I’ve even named some of the tools, and what I’m missing is an IDE I can live with on a regular basis. Wonder how I’d feel if I were thrown back to a 1980s toolkit and VT100 terminal? Or even the dyslexic teletype and line editor I had to work on in my first job after graduating?

[1] Just to list a couple of defects shared by both those platforms:

  • No way to use a window without raising it. If your reaction to that is “so what?”, see Steve Yegge’s explanation of what you’re missing.
  • No mouse-only cut&paste. Keyboard sequences like ctrl-c/ctrl-v mean you either tie up both hands in a simple operation, or abandon the mouse altogether. I can respect the latter (use it myself, in forms like vi’s y/p[2], though not across different applications and windows), but the former is just dreary, distracting, time-consuming, error-prone faff.

[2] vi’s keystrokes are also vastly less effort for clumsy hands than anything requiring multi-key combos like [alt|meta|ctrl]+action.

Posted on January 5, 2009, in programming, rants. Bookmark the permalink. 4 Comments.

  1. I tend to debug with print statements as well… it’s just, a lot of times, easier than firing up the debugger, setting breakpoints, stepping through, etc, to sprinkle a few printf’s around and see what’s going on. If you ever worked on the linux kernel (until recently) getting a debugger for it was enough of a PITA that printk’s were, and still are, the debugging tool of first resort.

    I tend to use gdb mostly when I’m getting a segfault… get a backtrace from gdb, then sprinkle a few printfs around.

    Gdb of course comes in very handy when printfs don’t seem to be getting you anywhere.

    Tom Tromey’s blog is one place to see some of what’s going on with gdb. He’s posted a few things recently about python extensions to gdb, mainly, I think, related to debugging C++ programs. I’m too much of a luddite myself to have much truck with C++.

    As for your gripe about “No way to use a window without raising it,” NO FREAKIN’ KIDDING! That is something that has bugged me for decades. The linux distro’s seem to default to similar behavior in their desktops, and it is literally the first preference I change on a new install.

    As for the mouse cut-n-paste thing, JWZ has an essay explaining X Selections, Cut Buffers, and Kill Rings which might explain things to any confused windows user who don’t know what you’re talking about.

  2. Correction: with enough poking, Mac OS X allows Terminal (and possibly other apps, but admittedly not OS-wide) to have focus-follows-mouse. It also allows move-without-raise using Cmd-click on background windows.

    Apart from that, I do generally agree. I tried, for various perverse reasons, to get into .NET late last year; while I was mostly impressed with MonoDevelop, the GUI scene left me cold. I used Visual Basic 3 and 4 in a summer job many years ago, and for getting from window to widgets to code they actually worked bloody well. This seems to have been forgotten, with MonoDevelop and Glade going after all the surrounding frutz in later versions of Visual Studio and none of the usability of the underlying paradigm. I gave up.

    Back to emacs for me, vi for you. They actually work. We know them and they do a handful of things well that is all we ask.

    And I still have choice-paralysis over the underlying languages (Q, scheme, lush, anyone?).

  3. This no-doubt also falls under “too much faff” but one can get mouse-only cut/copy/paste using e.g. with a mouse trigger to raise the gesture dialog.

    It’s not a terribly sane option, but possible 🙂

  1. Pingback: Symphonious » Time Machine as a Debugger

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: