In Chapter 18, Conway winds up the structured suggestions with the sine qua non for creating robust code, "Testing." Entire books have been written about the need to test code, and this chapter condenses the most useful tips into helpful guidelines. From "Write the test case first" ("probably the single best practice in all of software development..."), to "Write test cases that fail" ("Testing is not actually about ensuring correctness, it's about discovering mistakes..."), to "Never assume that a warning-free compilation implies correctness...", Conway's tips provide a roadmap for effectively testing your code.
After a chapter on "Miscellaneous" items, the book concludes by tying together the tips in two appendices. Appendix A excerpts the "top ten" techniques for optimizing your Perl coding in three categories: Essential Development Practices, Essential Coding Practices, and Essential Module Practices. Each "essential" is connected to the chapter where examples will be found. In Appendix B, every tip statement is listed in order, along with the item title associated with it in the book. This makes it easy to track back through the text. ("Where did I see that example about multi-contextual return values?")
Appendic C covers how to set up the optimum configuration for common editors like vim, vile, BBEdit and TextWrangler. The Appendix D lists recommended modules, subroutines, and utilities that will make the coding and testing process simpler, and the final appendix provides a bibliography. With the rich index, these "utilities" make the manual work as an excellent reference, as well as an initial guide.
As a beginning Perl programmer, I need all the help I can get. Damian Conways' Perl Best Practices is one of the most useful resources I've yet encountered in my quest to create elegant code.








Article comments