<?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>Talkwards &#187; jcr</title>
	<atom:link href="http://www.talkwards.com/tag/jcr/feed" rel="self" type="application/rss+xml" />
	<link>http://www.talkwards.com</link>
	<description>Advancing Talkwards...</description>
	<lastBuildDate>Sat, 03 Sep 2011 16:33:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Programming booleans</title>
		<link>http://www.talkwards.com/2007/07/programming-booleans</link>
		<comments>http://www.talkwards.com/2007/07/programming-booleans#comments</comments>
		<pubDate>Mon, 09 Jul 2007 02:09:48 +0000</pubDate>
		<dc:creator>Hoakz</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jcr]]></category>
		<category><![CDATA[jsr170]]></category>
		<category><![CDATA[programming practices]]></category>

		<guid isPermaLink="false">http://www.hoakz.com/blog/?p=93</guid>
		<description><![CDATA[When looking at other programmer&#8217;s code I&#8217;m sometimes surprised with things like this: exportDocumentView(java.lang.String absPath, java.io.OutputStream out, boolean skipBinary, boolean noRecurse) And in such prominent frameworks as Java Content Repository as well. What&#8217;s my problem then? Double negations. In order to do exportDocumentView and get binary data and recursive export you&#8217;ll need to do: exportDocumentView(&#8220;/path/to/my/Node/&#8221;, [...]]]></description>
			<content:encoded><![CDATA[<p>When looking at other programmer&#8217;s code I&#8217;m sometimes surprised with things like this:</p>
<blockquote><p>exportDocumentView(java.lang.String absPath, java.io.OutputStream out,<br />
boolean skipBinary, boolean noRecurse)</p></blockquote>
<p>And in such prominent frameworks as <a href="http://en.wikipedia.org/wiki/Content_repository_API_for_Java">Java Content Repository</a> as well.</p>
<p>What&#8217;s my problem then? Double negations. In order to do exportDocumentView and get binary data and recursive export you&#8217;ll need to do:</p>
<blockquote><p>exportDocumentView(&#8220;/path/to/my/Node/&#8221;, System.out, false, false)</p></blockquote>
<p>Sure I can handle it&#8230; but&#8230; false to opt something in? I find it rather fishy. Call me an idiot but my brain just don&#8217;t deal with that kind of stuff easily&#8230;</p>
<p>What I would have wanted instead was:</p>
<blockquote><p>exportDocumentView(java.lang.String absPath, java.io.OutputStream out,<br />
boolean includeBinary, boolean recursive)</p></blockquote>
<p>Which would have been called like:</p>
<blockquote><p>exportDocumentView(&#8220;/path/to/my/Node/&#8221;, System.out, true, true)</p></blockquote>
<p>For when we want binary data and recursive export, and like this for the case when we don&#8217;t want either or both:</p>
<blockquote><p>exportDocumentView(&#8220;/path/to/my/Node/&#8221;, System.out, false, true)<br />
exportDocumentView(&#8220;/path/to/my/Node/&#8221;, System.out, true, false)<br />
exportDocumentView(&#8220;/path/to/my/Node/&#8221;, System.out, false, false)</p></blockquote>
<p>I&#8217;m just saying.  In my world false means &#8220;no&#8221; and &#8220;no&#8221; means don&#8217;t give me something or don&#8217;t do something:</p>
<blockquote><p>&#8220;Don&#8217;t return binary data.&#8221;<br />
&#8220;Don&#8217;t recurse the tree of nodes.&#8221;</p></blockquote>
<p>To be compared with:</p>
<blockquote><p>&#8220;Don&#8217;t skip binary data.&#8221;<br />
&#8220;Don&#8217;t do no recursing.&#8221;</p></blockquote>
<p>(But you&#8217;re free to curse? <img src='http://www.talkwards.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> )</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.talkwards.com%2F2007%2F07%2Fprogramming-booleans&amp;title=Programming%20booleans" id="wpa2a_2"><img src="http://www.talkwards.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.talkwards.com/2007/07/programming-booleans/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

