News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

O’Reilly ships perl style guide

Jul 15, 2005 — by Henry Kingman — from the LinuxDevices Archive — views

O'Reilly has published a new perl book about coding style. Perl Best Practices covers code layout, naming conventions, choosing data and control structures, and more, and can help novices and experts alike write better code, says author Damian Conway.

(Click for larger view of the cover)

Conway contends that most perl programmers come by their coding styles in haphazard fashion, as a result of career opportunities and responsibilities, without ever giving style much thought. “They aren't conscious of the hundreds of choices they make every time they code: how they format their source, the names they use for variables, the kinds of loops they use,” he says.

Conway says that formulating a rational, consistent coding style can help programmers get more done. “[There are rules that] provide a uniform and predictable framework for thinking about problems, and a common language for expressing solutions. Code matters, so the way in which you code matters too,” said Conway.

In Perl Best Practices, Conway sets forth 256 style guidelines designed to help programmers produce code that is clear, robust, efficient, maintainable, and concise. The guidelines cover code layout, naming conventions, choice of data and control structures, program decomposition, interface design and implementation, modularity, object orientation, error handling, testing, and debugging.

Conway says experienced programmers may not agree with all his suggestions, but that “Just thinking about these issues — becoming conscious of the way you currently write code — can be of enormous benefit.”

Availability

The 544-page book is available direct from O'Reilly, priced at $39.95. A sample chapter on subroutines is also available.


 
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.