Shell Schmell

407 words.

I’m reading The Pragmatic Programmer, supposedly one of the Bibles for modern programmers. It came highly recommended by one of my favorite blogs, Coding Horror. (Well, it used to be highly recommended… I’d swear there were only two books on his recommended reading list before.) Anyway, it’s a good book so far. It’s easy to read and contains lots of good tips, although a lot of the advice is common sense practices you pick up through experience anyway. But it’s cool to have it all in one book. Great for someone starting out, I would think.

I’m finding a few things I don’t agree with, though.

For example, in the “Shell Games” section, the authors assert that you must be proficient in using the command shell to be a pragmatic programmer. In my opinion, this betrays a Unix environment bias. They list a few contrived situations where they tell you the shell is faster and easier. One of them is: Find “which Java files have not been changed in the last week.”

I very rarely need to know something like that, but it just so happens I had to do almost that exact same task recently when I needed to merge some changes from a branched project. Did I turn to the Windows command shell to find the files to merge? Hell, no. I opened up SourceSafe and did a recursive history. I certainly wouldn’t go to Windows Find Files, which the authors suggest is the only other alternative to the shell.

So no, I don’t see how the command shell is faster or easier for one-off situations like that. I don’t know about anyone else, but I started out programming on the Amiga where everything was shell-based, so frankly it’s kind of a pleasure to be able to use a GUI that doesn’t require me to memorize arcane shell commands. Sure it probably takes a few seconds longer than it would for a super-fast-typing shell user, but I’m old enough not to be too concerned about shaving a few seconds off of my productivity.

That being said, command shell knowledge is essential for scripting. Recently I’ve been writing a bunch of scripts at work to automate things that I would die of boredom from if I had to do them by hand. In that case I agree completely with Pragmatic Programmer: Scripting rules. Repetition blows.

I just don’t think its necessary to memorize shell commands anymore.

Related

This page is a static archival copy of what was originally a WordPress post. It was converted from HTML to Markdown format before being built by Hugo. There may be formatting problems that I haven't addressed yet. There may be problems with missing or mangled images that I haven't fixed yet. There may have been comments on the original post, which I have archived, but I haven't quite worked out how to show them on the new site.

Sorry, new comments are disabled on older posts. This helps reduce spam. Active commenting almost always occurs within a day or two of new posts.