<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Code in the hole - Comments</title>
    <link>http://codeinthehole.com/</link>
    <description>Code in the hole - David Winterbottom</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.3.1 - http://www.s9y.org/</generator>
    
    

<item>
    <title>Carl Helmertz: Phing trick for avoiding deploying debug code</title>
    <link>http://codeinthehole.com/archives/34-Phing-trick-for-avoiding-deploying-debug-code.html#c4426</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/34-Phing-trick-for-avoiding-deploying-debug-code.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=34</wfw:comment>

    

    <author>nospam@example.com (Carl Helmertz)</author>
    <content:encoded>
    If this isn&#039;t a CodeSniffer smell, it should be! 
    </content:encoded>

    <pubDate>Wed, 25 Aug 2010 21:57:33 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/34-guid.html#c4426</guid>
    
</item>
<item>
    <title>Vinh Nguyen: Return false with prudence</title>
    <link>http://codeinthehole.com/archives/33-Return-false-with-prudence.html#c4424</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/33-Return-false-with-prudence.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=33</wfw:comment>

    

    <author>nospam@example.com (Vinh Nguyen)</author>
    <content:encoded>
    Great post about return value! In fact, just return FALSE for something went wrong is poor! We can&#039;t know what happen! We just know it&#039;s not success! That&#039;s all! Exception is the best! 
    </content:encoded>

    <pubDate>Mon, 19 Jul 2010 12:37:54 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/33-guid.html#c4424</guid>
    
</item>
<item>
    <title>Serg Gr: Monitoring MySQL with Ganglia and gmetric</title>
    <link>http://codeinthehole.com/archives/8-Monitoring-MySQL-with-Ganglia-and-gmetric.html#c4420</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/8-Monitoring-MySQL-with-Ganglia-and-gmetric.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=8</wfw:comment>

    

    <author>nospam@example.com (Serg Gr)</author>
    <content:encoded>
    it&#039;s simply to use -

mysqladmin -i1 

-i1 - interval in 1 sec 
    </content:encoded>

    <pubDate>Fri, 07 May 2010 19:48:36 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/8-guid.html#c4420</guid>
    
</item>
<item>
    <title>Vlatko Šurlan: Monitoring MySQL with Ganglia and gmetric</title>
    <link>http://codeinthehole.com/archives/8-Monitoring-MySQL-with-Ganglia-and-gmetric.html#c4419</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/8-Monitoring-MySQL-with-Ganglia-and-gmetric.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=8</wfw:comment>

    

    <author>nospam@example.com (Vlatko Šurlan)</author>
    <content:encoded>
    For really trivial monitoring you can also use:

watch -n 1 mysqladmin -uroot -prootpass  processlist

Taken from: http://www.docplanet.org/mysql/mysql-sleeping-processees-how-to-control-them/ 
    </content:encoded>

    <pubDate>Thu, 06 May 2010 19:33:30 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/8-guid.html#c4419</guid>
    
</item>
<item>
    <title>Mario Aquino: Inspecting Javascript objects</title>
    <link>http://codeinthehole.com/archives/12-Inspecting-Javascript-objects.html#c4418</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/12-Inspecting-Javascript-objects.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=12</wfw:comment>

    

    <author>nospam@example.com (Mario Aquino)</author>
    <content:encoded>
    This was very helpful.  Thank you! 
    </content:encoded>

    <pubDate>Thu, 22 Apr 2010 06:05:04 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/12-guid.html#c4418</guid>
    
</item>
<item>
    <title>David: Phing task to update Twitter status</title>
    <link>http://codeinthehole.com/archives/14-Phing-task-to-update-Twitter-status.html#c4393</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/14-Phing-task-to-update-Twitter-status.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=14</wfw:comment>

    

    <author>nospam@example.com (David)</author>
    <content:encoded>
    Also of note is that the %I in the timestamp example is something, but it &lt;strong&gt;isn&#039;t&lt;/strong&gt; minutes as I assumed it would be. Minutes would be %M.

Big props for this task BTW ;-) 
    </content:encoded>

    <pubDate>Wed, 24 Mar 2010 23:10:16 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/14-guid.html#c4393</guid>
    
</item>
<item>
    <title>David: Phing task to update Twitter status</title>
    <link>http://codeinthehole.com/archives/14-Phing-task-to-update-Twitter-status.html#c4391</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/14-Phing-task-to-update-Twitter-status.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=14</wfw:comment>

    

    <author>nospam@example.com (David)</author>
    <content:encoded>
    For Ubuntu server, create the &quot;my&quot; folder under the $_PHING_DIR/tasks folder. Don&#039;t put the &quot;my&quot; folder under $_PHING_DIR/tasks/ext. 
    </content:encoded>

    <pubDate>Wed, 24 Mar 2010 17:07:36 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/14-guid.html#c4391</guid>
    
</item>
<item>
    <title>Elijen: Creating (very) large XML files with PHP</title>
    <link>http://codeinthehole.com/archives/3-Creating-very-large-XML-files-with-PHP.html#c4023</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/3-Creating-very-large-XML-files-with-PHP.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=3</wfw:comment>

    

    <author>nospam@example.com (Elijen)</author>
    <content:encoded>
    Or you can lock the file on the start of the script and unlock it again after all output is done. 
    </content:encoded>

    <pubDate>Thu, 04 Mar 2010 09:09:40 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/3-guid.html#c4023</guid>
    
