<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>perlfunk</title>
	<atom:link href="http://perlfunk.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://perlfunk.wordpress.com</link>
	<description>Free your mind and your code will follow</description>
	<lastBuildDate>Thu, 17 Sep 2009 03:16:26 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='perlfunk.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/bc42bd152319651e8f67ede994808ee4?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>perlfunk</title>
		<link>http://perlfunk.wordpress.com</link>
	</image>
			<item>
		<title>Unicode in PDFs in Catalyst</title>
		<link>http://perlfunk.wordpress.com/2009/09/17/unicode-in-pdfs-in-catalyst/</link>
		<comments>http://perlfunk.wordpress.com/2009/09/17/unicode-in-pdfs-in-catalyst/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 03:15:20 +0000</pubDate>
		<dc:creator>mrlynch</dc:creator>
				<category><![CDATA[PDF]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Template::Toolkit]]></category>
		<category><![CDATA[Unicode]]></category>

		<guid isPermaLink="false">http://perlfunk.wordpress.com/?p=82</guid>
		<description><![CDATA[If you have a Catalyst app which is generating PDFs with Catalyst::View::PDF::Reuse, and you want to use Unicode characters in the PDFs, you&#8217;ll need two things:

you&#8217;ll have to specify a TrueType font explicitly to get characters out of the Latin-1 range. The documentation for PDF::Reuse has instructions on how to do this.
Catalyst::View::PDF::Reuse uses Template::Toolkit, which [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=82&subd=perlfunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you have a Catalyst app which is generating PDFs with Catalyst::View::PDF::Reuse, and you want to use Unicode characters in the PDFs, you&#8217;ll need two things:</p>
<ul>
<li>you&#8217;ll have to specify a TrueType font explicitly to get characters out of the Latin-1 range. The documentation for PDF::Reuse has instructions on how to do this.</li>
<li>Catalyst::View::PDF::Reuse uses Template::Toolkit, which will turn wide characters into rubbish unless it knows what encoding you meant. You can specify this by passing in an ENCODING parameter when you configure View::PDF::Reuse in your app module:
<pre>
'View::PDF::Reuse' =&gt; {
    INCLUDE_PATH =&gt; __PACKAGE__-&gt;path_to('root', 'site', 'pdf'),
    ENCODING =&gt; 'utf8'
}
</pre>
<p>Template::Toolkit&#8217;s manuals have other ways to set the encoding.
</li>
</ul>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlfunk.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlfunk.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlfunk.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlfunk.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlfunk.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlfunk.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlfunk.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlfunk.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlfunk.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlfunk.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=82&subd=perlfunk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://perlfunk.wordpress.com/2009/09/17/unicode-in-pdfs-in-catalyst/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/627821587ec65f940a403ab050fe968d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrlynch</media:title>
		</media:content>
	</item>
		<item>
		<title>Devel::Ditto</title>
		<link>http://perlfunk.wordpress.com/2009/06/12/develditto/</link>
		<comments>http://perlfunk.wordpress.com/2009/06/12/develditto/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 05:18:05 +0000</pubDate>
		<dc:creator>mrlynch</dc:creator>
				<category><![CDATA[techniques]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://perlfunk.wordpress.com/?p=80</guid>
		<description><![CDATA[OH. MY. GOD if I had known about Devel::Ditto two months ago, I could have finished that project two months ago.
On closer inspection, it seems Devel::Ditto was not yet on CPAN two months ago BUT STILL.
You remember the project &#8211; the nightmare trawl through a pile of overdesigned, buggy web application which no-one still working [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=80&subd=perlfunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>OH. MY. GOD if I had known about <a href="http://search.cpan.org/dist/Devel-Ditto/lib/Devel/Ditto.pm">Devel::Ditto</a> two months ago, I could have finished that project two months ago.</p>
<p>On closer inspection, it seems Devel::Ditto was not yet on CPAN two months ago BUT STILL.</p>
<p>You remember the project &#8211; the nightmare trawl through a pile of overdesigned, buggy web application which no-one still working here understands? The one that stopped me having the spare time to post here. Well, Devel::Ditto tags all of your code&#8217;s print and warn outputs with the file and line number. That would have been incredibly helpful.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlfunk.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlfunk.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlfunk.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlfunk.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlfunk.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlfunk.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlfunk.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlfunk.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlfunk.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlfunk.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=80&subd=perlfunk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://perlfunk.wordpress.com/2009/06/12/develditto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/627821587ec65f940a403ab050fe968d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrlynch</media:title>
		</media:content>
	</item>
		<item>
		<title>Why your objects should make sense to users</title>
		<link>http://perlfunk.wordpress.com/2009/05/22/why-your-objects-should-make-sense-to-users/</link>
		<comments>http://perlfunk.wordpress.com/2009/05/22/why-your-objects-should-make-sense-to-users/#comments</comments>
		<pubDate>Fri, 22 May 2009 03:56:51 +0000</pubDate>
		<dc:creator>mrlynch</dc:creator>
				<category><![CDATA[obfuscation]]></category>
		<category><![CDATA[oo]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://perlfunk.wordpress.com/?p=76</guid>
		<description><![CDATA[Because when someone else has to learn how your system works, when they start out, they will be thinking about what it does from a user&#8217;s perspective, because that&#8217;s all (at that stage) they&#8217;ve got. Not from a programmer&#8217;s, and especially not from yours.
And if they have to learn a bunch of abstract class hierarchies [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=76&subd=perlfunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Because when someone else has to learn how your system works, when they start out, they will be thinking about what it does from a user&#8217;s perspective, because that&#8217;s all (at that stage) they&#8217;ve got. Not from a programmer&#8217;s, and especially not from yours.</p>
<p>And if they have to learn a bunch of abstract class hierarchies before they can begin to get their head around it &#8211; even if those abstractions are well established and are in textbooks and such, and are all nice and neat and by the book, which, let&#8217;s face it, they probably won&#8217;t be &#8211; they will hate you, and curse you and your descendants.</p>
<p>I&#8217;m just finishing a project involving the porting and maintenance of a largish, fragile and buggy system, written six years ago in heavily Java-accented Perl. Though I can&#8217;t swear that I&#8217;ve looked at every class in the app, I&#8217;ve looked at most of them, and I have found exactly one family of classes which models a concept which I could explain to a user of the system.</p>
<p>That concept is &#8216;a report&#8217;.  Typically for this code, the family of classes is not called X::Y::Z::Report, but X::Y::Z::Sort, and tracing <a href="http://perlfunk.wordpress.com/2009/03/09/inheritance/">the inheritance relationships</a> is a nightmare. So it&#8217;s not like modelling business concepts is going to make you write good code, but it avoids whole constellations and galaxies of ways of writing bad and misleading code.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlfunk.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlfunk.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlfunk.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlfunk.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlfunk.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlfunk.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlfunk.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlfunk.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlfunk.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlfunk.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=76&subd=perlfunk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://perlfunk.wordpress.com/2009/05/22/why-your-objects-should-make-sense-to-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/627821587ec65f940a403ab050fe968d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrlynch</media:title>
		</media:content>
	</item>
		<item>
		<title>Haskell is the Perl of Lisp</title>
		<link>http://perlfunk.wordpress.com/2009/03/12/haskell-is-the-perl-of-lisp/</link>
		<comments>http://perlfunk.wordpress.com/2009/03/12/haskell-is-the-perl-of-lisp/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 03:48:52 +0000</pubDate>
		<dc:creator>mrlynch</dc:creator>
				<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://perlfunk.wordpress.com/?p=73</guid>
		<description><![CDATA[By which I mean that Perl starts from C-style syntax and then allows a lot more flexibility and convenience.
Haskell feels like it does a similar dance with Lisp. It&#8217;s possible to write Haskell expressions in a very Lispish way, by avoiding all the syntactical conveniences like $ or backtick-infixing (which still seems very weird to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=73&subd=perlfunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>By which I mean that Perl starts from C-style syntax and then allows a lot more flexibility and convenience.</p>
<p>Haskell feels like it does a similar dance with Lisp. It&#8217;s possible to write Haskell expressions in a very Lispish way, by avoiding all the syntactical conveniences like $ or backtick-infixing (which still seems very weird to me, but I can see the reason for it) which make it such an expressive language.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlfunk.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlfunk.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlfunk.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlfunk.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlfunk.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlfunk.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlfunk.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlfunk.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlfunk.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlfunk.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=73&subd=perlfunk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://perlfunk.wordpress.com/2009/03/12/haskell-is-the-perl-of-lisp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/627821587ec65f940a403ab050fe968d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrlynch</media:title>
		</media:content>
	</item>
		<item>
		<title>Inheritance</title>
		<link>http://perlfunk.wordpress.com/2009/03/09/inheritance/</link>
		<comments>http://perlfunk.wordpress.com/2009/03/09/inheritance/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 23:27:29 +0000</pubDate>
		<dc:creator>mrlynch</dc:creator>
				<category><![CDATA[oo]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://perlfunk.wordpress.com/?p=68</guid>
		<description><![CDATA[The current project &#8211; trying to port a web application I didn&#8217;t write from Apache 1 to Apache 2, and in the process getting my head around its bewilderingly complicated class hierarchy &#8211; has crystallised my already dim view of inheritance into the following principle:
If you are relying on deep inheritance, it&#8217;s a sign that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=68&subd=perlfunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The current project &#8211; trying to port a web application I didn&#8217;t write from Apache 1 to Apache 2, and in the process getting my head around its bewilderingly complicated class hierarchy &#8211; has crystallised my already dim view of inheritance into the following principle:</p>
<p><strong>If you are relying on deep inheritance, it&#8217;s a sign that you are modelling the wrong things.</strong></p>
<p>I reckon objects should represent real world entities &#8211; Students, Customers, Parts etc. But inheritance isn&#8217;t often a useful property of real world objects; it&#8217;s a property of the abstractions we use to think about those objects. The sun ISA sphere, and so ISA orange, but that fact is not really the most important observation we can make about those two things.</p>
<p>One-level-deep inheritance (an orange ISA fruit, or, even more usefully, ISA pricelist-item) is handy, but inheritance of this sort &#8211; where a flat array of specific objects all inherit from a single template &#8211; is more like a way of filling in properties than anything else.</p>
<p>Deep inheritance may be better when the application domain is itself code: compilers and parsers etc.</p>
<p>In the code I&#8217;m grappling with, the classes are modelling application states and state machines and so on: the things the programmer is thinking about, not the things out in the world that the code is dealing with. Inheritance is a natural fit for such things, but that just makes it harder to read the code. While good code might be a possible outcome for some programmers using this approach, I think it&#8217;s the exception rather than the rule.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlfunk.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlfunk.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlfunk.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlfunk.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlfunk.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlfunk.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlfunk.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlfunk.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlfunk.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlfunk.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=68&subd=perlfunk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://perlfunk.wordpress.com/2009/03/09/inheritance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/627821587ec65f940a403ab050fe968d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrlynch</media:title>
		</media:content>
	</item>
		<item>
		<title>Comments which are always lies (i)</title>
		<link>http://perlfunk.wordpress.com/2009/03/04/comments-which-are-always-lies-i/</link>
		<comments>http://perlfunk.wordpress.com/2009/03/04/comments-which-are-always-lies-i/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 05:15:52 +0000</pubDate>
		<dc:creator>mrlynch</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perlfunk.wordpress.com/2009/03/04/comments-which-are-always-lies-i/</guid>
		<description><![CDATA[# This is where all the work is done

The programmer who wrote this was sincere, but it just isn&#8217;t true.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=65&subd=perlfunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><pre><span style="color:#339966;"># This is where all the work is done
</span></pre>
<p>The programmer who wrote this was sincere, but it just isn&#8217;t true.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlfunk.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlfunk.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlfunk.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlfunk.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlfunk.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlfunk.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlfunk.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlfunk.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlfunk.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlfunk.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=65&subd=perlfunk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://perlfunk.wordpress.com/2009/03/04/comments-which-are-always-lies-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/627821587ec65f940a403ab050fe968d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrlynch</media:title>
		</media:content>
	</item>
		<item>
		<title>Recursion, with apologies to David Hume</title>
		<link>http://perlfunk.wordpress.com/2009/02/26/recursion-with-apologies-to-david-hume/</link>
		<comments>http://perlfunk.wordpress.com/2009/02/26/recursion-with-apologies-to-david-hume/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 23:45:50 +0000</pubDate>
		<dc:creator>mrlynch</dc:creator>
				<category><![CDATA[Haskell]]></category>
		<category><![CDATA[functions]]></category>

		<guid isPermaLink="false">http://perlfunk.wordpress.com/?p=60</guid>
		<description><![CDATA[If we take into our hand any volume; of divinity or school metaphysics, for instance; let us ask, Does it illustrate recursive functions by means of either the Fibonacci series or factorials? Yes. Consign it then to the flames: For it can contain nothing but sophistry and illusion.
(I&#8217;ve been teaching myself Haskell.)
    [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=60&subd=perlfunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:left;">If we take into our hand any volume; of divinity or school metaphysics, for instance; let us ask, Does it illustrate recursive functions by means of either the Fibonacci series or factorials? Yes. Consign it then to the flames: For it can contain nothing but sophistry and illusion.</p>
<p style="text-align:left;">(I&#8217;ve been teaching myself Haskell.)</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlfunk.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlfunk.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlfunk.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlfunk.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlfunk.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlfunk.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlfunk.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlfunk.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlfunk.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlfunk.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=60&subd=perlfunk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://perlfunk.wordpress.com/2009/02/26/recursion-with-apologies-to-david-hume/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/627821587ec65f940a403ab050fe968d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrlynch</media:title>
		</media:content>
	</item>
		<item>
		<title>Named parameters</title>
		<link>http://perlfunk.wordpress.com/2009/02/03/named-parameters/</link>
		<comments>http://perlfunk.wordpress.com/2009/02/03/named-parameters/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 04:03:55 +0000</pubDate>
		<dc:creator>mrlynch</dc:creator>
				<category><![CDATA[functions]]></category>
		<category><![CDATA[gotcha]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://perlfunk.wordpress.com/?p=58</guid>
		<description><![CDATA[Once you start using named parameters, you have to use them everywhere.
Sometimes I get lazy and ignore this rule. It&#8217;s only a test script, I tell myself. Don&#8217;t slow things down. In doing this I am forgetting that the part of my brain which used to be responsible for remembering the order in which parameters [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=58&subd=perlfunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Once you start using named parameters, you have to use them everywhere.</p>
<p>Sometimes I get lazy and ignore this rule. It&#8217;s only a test script, I tell myself. Don&#8217;t slow things down. In doing this I am forgetting that the part of my brain which used to be responsible for remembering the order in which parameters are passed in to functions died several years ago from neglect, and that I can&#8217;t rely on it to help me anymore, and that I will get the parameter order wrong and waste even more time.</p>
<p>It&#8217;s buried next to the part of my brain which used to remember the names of &#8220;string&#8221; functions in C.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlfunk.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlfunk.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlfunk.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlfunk.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlfunk.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlfunk.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlfunk.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlfunk.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlfunk.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlfunk.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=58&subd=perlfunk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://perlfunk.wordpress.com/2009/02/03/named-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/627821587ec65f940a403ab050fe968d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrlynch</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;I don&#8217;t need to test that&#8221; is a code smell</title>
		<link>http://perlfunk.wordpress.com/2009/01/29/i-dont-need-to-test-that-is-a-code-smell/</link>
		<comments>http://perlfunk.wordpress.com/2009/01/29/i-dont-need-to-test-that-is-a-code-smell/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 00:16:28 +0000</pubDate>
		<dc:creator>mrlynch</dc:creator>
				<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://perlfunk.wordpress.com/?p=55</guid>
		<description><![CDATA[If I think of testing some aspect of my code&#8217;s behaviour, and I get the impulse &#8220;oh that&#8217;s so simple, writing a test for that behaviour is a complete waste of time&#8221;, and I then resist that impulse and write a test for it anyway, I&#8217;m guaranteed to find a bug.
This happens every single time. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=55&subd=perlfunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If I think of testing some aspect of my code&#8217;s behaviour, and I get the impulse &#8220;oh that&#8217;s so simple, writing a test for that behaviour is a complete waste of time&#8221;, and I then resist that impulse and write a test for it anyway, I&#8217;m guaranteed to find a bug.</p>
<p>This happens every single time. The &#8220;oh that&#8217;s so simple&#8221; impulse which would have stopped me testing the code is the same impulse that stopped me paying attention to it and noticing the bugs.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlfunk.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlfunk.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlfunk.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlfunk.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlfunk.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlfunk.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlfunk.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlfunk.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlfunk.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlfunk.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=55&subd=perlfunk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://perlfunk.wordpress.com/2009/01/29/i-dont-need-to-test-that-is-a-code-smell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/627821587ec65f940a403ab050fe968d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrlynch</media:title>
		</media:content>
	</item>
		<item>
		<title>Mojo so far</title>
		<link>http://perlfunk.wordpress.com/2008/11/17/mojo-so-far/</link>
		<comments>http://perlfunk.wordpress.com/2008/11/17/mojo-so-far/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 22:36:39 +0000</pubDate>
		<dc:creator>mrlynch</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[mojo]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://perlfunk.wordpress.com/?p=53</guid>
		<description><![CDATA[More notes for my future reference than anything else: this is a list of things which have puzzled me because they&#8217;re not in the documentation

form parameter parsing on POSTs was looking for the MIME type &#8216;x-application-urlencoded&#8217;, not  &#8216;x-www-form-urlencoded&#8217;, which is what Firefox is sending. I don&#8217;t know why. I added the other MIME type to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=53&subd=perlfunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>More notes for my future reference than anything else: this is a list of things which have puzzled me because they&#8217;re not in the documentation</p>
<ul>
<li>form parameter parsing on POSTs was looking for the MIME type &#8216;x-application-urlencoded&#8217;, not  &#8216;x-www-form-urlencoded&#8217;, which is what Firefox is sending. I don&#8217;t know why. I added the other MIME type to line 78 of Mojo/Message.pm; must get around to emailing the author about it</li>
<li>To get form parameters in a controller, you say $c-&gt;request-&gt;params-&gt;param($name) (for GET) or $c-&gt;request-&gt;body_parameters-&gt;param($name) for POST.</li>
<li>Passing variables to the Mojo::Template seems to be done by setting $c-&gt;stash() to a hashref (or whatever else you want) and then pulling it out in the template</li>
</ul>
<p>That said, I am enjoying playing with this stuff. It&#8217;s not often that I actually enjoy reading other people&#8217;s source code in order to understand it.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlfunk.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlfunk.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlfunk.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlfunk.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlfunk.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlfunk.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlfunk.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlfunk.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlfunk.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlfunk.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlfunk.wordpress.com&blog=4137596&post=53&subd=perlfunk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://perlfunk.wordpress.com/2008/11/17/mojo-so-far/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/627821587ec65f940a403ab050fe968d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrlynch</media:title>
		</media:content>
	</item>
	</channel>
</rss>