Strunk & White can apply to programming

The Elements of Style by [William Strunk, Jr.] and [E.B. White] has long been a favorite of English majors and great writers. [James Devlin] suggests that it can also be a good reference for programmers. With just a few changes in wording, the same guidance that applies to good writing can apply to good coding. For example, [Strunk] and [White} emphasize the importance of structural design to writing. Replace “writing” with “programming”, and the principles are exactly the same: “Programming, to be effective, must follow closely the thoughts of the writer programmer, but not necessarily in the order in which those thoughts occur.” So keep this guide in mind next time you start a new project.

[via Kottke]

Comments

  1. MaDecue says:

    Hmmm, while agree with the sentiment, none other the Kernighan and Plaugher wrote “The Elements of Programming Style” way back in 1978, when I was in college. It is highly recommended.

    As I recall, it uses Pascal as the example language, but the priciples are applicable to any language / programming effort.

    BTW, Strunk and White is an incredible book. It has been on my desk throughout my career. Even if you only write email, you *must* have this book. It’s the only book on clear writing that I’ve ever read that has actually been entertaining.

    Ma

  2. Yes, The Elements of Style is an excellent book. Everyone can profit from it. Clarity in text is always desirable on the Internet, where sometimes the main idea is lost due to a single bad construction.

    Now, I don’t necessarily think that all programming needs to be done in the super-structured style of pascal, but planning is always good, and using tried-and-true methods whenever possible is also advisable.

  3. Lee Drake says:

    I learned to program Pascal off the “elements of style”. I belive that and CJ Date’s relational database book were the two formative books in my early development experience. There isn’t much in those two books that isn’t still true today, not matter what the database engine or programming language you’re using.

  4. Lee Drake says:

    Wow – my English teacher would have killed me if he’d seen that post, and Strunk and White are probably rolling in their graves. I can’t believe I missed that many capitalizations, and made that many spelling errors…. :) I should do a better proofing job before hitting “Submit”….

  5. kyle says:

    @lee, ever notice that no one on hackaday capitalizes anything?… strtolower($comment) ;

  6. glompix says:

    Actually, more like…

    * { text-transform:lowercase; }

    Much cleaner, and this site uses it. :)

  7. Orv says:

    This reminds me of a book I saw many years ago called “The Little Book of BASIC Style.” The title was a reference to “The Little Book of Style,” a guide for authors and publishers. This was from the “bad old days” of non-structured BASIC programming, and had a bunch of tips for how to make BASIC programs more clear.

  8. Amazing Alex says:

    I was gifteed these hangers in burgundy. They really come in handy with hard-to-hang items.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,731 other followers