</item>
<item>
    <title>Rahul: Javascript cookie objects using Prototype and JSON</title>
    <link>http://codeinthehole.com/archives/5-Javascript-cookie-objects-using-Prototype-and-JSON.html#c3773</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/5-Javascript-cookie-objects-using-Prototype-and-JSON.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=5</wfw:comment>

    

    <author>nospam@example.com (Rahul)</author>
    <content:encoded>
    Hi,
If I want to give a name to my cookie, how I will do this? 
    </content:encoded>

    <pubDate>Thu, 11 Feb 2010 13:36:23 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/5-guid.html#c3773</guid>
    
</item>
<item>
    <title>Jim Clark: Return false with prudence</title>
    <link>http://codeinthehole.com/archives/33-Return-false-with-prudence.html#c3621</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/33-Return-false-with-prudence.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=33</wfw:comment>

    

    <author>nospam@example.com (Jim Clark)</author>
    <content:encoded>
    Great post. 
In my opinion the same arguments apply for returning &quot;null&quot;. In these cases the API may return a different type; forcing a user to implement explicit checks irrespective of the usage scenario.

That&#039;s why I agree that null object pattern and empty iterables are preferable.

One issue I come up against often, when using the empty iterable method, is how to handle an empty list where this needs to be handled specifically.

[geshi lang=java]
Lisk Books = findByAuthor(author);
if (Books.isEmpty()){
	display(&quot;Book not found&quot;);
}

for(Book book: Books){
	display(book);
}
[/lang]

But what I really want is something like:

[geshi lang=java]
for(Book book: findByAuthor(author)){
	display(book);
} else {
	display(&quot;Book not found&quot;);
}
[/lang]

Do you know of any language constructs that handle this case nicely? 
    </content:encoded>

    <pubDate>Fri, 29 Jan 2010 09:24:44 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/33-guid.html#c3621</guid>
    
</item>
<item>
    <title>andy york: The most important command-line tip - incremental history searching with .inputrc</title>
    <link>http://codeinthehole.com/archives/17-The-most-important-command-line-tip-incremental-history-searching-with-.inputrc.html#c2992</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/17-The-most-important-command-line-tip-incremental-history-searching-with-.inputrc.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=17</wfw:comment>

    

    <author>nospam@example.com (andy york)</author>
    <content:encoded>
    ...makes me feel like I&#039;m cheating. Way cool! Have been a commandlinefu fan for a while now. Got you bookmarked as an ubergeek. UDAMAN! 
    </content:encoded>

    <pubDate>Wed, 16 Dec 2009 23:25:25 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/17-guid.html#c2992</guid>
    
</item>
<item>
    <title>Chris: Javascript refactoring for customising shared libraries</title>
    <link>http://codeinthehole.com/archives/30-Javascript-refactoring-for-customising-shared-libraries.html#c2558</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/30-Javascript-refactoring-for-customising-shared-libraries.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=30</wfw:comment>

    

    <author>nospam@example.com (Chris)</author>
    <content:encoded>
    Some great advices. I had several problems with duplicate code in the past. 
    </content:encoded>

    <pubDate>Sun, 29 Nov 2009 13:18:56 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/30-guid.html#c2558</guid>
    
</item>
<item>
    <title>David Winterbottom: High Performance Web Sites by Steve Souders</title>
    <link>http://codeinthehole.com/archives/9-High-Performance-Web-Sites-by-Steve-Souders.html#c2292</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/9-High-Performance-Web-Sites-by-Steve-Souders.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=9</wfw:comment>

    

    <author>nospam@example.com (David Winterbottom)</author>
    <content:encoded>
    Cheers for that - typo now corrected. 
    </content:encoded>

    <pubDate>Wed, 18 Nov 2009 14:24:47 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/9-guid.html#c2292</guid>
    
</item>
<item>
    <title>Sven: High Performance Web Sites by Steve Souders</title>
    <link>http://codeinthehole.com/archives/9-High-Performance-Web-Sites-by-Steve-Souders.html#c2290</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/9-High-Performance-Web-Sites-by-Steve-Souders.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=9</wfw:comment>

    

    <author>nospam@example.com (Sven)</author>
    <content:encoded>
    image/css does not work. You must use text/css 
    </content:encoded>

    <pubDate>Wed, 18 Nov 2009 13:23:35 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/9-guid.html#c2290</guid>
    
</item>
<item>
    <title>seant: Inspecting Javascript objects</title>
    <link>http://codeinthehole.com/archives/12-Inspecting-Javascript-objects.html#c2196</link>
            <category></category>
    
    <comments>http://codeinthehole.com/archives/12-Inspecting-Javascript-objects.html#comments</comments>
    <wfw:comment>http://codeinthehole.com/wfwcomment.php?cid=12</wfw:comment>

    

    <author>nospam@example.com (seant)</author>
    <content:encoded>
    Thanks for this. 
    </content:encoded>

    <pubDate>Fri, 13 Nov 2009 23:24:22 +0000</pubDate>
    <guid isPermaLink="false">http://codeinthehole.com/archives/12-guid.html#c2196</guid>
    
</item>

</channel>
</rss>