<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>literal thoughts &#187; books</title>
	<atom:link href="http://blog.nix.is/tag/books/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.nix.is</link>
	<description>Come for the thoughts, stay for the rants</description>
	<lastBuildDate>Tue, 01 Sep 2009 13:15:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Perl book (mini) reviews</title>
		<link>http://blog.nix.is/perl-book-mini-reviews</link>
		<comments>http://blog.nix.is/perl-book-mini-reviews#comments</comments>
		<pubDate>Sun, 04 May 2008 21:33:36 +0000</pubDate>
		<dc:creator>Hinrik Örn Sigurðsson</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://blog.nix.is/?p=14</guid>
		<description><![CDATA[

Programming Perl
The Perl Cookbook
Mastering Regular Expressions
Mastering Algorithms with Perl
Perl Best Practices
Perl Hacks
Higher-Order Perl
Perl 6 and Parrot Essentials
Perl 6 Now
Catalyst
Perl Medic


I much prefer reading things in well typeset paperback books than on computer screens. The subject of Perl is no exception. I&#8217;ve got quite a few Perl books. Some reviews are in order. I haven&#8217;t actually [...]]]></description>
			<content:encoded><![CDATA[<div class="toc">
<ol>
<li><a href="http://blog.nix.is/perl-book-mini-reviews#programming-perl">Programming Perl</a></li>
<li><a href="http://blog.nix.is/perl-book-mini-reviews#the-perl-cookbook">The Perl Cookbook</a></li>
<li><a href="http://blog.nix.is/perl-book-mini-reviews#mastering-regular-expressions">Mastering Regular Expressions</a></li>
<li><a href="http://blog.nix.is/perl-book-mini-reviews#mastering-algorithms-with-perl">Mastering Algorithms with Perl</a></li>
<li><a href="http://blog.nix.is/perl-book-mini-reviews#perl-best-practices">Perl Best Practices</a></li>
<li><a href="http://blog.nix.is/perl-book-mini-reviews#perl-hacks">Perl Hacks</a></li>
<li><a href="http://blog.nix.is/perl-book-mini-reviews#higher-order-perl">Higher-Order Perl</a></li>
<li><a href="http://blog.nix.is/perl-book-mini-reviews#perl-6-and-parrot-essentials">Perl 6 and Parrot Essentials</a></li>
<li><a href="http://blog.nix.is/perl-book-mini-reviews#perl-6-now">Perl 6 Now</a></li>
<li><a href="http://blog.nix.is/perl-book-mini-reviews#catalyst">Catalyst</a></li>
<li><a href="http://blog.nix.is/perl-book-mini-reviews#perl-medic">Perl Medic</a></li>
</ol>
</div>
<p>I much prefer reading things in well typeset paperback books than on computer screens. The subject of Perl is no exception. I&#8217;ve got quite a few Perl books. Some reviews are in order. I haven&#8217;t actually written a book review in many years, so they won&#8217;t be very &#8220;in-depth&#8221;, though.</p>
<p>Oh, and by the way, this, too, <a href="http://use.perl.org/~schwern/journal/36263">is a Perl blog</a>.<br />
<span id="more-14"></span></p>
<h2 id="programming-perl">Programming Perl</h2>
<p><em>By Larry Wall, Tom Christiansen, and Jon Orwant</em></p>
<p><a href="http://blog.nix.is/wp-content/uploads/2008/05/progperl.jpg"><img class="alignright size-thumbnail wp-image-18" title="progperl" src="http://blog.nix.is/wp-content/uploads/2008/05/progperl-150x150.jpg" alt="" width="150" height="150" /></a>Ah, the Camel book. The latest edition is about 7 years old now, but it has stood the test of time. If you only read one Perl book, make it this one. Aside from being a comprehensive and detailed reference on the language, it&#8217;s also funny. One of my favorite passages is the start of chapter 10, Packages:</p>
<blockquote><p>In this chapter, we get to start having fun, because we get to start talking about software design. If we&#8217;re going to talk about good software design, we have to talk about Laziness, Impatience, and Hubris, the basis of good software design.</p>
<p>We&#8217;ve all fallen into the trap of using cut-and-paste when we should have defined a higher-level abstraction, if only just a loop or a subroutine.* To be sure, some folks have gone to the opposite extreme of defining ever-growing mounds of higher-level abstractions when they should have used cut-and-paste.† Generally, though, most of us need to think about using more abstraction rather than less.</p>
<p>Caught somewhere in the middle are the people who have  a balanced view of how much abstraction is good, but who jump the gun on writing their own abstractions when they should be reusing existing code.‡</p>
<p>――――――――――<br />
* This is a form of False Laziness.<br />
† This is a form of False Hubris.<br />
‡ You guessed it — this is False Impatience. But if you&#8217;re determined to reinvent the wheel, at least try to invent a better one.</p></blockquote>
<p>The book is written for programmers, so if you&#8217;ve haven&#8217;t programmed before, you should probably start with an easier book. I&#8217;ve heard &#8220;Learning Perl&#8221; is pretty good.</p>
<h2 id="the-perl-cookbook">The Perl Cookbook</h2>
<p><em>By Tom Christiansen and Nathan Torkington</em></p>
<p><a href="http://blog.nix.is/wp-content/uploads/2008/05/perlcook.jpg"><img class="alignright size-thumbnail wp-image-19" title="perlcook" src="http://blog.nix.is/wp-content/uploads/2008/05/perlcook-150x150.jpg" alt="" width="150" height="150" /></a>Here is another highly useful book. If you read the Camel book and thought &#8220;What next?&#8221;, then this book is the answer. It&#8217;s got 900 pages of recipes for how to do everything from sorting hashes to writing pre-forking TCP servers. Each one of the 22 chapters begins with a few pages of very informative discussion of the problem domain at hand. This book has been extremely useful to me. It saves you a lot of Googling and looking through various Perl man pages. I highly recommend it.</p>
<h2 id="mastering-regular-expressions">Mastering Regular Expressions</h2>
<p><em>By Jeffrey Friedl</em></p>
<p><a href="http://blog.nix.is/wp-content/uploads/2008/05/mastreg.jpg"><img class="alignright size-thumbnail wp-image-17" title="mastreg" src="http://blog.nix.is/wp-content/uploads/2008/05/mastreg-150x150.jpg" alt="" width="150" height="150" /></a>While not strictly a Perl book, it is about regular expressions, which were to a large extent popularized by Perl. Or the other way around. Or both. I&#8217;m not sure. But hey, at least the chapter on Perl is the longest one in the book.</p>
<p>Anyway, the book truly lives up to its title. It describes in detail how regular expression engines work, how to write effecient expressions, how programming languages support regexes, and more. Until I read this book, I did not know that there are two main approaches to writing a regular expression engine, a DFA (deterministic finite automaton) and an NFA (nondeterministic finite automaton), or that the fastest way to strip leading and trailing whitespace is (usually) like so:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000066;">s</span><span style="color: #339933;">/^</span><span style="color: #0000ff;">\s</span><span style="color: #339933;">+//;</span>
<span style="color: #009966; font-style: italic;">s/s+$//</span><span style="color: #339933;">;</span></pre></div></div>

<p>I hadn&#8217;t actually learned Perl before getting this book. Perl is used in most of the examples in the book, which is what got me interested in the language.</p>
<h2 id="mastering-algorithms-with-perl">Mastering Algorithms with Perl</h2>
<p><em>By Jon Orwant, Jarkko Hietaniemi, and John Macdonald</em></p>
<p><a href="http://blog.nix.is/wp-content/uploads/2008/05/mastalg.jpg"><img class="alignright size-thumbnail wp-image-20" title="mastalg" src="http://blog.nix.is/wp-content/uploads/2008/05/mastalg-150x150.jpg" alt="" width="150" height="150" /></a>I&#8217;m not a computer scientist. Perhaps that&#8217;s why I found this book so interesting. It has working Perl code accompanying all the algorithms that are explained in the book, as well as discussions of pertinent CPAN modules. Though I suspect that last part might be a bit outdated, as the book was written almost a decade ago. If you know Perl and would like a hands-on introduction to algorithms, this book is great.</p>
<h2 id="perl-best-practices">Perl Best Practices</h2>
<p><em>By Damian Conway</em></p>
<p><a href="http://blog.nix.is/wp-content/uploads/2008/05/perlbest.jpg"><img class="alignright size-thumbnail wp-image-21" title="perlbest" src="http://blog.nix.is/wp-content/uploads/2008/05/perlbest-150x150.jpg" alt="" width="150" height="150" /></a>I liked this book. I like my code especially clean and readable, and this book has very good guidelines that can help achieve that. The book is a joy to read (it has humour!), and it&#8217;s got very useful appendices at the end with quick summaries of all the guidelines. Then, if you want to audit your source code according to some of these (and other) guidelines, you can use the excellent <a href="http://search.cpan.org/dist/Perl-Critic/">Perl::Critic</a> module.</p>
<h2 id="perl-hacks">Perl Hacks</h2>
<p><em>By <code>chromatic</code>, Damian Conway, and Curtis &#8220;Ovid&#8221; Poe</em></p>
<p><a href="http://blog.nix.is/wp-content/uploads/2008/05/perlhacks.jpg"><img class="alignright size-thumbnail wp-image-22" title="perlhacks" src="http://blog.nix.is/wp-content/uploads/2008/05/perlhacks-150x150.jpg" alt="" width="150" height="150" /></a>This one is sort of like The Perl Cookbook, except it focuses more on the process of working with Perl rather than specific solutions to various programmatic problems. As such, it&#8217;s not really aimed at beginners. It has many very useful tricks regarding things like customizing your editor for Perl, working with modules, (ab)using the guts of Perl, and debugging. There&#8217;s something in it for everyone.</p>
<h2 id="higher-order-perl">Higher-Order Perl</h2>
<p><em>By Mark Jason Dominus</em></p>
<p><a href="http://blog.nix.is/wp-content/uploads/2008/05/hoperl.jpg"><img class="alignright size-thumbnail wp-image-28" title="hoperl" src="http://blog.nix.is/wp-content/uploads/2008/05/hoperl.jpg" alt="" width="122" height="150" /></a><em>Now</em> it&#8217;s getting interesting. In this book, the author tries to familiarize the reader with ways of programming most common in purely functional languages like Lisp and Haskell. That makes it very different from most Perl books (in a good way). The book is all about &#8220;being clever&#8221; as the author has said, so you&#8217;re bound to learn something from it. I certainly have. The topics covered include recursion, dispatch tables, currying, and parsing, to name a few. There are <a href="http://hop.perl.plover.com/#free">plans</a> to turn the book into wiki, but I I&#8217;m not sure when that&#8217;ll happen.</p>
<h2 id="perl-6-and-parrot-essentials">Perl 6 and Parrot Essentials</h2>
<p><em>By Allison Randal, Dan Sugalski, and Leopold Toetsch</em></p>
<p><a href="http://blog.nix.is/wp-content/uploads/2008/05/perl6parrot.jpg"><img class="alignright size-thumbnail wp-image-25" title="perl6parrot" src="http://blog.nix.is/wp-content/uploads/2008/05/perl6parrot-150x150.jpg" alt="" width="150" height="150" /></a>This book is an excellent introduction to Perl 6 and Parrot (the virtual machine which will run Perl 6), though I&#8217;ve been told that the Parrot bits are a little dated now. I read it in one sitting, it was that exciting. I realize that his book is about programming, and that this statement makes me a total geek. Oh well, there&#8217;s no looking back, Perl 6 will be awesome! The first half of the book covers the Perl 6 language, while the second covers the design of Parrot. I didn&#8217;t absorb as much as I could have from the second half as I don&#8217;t know much about parsing or compilers, but the first half more than made up for it. I really wish I could use all those nifty featues in my code right now. In the meantime, <a href="http://en.wikipedia.org/wiki/Pugs">Pugs</a> will have to quence the thirst of those like me who are excited about Perl 6.</p>
<h2 id="perl-6-now">Perl 6 Now</h2>
<p><em>By Scott Walters</em></p>
<p><a href="http://blog.nix.is/wp-content/uploads/2008/05/perl6now.jpg"><img class="alignright size-thumbnail wp-image-27" title="perl6now" src="http://blog.nix.is/wp-content/uploads/2008/05/perl6now.jpg" alt="" width="113" height="150" /></a>I didn&#8217;t get much out of this book. For one, many things are explained which most Perl users already know, so I flipped over many pages while reading it. Secondly, many of the Perl 6 ideas are illustrated with modules that use source filters, which are known to be unreliable, so you definitely wouldn&#8217;t use them in production code. </p>
<h2 id="catalyst">Catalyst</h2>
<p><em>By Jonathan Rockway</em></p>
<p><a href="http://blog.nix.is/wp-content/uploads/2008/05/catalyst.jpg"><img class="alignright size-thumbnail wp-image-26" title="catalyst" src="http://blog.nix.is/wp-content/uploads/2008/05/catalyst-150x150.jpg" alt="" width="150" height="150" /></a>The chapters in this book follow a very <em>practical</em> approach, diving right in and showing you various common ways of using Catalyst. I haven&#8217;t written much using this fine web framework, so there isn&#8217;t really much more I can say about the content of the book. I can say something about the <em>lack</em> of content though. This book is missing an overview of Catalyst, and a better explanation of how all the parts fits together. Some discussion on the MVC architecture and how Catalyst implements it would have been nice as well. Seeing as the book is quite short, there would be plenty of room for these things.</p>
<h2 id="perl-medic">Perl Medic</h2>
<p><em>By Peter J. Scott</em></p>
<p><a href='http://blog.nix.is/wp-content/uploads/2008/05/perlmedic.jpg'><img src="http://blog.nix.is/wp-content/uploads/2008/05/perlmedic-150x150.jpg" title="perlmedic" width="150" height="150" class="alignright size-thumbnail wp-image-29" /></a>I was not disappointed by this book. It delivers what is promised. Having recently started working on an old codebase, I found the book very useful. Testing, refactoring, benchmarking, debugging; all these things are well laid out by the author. It also has a useful chapter on upgrading code written for older versions on Perl, and discusses how to make use of newer features.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nix.is/perl-book-mini-reviews/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
