<?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>Dan Hulton's blog</title>
	<atom:link href="http://www.danhulton.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danhulton.com/blog</link>
	<description>Coffee, code, contemplation.</description>
	<lastBuildDate>Wed, 17 Feb 2010 15:20:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Get Scared and Submit!</title>
		<link>http://www.danhulton.com/blog/2010/02/17/get-scared-and-submit/</link>
		<comments>http://www.danhulton.com/blog/2010/02/17/get-scared-and-submit/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 15:20:41 +0000</pubDate>
		<dc:creator>Dan Hulton</dc:creator>
				<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://www.danhulton.com/blog/?p=201</guid>
		<description><![CDATA[Recently, the US held a cyber warfrare-style wargame.  I was very interested in watching this happen, largely to see if the simulated elected officials were as unprepared as I had thought they were.  I did wonder, however, why they were choosing to make public the results of this wargame.  They were even [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, <a href="http://www.washingtonpost.com/wp-dyn/content/article/2010/02/16/AR2010021605762.html?hpid=moreheadlines">the US held a cyber warfrare-style wargame</a>.  I was very interested in watching this happen, largely to see if the simulated elected officials were as unprepared as I had thought they were.  I did wonder, however, why they were choosing to make public the results of this wargame.  They were even live-broadcasting it.  Was this an example of the openness of the new administration?  What fun!</p>
<p>But after reading the results, I&#8217;m no longer amused at the prospect of an unprepared, over-encumbered government unable to keep up with the times &#8211; I&#8217;m in shock at how &#8220;with the times&#8221; they are, just in an entirely oblique aspect.</p>
<p>The scary parts of the article I linked are here:</p>
<blockquote><p>Half an hour into an emergency meeting of a mock National Security Council, the attorney general declared: &#8220;We don&#8217;t have the authority in this nation as a government to quarantine people&#8217;s cellphones.&#8221; </p>
<p>The White House cyber coordinator was &#8220;shocked&#8221; and asserted: &#8220;If we don&#8217;t have the authority, the attorney general ought to find it.&#8221;</p></blockquote>
<p>and</p>
<blockquote><p>Former senior officials from Republican and Democratic administrations participated in the war game, as did one former senator. Jamie S. Gorelick, a deputy attorney general under President Bill Clinton, pressed the issue of individual privacy. In a crisis, she said, &#8220;Americans need to know that they should not expect to have their cellphone and other communications to be private &#8212; not if the government is going to have to take aggressive action to tamp down the threat.&#8221;</p></blockquote>
<p>and</p>
<blockquote><p>&#8220;People have trouble understanding warnings,&#8221; said John McLaughlin, who served as acting CIA director in 2004 and who played the director of national intelligence. &#8220;It was only after Sept. 11 that people could visualize what was possible. The usefulness of the simulation is it will help people visualize [the threat].&#8221;</p></blockquote>
<p>Yes, and we all know how safe the precautions taken after 9/11 have made everyone, and how much they&#8217;ve enriched everyone&#8217;s lives.</p>
<p>It&#8217;s pretty clear &#8211; you don&#8217;t even have to read between the lines.  This wasn&#8217;t a public example of the United States&#8217; actual response to a credible cyber-threat, it was Security Theatre, but a dangerous new definition thereof: A sham bit of theatre <i>about</i> security, intended to cow the audience into submitting to brand new invasions of privacy.</p>
<p>Still not convinced?  Let me leave you with one more quote:</p>
<blockquote><p>Lockhart said that people would be scared by the simulation but that &#8220;that&#8217;s a good thing.&#8221; Only then, he said, would Congress act.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.danhulton.com/blog/2010/02/17/get-scared-and-submit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Goals, 2010</title>
		<link>http://www.danhulton.com/blog/2010/01/05/goals-2010/</link>
		<comments>http://www.danhulton.com/blog/2010/01/05/goals-2010/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 15:29:05 +0000</pubDate>
		<dc:creator>Dan Hulton</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.danhulton.com/blog/?p=196</guid>
		<description><![CDATA[Apparently, Goals suck too.  Or at least I suck.  Reviewing the goals I set for myself last year, I see that I didn&#8217;t really do too well.
1. Lose 30 lbs. I don&#8217;t want a perfect body, but I do want to get rid of this spare tire I&#8217;m lugging around. Getting down to [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently, Goals suck too.  Or at least I suck.  Reviewing the goals I set for myself last year, I see that I didn&#8217;t really do too well.</p>
<blockquote><p>1. Lose 30 lbs. I don&#8217;t want a perfect body, but I do want to get rid of this spare tire I&#8217;m lugging around. Getting down to 195 would do most of that.</p></blockquote>
<p>FAIL.  I weigh as much as last year at this time, almost to the pound.</p>
<blockquote><p>2. Exercise 3x weekly, for at least 30 minutes. I’m going to keep a journal and everything.</p></blockquote>
<p>FAIL.  I lasted until early February.</p>
<blockquote><p>3. Launch BillOnSite. There’ll be more on this later, but I think I have a real winner (or at least some real potential) here.</p></blockquote>
<p>WIN!  I actually launched the site!  That said, I haven&#8217;t really developed it into a winner yet.</p>
<blockquote><p>4. Pay off my PC Financial Mastercard. My strategy here is that every non-rent paycheque is used to reduce it a further $500 from last time. So if it’s at $2000 and I spend $40 in the intervening time, I have to put $540 on it to “catch up”. I don’t know how well that will work, but even if it doesn’t, I should still be able to pay the whole thing off this year.</p></blockquote>
<p>FAIL.  Though getting laid off sure didn&#8217;t help.</p>
<h3>New Goals for 2010</h3>
<ol>
<li>Lose 30 lbs.  This one I&#8217;m carrying over, since it&#8217;s pretty worthwhile.</li>
<li>Develop Bill On Site into something at at least pays its own bills.</li>
<li>Pay off my PC Financial Mastercard.  Again, I&#8217;m carrying this over.  Hopefully this year I won&#8217;t be laid off halfway through it and I can afford to throw money at it until it&#8217;s dead.</li>
<li>Have a playable demo.  I&#8217;m working on a game now &#8211; name unknown, but it goes by &#8220;Zombie Fortress&#8221; until I can dig up a better one &#8211; and I want to have something I can actually show someone so they understand how the game plays.  It&#8217;s one of those sandbox games where the attention to detail really makes the game, so I&#8217;m not planning on finishing it this year, but I want to be able to load it up and say &#8220;So look, the survivor goes over here and he picks up the gas can, but there&#8217;s a zombie there and he&#8217;s a cowardly survivor, so he drops the gas can and runs.  Neat, huh?&#8221;</li>
</ol>
<p>Unachievable goal: Rig the lottery so that Stephen Harper wins six times in a row, even though he&#8217;s not playing, and he undergoes an embarassing investigation.  The scandal loses him the Prime Minister&#8217;s seat.</p>
<p>In other news, while not a goal or a resolution, I do plan on blogging more.  It occurs to me that more things of note happened to me in &#8216;09 than are reflected on this blog, and that&#8217;s kind of a shame.  I mean, nowhere on here does it say how I&#8217;m now working for The Hill Times in downtown Ottawa, and loving it.  I mean, what the heck&#8217;s the point of that?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danhulton.com/blog/2010/01/05/goals-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>It&#8217;s Programmer&#8217;s Day!</title>
		<link>http://www.danhulton.com/blog/2009/09/13/its-programmers-day/</link>
		<comments>http://www.danhulton.com/blog/2009/09/13/its-programmers-day/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 17:30:33 +0000</pubDate>
		<dc:creator>Dan Hulton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.danhulton.com/blog/?p=191</guid>
		<description><![CDATA[Apparently, in Russia, on the 256th day of the year, they now celebrate Programmer&#8217;s Day.
I propose that this is an excellent idea, and we should celebrate it with all the pomp, circumstance, and rigamarole that we celebrate Mother&#8217;s Day, Father&#8217;s Day, and Talk Like a Pirate Day.
Speaking of, Talk Like a Pirate Day is coming [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://opendotdotdot.blogspot.com/2009/09/russias-new-holiday-programmers-day.html">Apparently, in Russia, on the 256th day of the year, they now celebrate Programmer&#8217;s Day.</a></p>
<p>I propose that this is an excellent idea, and we should celebrate it with all the pomp, circumstance, and rigamarole that we celebrate Mother&#8217;s Day, Father&#8217;s Day, and Talk Like a Pirate Day.</p>
<p><a href="http://www.talklikeapirate.com/">Speaking of, Talk Like a Pirate Day is coming up, too.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.danhulton.com/blog/2009/09/13/its-programmers-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Colony</title>
		<link>http://www.danhulton.com/blog/2009/08/21/the-colony/</link>
		<comments>http://www.danhulton.com/blog/2009/08/21/the-colony/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 18:26:05 +0000</pubDate>
		<dc:creator>Dan Hulton</dc:creator>
				<category><![CDATA[Raw Entertainment]]></category>

		<guid isPermaLink="false">http://www.danhulton.com/blog/?p=181</guid>
		<description><![CDATA[So I found this new reality show.  I know what you&#8217;re thinking &#8211; &#8220;Man, fuck reality shows.  Those are for bored housewives who do nothing but sit around eating bonbons all day.&#8221;  Well fuck, aside from the &#8220;bored&#8221;, &#8220;housewife&#8221;, &#8220;bonbons&#8221;, and &#8220;nothing but sit around&#8221;, that&#8217;s me to a T.
(For those of [...]]]></description>
			<content:encoded><![CDATA[<p>So I found this new reality show.  I know what you&#8217;re thinking &#8211; &#8220;Man, fuck reality shows.  Those are for bored housewives who do nothing but sit around eating bonbons all day.&#8221;  Well fuck, aside from the &#8220;bored&#8221;, &#8220;housewife&#8221;, &#8220;bonbons&#8221;, and &#8220;nothing but sit around&#8221;, that&#8217;s me to a T.</p>
<p>(For those of you playing the home game, that makes me a &#8220;who do eating all day&#8221;.  That&#8217;s fucked up.)</p>
<p>Anyway, the show is called &#8220;The Colony&#8221;, and it&#8217;s about a group of people who are herded into an abandoned industrial lot, told that the world has ended, and they must survive this post-industrial wasteland with nothing more than what they can scavenge, build, or steal.</p>
<p>Considering I just got through playing Fallout 3, I am in <b>exactly</b> the right frame of mind to enjoy this show.  I basically scavenged and stole the entirety of Washington, DC.</p>
<p>Here, let me give you a little excerpt from the wikipedia page about episode one:</p>
<h3>Episode 1</h3>
<table>
<thead>
<tr>
<th>Phase</th>
<th>Context</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Phase 1: Sleep Deprivation</td>
<td>Shock and Fatigue</td>
<td>To simulate the stress survivors experience in the aftermath of a disaster, the volunteers are kept awake for thirty hours with almost no food or water.</td>
</tr>
<tr>
<td>Phase 2: Looting</td>
<td>Scarcity of Supplies</td>
<td>Mentally drained, the first six volunteers were given fifteen minutes in an abandoned department store to scavenge as many resources as they can carry.</td>
</tr>
<tr>
<td>Phase 3: The Marauders</td>
<td>Resource Competition</td>
<td>Ten minutes into scavenging, a gang of looters are sent in to steal the volunteer&#8217;s supplies.</td>
</tr>
<tr>
<td>Phase 4: River Walk</td>
<td>Search for Shelter</td>
<td>Before arriving at the colony, the volunteers haul their 200 pounds of looted supplies eight miles down the Los Angeles River.</td>
</tr>
<tr>
<td>Phase 5: Arrival and Survival</td>
<td>Rebuilding Begins</td>
<td>The six colonists arrive at an 80,000 square foot warehouse on a three and a half acre plot of land. They are supplied with rudimentary materials, tools, and a small supply of food and water. How they use these resources is up to them.</td>
</tr>
</tbody>
</table>
<p>Now <b>tell me</b> that doesn&#8217;t sound badass.  I&#8217;m sure it&#8217;ll be fucked up by the normal reality-show drama nonsense that the producers seem to love putting in regardless of how cool the concept is, but this is such a cool concept that I&#8217;m going to have to give it a try.</p>
<p>Hopefully I can catch Episode 1 tonight and report back.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danhulton.com/blog/2009/08/21/the-colony/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Game Crafter &#8211; Cafe Press for Board Games</title>
		<link>http://www.danhulton.com/blog/2009/07/16/the-game-crafter-cafe-press-for-board-games/</link>
		<comments>http://www.danhulton.com/blog/2009/07/16/the-game-crafter-cafe-press-for-board-games/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 18:15:20 +0000</pubDate>
		<dc:creator>Dan Hulton</dc:creator>
				<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://www.danhulton.com/blog/?p=176</guid>
		<description><![CDATA[I just saw this and fell directly in love:
The Game Crafter &#8211; Your game REALIZED
So basically you can design your own board game, upload it to them, and then start selling it from their site.  How freaking cool is that?
I wish I had an extra 24h in each day so I could work on [...]]]></description>
			<content:encoded><![CDATA[<p>I just saw this and fell directly in love:</p>
<p><a href="http://www.thegamecrafter.com/home">The Game Crafter &#8211; Your game REALIZED</a></p>
<p>So basically you can design your own board game, upload it to them, and then start selling it from their site.  How freaking cool is that?</p>
<p>I wish I had an extra 24h in each day so I could work on a board game in addition to <a href="http://www.billonsite.com">Bill On Site</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danhulton.com/blog/2009/07/16/the-game-crafter-cafe-press-for-board-games/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Naked Else &#8211; How I Hate Thee</title>
		<link>http://www.danhulton.com/blog/2009/06/25/the-naked-else-how-i-hate-thee/</link>
		<comments>http://www.danhulton.com/blog/2009/06/25/the-naked-else-how-i-hate-thee/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 19:24:20 +0000</pubDate>
		<dc:creator>Dan Hulton</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.danhulton.com/blog/?p=170</guid>
		<description><![CDATA[I cannot express my frustration at seeing code like this:


if (isset($modifier)) {
    // Do some things.

    // And some more things.

    // Still more
    // things
    // to be done here.

    // There's a whole lot of [...]]]></description>
			<content:encoded><![CDATA[<p>I cannot express my frustration at seeing code like this:</p>
<p><code>
<pre class="prettyprint">
if (isset($modifier)) {
    // Do some things.

    // And some more things.

    // Still more
    // things
    // to be done here.

    // There's a whole lot of things here!

    // Last bunch of things
}
else {
    // Do totally different stuff
}
</pre>
<p></code></p>
<p>People.  Comment your elses!  I shouldn&#8217;t have to scroll up to read the if again just to figure out what a branch of logic does.  This is a maintenance code nightmare, and simply adding a simple &#8220;// If validation has failed&#8221; will save all kinds of time and frustration.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danhulton.com/blog/2009/06/25/the-naked-else-how-i-hate-thee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Got Laid Off Today</title>
		<link>http://www.danhulton.com/blog/2009/06/24/got-laid-off-today/</link>
		<comments>http://www.danhulton.com/blog/2009/06/24/got-laid-off-today/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 23:42:38 +0000</pubDate>
		<dc:creator>Dan Hulton</dc:creator>
				<category><![CDATA[Bill On Site]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.danhulton.com/blog/?p=166</guid>
		<description><![CDATA[I always figured that when I got laid off next, I&#8217;d write a scathing missive about how the company that did it was full of blundering morons, savagely incompetent noncompoops, and how I hoped they&#8217;d fail miserably without me.
Okay, rather, I figured I&#8217;d have the fortitude to resist writing such a post, but I at [...]]]></description>
			<content:encoded><![CDATA[<p>I always figured that when I got laid off next, I&#8217;d write a scathing missive about how the company that did it was full of blundering morons, savagely incompetent noncompoops, and how I hoped they&#8217;d fail miserably without me.</p>
<p>Okay, rather, I figured I&#8217;d have the fortitude to <em>resist</em> writing such a post, but I at least figured I&#8217;d <em>want to</em>.</p>
<p>But see, I got laid off earlier today and frankly, I&#8217;m not upset at all.</p>
<p>I&#8217;m not upset with the company &#8211; I wish them the very best.  They have some neat technology and if it pans out (and it looks like it will), then they&#8217;re going to clobber the marketplace.  I&#8217;m not upset with anyone left behind &#8211; these things are usually as hard on them as they are on those that got laid off, and everyone still working there is good people that I just don&#8217;t wish this on.  And I&#8217;m not upset with the management either &#8211; they were faced with a tough decision. They&#8217;d cut every non-staff expense they could (we watched and noticed and were grateful), but this economy is brutal and people are loathe to commit to purchasing decisions, which affects their bottom line.</p>
<p>And it&#8217;s not like I&#8217;m going to be in dire straights or anything.  Since I was laid off, I can get EI for Quite Some Time, or even better, Ontario offers a <a href="http://www.edu.gov.on.ca/eng/tcu/employees/selfEmployment.html">Self-Employment Grant</a> that you can get if you&#8217;re otherwise eligible for EI.  Since I wanted more time to work on <a href="http://www.billonsite.com">Bill On Site</a>, then this may actually work out to my benefit.</p>
<p>Ultimately, I&#8217;m choosing not to think of this as a setback, but rather as a hell of an opportunity.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danhulton.com/blog/2009/06/24/got-laid-off-today/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Super-useful Komodo Plugins</title>
		<link>http://www.danhulton.com/blog/2009/05/22/super-useful-komodo-plugins/</link>
		<comments>http://www.danhulton.com/blog/2009/05/22/super-useful-komodo-plugins/#comments</comments>
		<pubDate>Fri, 22 May 2009 18:33:02 +0000</pubDate>
		<dc:creator>Dan Hulton</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[jslint]]></category>
		<category><![CDATA[komodo edit]]></category>
		<category><![CDATA[lint]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[source tree]]></category>
		<category><![CDATA[todo]]></category>

		<guid isPermaLink="false">http://www.danhulton.com/blog/?p=153</guid>
		<description><![CDATA[Komodo Edit is Awesome and has Plugins
Komodo Edit is awesome and you should all use it.
Seriously.  I don&#8217;t know how much more I need to go on about this point, but the productivity benefits of a good IDE are astounding, and if you&#8217;re still using Notepad or gedit or the like like, then you [...]]]></description>
			<content:encoded><![CDATA[<h3>Komodo Edit is Awesome and has Plugins</h3>
<p>Komodo Edit is awesome and you should all use it.</p>
<p>Seriously.  I don&#8217;t know how much more I need to go on about this point, but the productivity benefits of a good IDE are astounding, and if you&#8217;re still using Notepad or gedit or the like like, then you are Doing It Wrong.</p>
<p>If I had to recommend a good IDE, I&#8217;d recommend Komodo Edit.  I have before.  Hell, <a href="http://www.activestate.com/komodo_edit/">I&#8217;m still their go-to quote</a>, a fact that I find puzzling, yet rewarding.</p>
<p>Anyway.  The guys at Activestate switched to using the Mozilla codebase a while ago, which means that anyone who can write a Firefox extension can (in theory) write a Komodo extension.  And so they have!  And I have found three that I have fallen absolutely in love with.</p>
<p>They are:</p>
<h3><a href="http://community.activestate.com/node/1396">TODO Helper</a></h3>
<p>The <a href="http://community.activestate.com/node/1396">TODO Helper plugin</a> is great if you leave all kinds of little &#8220;TODO:&#8221;s scattered through your code as mental bookmarks.  This plug-in can quickly search your entire project for all TODOs listed and display them in the bottom panel.</p>
<p>It&#8217;s a little frustrating when the framework you&#8217;re using leaves TODOs in their releases, but it&#8217;s not hard to take those suckers out anyway.</p>
<h3><a href="http://community.activestate.com/xpi/kjslint-jslint-komodo">kJSLint</a></h3>
<p>A long while ago, I blogged about <a href="http://www.danhulton.com/blog/2008/01/16/integrate-js-lint-into-komodo-edit/">how to integrate jslint into Komodo Edit</a>, but I guess that&#8217;s not really strictly necessary these days.  Since there&#8217;s <a href="http://community.activestate.com/xpi/kjslint-jslint-komodo">a plugin that integrates jslint into a menu command</a>.</p>
<p>Sure, you lose out somewhat on the ability to control exactly what version of jslint you use, but the version included is rather up-to-date, and saves you the trouble of having to install an interpreter just to run it.  A definite win.</p>
<p>(Also, the &#8220;Crockford says no.&#8221; message it spits out when you fail validation makes me smile every time.)</p>
<h3>Source Tree</h3>
<p>Though not as slick as <a href="http://www.activestate.com/komodo_edit/osx_sections_list_code.jpg">Komodo IDE&#8217;s code browser</a>, at least the <a href="http://community.activestate.com/xpi/source-tree">Source Tree plugin</a> is free and does what it says on the tin.  Having the entirety of the file&#8217;s functions and classes available and easy to navigate is <em>very</em> handy.  Shame this isn&#8217;t in the free version of Edit to start, but they&#8217;ve got to have <em>some</em> features to differentiate the two enough to encourage people to buy the &#8220;pro&#8221; edition.</p>
<h3>And in Conclusion</h3>
<p>Komodo Edit.  It&#8217;s good.  Komodo Edit with Plugins.  Even better.</p>
<p>Now get coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danhulton.com/blog/2009/05/22/super-useful-komodo-plugins/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Clean Code: Nested conditionals</title>
		<link>http://www.danhulton.com/blog/2009/05/12/cleaning-up-your-code-nested-conditionals/</link>
		<comments>http://www.danhulton.com/blog/2009/05/12/cleaning-up-your-code-nested-conditionals/#comments</comments>
		<pubDate>Tue, 12 May 2009 19:58:13 +0000</pubDate>
		<dc:creator>Dan Hulton</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.danhulton.com/blog/?p=65</guid>
		<description><![CDATA[Ugly code is everywhere.  Inside that copy of Microsoft Office 2007, behind that latest Linux kernel, and in the dozens and dozens of web 2.0 MicroISV tools you use day-in and day out.  Lurking.
But there are those of us who fight!  Who rage against the dying of the light!  Those who [...]]]></description>
			<content:encoded><![CDATA[<p>Ugly code is everywhere.  Inside that copy of Microsoft Office 2007, behind that latest Linux kernel, and in the dozens and dozens of web 2.0 MicroISV tools you use day-in and day out.  Lurking.</p>
<p>But there are those of us who fight!  Who rage against the dying of the <a href="#" title="elegant and maintanable code">light</a>!  Those who are more than happy to share our solutions to cleaning up ugly code, in the hopes that up-and-coming programmers will notice and apply said solutions.  This&#8230; is one such solution.</p>
<p>Take, for example, nested conditions.  They look like:</p>
<p><code>
<pre class="prettyprint">
if (thing) {
    [CHUNK A]
    if (thing) {
        [CHUNK B]
        if (thing) {
            [CHUNK C]
        }
    }
}
</pre>
<p></code></p>
<p>It&#8217;s not THAT ugly, but try extending that out into five or more chunks, or if you&#8217;ve already indented a couple of times, you will notice just how ugly this looks.  Since each chunk is only executed based on the result of a boolean test (the if statements), and each chunk is directly dependant on the previous chunk (and oughn&#8217;t be run if the previous chunk fails), we can take advantage of short-circuit operators and rewrite this section of code to be much cleaner.</p>
<p>Instead, rewrite each chunk into its own function, have that function return a boolean, and you can rewrite the original code like:</p>
<p><code>
<pre class="prettyprint">
$success = do_chunk_a();
$success = $success &#038;&#038; do_chunk_b();
$success = $success &#038;&#038; do_chunk_c();
</pre>
<p></code></p>
<p>This is a <em>huge</em> win in terms of readability, and therefore in terms of maintainability.  Especially so if you name your new functions descriptively, like &#8220;send_invoice()&#8221; or &#8220;update_client_list()&#8221;.  It&#8217;s far easier to look at the descriptive name of the functions instead of having to read through the entirety of each chunk, just to find out what the code is supposed to <em>do</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danhulton.com/blog/2009/05/12/cleaning-up-your-code-nested-conditionals/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Micropreneur Academy</title>
		<link>http://www.danhulton.com/blog/2009/04/08/the-micropreneur-academy/</link>
		<comments>http://www.danhulton.com/blog/2009/04/08/the-micropreneur-academy/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 22:27:49 +0000</pubDate>
		<dc:creator>Dan Hulton</dc:creator>
				<category><![CDATA[Bill On Site]]></category>

		<guid isPermaLink="false">http://www.danhulton.com/blog/?p=137</guid>
		<description><![CDATA[As some of you may know, I began working on a side-project back in December &#8211; a business I want to launch this year.  Thankfully, to a large degree I know what I don&#8217;t know, and I&#8217;ve been reading as voraciously as possible, trying to fill the gaps.  I&#8217;ve read books by Guy [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you may know, I began working on a side-project back in December &#8211; a business I want to launch this year.  Thankfully, to a large degree I know what I don&#8217;t know, and I&#8217;ve been reading as voraciously as possible, trying to fill the gaps.  I&#8217;ve read books by <a href="http://www.amazon.com/Art-Start-Time-Tested-Battle-Hardened-Starting/dp/1591840562/ref=pd_bbs_sr_2?ie=UTF8&#038;s=books&#038;qid=1239227793&#038;sr=8-2">Guy Kawasaki</a>, I&#8217;ve subscribed to <a href="http://venturehacks.com/">blogs for entrepreneurs</a>, and participated in <a href="http://discuss.joelonsoftware.com/?biz">discussion forums for software business owners</a>.</p>
<p>But just today, I decided to sign up for The Micropreneur Academy, by <a href="http://www.sixfiguresoftware.com/">Six Figure Software</a>.  Run by a fellow named Rob, who has experience creating, launching, and running not one but many super-small businesses, it looks to be a very interesting resource.  Two main things attracted me:</p>
<ul>
<li>It&#8217;s not free.  Actually, it&#8217;s rather pricey.  The benefit here is that it keeps out the riff-raff.  The only people here are the people who really want to learn how to launch a super-small business and succeed, not just some shmoe who wants to <i>dream</i> of doing constantly without ever achieving.  Signing up to something that costs serious dollars at least signifies some <i>intent</i>.</li>
<li><b>The forum.</b>  I waffled on signing up for a bit, wondering if the information imparted would really be worth the money, when I realized that <i>it didn&#8217;t matter</i>.  The course could be a total wash, teaching me nothing that I didn&#8217;t already know or couldn&#8217;t already find on the internet for free.  But it would provide a guided discussion of all the varied aspects of running a super-small business, and all those people on the forums with intent and businesses, who are currently putting it on the line will be there, taking part in that conversation.  That, in and of itself, is worth it.</li>
</ul>
<p>Today was the first day the Academy was open, and the forum is already lively.  There&#8217;s the seemingly-mandatory introduction thread, there&#8217;s a few threads about very specific questions that are returning some interesting answers, and there&#8217;s an entire sub-section dedicated to people announcing goals each week and how well they followed through on the previous week&#8217;s goals, a brilliant little feature that I immediately participated in.  It&#8217;s good to have people keeping you honest.</p>
<p>And honestly, I&#8217;m really looking forward to the coming weeks and the lessons learned therein.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danhulton.com/blog/2009/04/08/the-micropreneur-academy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
