Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

The much anticipated new book from Damian Conway hit my desk this morning, and I spent a chunk of my evening tearing through it.

It's a wonderful resource, with a web of interconnected and mutually-reinforcing heuristics that reminds me of the better parts of the design patterns literature, although the recommendations are usually at a lower-level of detail then the typical class architecture patterns.

The 256 practices are grouped into logical categories, starting with lower-level syntax and working up to object, module, and project-wide issues. Much of this is familiar ground -- for example, many of the recommendations of perlstyle show up in chapters 2 and 3 -- but for each recommendation Damian includes both the basic, well-organized information that a newcomer would need to learn, as well as a mix of entertaining examples, obscure details, and geeky jokes that will keep the attention of more experienced programmers.

For example, the recommendation to use a four-column indent is accompanied by an ACM journal citation and an amusing anecdote about the competing social pressures that favor 4 over 2 or 8. (And let's not even talk about 3-space indents -- that's totally bizarre.)

There were some stylistic recommendations that I disagreed with, but they were a small minority, and the author makes it clear from the beginning that he's not trying to lay down a system of hard-and-fast rules, but rather expects individual developers to consider these issues in their local context to reach their own conclusions.

Later chapters show sensible ways of handling more complex coding issues, with a reasonable mix of recipes to roll-your-own solution versus pointing the reader towards relevant CPAN modules. Much of the Objects chapter is based on using Damian's Class::Std, and a number of the Perl6::* modules get a plug, but the book generally refrains from just focussing on his own distributions.

Remaining chapters cover documentation, testing, and other larger development issues. The influence of agile methodologies is evident in sections on writing tests first, test automation, and synchronizing code and documentation changes.

All in all, an enjoyable read and a useful reference for my Perl bookshelf.

-Simon


In reply to Perl Best Practices by simonm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found