<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How many lines should a function have?</title>
	<atom:link href="http://geek.co.il/wp/2009/09/17/how-many-lines-should-a-function-have/feed" rel="self" type="application/rss+xml" />
	<link>http://geek.co.il/wp/2009/09/17/how-many-lines-should-a-function-have</link>
	<description>Thoughts about the universe in general</description>
	<lastBuildDate>Wed, 25 Jan 2012 18:13:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
	<item>
		<title>By: Oded</title>
		<link>http://geek.co.il/wp/2009/09/17/how-many-lines-should-a-function-have/comment-page-1#comment-213263</link>
		<dc:creator>Oded</dc:creator>
		<pubDate>Wed, 04 Nov 2009 10:07:10 +0000</pubDate>
		<guid isPermaLink="false">http://geek.co.il/wp/?p=1177#comment-213263</guid>
		<description>So - you do not believe in side-effects? programming with no side-effects is basically functional programming - a paradigm that I never though merited the hype around it, and like OOP - when taken to the extreme - results in unusable programs.

Regarding preview comments - I never figure this for a good idea, you are basically writing text here. I&#039;ll see what I can do, though due to my BiDi hack most text manipulation plugins for wordpress require some work to adapt to my blog.</description>
		<content:encoded><![CDATA[<p>So &#8211; you do not believe in side-effects? programming with no side-effects is basically functional programming &#8211; a paradigm that I never though merited the hype around it, and like OOP &#8211; when taken to the extreme &#8211; results in unusable programs.</p>
<p>Regarding preview comments &#8211; I never figure this for a good idea, you are basically writing text here. I&#8217;ll see what I can do, though due to my BiDi hack most text manipulation plugins for wordpress require some work to adapt to my blog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shlomi Fish</title>
		<link>http://geek.co.il/wp/2009/09/17/how-many-lines-should-a-function-have/comment-page-1#comment-213210</link>
		<dc:creator>Shlomi Fish</dc:creator>
		<pubDate>Tue, 03 Nov 2009 18:01:06 +0000</pubDate>
		<guid isPermaLink="false">http://geek.co.il/wp/?p=1177#comment-213210</guid>
		<description>Hi Oded!

I feel that the shorter the method, the better. Generally a method should receive parameters (which is generally a bit more complex in Perl 5 due to the @_ stuff), possibly validate them, and then return a value that is a single expression. The reason for this is that that way one can more easily over-ride such methods or inherit from them and have greater code re-use. I recall seeing a very long method in the Catalyst (a web-framework for Perl&#039;s) codebase, and I needed to override a very small expression out of it in order to make sure that it did not treat URLs with a trailing slash (&quot;/&quot;) the same as URLs without them.

Of course, I sometimes write my methods and functions longer out of laziness, and because they acquire cruft, but this is the ideal. One of the codebases that I&#039;m most proud of in having short, single-purpose methods is &lt;a href=&quot;http://web-cpan.berlios.de/modules/Test-Run/&quot; rel=&quot;nofollow&quot;&gt;Test-Run&lt;/a&gt;. I&#039;ve spent a long time perfecting it, partly because I started from an old and monolithic and completely non-OOP codebase (reportedly dating back to Larry Wall&#039;s perl 1.0), which I decided to whip into shape, and while completely breaking backwards-compatibility.

And finally, can you please get comments previews here? I don&#039;t know if this comment would be OK. Stupid WordPress.</description>
		<content:encoded><![CDATA[<p>Hi Oded!</p>
<p>I feel that the shorter the method, the better. Generally a method should receive parameters (which is generally a bit more complex in Perl 5 due to the @_ stuff), possibly validate them, and then return a value that is a single expression. The reason for this is that that way one can more easily over-ride such methods or inherit from them and have greater code re-use. I recall seeing a very long method in the Catalyst (a web-framework for Perl&#8217;s) codebase, and I needed to override a very small expression out of it in order to make sure that it did not treat URLs with a trailing slash (&#8220;/&#8221;) the same as URLs without them.</p>
<p>Of course, I sometimes write my methods and functions longer out of laziness, and because they acquire cruft, but this is the ideal. One of the codebases that I&#8217;m most proud of in having short, single-purpose methods is <a href="http://web-cpan.berlios.de/modules/Test-Run/" rel="nofollow">Test-Run</a>. I&#8217;ve spent a long time perfecting it, partly because I started from an old and monolithic and completely non-OOP codebase (reportedly dating back to Larry Wall&#8217;s perl 1.0), which I decided to whip into shape, and while completely breaking backwards-compatibility.</p>
<p>And finally, can you please get comments previews here? I don&#8217;t know if this comment would be OK. Stupid WordPress.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

