<?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>dark looks &#187; Code</title>
	<atom:link href="http://darklooks.com/blog/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://darklooks.com/blog</link>
	<description>it&#039;s just my motor running</description>
	<lastBuildDate>Sat, 24 Sep 2011 19:30:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<atom:link rel='hub' href='http://darklooks.com/blog/?pushpress=hub'/>
		<item>
		<title>It&#8217;s a simple head code: anyone can catch it</title>
		<link>http://darklooks.com/blog/2010/02/17/its-a-simple-head-code-anyone-can-catch-it/</link>
		<comments>http://darklooks.com/blog/2010/02/17/its-a-simple-head-code-anyone-can-catch-it/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 08:46:38 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Nonsense]]></category>

		<guid isPermaLink="false">http://darklooks.com/blog/?p=156</guid>
		<description><![CDATA[What you always knew happened in the dealership]]></description>
			<content:encoded><![CDATA[<p>What you always knew happened <a href="http://www.youtube.com/watch?v=pbVY5teBzlg">in the dealership</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdarklooks.com%2Fblog%2F2010%2F02%2F17%2Fits-a-simple-head-code-anyone-can-catch-it%2F&amp;title=It%E2%80%99s%20a%20simple%20head%20code%3A%20anyone%20can%20catch%20it" id="wpa2a_2"><img src="http://darklooks.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://darklooks.com/blog/2010/02/17/its-a-simple-head-code-anyone-can-catch-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More news!</title>
		<link>http://darklooks.com/blog/2009/01/29/more-news/</link>
		<comments>http://darklooks.com/blog/2009/01/29/more-news/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 19:49:30 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Publicity]]></category>

		<guid isPermaLink="false">http://darklooks.com/blog/?p=95</guid>
		<description><![CDATA[A colleague and I have just confirmed our slot at QCon, speaking on our experience with implementing architectures in the real world. I find this terribly exciting. Others will find it either incomprehensible or deeply dull: my friends, I love &#8230; <a href="http://darklooks.com/blog/2009/01/29/more-news/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A colleague and I have just confirmed our slot at <a href="http://qconlondon.com">QCon</a>, <a href="http://qconlondon.com/london-2009/presentation/Document+Style+Business+Services+at+British+Airways.">speaking</a> on our experience with implementing architectures in the real world. I find this terribly exciting. Others will find it either incomprehensible or deeply dull: my friends, I love you, but it&#8217;s your loss <img src='http://darklooks.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' 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%2Fdarklooks.com%2Fblog%2F2009%2F01%2F29%2Fmore-news%2F&amp;title=More%20news%21" id="wpa2a_4"><img src="http://darklooks.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://darklooks.com/blog/2009/01/29/more-news/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Funny ha-ha&#8230;</title>
		<link>http://darklooks.com/blog/2008/01/13/funny-ha-ha/</link>
		<comments>http://darklooks.com/blog/2008/01/13/funny-ha-ha/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 22:57:21 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Friends]]></category>

		<guid isPermaLink="false">http://darklooks.com/blog/2008/01/13/funny-ha-ha/</guid>
		<description><![CDATA[It was put to me this week that I should, as it were, expose myself publicly as part of a strategy to generate wealth through humour. Whilst I accept I do, from time to time, prompt fits of incontinent laughter &#8230; <a href="http://darklooks.com/blog/2008/01/13/funny-ha-ha/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It was put to me this week that I should, as it were, expose myself publicly as part of a strategy to generate wealth through humour. Whilst I accept I do, from time to time, prompt fits of incontinent laughter on the part of those around me, I couldn&#8217;t help but compare it to the other part of my wealth-generation strategy: working. </p>
<p>There has been an opportunity in my workplace of late to apply for a change in role: the sort of change which, yes, does have a pound symbol attached, but a modest one, the point of the exercise having as much to do with getting to face the kind of challenges you really fancy waking up at 3am worrying about, rather than ones you would <em>hate</em> to wake up at 3am worrying about, but wake up at 3am worrying about anyway. (With sentence construction skills like these, no one need fear my application progressing too far.)</p>
<p>It&#8217;s been interesting to observe the various approaches of those colleagues who have applied, and, out of deference to their privacy, I shall say nothing about any of them, save that the person who thinks they&#8217;re most cynical and defeatist about it is in fact hopelessly outclassed in negativity by another applicant. I&#8230; looked at the forms, shall we say, and thought about how I would fill in a couple of the blank boxes presented.</p>
<p>Two hours and six words later, I had failed to find in myself a single redeeming quality. Even my old PE teacher did better than this, and I was a real challenge (he wrote: &#8220;Mike is hopeless at this subject and knows it, but I enjoy his dry sense of humour&#8221;). Had I spent any longer on the matter, it&#8217;s safe to say I would have had to resign immediately, on grounds of <em>sheer honesty</em>.</p>
<p>So if, in a totally ahumorous, ruthlessly fact-based sort of a way, I cannot think of one good thing to say about myself, what hope could there possibly be for me as a humorist, when invention, wit, agility of imagination and mastery of the over-extended nonsense metaphor are all marvellous but essentially adjuncts to sound underlying structure of the prosaic old ahumorous sort? Wilde, of course, maintained that he reserved his true genius for his conversation, which has ever since provided hope to generations of bad writers who, when drunk, think they&#8217;re funny (self, of course, excluded: when drunk I am <em>hysterical</em>).</p>
<p>So which will garner more pounds sterling: funny &#8220;ha ha&#8221; or funny &#8220;I take my job extremely seriously, and regard it as my life&#8217;s work to improve human lives through intelligent application of technology, right up until the <a href="http://en.wikipedia.org/wiki/Technological_singularity">Singularity</a>, for which I will be right at the front of the upload queue&#8221;? And is that even a particularly important question to ask (if you work for a mortgage broker, please note that the sentence in which this parenthesis is embedded is humorous and should not be understood as implying financial irresponsibility on the part of its author, who would like to borrow six times his salary to live in a Zone 6 shoebox, pretty please with icing on) in these days of personal fulfilment plans and tailored dieting?</p>
<p>Well, who knows, who can say, and I expect as with so many things in life we&#8217;ll <em>find</em> out sooner than we could have <em>worked it</em> out. Good night and good luck.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdarklooks.com%2Fblog%2F2008%2F01%2F13%2Ffunny-ha-ha%2F&amp;title=Funny%20ha-ha%E2%80%A6" id="wpa2a_6"><img src="http://darklooks.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://darklooks.com/blog/2008/01/13/funny-ha-ha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TwoPhase SchmooPhase</title>
		<link>http://darklooks.com/blog/2006/11/15/twophase-schmoophase/</link>
		<comments>http://darklooks.com/blog/2006/11/15/twophase-schmoophase/#comments</comments>
		<pubDate>Tue, 14 Nov 2006 23:25:55 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Nonsense]]></category>

		<guid isPermaLink="false">http://darklooks.com/2006/11/15/twophase-schmoophase/</guid>
		<description><![CDATA[Also&#8230; spent ages looking at my app server today wondering why it suddenly refused to allow my EJBs access to other classes in the EAR. Turns out I may have to go scour the logs for a BEA-149316, which is &#8230; <a href="http://darklooks.com/blog/2006/11/15/twophase-schmoophase/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Also&#8230; spent ages looking at my app server today wondering why it suddenly refused to allow my EJBs access to other classes in the EAR. Turns out I may have to go scour the logs for a <a href="http://e-docs.bea.com/wls/docs81/messages/MasterDeployer.html#BEA-149316">BEA-149316</a>, which is the code weblogic puts out when it decides you&#8217;ve not assembled your EAR properly, so resets the TwoPhase attribute of the Application element in config.xml to &#8220;false&#8221; and basically causes universal ClassLoader woe and, in my case, hairloss and general snippiness.</p>
<p>Anonymous Technical Guru Colleague &#8216;L&#8217; says he&#8217;s seen this three (count &#8216;em) times, all on rhel environments running under VMWare. Harrumph.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdarklooks.com%2Fblog%2F2006%2F11%2F15%2Ftwophase-schmoophase%2F&amp;title=TwoPhase%20SchmooPhase" id="wpa2a_8"><img src="http://darklooks.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://darklooks.com/blog/2006/11/15/twophase-schmoophase/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Failing to fail</title>
		<link>http://darklooks.com/blog/2006/09/18/failing-to-fail/</link>
		<comments>http://darklooks.com/blog/2006/09/18/failing-to-fail/#comments</comments>
		<pubDate>Mon, 18 Sep 2006 18:35:08 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://darklooks.com/?p=3</guid>
		<description><![CDATA[I do wonder sometimes whether IDEs ought to be withheld from programmers for a couple of weeks a year just to remind them to think &#8212; self included. That sounds rather harsher than I mean to be; sorry. The root &#8230; <a href="http://darklooks.com/blog/2006/09/18/failing-to-fail/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I do wonder sometimes whether IDEs ought to be withheld from programmers for a couple of weeks a year just to remind them to think &#8212; self included.</p>
<p>That sounds rather harsher than I mean to be; sorry. The root cause is that I spent a good few minutes today reducing an (admittedly already overlarge) JUnit test case by a substantial percentage thanks to this little idiom:</p>
<p><code>try {<br />
couldThrowCheckedException();<br />
} catch(Exception e) {<br />
fail("Exception thrown");<br />
} </code><br />
I think the forces, right or wrong, operating in the minds of coders when they write this are as follows: <span id="more-3"></span></p>
<ul>
<li>checked exceptions are a nuisance, they hinder your smooth progress through code (I know, I know), and they&#8217;re not what you&#8217;re interested in because this is a positive test-case, right?</li>
<li>Eclipse helpfully offers to surround the exception-throwing call with a try/catch block. How handy! It also offers (I think as the first option) to add a throws clause, but no one seems to choose that. It&#8217;s the path of least resistance, so let&#8217;s do that and worry about it later.</li>
<li>They&#8217;re not consistently looking at the output of their JUnit (perhaps they&#8217;ve been hypnotised by the green bar) &#8212; if they had to rely on the text output, they&#8217;d be frustrated by the loss of that juicy stacktrace in e.</li>
<li>They&#8217;re not writing the parallel failure cases. If they were, they&#8217;d have had an interest in the exception and might have chosen to do differently in the success case.</li>
<li>The difference between failure and error is not well-understood. In one sense I sympathise (not green == bad), but the distinction between failure and error is an important one &#8212; an error may mean you don&#8217;t understand your application or the use of a library it depends on as well as you think you do; a good failure (in development, I mean) means your suspicions were right and it could go wrong like that: in other words, it affirmed your understanding rather than contradicting it.</li>
</ul>
<p>I&#8217;d be interested to see whether TDD made a difference to these forces; I know it did for me, and made a huge and fairly immediate difference to all aspects of my code (mostly, I have to say, quality; but also simplicity). TDD draws the coder into the code; you can&#8217;t just write to a spec and be done with it. I would hope that it also draws coders into a more rewarding coding cycle; they get to write more code, they get to really understand what&#8217;s going on, the tests document the system in a way which makes sense to them, and they get to creatively challenge the design.</p>
<p>Cue Eliza Doolittle singing <em>Wouldn&#8217;t it be lovely</em> &#8230;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fdarklooks.com%2Fblog%2F2006%2F09%2F18%2Ffailing-to-fail%2F&amp;title=Failing%20to%20fail" id="wpa2a_10"><img src="http://darklooks.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://darklooks.com/blog/2006/09/18/failing-to-fail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

