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]

8 thoughts on “Strunk & White Can Apply To Programming

  1. 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.


  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. 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. 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. 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.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.