<?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>Dark Views &#187; Software Development</title>
	<atom:link href="http://blog.pdark.de/tag/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.pdark.de</link>
	<description>Opinions and views about computers, writing SciFi and everything else.</description>
	<lastBuildDate>Wed, 08 Feb 2012 06:43:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.pdark.de' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/7741f06d762e6a53700b2915f21e3d77?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Dark Views &#187; Software Development</title>
		<link>http://blog.pdark.de</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.pdark.de/osd.xml" title="Dark Views" />
	<atom:link rel='hub' href='http://blog.pdark.de/?pushpress=hub'/>
		<item>
		<title>New Years Resolution: Stop being so agreeable!</title>
		<link>http://blog.pdark.de/2011/12/30/new-years-resolution-stop-being-so-agreeable/</link>
		<comments>http://blog.pdark.de/2011/12/30/new-years-resolution-stop-being-so-agreeable/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 09:48:22 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=2439</guid>
		<description><![CDATA[How quick are you to say &#8220;sure, we can do that&#8221;? Here are a couple of reasons to reconsider your attitude: Stop being so agreeable! by Erick Erickson. Tagged: Agile, Software Development<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2439&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How quick are you to say &#8220;sure, we can do that&#8221;?</p>
<p>Here are a couple of reasons to reconsider your attitude: <a href="http://www.lucidimagination.com/blog/2011/11/03/stop-being-so-agreeable/" target="_blank">Stop being so agreeable!</a> by Erick Erickson.</p>
<br /> Tagged: <a href='http://blog.pdark.de/tag/agile/'>Agile</a>, <a href='http://blog.pdark.de/tag/software-development/'>Software Development</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/2439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/2439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/2439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/2439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/2439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/2439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/2439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/2439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/2439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/2439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/2439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/2439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/2439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/2439/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2439&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2011/12/30/new-years-resolution-stop-being-so-agreeable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Do You Know Your Limits?</title>
		<link>http://blog.pdark.de/2011/10/17/do-you-know-your-limits/</link>
		<comments>http://blog.pdark.de/2011/10/17/do-you-know-your-limits/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 21:21:43 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=2371</guid>
		<description><![CDATA[This interesting talk by Dan Ariely - Are we in control of our own decisions? &#8211; got my thinking. Dan says: We understand our limitations. And we build around it. But for some reason when it comes to the mental world, when we design things like healthcare and retirement and stockmarkets, we somehow forget the idea [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2371&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This interesting talk by <a class="zem_slink" title="Dan Ariely" href="http://en.wikipedia.org/wiki/Dan_Ariely" rel="wikipedia">Dan Ariely</a> - <a href="http://www.ted.com/talks/dan_ariely_asks_are_we_in_control_of_our_own_decisions.html" target="_blank">Are we in control of our own decisions?</a> &#8211; got my thinking. Dan says:</p>
<blockquote><p>We understand our limitations. And we build around it. But for some reason <em>when it comes to the mental world</em>, when we design things like healthcare and retirement and stockmarkets, <em>we somehow forget the idea that we are limited</em>. I think that if we understood our cognitive limitations in the same way that we understand our physical limitations, even though they don&#8217;t stare us in the face in the same way, we could design a better world.</p></blockquote>
<p>(my italics)</p>
<p>I think that is a very important point. Software development is a purely mental process. We take ideas, translate them into code. We&#8217;re authors, our audience is a CPU. We write in RAM chips instead of on paper. But basically, we&#8217;re translators.</p>
<p>Most software developers know their tools but not their own mental limits. Ask yourself: How much brain power does it take to type on a keyboard? Got your number?</p>
<p>It&#8217;s about 30%. When you type yourself, you only have 70% of your brain left to think what you&#8217;re typing.</p>
<p>Software development is a craft but it&#8217;s not like smithery. We had anvils and fire pits at my school. When you work with yellow-hot glowing steel, a five-pound hammer and an anvil, you learn something with your first strike: This is dangerous, this is hard work, this isn&#8217;t as simple as it looks, and how fast you&#8217;re going to tire.</p>
<p>How do you do that? Because your brain is wired by millions of years of evolution to know such things. Your muscles are designed to give you feedback: Can I outrun my enemy or do I have to make a stand? Forging steel is built into us. The result will vary with clumsiness but every person in my class was able to hit the steel with a hammer. It takes a day to teach someone to write the most simple program in <a class="zem_slink" title="Java (programming language)" href="http://en.wikipedia.org/wiki/Java_%28programming_language%29" rel="wikipedia">Java</a> but it takes one sentence to teach them how to flatten iron: &#8220;Take one of those hammers and hit it here.&#8221;</p>
<p>If driving steel is so simple, why are we so bad at software development?</p>
<p>Well, it&#8217;s one of those tasks where one brain tries to achieve two conflicting goals: Write software and at the same time watch itself doing it right. It&#8217;s a dilemma. You have 70% tops unless you have trouble at home, worry for your job, are hungry or mad at the guy next door yelling in his telephone. How much of the 70% are you going to give to &#8220;write software&#8221; and how much to &#8220;do it right&#8221;?</p>
<p>That said, being a software developer, you&#8217;re male (98% chance). Males <strong>suck</strong> at doing two things at a time and you&#8217;re already doing at <em>least</em> two. How much good is adding control to the pile going to do?</p>
<p>Probably not much. So what can you do?</p>
<p>First: Don&#8217;t forget that you&#8217;re limited. Clear your brain. Heed your limits.</p>
<p>Second: Turn your limits into a foundation. Instead of struggling with them, accept them. Use techniques like <a href="http://en.wikipedia.org/wiki/Test-driven_development" target="_blank">Test Driven Development</a> to do one thing at a time: Tests answer the &#8220;do it right?&#8221; part. When you have the test, you can forget about this and go the &#8220;write software&#8221; part.</p>
<p>Use you limits. They are tools just like everything else.</p>
<br /> Tagged: <a href='http://blog.pdark.de/tag/software-development/'>Software Development</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/2371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/2371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/2371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/2371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/2371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/2371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/2371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/2371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/2371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/2371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/2371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/2371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/2371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/2371/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2371&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2011/10/17/do-you-know-your-limits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Why Writing Software is Not Like Engineering</title>
		<link>http://blog.pdark.de/2011/09/12/why-writing-software-is-not-like-engineering/</link>
		<comments>http://blog.pdark.de/2011/09/12/why-writing-software-is-not-like-engineering/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 15:02:41 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=2324</guid>
		<description><![CDATA[Excellent article by Terence Parr: Why writing software is not like engineering Main points: &#8220;Congress does not go to NASA halfway through a moonshot and ask them to go to Mars instead.&#8221; When building a house, it&#8217;s pretty hard to make the toilet flush when you ring the doorbell. In languages like C++, it&#8217;s very hard [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2324&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Excellent article by <a class="zem_slink" title="Terence Parr" href="http://en.wikipedia.org/wiki/Terence_Parr" rel="wikipedia">Terence Parr</a>: <a href="http://www.cs.usfca.edu/~parrt/doc/software-not-engineering.html" target="_blank">Why writing software is not like engineering</a></p>
<p>Main points:</p>
<ul>
<li>&#8220;Congress does not go to NASA halfway through a moonshot and ask them to go to Mars instead.&#8221;</li>
<li>When building a house, it&#8217;s pretty hard to make the toilet flush when you ring the doorbell. In languages like C++, it&#8217;s very hard to make 100% sure this can&#8217;t happen.</li>
<li>Is it science? No, science is about conducting experiments and accumulating knowledge.</li>
</ul>
<p>I don&#8217;t agree with software == art. Art is meant to make emotions available to a larger audience. Maybe writing error messages at M$ is an art form but general coding isn&#8217;t.</p>
<p>Conclusion: Software development is a craft just like carpentry or masonry.</p>
<p>Related articles:</p>
<ul>
<li><a href="http://cemerick.com/2010/09/07/the-placebo-effect-is-what-makes-the-software-world-go-round/" target="_blank">The placebo effect is what makes the software world go ’round</a>
<p>&nbsp;</li>
</ul>
<br /> Tagged: <a href='http://blog.pdark.de/tag/software-development/'>Software Development</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/2324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/2324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/2324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/2324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/2324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/2324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/2324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/2324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/2324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/2324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/2324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/2324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/2324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/2324/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2324&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2011/09/12/why-writing-software-is-not-like-engineering/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Final Java Questions</title>
		<link>http://blog.pdark.de/2011/09/03/final-java-questions/</link>
		<comments>http://blog.pdark.de/2011/09/03/final-java-questions/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 18:02:08 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Team building]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=2294</guid>
		<description><![CDATA[Recently, I read a blog post which talked how &#8220;stupid&#8221; today&#8217;s developers are. As an example, &#8220;the interviewed candidates claims that they are very good at core java and saying that we can&#8217;t add/remove elements to an ArrayList which is declared as final.&#8221; (Are Frameworks Making Developers Dumb?) Funny, right? But it got me thinking. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2294&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently, I read a blog post which talked how &#8220;stupid&#8221; today&#8217;s developers are. As an example, &#8220;the interviewed candidates claims that they are very good at core java and saying that we can&#8217;t add/remove elements to an ArrayList which is declared as final.&#8221; (<a href="http://java.dzone.com/news/are-frameworks-making?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:+javalobby/frontpage+(Javalobby+/+Java+Zone)" target="_blank">Are Frameworks Making Developers Dumb?</a>)</p>
<p>Funny, right? But it got me thinking.</p>
<p>How important is it really that someone knows this? With over <a href="http://stackoverflow.com/users/34088/aaron-digulla" target="_blank">60K points on stackoverflow</a>, I&#8217;m one of the most knowledgeable software developers in the world but there was a moment, when my brain stumbled over the question. I rarely use final in my code. So how much value does this information have? How often do I need this every day? Once per week? Month? Year? How much damage can the wrong answer cause?</p>
<p>While I agree that sound knowledge helps a lot, I see team mates struggle much less. They don&#8217;t know as much as I do but there is a demotivating effect here: If you know too much, every simple question triggers a flood of thoughts: What can go wrong? Didn&#8217;t we encounter this already? What&#8217;s the best solution?</p>
<p>Sometimes, there are two &#8220;best&#8221; solutions and missing any further input, I can get stuck in a deadlock. Which way to go?</p>
<p>Or the solution to a problem triggers a new problem which in turn triggers a third. Suddenly, I&#8217;m caught in a maelstrom of dread which overwhelms me: Every possible way out just causes more trouble.</p>
<p>So for me, knowledge isn&#8217;t everything. Some people are &#8220;just&#8221; decent developers but that should not stop you to hire them. Here are some other, valuable factors:</p>
<ul>
<li>How easily do they give up?</li>
<li>How well do they play as a team? That doesn&#8217;t mean everyone has to be a &#8220;team player&#8221; (whatever that might be). But strengths and weaknesses of each individual should compensate each other. One guys likes to talk a lot, let him handle customers. The other guy likes to work alone, give him the hard tasks that need a lot of time and concentration.</li>
</ul>
<div>Most of all, make sure that every member of the team understands that a weak spot doesn&#8217;t make someone less valuable. It just makes them less valuable for certain tasks. If you can distribute the tasks just right, the team will be much stronger than one made up from the best developers in the world.</div>
<br /> Tagged: <a href='http://blog.pdark.de/tag/philosophy/'>Philosophy</a>, <a href='http://blog.pdark.de/tag/software-development/'>Software Development</a>, <a href='http://blog.pdark.de/tag/team-building/'>Team building</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/2294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/2294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/2294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/2294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/2294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/2294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/2294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/2294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/2294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/2294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/2294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/2294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/2294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/2294/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2294&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2011/09/03/final-java-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Java Tools For Healthy Code</title>
		<link>http://blog.pdark.de/2011/08/12/java-tools-for-healthy-code/</link>
		<comments>http://blog.pdark.de/2011/08/12/java-tools-for-healthy-code/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 15:15:41 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Code Health]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=2254</guid>
		<description><![CDATA[While any good developer makes sure that his code is healthy all the time *cough*, tools can be a lot of help. Venkatt Guhesan has compiled a list of 11 tools that you should know about. Tagged: Code Health, Java, Software Development, Tools<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2254&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While any good developer makes sure that his code is healthy all the time <em>*cough*</em>, tools can be a lot of help.</p>
<p><a href="https://mythinkpond.wordpress.com/2011/07/14/java-tools-for-source-code-optimization-and-analysis/" target="_blank">Venkatt Guhesan has compiled a list of 11 tools</a> that you should know about.</p>
<br /> Tagged: <a href='http://blog.pdark.de/tag/code-health/'>Code Health</a>, <a href='http://blog.pdark.de/tag/java/'>Java</a>, <a href='http://blog.pdark.de/tag/software-development/'>Software Development</a>, <a href='http://blog.pdark.de/tag/tools/'>Tools</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/2254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/2254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/2254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/2254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/2254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/2254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/2254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/2254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/2254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/2254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/2254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/2254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/2254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/2254/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2254&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2011/08/12/java-tools-for-healthy-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Zero Bug Tolerance Intolerance</title>
		<link>http://blog.pdark.de/2011/07/12/zero-bug-tolerance-intolerance/</link>
		<comments>http://blog.pdark.de/2011/07/12/zero-bug-tolerance-intolerance/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 14:05:04 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=2198</guid>
		<description><![CDATA[Jim Bird has written a great post about reasons to fix bugs and reasons to leave bugs alone: Zero Bug Tolerance Intolerance Tagged: Agile, Bugs, Software, Software Development<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2198&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Jim Bird has written a great post about reasons to fix bugs and reasons to leave bugs alone: <a href="http://swreflections.blogspot.com/2011/02/zero-bug-tolerance-intolerance.html" target="_blank">Zero Bug Tolerance Intolerance</a></p>
<div id="articleText"></div>
<br /> Tagged: <a href='http://blog.pdark.de/tag/agile/'>Agile</a>, <a href='http://blog.pdark.de/tag/bugs/'>Bugs</a>, <a href='http://blog.pdark.de/tag/software/'>Software</a>, <a href='http://blog.pdark.de/tag/software-development/'>Software Development</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/2198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/2198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/2198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/2198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/2198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/2198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/2198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/2198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/2198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/2198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/2198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/2198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/2198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/2198/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=2198&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2011/07/12/zero-bug-tolerance-intolerance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Project Ceylon, Successor for Java?</title>
		<link>http://blog.pdark.de/2011/04/14/project-ceylon-successor-for-java/</link>
		<comments>http://blog.pdark.de/2011/04/14/project-ceylon-successor-for-java/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 13:51:24 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Ceylon]]></category>
		<category><![CDATA[Compiler]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=1875</guid>
		<description><![CDATA[A lot of languages compete for the king&#8217;s seat taken by Java. Most of them solve a lot of problem with Java but none of them really takes the win. As I say: &#8220;Why is there more than one database? Because they all suck.&#8221; Now Ceylon enters the stage (slides from the presentation). The main [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=1875&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A lot of languages compete for the king&#8217;s seat taken by <a class="zem_slink" title="Java (programming language)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Java_%28programming_language%29">Java</a>. Most of them solve a lot of problem with Java but none of them really takes the win. As I say: &#8220;Why is there more than one database? Because they all suck.&#8221;</p>
<p>Now <a href="http://relation.to/Bloggers/Ceylon">Ceylon</a> enters the stage (<a href="https://docs.google.com/viewer?a=v&amp;pid=explorer&amp;chrome=true&amp;srcid=0B7IgMTLsf_SzZmU0NDhiNzMtOWEzZC00MDA1LWJjNDQtMmMzMmFlY2MwMWFj&amp;hl=en&amp;authkey=CKft8aYM">slides from the presentation</a>). The main goal is to clean up the <a class="zem_slink" title="Software development kit" rel="wikipedia" href="http://en.wikipedia.org/wiki/Software_development_kit">SDK</a> while keeping an eye on what was good and what was bad with Java.</p>
<p>I&#8217;ve had my share with programming languages. On a scale between 1 and 10 (best), <a class="zem_slink" title="Python (programming language)" rel="homepage" href="http://www.python.org/">Python</a> gets 9 from me. Java gets 6. Scala gets 5.</p>
<p>So how does Ceylon fare? At first glance, I&#8217;d give it a 7.</p>
<p>Pros:</p>
<ul>
<li>Compact syntax. No packages, no classes.</li>
<li>I like to idea of the recursive block scope which gets rid of the very limited public/private and the ill fated package public. My only concern is how you can declare friends to something at a nested scope (for example for tests).</li>
<li>Short syntax to avoid NPEs. The approach allows to catch null pointers when they are <strong>assigned</strong> instead of when they are used. This means: If you find a bug, you&#8217;ll actually know what to do about it.</li>
<li>No new keyword! I really never understood why they added that.</li>
<li>No checked exceptions. No one got them right, anyway.</li>
<li>Just one constructor per class. I never use them anyway, and the new named argument syntax solves many of the existing problems.</li>
<li>Method references</li>
</ul>
<p>Cons:</p>
<ul>
<li>= vs. :=. Come on. In 2011, I still need to tell the compiler something it already knows? Also, looking at my code, I&#8217;ll probably use := a lot. So that means extra effort for me. Bad. Not everyone&#8217;s brain is wired for immutables.</li>
<li>&#8220;if (exists foo)&#8221; to check for null values. If I already have to use a special syntax to mark something as &#8220;can be null&#8221;, why do I need to mention that again in a condition? What&#8217;s wrong with &#8220;if(name)&#8221;?</li>
</ul>
<p>Things that leave me puzzled:</p>
<ul>
<li>local vs shared. I understand that the compiler can&#8217;t infer types for shared references in a single pass but who cares? The compiler is a tool that has to make <strong>me</strong> more productive. If the compiler needs two or three passes to resolve dangling type reference, so what?</li>
<li>How is the module system working? How do you bundle types in a container to keep the namespace clean?</li>
</ul>
<br /> Tagged: <a href='http://blog.pdark.de/tag/ceylon/'>Ceylon</a>, <a href='http://blog.pdark.de/tag/compiler/'>Compiler</a>, <a href='http://blog.pdark.de/tag/java/'>Java</a>, <a href='http://blog.pdark.de/tag/programming/'>Programming</a>, <a href='http://blog.pdark.de/tag/software-development/'>Software Development</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/1875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/1875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/1875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/1875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/1875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/1875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/1875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/1875/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=1875&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2011/04/14/project-ceylon-successor-for-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Pestered by deadlocks?</title>
		<link>http://blog.pdark.de/2010/12/30/pestered-by-deadlocks/</link>
		<comments>http://blog.pdark.de/2010/12/30/pestered-by-deadlocks/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 10:39:54 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Deadlocks]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=1645</guid>
		<description><![CDATA[Serge Beauchamp wrote a tool to automatically locate and report places where they can occur: Freescale&#8217;s Deadlock Preventer is now released! Details can be found in this blog post. Tagged: Deadlocks, Java, Software Development<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=1645&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Serge Beauchamp" src="http://bp3.blogger.com/_xRUrqZpshsQ/SGOm9j2Q0DI/AAAAAAAAAAM/7FNMZ28WHYI/S220/IMG_0004_2.jpg" alt="" width="132" height="128" /><a href="http://sergebeauchamp.blogspot.com/">Serge Beauchamp</a> wrote a tool to automatically locate and report places where they can occur: <a href="http://sergebeauchamp.blogspot.com/2010_12_01_archive.html">Freescale&#8217;s Deadlock Preventer is now released!</a></p>
<p>Details can be found in <a href="http://sergebeauchamp.blogspot.com/2010/11/how-to-debug-and-detect-deadlocks.html">this blog post</a>.</p>
<br /> Tagged: <a href='http://blog.pdark.de/tag/deadlocks/'>Deadlocks</a>, <a href='http://blog.pdark.de/tag/java/'>Java</a>, <a href='http://blog.pdark.de/tag/software-development/'>Software Development</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/1645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/1645/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/1645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/1645/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/1645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/1645/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/1645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/1645/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/1645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/1645/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/1645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/1645/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/1645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/1645/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=1645&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2010/12/30/pestered-by-deadlocks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>

		<media:content url="http://bp3.blogger.com/_xRUrqZpshsQ/SGOm9j2Q0DI/AAAAAAAAAAM/7FNMZ28WHYI/S220/IMG_0004_2.jpg" medium="image">
			<media:title type="html">Serge Beauchamp</media:title>
		</media:content>
	</item>
		<item>
		<title>Positive logic</title>
		<link>http://blog.pdark.de/2010/08/20/positive-logic/</link>
		<comments>http://blog.pdark.de/2010/08/20/positive-logic/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 08:52:49 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.pdark.de/?p=1110</guid>
		<description><![CDATA[I just read another great post on Daily WTF (&#8220;Boolean Illogic&#8220;). Question: Does validation occur when the status is valid? if (statusIsNotValid.compareTo( Boolean.FALSE ) != 0) skipValidation = false; Another great example why you should prefer positive logic. Tagged: Java, Software Development<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=1110&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just read another great post on <a href="http://thedailywtf.com/">Daily WTF</a> (&#8220;<a href="http://thedailywtf.com/Articles/Boolean-Illogic.aspx">Boolean Illogic</a>&#8220;). Question: Does validation occur when the status is valid?</p>
<blockquote><p><code>if (statusIsNotValid.compareTo( Boolean.FALSE ) != 0) skipValidation = false;</code></p></blockquote>
<p>Another great example why you should <a href="http://blog.pdark.de/2008/02/02/safer-java-think-positive/">prefer positive logic</a>.</p>
<br /> Tagged: <a href='http://blog.pdark.de/tag/java/'>Java</a>, <a href='http://blog.pdark.de/tag/software-development/'>Software Development</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/1110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/1110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/1110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/1110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/1110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/1110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/1110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/1110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/1110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/1110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/1110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/1110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/1110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/1110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=1110&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2010/08/20/positive-logic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
		<item>
		<title>Dependency Injection and Reference Passing</title>
		<link>http://blog.pdark.de/2010/07/21/dependency-injection-and-reference-passing/</link>
		<comments>http://blog.pdark.de/2010/07/21/dependency-injection-and-reference-passing/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 17:17:40 +0000</pubDate>
		<dc:creator>digulla</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Dependency Injection]]></category>
		<category><![CDATA[DI]]></category>
		<category><![CDATA[Law of Demeter]]></category>
		<category><![CDATA[LoD]]></category>
		<category><![CDATA[Singleton]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://darkviews.wordpress.com/?p=183</guid>
		<description><![CDATA[When you start using dependency injection (DI), you probably come from the painful world of singletons. Singletons are a lie. When we were doing structured programming (remember? What we did before OO?), that was called &#8220;global variable&#8221; and everyone knew they were bad. But hey, OO came along and we had the same problem and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=183&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When you start using dependency injection (DI), you probably come from the painful world of singletons. Singletons are a lie. When we were doing structured programming (remember? What we did before OO?), that was called &#8220;global variable&#8221; and everyone knew they were bad. But hey, OO came along and we had the same problem and to solve it &#8230; we used global variables. Only we didn&#8217;t name them that. We said &#8220;It&#8217;s a Singleton!&#8221; and everybody was happy.</p>
<p>Except that the mighty singleton has the same problems as the global variable &#8211; because they are the same thing.</p>
<p>A solution was sought and DI was invented. When people start to use DI, they are still in the &#8220;Singleton&#8221; mind because you can&#8217;t get rid of an idea that has served you (more or less) well over many years. Since a human can&#8217;t simply forget what he&#8217;s been doing for a long time (it&#8217;s traditional), singletons leaked into DI leading to odd design which felt wrong.</p>
<p>Software developers are paid for their brains. If something feels wrong, it usually is. Most of the early code we come up with then starting with DI violates the <a href="http://misko.hevery.com/2008/07/18/breaking-the-law-of-demeter-is-like-looking-for-a-needle-in-the-haystack/">Law of Demeter</a>.</p>
<p>A common solution to the problems with many singletons is to replace them with a single singleton (for example one which loads and offers the application context in Spring). While this is convenient, we still have a global variable left. </p>
<p>Another solution is to write constructors that take 27 parameters so you can pass in all the parameters. If you avoid that trap, then your class will have 27 setters. Holy Ugly, Batman.</p>
<p>How to solve that? Use more DI. Most of the 27 ex-singletons will be passed on to other worker classes. So instead of passing on the singletons to create the worker classes deep down in the code, create the worker classes using DI (so the DI framework can fill in all the ex-singletons they need) and then pass in the 2-3 workers.</p>
<p>For some code, see this article: <a href="http://java.dzone.com/articles/dependency-injection-myth-refe">Dependency Injection Myth: Reference Passing</a></p>
<br /> Tagged: <a href='http://blog.pdark.de/tag/dependency-injection/'>Dependency Injection</a>, <a href='http://blog.pdark.de/tag/di/'>DI</a>, <a href='http://blog.pdark.de/tag/law-of-demeter/'>Law of Demeter</a>, <a href='http://blog.pdark.de/tag/lod/'>LoD</a>, <a href='http://blog.pdark.de/tag/singleton/'>Singleton</a>, <a href='http://blog.pdark.de/tag/software-development/'>Software Development</a>, <a href='http://blog.pdark.de/tag/testing/'>Testing</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/darkviews.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/darkviews.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/darkviews.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/darkviews.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/darkviews.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/darkviews.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/darkviews.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/darkviews.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/darkviews.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/darkviews.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/darkviews.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/darkviews.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/darkviews.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/darkviews.wordpress.com/183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.pdark.de&amp;blog=6384723&amp;post=183&amp;subd=darkviews&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.pdark.de/2010/07/21/dependency-injection-and-reference-passing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8a4d6f03a8879432d8563aefbf48e787?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">digulla</media:title>
		</media:content>
	</item>
	</channel>
</rss>
