<?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; rassie</title>
	<atom:link href="http://rassie.org/archives/author/rassie/feed" rel="self" type="application/rss+xml" />
	<link>http://rassie.org</link>
	<description>Barking at technology</description>
	<lastBuildDate>Wed, 28 Jul 2010 00:14:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>On ducks and ducklings</title>
		<link>http://rassie.org/archives/368</link>
		<comments>http://rassie.org/archives/368#comments</comments>
		<pubDate>Tue, 27 Jul 2010 23:57:41 +0000</pubDate>
		<dc:creator>rassie</dc:creator>
				<category><![CDATA[Main]]></category>
		<category><![CDATA[hype]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://rassie.org/?p=368</guid>
		<description><![CDATA[It seems there is a new search engine in town: DuckDuckGo. While in itself it&#8217;s a good thing &#8212; if anything, Google needs some competition &#8212; it&#8217;s disturbing how much unreflected hype it produces in the Perl community. I generally disapprove of the &#8220;because it&#8217;s not Google&#8221; argument. Just because someone is not Google, doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>It seems there is a new search engine in town:
<a href="http://duckduckgo.com">DuckDuckGo</a>. While in itself it&#8217;s a good thing
&#8212; if anything, Google needs some competition &#8212; it&#8217;s disturbing how
much unreflected hype it produces in the Perl community.</p>

<p>I generally disapprove of the &#8220;because it&#8217;s not Google&#8221; argument. Just
because someone is not Google, doesn&#8217;t mean they are good per
definition &#8212; neither is Google evil per definition. You need to
fairly rate each contender and base ratings on facts: features,
existing problems, evaluations etc. On this scale, technical arguments
for Duck<sup class='footnote'><a href='#fn-368-1' id='fnref-368-1'>1</a></sup> has been not really compelling
enough for me to switch.</p>

<p>But one argument <strong>shouldn&#8217;t be compelling</strong> for anyone: <strong>DuckDuckGo is
written in Perl</strong>. Because it <strong>doesn&#8217;t matter</strong> at all.</p>

<p>You remember Frederic Brooks&#8217; &#8220;<a href="http://en.wikipedia.org/wiki/No_Silver_Bullet">No silver
bullet</a>&#8221; essay? In a
nutshell, it&#8217;s stating &#8220;There is no single technology that&#8217;s best for
every task&#8221;. A solution should use whatever is most suited for the
task, not the next best hype. If you do embedded programming, you&#8217;d
probably go with C, doing much mathematical stuff brings you to
Haskell and in complex networking you might be better off with
Erlang. Normally you wouldn&#8217;t be doing web-development in Bash, but
you&#8217;d take whatever is best suited for the task instead. If you have
several options then you get to choose whatever you&#8217;d be more
efficient with. Like, for example, Perl.</p>

<p>But nobody should care about which language you chose just as nobody
should care what DuckDuckGo is written in. It&#8217;s a nice bonus if your
favourite search engine is made with technologies you like, but it
shouldn&#8217;t matter &#8212; what matters is that it gets stuff done.</p>

<p>If someone were to make a survey asking geek what programming language
Google&#8217;s search engine is written in, he&#8217;d probably get a hundred
different answers, depending of what every one of respondents has
heard on different occassions from different sources. And probably,
every one of them will be right to a certain degree: Google does many
languages and many technologies &#8212; whatever it takes to get stuff
done. A solution is always a mixture, even in IT.</p>

<p>The mere fact that DuckDuckGo is written in Perl will be good
publicity and a good showcase for Perl, but only if or when DuckDuckGo
takes off big time. Geeks won&#8217;t be the critical mass for Duck&#8217;s
takeoff, instead &#8220;normal&#8221; people will &#8212; and Duck will need a lot of
them. They&#8217;ll matter a lot: if they like Duck, Google will be getting
some competition, if not, well, Duck will be offline pretty soon
then. Either way, its success or failure will be based on features (or lack
thereof), speed (or lack thereof) or maybe free gas coupons for every
millionth visitor (or lack thereof).</p>

<p>But not on Perl being the programming language.</p>

<div class='footnotes'><div class='footnotedivider'></div><ol><li id='fn-368-1'>Noticed how I called this thing &#8220;Duck&#8221;? I&#8217;m certainly not
calling it DDG or DuckDuckGo, since it&#8217;s just too difficult to
pronounce. And &#8220;Duck&#8221; is nowhere near &#8220;Google&#8221; &#8212; &#8220;I&#8217;ve ducked you on
the internet&#8230;&#8221; just sounds weird <span class='footnotereverse'><a href='#fnref-368-1'>&#8617;</a></span></li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://rassie.org/archives/368/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>On generating buzz</title>
		<link>http://rassie.org/archives/343</link>
		<comments>http://rassie.org/archives/343#comments</comments>
		<pubDate>Mon, 12 Jul 2010 17:51:15 +0000</pubDate>
		<dc:creator>rassie</dc:creator>
				<category><![CDATA[Main]]></category>
		<category><![CDATA[branding]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://rassie.org/?p=343</guid>
		<description><![CDATA[As is seems, my last article has left some things to be explained in more detail. Particularly, Gabor has left the following comment: I wish people would stop blaming Perl 6 or its name on the lack of buzz around Perl. I wish people were spending that energy and time in creating more buzz. I [...]]]></description>
			<content:encoded><![CDATA[<p>As is seems, my <a href="http://rassie.org/archives/312/">last article</a> has left some things to be explained in more detail. Particularly, <a href="http://szabgab.com/">Gabor</a> has left the following comment:</p>

<blockquote>I wish people would stop blaming Perl 6 or its name on the lack of buzz around Perl. I wish people were spending that energy and time in creating more buzz.</blockquote>

<p>I would like to reply to that quote by this post, since I feel that the importance of the problem has not been understood in its completeness.</p>

<p>The key misunderstanding here is: <strong>You can only generate buzz for something new</strong>. Let&#8217;s just make a small practical example, shall we? Let&#8217;s go to <a href="http://www.reddit.com/r/programming">programming reddit</a> and pick something up from the front page. How about <a href="http://www.reddit.com/tb/cocww">Little known C# feature, Conditional attributes.</a>? What do you feel when you read that article?</p>

<p>I can tell you what I feel: I don&#8217;t care at all. It&#8217;s nice to know that C# has that kind of attributes, but I still don&#8217;t care because of one single fact: I&#8217;m not going to programm C#. That language is out of my scope, because an immediate connection from C# to .NET to Microsoft to Windows is established and I&#8217;m a Linux/FOSS guy. Same goes for Java &#8212; however nice the newest Hibernate or JSF or jBPM or whatever might be, I&#8217;m not interested, since I try to avoid Java, because the word that I associate with Java is &#8220;restriction&#8221;<sup class='footnote'><a href='#fn-343-1' id='fnref-343-1'>1</a></sup>.</p>

<p>Same goes for Perl[56]. You can generate as much buzz about Perl as you want, but &#8220;Perl&#8221;, as I explained previously, is a brand with definitive associations, namely &#8220;ugly&#8221; and &#8220;incomprehensible&#8221;. It doesn&#8217;t even matter which version, Perl is Perl, right? So every article about some cool new technology in Perl, be it Catalyst or DBIx::Class or Net::Twitter, will be dismissed with a comment &#8220;Yeah, it&#8217;s nice, but who&#8217;d want to code Perl nowadays?&#8221;</p>

<p>It&#8217;s the same problem Steve Yegge pointed out in his talk which I linked to from my last article: &#8220;Java is my father&#8217;s language, I won&#8217;t use that&#8221;. Same goes for Perl &#8212; it&#8217;s an old language and usually an old language is considered crufty and inflexible, even though it&#8217;s untrue for at least Perl and Common Lisp.</p>

<p>So basically, buzz for old stuff doesn&#8217;t matter. New stuff can be efficiently buzzed &#8212; look at all the attention Cassandra and all other NoSQL database engines are getting. Buzzing only matters when the stuff is new, at least from one&#8217;s point of view. And here lies a problem: Perl is extremely well-known. Just like COBOL, Perl is known by the name, even though most people can&#8217;t usually tell anything useful about the language itself. Only that they wouldn&#8217;t want to program either of these languages, since they&#8217;ve heard that they are awful. So barely anyone would consider Perl a new development and therefore a common perception exists which makes all buzzing about Perl moot.</p>

<p>But how can we revive Perl and show the masses that it&#8217;s still alive and kicking? We&#8217;ve got several options. Educating is probably the most time-consuming and probably also the most useless method &#8212; for one reeducated person you get couple of hundreds who&#8217;ve learned Perl is ugly. Rebranding might be a good way. Writing articles for popular magazines would probably help a lot, especially if someone were to write an article introducing a totally new and powerful programming language, revealing only at the end that it&#8217;s actually has been Perl all along. Perl desperately needs new books (I&#8217;m awaiting &#8220;Modern Perl Book&#8221; eagerly) and also a lot of showcases.</p>

<p>But there is really no patented recipe &#8212; Perl currently sits in a self-inflicted branding trap and it&#8217;ll be a hard ride to get out<sup class='footnote'><a href='#fn-343-2' id='fnref-343-2'>2</a></sup>.</p>

<p>And Perl 6 is not helping it at all.</p>

<div class='footnotes'><div class='footnotedivider'></div><ol><li id='fn-343-1'>and also &#8220;Eclipse&#8221;, but that&#8217;s another story <span class='footnotereverse'><a href='#fnref-343-1'>&#8617;</a></span></li><li id='fn-343-2'>Maybe TPF should hire a marketing/branding consultant? <span class='footnotereverse'><a href='#fnref-343-2'>&#8617;</a></span></li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://rassie.org/archives/343/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Perl&#8217;s visibility and branding</title>
		<link>http://rassie.org/archives/312</link>
		<comments>http://rassie.org/archives/312#comments</comments>
		<pubDate>Sat, 10 Jul 2010 23:30:27 +0000</pubDate>
		<dc:creator>rassie</dc:creator>
				<category><![CDATA[Main]]></category>
		<category><![CDATA[branding]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://rassie.org/?p=312</guid>
		<description><![CDATA[In the recent days, several bloggers (including chromatic) have talked about Perl&#8217;s visibility in the world. Here are some thoughts of mine on Perl&#8217;s marketing and connected topics. Self-referential promotion I feel that most Perl marketing strategies currently in use are misguided &#8212; they appeal to people already using Perl. First and most important, the [...]]]></description>
			<content:encoded><![CDATA[<p>In the recent days, several bloggers (including
<a href="http://www.modernperlbooks.com/mt/2010/07/the-urge-to-brag.html">chromatic</a>)
have talked about Perl&#8217;s visibility in the world. Here are some thoughts of mine on Perl&#8217;s marketing and connected topics.</p>

<h3>Self-referential promotion</h3>

<p>I feel that most Perl marketing 
strategies currently in use are misguided &#8212; they appeal to people already using Perl. First and most important, the Ironman blogging competition. Its
original aim has been &#8220;to promote the Perl language, and encourage
more people within the Perl community to promote the language to the
world outside the Perl echo-chamber&#8221;. I honestly still don&#8217;t
understand why blogging about Perl in a self-contained blogging system
has <em>any</em> influence on the people outside. Yes, we might actually get
higher Google rankings, but does it help Perl itself in any way? Only
people who are actively searching for Perl might find something
interesting, but they won&#8217;t until the thought of actually using Perl
arises. Instead, we should be writing articles and sending them to the
(online) magazines about general IT or general programming, not dedicated Perl magazines. Where&#8217;s that &#8220;Ironman Article of the Month&#8221;
prize I keep hearing about? We could use those articles for promoting Perl outside of its own eco-system.</p>

<p>The other proposal is placing &#8220;Made with Perl&#8221; banners all over your
website. Seriously, do I even need to mention why this is bad? Normal
people don&#8217;t give a damn about what technology your site is made
with. Do you see any &#8220;.NET FTW!&#8221; banners on stackoverflow.com? Any
&#8220;Proudly made with TextMate and Rails&#8221; buttons on GitHub? They are not
there, because they don&#8217;t matter to the visitors.</p>

<p>If we want more people to choose Perl for their projects, we need to
showcase Perl. Projects using Perl, be it DuckDuckGo or BBC or
anything else<sup class='footnote'><a href='#fn-312-1' id='fnref-312-1'>1</a></sup> should be referenced
from one single place and this place should be the frontpage of
perl.org. Ruby on Rails&#8217; <a href="http://rubyonrails.org/">front page</a>
prominently presents sites using Rails,
<a href="http://www.djangoproject.com/">Django</a> has the same thing on the
front page, PostgreSQL has a &#8220;Featured User&#8221; front page
column. Catalyst on the other hand, just publishes some testimonials
by people without referenced project or company, perl.org has a huge
&#8220;20,000 CPAN modules&#8221; heading, which makes me feel like &#8220;20k of
what?&#8221;. Underneath a line &#8220;That&#8217;s why we love Perl&#8221;. Yeah, right, we
do, does the visitor? Such introductory websites should become more embracing and welcoming to the newbies
and not look like some kind of bizarre cult to them. This part of
self-promotion is extremely important, first impression counts.</p>

<h3>Talking to others</h3>

<p>When you talk to people about stuff you make in Perl, you mostly get
some condolencing faces and a question &#8220;Couldn&#8217;t you take Python or
Ruby&#8221;? Many other languages (just like Python or Ruby), have become
popular with a tagline &#8220;Obsoleting Perl&#8221;, because they all thought a
replacement was desperately needed. It doesn&#8217;t even matter that
current Perl is more flexible or better or faster or cleaner than
Python or Ruby or for that matter Perl itself from 2000. Perl has a
reputation, it has become a brand name, a brand name that has
negative connotations.</p>

<p>Have you ever watched Steve Yegge&#8217;s excellent <a href="http://blip.tv/file/319044/">branding
keynote</a>? If not, you should do so
immediately. Even though he mentions Perl several times, another quote
should stay in your mind:</p>

<pre><code>    Who remembers GTE? [...] GTE was for some time the most
    reviled brand. Why? [...] their infrastructure sucked and
    their service sucked and everybody hated them. The word for
    GTE in consumer's mind was "suck". [...] They've spent a
    billion dollars upgrading their infrastructure and service
    until they were actually the best in the United States. And
    ... the people still thought they sucked, of course. [...] The
    problem is: [a brand] is a const identifier. [...] GTE was
    like "we are screwed, our brand is in the toilet". So they
    went to this marketing agency and they asked [...] "If your
    service is bad today and perfect tomorrow, how long does it
    take to change people's mind about your brand?" [...] And the
    answer came back after much study that it takes *one
    generation*. And the GTE was like "Screw that!" and changed
    their name to Verizon.
</code></pre>

<p>This is exactly the situation Perl is currenty in. Most people
associate Perl with &#8220;scripting&#8221; or &#8220;system administration&#8221; if they
mean good or &#8220;ugly&#8221; or &#8220;write-only&#8221; otherwise. And since Perl has been
on the market for a long time, it&#8217;ll probably take a bit more than a
generation of new programmers to get away from that image. The bad
news are: very few new programmers will ever get a chance to see
Perl&#8217;s bright side &#8212; Java and PHP are just excellent at recruiting
newbies.</p>

<p>So we got to educate people about Perl as soon as it gets and show
them the good sides and compare it to Java and PHP and Python and Lua
etc. But in my opinion, there is one big problem with that: Perl 6.</p>

<h3>Perl 6</h3>

<p>Perl 6 actually warrants a separate rant about its whole structure and
design, but one thing is certain: it will have the same branding
problems as Perl 5. They should have called it &#8220;Rakudo&#8221; or &#8220;Parrot&#8221; or
anything else, just not &#8220;Perl&#8221; and it might have been (or maybe it
still will be) a successful language.</p>

<p>When you tell people there is a Perl 6 coming, which will be somewhat
incompatible to current Perl 5 and won&#8217;t have any of the libraries or
frameworks, you lose them immediately, since it&#8217;s not feasible to build
something new on an obsolete technology. Perl community can&#8217;t afford
not getting more people involved and it can&#8217;t afford waiting for Perl 6. It should rather use all the power it can to continue improving Modern Perl. A question still
remains whether Perl 6 will be needed at all if Modern Perl implements
all of its tasty features.</p>

<p>In a way, Perl 6 drama reminds me of another language which is &#8220;worth
learning [tm]&#8221; &#8212; JavaScript<sup class='footnote'><a href='#fn-312-2' id='fnref-312-2'>2</a></sup>. Currently
implemented version of the standard is ECMAScript 3. The most recent
standard version is ECMAScript 5, released in December 2009. An
ECMAScript 4 has never been released, there has only been a draft of a
completely incompatible overhaul of the standard, which promised to
clean up the whole mess of browser scripting. Needless to say: it
failed miserably, in part because of a necessary complete
reimplementation and was replaced with backwards-compatible ECMAScript
5, which corrected the most obvious stupidities of the original
standard and made people <em>happy enough</em>. To me, ECMAScript 4 has a lot
of similarities to the aims of Perl 6, while ECMAScript 5 is more like
Modern Perl.</p>

<h3>Marketing Modern Perl</h3>

<p>In my opinion, Modern Perl is the only one that should be
marketed. Remember that GTE/Verizon example? While I think a new name
for Perl 6 is needed, it&#8217;s possible to create a new brand for
modern Perl 5 without completely sacrificing the name. How about
<strong>Modern Perl</strong> for an official name for Perl 5?</p>

<p>5.12 could be the last official Classic Perl version and 5.14 would be
<em>Modern Perl 1.0</em>. New filename extensions <code>.mpl</code> and <code>.mpm</code> could be
introduced, which would enable warnings and strictness and
Perl::Critic warnings and other new features by default, while
<code>.pl</code> and <code>.pm</code> would still trigger Classic Perl mode. Disturbing
features could be deprecated in the Modern Perl while retained in
Classic. New features could be tested out as CPAN modules and
officially introduced to the core in Modern mode.</p>

<p>I know it&#8217;s difficult on the compiler side. However, it&#8217;s a lot better than creating a complete new language over a decade and then creating
a whole new set of libraries over another decade. We don&#8217;t actually need a perfect language, which has all the bells and whistles and fixes all of the mistakes of the previous iteration, I think the 80%/20% rule should also apply to Perl. Continuous
improvement has done Perl 5 a lot of good in the last years and I think
this process should be continued.  With a bit of luck, Perl will then be able to live on and innovate for the upcoming decades.</p>

<div class='footnotes'><div class='footnotedivider'></div><ol><li id='fn-312-1'>Oh, while we at it: did you know that Perl, Moose and
Catalyst is used as a backend for a website with more traffic and CPU
load than Google and YouTube? It&#8217;s called YouPorn, google it. It&#8217;s
huge, it&#8217;s using the most modern Perl you can get. Also, booking.com
and xing.com are huge sites running on Perl. <span class='footnotereverse'><a href='#fnref-312-1'>&#8617;</a></span></li><li id='fn-312-2'>About 99% of programmers still believe
JavaScript is a toy language, much like VBA, something you learn
because you can&#8217;t program a web application otherwise. Only few people
really know what JavaScript is capable of and even less people know
how to program JavaScript correctly and cleanly. Those people have to
fight ignorance every day and prefer to talk about ECMAScript 5, just
like Perl hackers prefer to talk about &#8220;Modern Perl&#8221;. <span class='footnotereverse'><a href='#fnref-312-2'>&#8617;</a></span></li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://rassie.org/archives/312/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<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>
		<item>
		<title>The time has come&#8230;</title>
		<link>http://rassie.org/archives/276</link>
		<comments>http://rassie.org/archives/276#comments</comments>
		<pubDate>Fri, 10 Jul 2009 18:18:18 +0000</pubDate>
		<dc:creator>rassie</dc:creator>
				<category><![CDATA[Main]]></category>
		<category><![CDATA[bleeding edge]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://rassie.org/archives/276</guid>
		<description><![CDATA[&#8230; and although it&#8217;s a bit rough along the edges, today&#8217;s Chromium build for Ubuntu (3.0.194.0~svn20090710r20374-0ubuntu1~ucd1) has Flash support! Gotta love those ads all around the pages :)]]></description>
			<content:encoded><![CDATA[<p>&#8230; and although it&#8217;s a bit rough along the edges, today&#8217;s Chromium build for Ubuntu (3.0.194.0~svn20090710r20374-0ubuntu1~ucd1) has Flash support! Gotta love those ads all around the pages :)</p>
]]></content:encoded>
			<wfw:commentRss>http://rassie.org/archives/276/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If you do a corporate CPAN, please do it properly!</title>
		<link>http://rassie.org/archives/273</link>
		<comments>http://rassie.org/archives/273#comments</comments>
		<pubDate>Mon, 25 May 2009 07:54:18 +0000</pubDate>
		<dc:creator>rassie</dc:creator>
				<category><![CDATA[Main]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[cpan2dist]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[packaging]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://rassie.org/?p=273</guid>
		<description><![CDATA[Coming from the &#8220;bad implementations of good ideas&#8221; department: Corporate CPAN. It&#8217;s a good idea, but a completely wrong solution. If someone is going to implement this, the proper way is not creating a PAUSE and CPAN mirror or anything like it. Corporate requirements are different. What you really need is a revival of http://debian.pkgs.cpan.org/ [...]]]></description>
			<content:encoded><![CDATA[<p>Coming from the &#8220;<a href="http://rassie.org/archives/270">bad implementations of good ideas</a>&#8221; department: <a href="http://szabgab.com/blog/2009/05/1243228620.html">Corporate CPAN</a>.</p>

<p>It&#8217;s a good idea, but a completely <a href="http://rassie.org/archives/250">wrong</a> solution. If someone is going to implement this, the proper way is not creating a PAUSE and CPAN mirror or anything like it. Corporate requirements are <a href="http://use.perl.org/~jozef/journal/39027">different</a>. What you really need is a revival of <a href="http://debian.pkgs.cpan.org/">http://debian.pkgs.cpan.org/</a> and also complete repositories for RHEL5, Debian, Ubuntu LTS, SLES9/10 etc. Those can be mirrored at will by usual and well-tested tools.</p>

<p>Thank you.</p>

<p><em>Update</em>: Removed last sentence, it&#8217;s been a &#8220;thinko&#8221; on my side :(</p>
]]></content:encoded>
			<wfw:commentRss>http://rassie.org/archives/273/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PBP 2nd ed.? Just open it up!</title>
		<link>http://rassie.org/archives/270</link>
		<comments>http://rassie.org/archives/270#comments</comments>
		<pubDate>Fri, 22 May 2009 21:06:02 +0000</pubDate>
		<dc:creator>rassie</dc:creator>
				<category><![CDATA[Main]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[pbp]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://rassie.org/?p=270</guid>
		<description><![CDATA[There are some long-overdue calls out there calling for the second edition of &#8220;Perl Best Practices&#8221;. And more often than not, people having good ideas don&#8217;t realize they are proposing a dreadful solution. I do consider PBP a good collection of recommendations. But sometimes, I loathe the impact it has on the community. It&#8217;s the [...]]]></description>
			<content:encoded><![CDATA[<p>There are some long-overdue <a href="http://www.dagolden.com/index.php/199/time-for-second-edition-perl-best-practices/">calls</a> out there calling for the second edition of &#8220;Perl Best Practices&#8221;. And more often than not, people having good ideas don&#8217;t realize they are proposing a dreadful solution.</p>

<p>I do consider PBP a good collection of recommendations. But sometimes, I loathe the impact it has on the community. It&#8217;s the Perl bible, Part II (just after the Camel book) and many people just go on believing in it. What we get as a result is a free community&#8217;s dependency on a non-free book.</p>

<p>At my place of work, we run <code>Perl::Critic</code> on SVN commits with PBP rule set. Everytime it finds something, it tells me to &#8220;Look at page XX of PBP for details&#8221;. So much for online help&#8230; Yes, I do have a copy of PBP in the office, even on my table. Sadly, it&#8217;s a german translation which has slightly different page numbering.</p>

<p>Why does a code analyzer cite some particular book edition? Imagine a second edition of PBP coming out. What do we get then, a command line parameter for book version? For a translation thereof? How many modules will we have to update? Usually a book gets updated when code changes, not other way around.</p>

<p>An even more heretical question: what happens if I don&#8217;t actually own a copy of PBP? Am I doomed to stay ignorant of best practices just because I&#8217;m just starting to learn and can&#8217;t or don&#8217;t want to shell out money for a book?</p>

<p>Other language communities are different. Both Ruby and Python give you extensive online documentation and also some dead-tree docs if you need them. But you don&#8217;t have to buy a book just to learn some best practices, those are readily available in blogs, wikis and what not. Perl&#8217;s community seems to trust in holy cows (camels or dogs for that matter) and just keeps insisting on buying books. &#8220;Modern&#8221; is something very different, though.</p>

<p>I know I can read PBP on Google Books, with several dozens of invisible pages. But PBP should have been online a long time ago. It should have been a community work from the beginning, since best practices is one of the first things a newbie needs.</p>

<p>There is only one way for PBP for the future: O&#8217;Reilly and Damian should open it up, just like &#8220;Higher Order Perl&#8221; has done. Make it downloadable at first, make it a community-driven project later. O&#8217;Reilly could even release a dead-tree edition every now and then, but the first step would be to free Damian from all the &#8220;please update PBP&#8221; e-mails &#8212; it&#8217;s perfectly probable that he doesn&#8217;t have time to do so and even more probable, no personal interest in bringing the second edition out. In that case, maybe he should raise his voice and work with O&#8217;Reilly on making that vastly important book a community project.</p>
]]></content:encoded>
			<wfw:commentRss>http://rassie.org/archives/270/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The CPAN&#8217;s new clothes</title>
		<link>http://rassie.org/archives/250</link>
		<comments>http://rassie.org/archives/250#comments</comments>
		<pubDate>Wed, 13 May 2009 00:19:40 +0000</pubDate>
		<dc:creator>rassie</dc:creator>
				<category><![CDATA[Main]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://rassie.org/?p=250</guid>
		<description><![CDATA[I must admit, I&#8217;m a bit underwhelmed by Enlightened Perl&#8217;s Iron Man competition. They&#8217;ve essentially replaced Planet Perl because every blogger from the Planet now also gets syndicated to the Iron Man (could you please work together guys and kill one of the planets?) However, the blog posts&#8217; medium quality hasn&#8217;t changed at all &#8212; [...]]]></description>
			<content:encoded><![CDATA[<p>I must admit, I&#8217;m a bit underwhelmed by Enlightened Perl&#8217;s <a href="http://ironman.enlightenedperl.org/">Iron Man</a> competition. They&#8217;ve essentially replaced <a href="http://planet.perl.org/">Planet Perl</a> because every blogger from the Planet now also gets syndicated to the Iron Man (could you please work together guys and kill one of the planets?) However, the blog posts&#8217; medium quality hasn&#8217;t changed at all &#8212; and neither have the subjects. It&#8217;s still the same: some &#8220;aren&#8217;t you using Perl 6 already? 10 reasons why you should!&#8221;, some &#8220;all hail Moose!&#8221;, some &#8220;new Padre released, it&#8217;s just as powerful as Emacs, but only for Perl stuff&#8221;, and also some &#8220;Did you know CPAN rocked?&#8221; That last bit of sensationalism is getting on my nerves.</p>

<p>Yes, I know, CPAN is great. I even agree. CPAN is great because of the sheer amount of data collected. But it&#8217;s a complete disaster otherwise. I might be a bloody newbie in Perl world, but everytime I&#8217;m confronted with CPAN, I&#8217;m lost and confused &#8212; and there is a major flaw in CPAN causing that feeling: every module in CPAN is essentially an open-source project, but nothing at CPAN works under this assumption. It&#8217;s full of closed down silos.</p>

<p>Let&#8217;s start with a simple example: toying with <a href="http://cpan.uwinnipeg.ca/dist/CPANPLUS-Dist-RPM">CPANPLUS::Dist::RPM</a> (or maybe it&#8217;s this <a href="http://search.cpan.org/~rsrchboy/CPANPLUS-Dist-RPM-0.0.8/">link</a>, who knows which is the canonical one) at work I&#8217;ve noticed it hangs sometimes, consuming 100% of CPU essentially doing nothing worthy. Let&#8217;s now assume I&#8217;d like to investigate this problem, but I don&#8217;t know if this is a bug or a mistake on my side.</p>

<p>So I go to the CPAN <a href="http://search.cpan.org/~rsrchboy/CPANPLUS-Dist-RPM-0.0.8/">page</a> of the package. Oh, there is a discussion <a href="http://www.cpanforum.com/dist/CPANPLUS-Dist-RPM">forum</a>, let&#8217;s click on that! Too bad, it&#8217;s broken. Bug reports? Oh yeah, there are whole three of them &#8212; none of which is my problem as far I can see. And I can actually <em>barely</em> see, since the visual component of that bug tracker makes Bugzilla of 1998 look good. But I still not sure that&#8217;s a bug, so I wouldn&#8217;t file one. What&#8217;s next? Maybe there is something new and relevant in development code in the revision control system? Oh wait, there isn&#8217;t any. CVS, SVN, Git, Mercurial, anything? Nope, no such thing on CPAN. Only release tarballs and some weird release differ tool. No revision control for an open source hosting in 2009, am I looking right?! Only way to ask something is to ask the author per e-mail? What about collaboration, patches, interactive community process for single modules?</p>

<p><strong>Dear Github guys, if you happen to read this, please host the CPAN for us! Revision control, bug tracking, code review, documentation parser &#8212; if you could add some discussion forums, you&#8217;d be a perfect CPAN hoster!</strong></p>

<p>So CPAN is so far: EPIC FAIL in discussion forums, somewhat FAIL in bug reports, EPIC FAIL in encouraging open development. Those are basic open source functionality nowadays, you know. And those are not nearly scratching the surface of critisicm.</p>

<p>Every other page on CPAN is different in design and interaction, there is no common and consice web interface, many different docs/search/rating mirrors which ultimatively produce a lot of Google spam. An awesome lot of cruft, a lot of broken modules which pop up prominently as first search result, no clear indication if a module is abandoned or actively developed. Even the most potentially useful features like dependencies&#8217; resolution are crippled &#8212; dependencies work only in one direction, whenever I&#8217;d like to know how people actually use some module, I&#8217;m lost again. This is CPAN of today, confusing and rusty. CPAN is naked and it seems nobody wants to point that out. I do not want to think that nobody actually notices.</p>

<p>The situation with CPAN is symptomatic for the whole Perl community. Whether it&#8217;s Perl.com, Perl.org, Perl Mongers site, Perl Monks, use Perl or CPAN, it&#8217;s always the same: unreadable and misaligned content, incomprehensive navigation and straining colors, self-representation on the web coming straight from 1999&#160;<sup class='footnote'><a href='#fn-250-1' id='fnref-250-1'>1</a></sup>. All the good code in the world and the power of the language won&#8217;t help anyone as long as people are alienated by ugly tools, visually and technically. Why can&#8217;t CPAN have the visual docs design from <a href="http://perldoc.perl.org">http://perldoc.perl.org</a>, which at least features a syntax highlighter? Some CPAN mirror I land on every now and then from Google is even uglier than the one at <a href="http://search.cpan.org">http://search.cpan.org</a>. Do we care at all about how those sites look? Do we care about fellow Perlers, about how hard they have to look for information? Why isn&#8217;t there some central site for Perl information? Why is every Perl project so independant that things like Perl Iron Man happen without cooperation with Planet Perl? <sup class='footnote'><a href='#fn-250-2' id='fnref-250-2'>2</a></sup></p>

<p>Perl community has so many possibilities but most of them stay unused. Most people are probably content with what they have and wouldn&#8217;t want to change anything. It&#8217;s fine, Perl&#8217;s way certainly supports that, but then we can forget about Perl revival. It&#8217;d be a shame, but we&#8217;d have only us to blame, not some superstitions about Perl being a &#8220;write-only language&#8221; or &#8220;ASCII soup&#8221;. The first impression counts and many newbies might not make it to the code at all &#8212; they&#8217;ll struggle with finding tutorials first. They won&#8217;t find out why Perl is great and will leave for other, probably inferior, languages, because they&#8217;ll be reading some ugly outdated quickstart documentation from 1997. They won&#8217;t find the shiny things, but they should be able to &#8212; as their first Google search result.</p>

<div class='footnotes'><div class='footnotedivider'></div><ol><li id='fn-250-1'>Let&#8217;s not forget the sheer number of sites a Perler might need to visit to get all the information <span class='footnotereverse'><a href='#fnref-250-1'>&#8617;</a></span></li><li id='fn-250-2'>Actually there is an easy explanation: at CPAN, if you have a proposal or a patch, you can&#8217;t actually do anything more useful than fork and upload your own package to CPAN. Same goes for Planets &#8212; open-source type cooperation seems mostly unknown to Perl 5 community. This changes with Perl 6, but it needs to change for Perl 5 too. <span class='footnotereverse'><a href='#fnref-250-2'>&#8617;</a></span></li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://rassie.org/archives/250/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>On the state of i18n in Perl</title>
		<link>http://rassie.org/archives/247</link>
		<comments>http://rassie.org/archives/247#comments</comments>
		<pubDate>Sun, 26 Apr 2009 19:39:22 +0000</pubDate>
		<dc:creator>rassie</dc:creator>
				<category><![CDATA[Main]]></category>
		<category><![CDATA[gettext]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[maketext]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://rassie.org/archives/247</guid>
		<description><![CDATA[The following text represents an effort to describe the situation I&#8217;ve encountered when I came to the Perl world last December. I&#8217;ve done some translating for the Debian project and I was a bit shocked about the state of Perl&#8217;s i18n. I have to admit, I&#8217;m still an inexperienced hacker, but I wanted to write [...]]]></description>
			<content:encoded><![CDATA[<p>The following text represents an effort to describe the situation I&#8217;ve encountered when I came to the Perl world last December. I&#8217;ve done some translating for the Debian project and I was a bit shocked about the state of Perl&#8217;s i18n. I have to admit, I&#8217;m still an inexperienced hacker, but I wanted to write this article to raise some awareness for the issues described if I&#8217;m right and learn something new if I&#8217;m wrong. Anyway, I tried to keep this article constructive and it&#8217;s still just my opinion, so please comment appropriately.</p>

<p>Disclaimer: I&#8217;m essentially talking about l10n, but most people know it as i18n, so I&#8217;m keeping &#8220;i18n&#8221; in text.</p>

<h2>The i18n problem</h2>

<p>When it comes to making your application tranlatable in Perl, there are actually two schools of doing this: via <a href="http://search.cpan.org/dist/Locale-Maketext/lib/Locale/Maketext.pod">Maketext</a> and via <a href="http://www.gnu.org/software/gettext/gettext.html">GNU gettext</a>. <code>GNU gettext</code> is the most known software translation tool used in most open-source projects while <code>Maketext</code> is a child of the Perl world. And the bad thing is: <code>Maketext</code> is currently more popular, but if you are using <code>Maketext</code> for making your application translatable, you are doing it wrong!</p>

<p>Let&#8217;s look at how <code>Maketext</code> works, according to its documentation and contrast that with the <code>gettext</code> way.</p>

<p><code>Maketext</code> manual defines the process as following (quoting freely):</p>

<ul>
<li>Decide what system you&#8217;ll use for lexicon keys (i.e. base language)</li>
<li>Create a class for your localization project</li>
<li>Create a class for the language your internal keys are in</li>
<li>Go and write your program</li>
<li>Once the program is otherwise done, and once its localization for the first language works right (via the data and methods in Projname::L10N::en_us), you can get together the data for translation.</li>
<li>Submit all messages/phrases/etc. to translators

<ul>
<li>Translators may request clarification of the situation in which a particular phrase is found</li>
<li>Each translator should make clear what dependencies the number causes in the sentence</li>
<li>Remind the translators to consider the case where N is 0</li>
<li>Remember to ask your translators about numeral formatting in their language</li>
<li>The basic quant method that Locale::Maketext provides should be good for many languages. [&#8230;] For the particularly problematic Slavic languages, what you may need is a method which you provide with the number, the citation form of the noun to quantify, and the case and gender that the sentence&#8217;s syntax projects onto that noun slot.</li>
</ul></li>
<li>Once you&#8217;ve localized your program/site/etc. for all desired languages, be sure to show the result (whether live, or via screenshots) to the translators.</li>
</ul>

<p>There is a lot of sense in this and this has certainly been valid back in 1999, but a lot of work in this process is not specified. For example, the translation process itself is questionable:</p>

<ul>
<li>How do you &#8220;Submit all messages/phrases/etc. to translators&#8221;?</li>
<li>How do you integrate translations back from translators?</li>
<li>How do you resubmit translation strings if they change?</li>
<li>How do you communicate &#8220;situation in which a particular phrase is found&#8221; (i.e. context)?</li>
<li>What happens if one phrase has to be translated differently depending on context? How does one implement that in a module properly?</li>
<li>How does the translator &#8220;make clear what dependencies the number causes&#8221;? At what extents does that happen? Will the developer even understand him at all?</li>
<li>Does the programmer really have to understand all of implications of each language implemented? Should every programmer on the team understand them?</li>
<li>Who actually implements that &#8220;quant&#8221; method? How? What about languages with expections?</li>
</ul>

<p>One basic, but fatal, mistake <code>Maketext</code> does is off-loading a lot of linguistic work onto programmer.</p>

<ul>
<li>One particularly important point is the plural forms support (&#8216;1 apple&#8217;, &#8216;2 apples&#8217;), which is important for many languages outside of USA and Western Europe . <code>Maketext</code> requires you to write a <em>quant</em> function that gets a string and a number as parameters and does some voodoo to produce the right string. Voodoo is undefined. In <code>gettext</code> it is &#8212; a formula for producing plural forms is defined which selects one of provided plural phrases.</li>
<li>No translator in his sane mind will ever write a Perl module for a language (they aren&#8217;t programmers, remember?), the programmer will have to do it and will also have to understand the implications.</li>
<li>The <em>quant</em> notation (<code>"Your search matched [quant,_1,document]!"</code>) foolishly assumes word order is the same in all languages. Implementing a <em>quant</em> method properly would require passing the whole sentence into the function and doing a complete linguistic transformation which is highly non-trivial and better done by human.</li>
<li>Most of those linguistic &#8220;conventions&#8221; like number formatting or plural forms do not change over time and can be compiled at one place. One such place is Unicode&#8217;s <a href="http://cldr.unicode.org">CLDR</a> project, which also includes plural form building and number/date formatting among other country- and language-dependant data.</li>
<li>It can&#8217;t even be assumed that the translators actually know all of these conventions! They might assume they know them, but translator is not necessarily doing translations for a living, he might be a volunteer, like in most open source projects. Imagine what happens when an amateur translator explains the inner workings of his native language to a programmer?</li>
</ul>

<p>Compared to this <code>gettext</code> has a saner, more practical approach &#8212; they provide a standardized translation string format, handle updates of message catalogs cleanly, provide all necessary tools for message extraction, don&#8217;t require any additional modules, work mostly language-agnostic, provide contexts and translators&#8217; comments, even plural forms calculation formulae are explicitely noted in the manual. It also emphasizes asynchronous translation: translation strings can be extracted and imported at any time in the lifecycle of a project. A developer essentially has to do the following:</p>

<ul>
<li>Implement using <code>gettext</code> in his project (depends on the language used)</li>
<li>Mark extractable strings</li>
<li>Run extraction and merging scripts (mostly included by <code>gettext</code>)</li>
<li>Submit translation files to translators</li>
<li>Copy received translations back into the project</li>
</ul>

<p><code>gettext</code> of course is not perfect. It lacks several vastly important features, like proper gender support (e.g. &#8220;He was born&#8221; and &#8220;She was born&#8221; is different in Russian). But it generally follows the &#8220;It mostly works&#8221; principle, making features needed 95% of the time available. Workflow tools make using <code>gettext</code> a snap. Compared to <code>Maketext</code> it is also easier to support for the programmer and easier for the translator to produce translations. The dreaded <em>quant</em> function actually makes using <code>Maketext</code> properly for translations impossible.</p>

<p>Apart from those techical shortcomings, there is a bigger threat.</p>

<h2>Community separation</h2>

<p>Remember <a href="http://search.cpan.org/~ferreira/Locale-Maketext-1.13/lib/Locale/Maketext/TPJ13.pod">TPJ13</a>?
TPJ13 is an excellent summary of i18n problems, which every developer, even non-Perl one, should read. It&#8217;s solution part is hopelessly out-of-date &#8212; don&#8217;t forget, TPJ13 is getting ten years old this year. Back in 1999&#160;<code>gettext</code> hasn&#8217;t had any plural forms support and also lacked many other features so the authors&#8217; point used to be valid at that point. However, gettext had implemented its support for plurals rather fast and at that time <code>Maketext</code> should have been retired immediately. Sadly, this has not happened.</p>

<p>That misunderstanding haunts us until this day. Every novice Perl hacker is introduced to TPJ13 and tends to believe <code>Maketext</code> is the way to go. Failing to see its shortcomings however, yields in well-meant but still failed creations like <a href="http://search.cpan.org/dist/Locale-Maketext-Lexicon/lib/Locale/Maketext/Lexicon.pm">Locale::Maketext::Lexicon</a>
which tries hard to bring the world of <code>gettext</code> to <code>Maketext</code>-infected minds. What we get is crazy stuff like (verbatim from the POD)</p>

<pre><code>#: Hello.pm:11
msgid "You have %quant(%1,piece) of mail."
msgstr "Sie haben %quant(%1,Poststueck,Poststuecken)."
</code></pre>

<p>instead of a proper (German spelling corrected a bit):</p>

<pre><code>#: Hello.pm:11
msgid "You have 1 piece of mail."
msgid_plural "You have %d pieces of mail"
msgstr[0] "Sie haben 1 Poststueck"
msgstr[1] "Sie haben %d Poststuecke"
</code></pre>

<p>The former has virtually no tool support (not even <code>gettext</code>&#8217;s extraction routine <code>xgettext</code>), but extraction is supported by home-grown <code>xgettext.pl</code> (notice the <code>.pl</code> suffix). And there we have some fatal stuff going on:</p>

<ul>
<li><code>Locale::Maketext::Lexicon</code> is considered <strong>the</strong> solution for using <code>Maketext</code> with <code>.po</code> files.</li>
<li>Neither <code>Locale::Maketext::Lexicon</code> nor <code>xgettext.pl</code> have any notion of proper <code>gettext</code> plurals</li>
<li><code>.po</code> files created by <code>xgettext.pl</code> are not fully supported by translation tools like PoEdit, KBabel, Launchpad Rosetta, 99translations.com etc.</li>
<li><a href="http://search.cpan.org/~mramberg/Catalyst-Plugin-I18N-0.09/lib/Catalyst/Plugin/I18N.pm">Catalyst::Plugin::I18N</a>, the only i18n plugin for the extremely popular <a href="http://catalyst.perl.org">Catalyst</a> web framework, is based on  <code>Locale::Maketext::Lexicon</code></li>
<li><code>xgettext.pl</code> has support for <a href="http://www.template-toolkit.org">Template-Toolkit</a> templates, YAML, FormFu and Mason. Original <code>gettext</code>&#8217;s <code>xgettext</code> does not.</li>
</ul>

<p>So there we have it: Perl hackers mostly use tools which are unsuitable and incompatible with the rest of the world without knowing it. The right tools actually can&#8217;t help them become &#8220;sane&#8221;, since <code>xgettext</code> can&#8217;t extract all those formats which <code>xgettext.pl</code> can and I don&#8217;t think that&#8217;ll change sometime soon.</p>

<h2>Alternatives</h2>

<p>Luckily, some hackers have produced a <a href="http://search.cpan.org/dist/libintl-perl/"><code>libintl-perl</code></a> library which basically re-implements <code>GNU gettext</code> in Perl. There is a pure Perl implementation of message catalogs called <code>Locale::gettext_pp</code>, an XS version called <code>Locale::gettext_xs</code> (Warning: this one has some problems with <code>mod_perl2</code>!), a Perl wrapper around that (<code>Locale::Messages</code>) and building upon that an excellent Perl-y implementation of the framework <code>Locale::TextDomain</code>. These tools are worth your time.</p>

<p>Even though we have <code>Locale::TextDomain</code>, what should be done to amend the whole <code>Maketext</code> situation? I&#8217;d propose several possible actions:</p>

<ul>
<li>Read the <a href="http://www.gnu.org/software/gettext/manual/gettext.html">GNU gettext Manual</a> to fully understand what these tools can do for you</li>
<li>Educate your colleagues, tell them about this article and explain the differences</li>
<li>If you can, port your current code to <code>Locale::TextDomain</code></li>
<li>Don&#8217;t use <code>Maketext</code> for any new code</li>
<li>Update important code using <code>Maketext</code> like the Catalyst plugin mentioned above to support <code>gettext</code></li>
<li>Update TPJ13 to reflect the situation</li>
<li>Port extraction routines from <code>xgettext.pl</code> to <code>xgettext</code></li>
</ul>

<p>This and general awareness of the issue should bring Perl&#8217;s i18n back on track. Thank you for reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://rassie.org/archives/247/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wishes coming true</title>
		<link>http://rassie.org/archives/242</link>
		<comments>http://rassie.org/archives/242#comments</comments>
		<pubDate>Tue, 13 Jan 2009 18:35:41 +0000</pubDate>
		<dc:creator>rassie</dc:creator>
				<category><![CDATA[Main]]></category>
		<category><![CDATA[blogs]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://rassie.org/?p=242</guid>
		<description><![CDATA[Lately, two of the projects I wanted implemented badly and was thinking about implementing myself have been started by other people: Google&#8217;s blog converter Emacs Starter Kit Let&#8217;s hope both produce something usable. And now I&#8217;m sort of relieved, since contributing to existing projects is simpler than starting new ones, especially with my limited knowledge [...]]]></description>
			<content:encoded><![CDATA[<p>Lately, two of the projects I wanted implemented badly and was thinking about implementing myself have been started by other people:</p>

<ul>
<li>Google&#8217;s <a href="http://code.google.com/p/google-blog-converters-appengine/">blog converter</a></li>
<li><a href="http://github.com/technomancy/emacs-starter-kit/tree/master">Emacs Starter Kit</a></li>
</ul>

<p>Let&#8217;s hope both produce something usable. And now I&#8217;m sort of relieved, since contributing to existing projects is simpler than starting new ones, especially with my limited knowledge on both subjects. Just like I&#8217;ve been shown by the second one, since I didn&#8217;t know about <a href="http://tromey.com/elpa">ELPA</a> yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://rassie.org/archives/242/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
