<?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>Rassie&#039;s Doghouse &#187; review</title>
	<atom:link href="http://rassie.org/archives/tag/review/feed" rel="self" type="application/rss+xml" />
	<link>http://rassie.org</link>
	<description>Barking at technology</description>
	<lastBuildDate>Sun, 08 May 2011 13:49:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Rant #213, in which a 1200+ pages book is judged and dismissed by its table of contents</title>
		<link>http://rassie.org/archives/281</link>
		<comments>http://rassie.org/archives/281#comments</comments>
		<pubDate>Thu, 01 Jul 2010 23:46:56 +0000</pubDate>
		<dc:creator>rassie</dc:creator>
				<category><![CDATA[Main]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[modern perl]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://rassie.org/?p=281</guid>
		<description><![CDATA[DISCLAIMER This post is highly subjective, biased and mostly unfunded. Thank you for understanding. A new book on Perl has been published. No, it&#8217;s not &#8220;Modern Perl&#8221; by chromatic (at least not yet) and also not the &#8220;Effective Perl Programming 2nd edition&#8221;. What I&#8217;m talking about is &#8220;Der Perl-Programmierer&#8221; (that&#8217;s German for &#8220;The Perl Programmer&#8221;) [...]]]></description>
			<content:encoded><![CDATA[<p><strong>DISCLAIMER</strong> This post is highly subjective, biased and mostly unfunded. Thank you for understanding.</p>

<p>A new book on Perl has been published. No, it&#8217;s not <a href="http://www.modernperlbooks.com/mt/index.html">&#8220;Modern Perl&#8221;</a> by
chromatic (at least not yet) and also not the <a href="http://www.effectiveperlprogramming.com/">&#8220;Effective Perl
Programming 2nd edition&#8221;</a>. What I&#8217;m talking about is
<a href="http://www.hanser.de/buch.asp?isbn=978-3-446-41688-8">&#8220;Der
Perl-Programmierer&#8221;</a> (that&#8217;s German for &#8220;The Perl Programmer&#8221;) by
Jürgen Plate. Now, I must admit I know nothing about Jürgen, and he is
probably a good professor, teacher and maybe even a good Perl hacker
and I don&#8217;t want to say anything bad about him. I didn&#8217;t even read
his book &#8212; I&#8217;ve only seen the <a href="https://docs.google.com/viewer?url=http://files.hanser.de/hanser/docs/20100623_216231413-23_978-3-446-41688-8_Inhaltsverzeichnis.pdf">table of
contents</a>. Despite
that, I wouldn&#8217;t recommend it, I&#8217;ll probably even recommend
strongly against it and I would even recommend that everyone in the
Perl community makes sure this book doesn&#8217;t get a wide reading.</p>

<p>My main problem with this book is that it&#8217;s totally unhelpful for Perl
at large. It&#8217;s a 2010 work, but it seems very unmodern, at least not
&#8220;modern&#8221; as in &#8220;modern Perl&#8221;. &#8220;Perl Best Practices&#8221; have done a
tremendous job separating Perl&#8217;s functionality into &#8220;use it&#8221; and &#8220;use
it only when you know what you are doing&#8221; and my personal plan for
teaching Perl would be teaching newbies the &#8220;good&#8221; stuff only &#8212;
and this book seems to fail miserably at this.</p>

<p>Here is what I don&#8217;t like in detail:</p>

<ul>
<li><p>In the chapter about control structures, the <code>goto</code> statement is
getting a separate subchapter. Call me purist, but I don&#8217;t believe
that the only useful form of <code>goto</code>, the one with a subroutine
reference, would be described, especially since subroutine references
are explained some 70 pages later. The other <code>goto</code> variants should
definitely be off the radar for newbies.</p></li>
<li><p>The <code>eval</code> function is getting one single page of attention or
maybe even less. I wonder whether the <code>$@</code> localizing problem is
explained somewhere in the book?</p></li>
<li><p>Whole five pages are dedicated to the &#8220;Perl 6 outlook&#8221;. How much
useful information about Perl 6 can you actually put in that space
without alienating people? I would have understood something like
&#8220;There is Perl 6 around, read all about it in our other book&#8221; in the
introduction, but a separate chapter of five pages?</p></li>
<li><p>Chapter 2 is &#8220;Debugging&#8221;, including &#8220;Perl Debugger&#8221;. Way before the
chapters on packages, modules and even complex data
structures. Needless to say, that whole chapter is ten pages long,
probably including the infamous &#8220;This page has been intentionally left
blank&#8221;.</p></li>
<li><p>I&#8217;m not entirely convinced that a chapter on documentation should
go before the one on packages, yet it does.</p></li>
<li><p>The chapter on regular expressions is
<a href="http://files.hanser.de/hanser/docs/20100623_21623141-28_978-3-446-41688-8_Leseprobe.pdf">available</a>
for free reading. It&#8217;s horrible, from what I can see.</p>

<p>First, we are told that Kleene created them and &#8220;adapted for the
information technology&#8221;. Fine, you could think, never mind the theory,
not everyone needs to know about Chomsky hierarchy. However, a
paragraph later you read &#8220;Regular expressions in Perl are based on an
NFA (non-deterministic finite automata), which does the following&#8230;.&#8221;
Besides that, the author tells us that Perl only has matching (<code>//</code> or
<code>m//</code>) and replacing (<code>s//</code>) regexps only to introduce <code>tr//</code> later
on.</p>

<p>Great examples for replacement are <code>$string =~ s/ä/&amp;auml;/g;</code> for
HTML, which is still common in Germany, but utter bullshit even
there. Looking for something in a file? &#8220;For this special case (and
for searching in arrays) there is a function called <code>grep</code> which we&#8217;ll
discuss later, since we are solving the problem with simple pattern
matching&#8221;. Yes, it&#8217;s solved with a <code>while</code> loop &#8212; and we can consider
the readers lucky, since the author only wants the matching lines
printed. Otherwise we&#8217;d probably get the infamous <code>for-push</code> or a
<code>while-push</code> pattern. Oh and by the way, <code>tr//</code> gets almost three
pages of treatment, almost as much as <code>m//</code> and <code>s//</code> together.</p>

<p>Pure evil follows. Words can&#8217;t describe my feelings about the ignorance of Unicode in 2010. Probably the same words that go for Whitesmiths indentation of the code in that whole chapter.</p></li>
</ul>

<blockquote>
Whether `/.+/` accepts umlauts or not depends on
your setup. Therefore don&#8217;t forget to put the following lines at the
beggining of your program:

<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">use POSIX;<br />
use locale;<br />
# In case it's not yet set:<br />
setlocale(LC_CTYPE, &quot;de_DE.ISO-8859-1&quot;);</div></td></tr></tbody></table></div>

</blockquote>

<ul>
<li><p>Following the &#8220;Regexps&#8221; chapter are the ones called &#8220;Program
configuration&#8221; (either with Perl code or with key-value pairs, no idea
what they tell you there), &#8220;System information&#8221; (stuff like
<code>getpwuid</code>) and &#8220;Processes and signals&#8221; (<code>fork</code> and <code>waitpid</code>). I
consider it by any means advanced material, which shouldn&#8217;t come this
early in the book. The author probably has a strong system
administration background, so I guess that would explain it.</p></li>
<li><p>Whole ten pages on &#8220;Internationalization&#8221;, which seems to only
cover locales. I&#8217;m happy I don&#8217;t have the book here, since I&#8217;d
probably go killing people. Again, i18n is a must-know topic in 2010,
but covering it on ten pages won&#8217;t do it. Even the Unicode
<a href="http://www.joelonsoftware.com/articles/Unicode.html">article</a> by Joel
Spolsky is probably a bit longer than that. No mention of
Locale::Maketext (thank God!) but also none of any other translation
frameworks. Not important I guess&#8230;</p></li>
<li><p>The &#8220;Modules&#8221; chapter begins with a &#8220;Using modules&#8221; subchapter,
which makes me wonder &#8212; how did the author manage to recommend many
CPAN modules without explaining how to use them? And he did recommend
a lot in the earlier chapters, starting with <code>List::Util</code>,
<code>Regexp::Helper</code> and <code>Data::Dumper</code>.</p></li>
<li><p>Whole 34 pages on object oriented Perl in a 1200+ pages book. Classic object oriented
Perl. No Moose, no Class::Std or any other bless-free framework, as
far as I can see. This chapter will be the one I&#8217;d be wanting to look
into &#8212; I can&#8217;t believe you can write a book on Perl in 2010 and not
mention Moose.</p></li>
<li><p>All of the following chapters are dealing with &#8220;Practical Perl&#8221;, which is
more or less 800 pages of &#8220;look what I think is cool&#8221;. If he had
taught people to use CPAN properly, there would be no need for
that. Topic selection is more or less random &#8212; while I find &#8220;Text
manipulation&#8221; something that&#8217;s probably worth it, taking almost 100
pages for &#8220;GUIs with Tk&#8221; is a waste of time and paper. Same goes for
calling a chapter &#8220;MySQL Databases&#8221;, introducing MySQL in general for
about 60 pages, probably mixing up MySQL and generic SQL while at it,
and then trying to fire up DBI with MySQL over 30 pages. &#8220;Socket
programming&#8221;, &#8220;E-Mail with Perl&#8221; (including writing a small MTA), &#8220;CGI
and HTML&#8221; (yes, CGI as as Perl module too, no Catalyst, Dancer,
CGI::Application or anything else of the sort, but instead including a
sub-chapter on CAPTCHAs), &#8220;Math with Perl&#8221; and even &#8220;Hardware
Programming with Perl&#8221; (first sub-chapter of which is called &#8220;you must
be root&#8221;) are all interesting topics, but are they really needed in a
Perl book intended for newbies?</p></li>
</ul>

<p>As I went through the TOC, my WTF per second ratio went almost through the roof. This book could have been really good in 2003 or even 2005. In 2010 however, it is harmful for Perl the language, for Perl the community and ultimately for the newbies themselves, who will be easily alienated by this book &#8212; it&#8217;s not like there were no alternatives for Perl around. It&#8217;s not 1998, right?</p>

<p>Maybe we should forget about writing a Perl 6
<a href="http://github.com/perl6/book/">book</a> for a while and start by writing
a Perl 5 one? I for myself still hope for some good mixture of PBP, HOP and
chromatic&#8217;s new one. The one I can then whole-heartedly recommend &#8212; both Camel and Llama books seem a bit dusty right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://rassie.org/archives/281/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

