http://www.perlmonks.org?node_id=736395

Just finished the book Beautiful Code". Interesting to read what others in the trade consider best design and coding practices, and how they arrived at these conclusions.

I found this summary succinent Seven Pillars of Pretty Code, which reminded me of Andy Tannenbaums kernel code in MINIX as a fine example of easy "visual parsing"; - Seems there's still life in the MINIX OS despite the '92 Linus vs. Tanenbaum shootout

Allan Dystrup

Replies are listed 'Best First'.
Re: Beautiful Code
by matze77 (Friar) on Jan 19, 2009 at 14:48 UTC

    Would you recommend it (the book)? Thought of buying it maybe you want to add a book review here? ( I trust the Perlmonks community reviews more than that amazon reviews which I wonder sometimes why they are so good ;-))

    MH

      I reviewed the book on my website last year. I think I would recommend the book given the caveats in my review.

      I did (and still do) think this book is more useful for more senior programmers. I found the book to be most useful when recognizing that the beauty of the code was often a function of the context in which it was used. A more junior programmer might not recognize the context and therefore get the wrong impression.

      G. Wade
      This can be classified as an "advanced book" in the sense that to really evaluate/appreciate the design choices made by the 30+ different authors (and projects), you should have some experience developping software, where you have wrestled with the same general kind of design issues.

      You should also have a reading familiarity with language grammars (BNF) and parsing, algorithms, complexity (O) and testing, programming languages (C, C++, Java, Haskell, Scheme/Lisp, Perl), frameworks (OO) and architectures (layering, services).

      For a novice (actually for any...) programmer, I'd rather as a first read recommend a book like "Perl Best Practices" by Damian Conway or Bjarne Stroustrups new book on Programming, Principles and Practice(see ref). But with the above prerequisites, I find the "Beautiful Code" book thought provoking and inspiring (each author has his own preferences viz. design and coding - sometimes contradicting - , but they describe the alternatives, explain their mistakes and argue for their final choices.

      Best regards,
      Allan Dystrup