Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

petdance (2468)

petdance
  andy@petdance.com
http://www.perlbuzz.com/
AOL IM: petdance (Add Buddy, Send Message)
Yahoo! ID: petdance (Add User, Send Message)
Jabber: petdance@gmail.com

I'm Andy Lester, and I like to test stuff. I also write for the Perl Journal, and do tech edits on books. Sometimes I write code, too.

Journal of petdance (2468)

Thursday September 26, 2002
03:21 PM

Vigorous writing is concise

[ #8034 ]
A favorite passage from Strunk & White's The Elements Of Style:

Vigorous writing is concise. A sentence should contain no unnecessary words, a paragraph no unnecessary sentences, for the same reason that a drawing should have no unnecessary lines and a machine no unnecessary parts. This requires not that the writer make all his sentences short, or that he avoid all detail and treat his subjects only in outline, but that every word tell.

These words should be part of everything we do as programmers. They apply as much to programs and functions as to essays and sentences.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • by "a machine should have no unnecessary parts", I think.

    I always think of programs as machines, built with logic and data.

    • But isn't that thinking what got us into the current situation with software patents?
      • The fact that programs are machines seems intuitively obvious to me. I don't change my world view because of some inconvenient legal framework.

        That would be making reality fit with what Society demands. I think reality should dictate Society and not the other way around.

        Perhaps the problem isn't with Software Patents but Patents in general.

        • The problem with intellectual property isn't the intellectual. It's the property.

          The concept of property cannot possibly hold out against the modern ability to copy. The only reason land-as-property is going to remain stable is because you cannot copy land. Same for buildings. Same for pets.

          It's not the same for a book. Not any more. It's not the same for a recipe or a book or a program or a picture.

          --

          ------------------------------
          You are what you think.
    • It's not implied at all. I've seen lots of code over the years that has dozens of variables defined to use in a 100-200 line function. I've seen this in many languages, in many contexts. Loads of senseless repetition and fat.

      It's a classic beginner's mistake. Beginners use too much code to get the job done in general.

      • How is this responsive to my point?

        You can't imagine a machine built with senseless repetition and fat?

        Programming is typically easier than building machines, so it's easier to put together monstrosities. When you see a bad program, think of a Rube Goldberg contraption.

        • I misread your statement (that programs are machines built of logic and data) to mean that programs have no unnecessary parts.

          Upon re-reading it, I now see that your point is that programs, as machines, should have no unnecessary parts.

          Oops.

  • This goes for technical presentations, too. I used to take only 5-7 minutes to say what I had to say in 15 minute presentations. I'd cover the material, to be sure, but no sense rambling or repeating. Extra lines of code are an opportunity for a bug to creep in; extra minutes of speaking are an opportunity for you to distract your listeners from what's important.

    I was ranting about the terrible "Tell them what you're going to tell them, tell them, then tell them what you told them" advice at least thre

    --
    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers