<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='rssxsl.xslt' version='1.0'?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>secretGeek</title> 
<link>http://secretGeek.net/index.asp</link> 
<description>secretGeek - dot Nuts about dot Net!</description> 
<copyright>Copyright 2007 Leon Bambrick</copyright>
<language>en-au</language> 
<managingEditor>LeonBambrick@NoSpamGMAIL.com (Leon Bambrick)</managingEditor> 
<webMaster>LeonBambrick@NoSpamGMAIL.com (Leon Bambrick)</webMaster>
<atom:link href="http://secretGeek.net/rss.asp" rel="self" type="application/rss+xml" /> 
<image>
<title>secretGeek</title>
<url>http://secretGeek.net/secretgeek2_noT.gif</url>
<link>http://secretGeek.net/index.asp</link>
<width>49</width>
<height>33</height>
<description>secretGeek - dot Nuts about dot Net!</description> 
</image>
<item>
  <title>The Utterly Thorough Guide To Awesome Application Compatibility on Windows 7.</title>
    <link>http://www.secretGeek.net/win7_compat_layer.asp</link>
    <description>
      <![CDATA[
<p><strong>How does backward compatibility work in windows 7?</strong></p>
<p>I'm glad you asked.</p>
<p>You don't got to be a <a href='http://www.hanselman.com/blog/'>Hanselman</a> to know all this.</p>
<p>Here's a pictographicatorial guide to compatibility checking in the windows 7.</p>
<img src='http://secretGeek.net/image/flowchart_app_compat_win7.png' alt='XXX' style='border:2px solid #000;margin:15px;margin-top:5px;' />
<p><small>* In point of fact, it's a virtual <a href='http://blogs.msdn.com/oldnewthing/'>Raymond Chen</a> (a VRC), but the MS guys are so freakin good at virtualization now that You Will Never Ever Ever EVER Be Able To Detect The Difference. Even Mrs Chen is rarely sure. And only when that fails do they invoke <a href='http://www.joelonsoftware.com/articles/APIWar.html'>the real Ray Chen</a>.</small></p>
<p>So take it from me, a world expert on the computing technologies, that this new version of windows will be just about the best thing since Vista.</p>
]]>
    </description>
    <pubDate>Thu, 02 Jul 2009 11:39:44 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/win7_compat_layer.asp</guid>
  </item>
<item>
  <title>Astounding Hyperlinked Noticeboard</title>
    <link>http://www.secretGeek.net/hyperNotice.asp</link>
    <description>
      <![CDATA[<p>I see this sign on the noticeboard in the staff kitchen every day, and thought I ought to share the wry little WTF it invokes, <em>every last time.</em></p>
<p><small>sorry i redacted it slightly; i think the guilty deserve some protection too; they're just hard working kids in the end)</small></p>
<span background:black'><table><tr><td style='background:black'><img src='http://secretGeek.net/image/noticeboard_35_1.png' alt='' style='float:right;border:1px solid #CCC;margin:10px;' /></td></tr></table></span>
]]>
    </description>
    <pubDate>Sat, 13 Jun 2009 12:17:23 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/hyperNotice.asp</guid>
  </item>
<item>
  <title>Three Questions About Each Bug You Find</title>
    <link>http://www.secretGeek.net/3q_eachbug.asp</link>
    <description>
      <![CDATA[ 
<span style='float:right; background:black'><table ><tr><td style='background:black'><a href='http://www.multicians.org/thvv/threeq.html'><img src='http://secretGeek.net/image/3_questions_th.gif' alt='1. Is this mistake somewhere else also?
2. What next bug is hidden behind this one?
3. What should I do to prevent bugs like this?' style='float:right;border:1px solid #CCC;margin:10px;'  /></a><br /><center style='clear:right'><small style='color:#FFF'>3 Questions... <br />in cartoon form too!</small></center><br /></td></tr></table></span>

<p>I really love this timeless Tom Van Vleck article from 1989.</p>
<p>It teaches us to ask ourselves:</p> 
<h2><a href='http://www.multicians.org/thvv/threeq.html'>Three Questions About Each Bug You Find</a></h2>
<p>Those questions being:</p>
<ol><li>Is this mistake somewhere else also?</li>
<li>What next bug is hidden behind this one?</li>
<li>What should I do to prevent bugs like this?</li></ol>

<p>When I first read these rules, I was foolish enough to think:</p>

<blockquote><p>'Cute, But Too Obvious! i do this intuitively <em>all the time.</em>'</p></blockquote>

<p>But <a href='http://TimeSnapper.com/'>watch yourself closely!</a> I've caught myself out on occasion, and maybe you will too.</p>

<p>I'm making an effort to be more explicit about <em>the three questions</em>. Maybe i'll end up fixing related problems at first hint more often than i do now.</p>
]]>
    </description>
    <pubDate>Fri, 12 Jun 2009 13:06:58 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/3q_eachbug.asp</guid>
  </item>
<item>
  <title>Recursing over the Pareto Principle...</title>
    <link>http://www.secretGeek.net/pareto_recurse.asp</link>
    <description>
      <![CDATA[<span style='float:right; background:black'><table><tr><td style='background:black'><img src='http://secretGeek.net/image/pareto.gif' alt='Villy Pareto' style='float:right;border:1px solid #CCC;margin:10px;'  /><br /><center style='clear:right'><small style='color:#FFF'>
Vilfredo Pareto:<br />
don't got time to shave.<br />
</small></center><br /></td></tr></table></span>

<p>I keep hearing rather a bit too much about this <a href='http://en.wikipedia.org/wiki/Pareto_principle'>Pareto Principle</a>.</p>

<p>Apparently, with just 20% effort, correctly applied, I can achieve 80% of the desired effect. Marvellous stuff!</p>

<p>I was about to go ahead and do this when it occurred to me:</p>

<blockquote><p><em>"Why waste all that time, doing a whole 20%?</p>
<p>"If I only did <strong>20%</strong> of that 20%, then surely I could achieve <strong>80%</strong> of the 80%?"</em></p></blockquote>

<p>Then with a little more head scratching, and the help of an excel spreadsheet, I determined that with just 0.8% of the effort I could achieve 51.2% of the result -- which is a PASS in anyone's books.</p>

<p>So from now on, you will excuse me while I spend 99.2% of my time:</p>

<ol><li><p>Lounging around, drunk, in a pool bar and</p> </li>
<li><p>Determining exactly which 0.8% of the effort to apply myself to.</p></li></ol>

<p>Unless, of course, it takes 80% of the effort to work out exactly <em>which</em> 20% will achieve the desired effect. And it takes...</p>
]]>
    </description>
    <pubDate>Sun, 07 Jun 2009 08:26:42 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/pareto_recurse.asp</guid>
  </item>
<item>
  <title>Sometimes, The Better You Program, The Worse You Communicate.</title>
    <link>http://www.secretGeek.net/program_communicate_4reasons.asp</link>
    <description>
      <![CDATA[<p>The habits of a good programmer are not simply <em>orthogonal</em> to good communication practices -- frequently they are in direct opposition.</p>

	 <p>A couple of weeks ago I put out a twitter post I've been meaning to come back and explain:</p>
<blockquote><p>"the habits of a good programmer are not simply orthogonal to good communication -- frequently they're in direct opposition."</p>
<a href='http://twitter.com/secretGeek/status/1870937085'>http://twitter.com/secretGeek/status/1870937085</a>
</blockquote>


<p>This is a pretty startling and upsetting result: I'd like to think that the heart of good programming is crisp and direct communication. That all of my efforts to be better at programming will, somehow, make me a better all-round person. If only it were true.</p>

<p>Here's a bunch of ways that good programming practices are directly opposed to good communication practices.</p> 

<p>In bullet form:</p>
<ol>
<li>D.R.Y. Does Not Apply.</li>
<li>Humans don't mean what they say.</li>
<li>Compilers don't need to see an example.</li>
<li>Programs love definitions; Humans get flummoxed.</li>
</ol>
<p>And in detail:</p>

<h2>1. D.R.Y. Does Not Apply</h2>

<p>The golden rule of programming is D.R.Y. -- don't repeat yourself. This is the heart of effective programming. But this is the opposite of effective communication.</p>

<p>Let me say that again:</p>

<p>The golden rule of programming, DRY, is the opposite of effective communication. ;-)</p>

<p>Say everything once and only once -- go ahead -- then be amazed as everyone misses your point!</p>

<p>Humans are not machines. Memories made of this gooey, spongy stuff called a <strong>brain</strong> are nothing like memories made of silicon.</p>

<p>With Humans, nothing sinks in the first time. And furthermore, you may be surprised to hear that NOTHING sinks in the first time.</p>

 
<span style='float:right; background:black'><table><tr><td style='background:black'><img src='http://secretGeek.net/image/nietzche_cvh.jpg' alt='Human, All Too Human' style='float:right;border:1px solid #CCC;margin:10px;'  /><br /><center style='clear:right'><small style='color:#FFF'>
"Human, All Too Human"<br />
<br />
Nietzsche preferred the<br /> 
company of a good compiler <br />
over that of a human.<br />
<br />
"Compilers never make fun<br /> 
of one's moustache," <br />
--Ibid., pg 293.</small></center><br /></td></tr></table></span>

<h2>2. Humans don't mean what they say.</h2>

<p>Compilers are of course perfectly literal. They don't care at all what you mean, they are <em>always</em> hung up on precisely what you say.</p>

<p>Even if you didn't start off life as an anal-retentive git, you'll slowly gain the requisite faculties over years of trying to please a compiler.</p>

<p>The art of trying to please a compiler consists of the ability to logically, dispassionately, analyse what you've said, to discover and remove any mistake or ambiguity -- to always produce an output that is perfectly comprehensible to the strictest of master.</p> 

<p>Try being like that around real people. Just try it.</p>

<p>People are barely literal at all. If you take them literally when their meaning differs from their words -- they will get quite irate with you. They won't see that the mistake is theirs.</p>

<p>When the words they use differ from their intent, you may feel an overwhelming desire to 'correct' their mistake. You may even think you are doing them a favour.</p>

<p>This is a natural feeling, amongst programmers, who would be happily spared the torture of spending time trying to remove all ambiguity from the words they provide to a parser.</p>  

<p>But please (please) hold back. You might score a small point in the 'intelligence' column for pointing out their '<em>mistake</em>'. But you'll also score about a bajillion points in the '<em>what a freaking dork</em>' column.</p>


<h2>3. Programs don't need to see an example.</h2>

<p>Explain a function to a compiler, and it will be able to calculate the answer.</p>

<p>Explain a function to a human... and then give them an example, and draw them a picture, and give two counter examples, and draw another picture, plus provide an interpretive dance on the topic of functions -- and maybe, just maybe, if you've danced <em>very</em> nicely, they will begin to see "what you're trying to say."

<p>"What I'm <em>trying</em> to say?" I'm saying it damn clear! I'm saying it directly, concisely and with perfectly constructed phrases! I'm not <em>trying</em> to say anything! I'm succeeding, you're just not listening, you freaking imbecile!</p> 

<p>And don't take that tone with me. With humans I mean. There's no point yelling. Their rational mind shuts down, their sympathetic nervous system takes over. They get ready to fight or flee. Your point is lost when you get them angry.</p>  

<p>Computers don't mind if you type angry. Humans think the anger is more important than the words themselves.</p>

<p>When you have the customer in a headlock, knocking their face against the ground with every syllable: the syllables themselves are no longer of tremendous consequence.</p> 

<p>True: that bit about beating up the customer may <em>not</em> be a typical trait amongst great programmers. Perhaps I included it just for entertainment purposes. Continuing...</p>

<h2>4. Programs love definitions; Humans get flummoxed.</h2> 

<p>In programming we define new terms all day long. We define class names or function names or variable names.</p>

<p>We immediately attach a specific definition to them -- and then we use that definition throughout our code.</p> 

<p>I imagine that some part of the brain is associated with the ability to define a new term and then hold onto its definition. That part of the brain would be monstrous in programmers. Very over-developed. Gigantic -- a tiger amongst kittens.</p>

<p>But define a new term in front of an audience of non-programmers: watch as the eyes glaze over. Heads slump forward. They start planning their weekend.</p>

<p>Let's call this our Neologismic Synaptic Aptitude, or NSA. Actually: let's not call it our NSA, because if we do, then programmers will start bandying the terminology around like it's something we've known about all their life. And the normal people will just look at us with that '<em>freak</em>' expression, and we'll be even further from ever making it into the boardroom.</p>

<p>I think this aptitude for new terms is what makes TLA's so abundant in the IT world. I do hope you realise it scares everyone else.</p>  

<h2>So please, I implore you...</h2>

<p>Stop defining new terms. Stop expecting non-programmers to understand the specific and concrete definitions you attach to funny little abbreviations.</p>

<p>Stop striving for brevity and conciseness.</p>

<p>Stop correcting other people.</p>

<p>Stop expecting people to understand you first time around.</p> 

<p>Start giving examples -- real examples, earthy examples.</p> 

<p>Let people be people -- let them be vague and a little incorrect -- listen more for the gist of what they're saying than the exact terminology.</p>

<p>Be a compassionate speaker, a compassionate listener. Embrace the 'all too human' aspects of the strange bipeds you interact with.</p>

<p>Then drop me an email and please, for the love of god, tell me how you managed it.</p>

]]>
    </description>
    <pubDate>Fri, 05 Jun 2009 10:24:14 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/program_communicate_4reasons.asp</guid>
  </item>
<item>
  <title>A Non Warning, from Windows XP</title>
    <link>http://www.secretGeek.net/non_warning_warning.asp</link>
    <description>
      <![CDATA[<p>I feel sorry for the programmer who was forced, no doubt after endless emails, meetings, focus-groups and think-tanks to check this obscure non-warning warning message into the Windows source tree...</p>

<img src='http://secretGeek.net/image/non_warning.PNG' alt='Warning message after adding more RAM, at last' style='border:5px solid #CCC;margin:10px;'  />

<blockquote><p>"The amount of physical memory in your system has increased. This typically does NOT indicate a hardware failure. Contact your Help Desk if you did not personally change your system's physical memory configuration."</p></blockquote>

<p>Why didn't they say "Congratulations!" or "Good news" or "Ahhhh! thanks for feeding me those yummy ram chips!" or best of all:</p>

<blockquote><p>"Well, how about that! The tight bastards in IT must've approved that RAM upgrade request we noticed you writing in MS-Word, all those months ago.</p>

</p>"Now let's see if we can get the cowards to consider upgrading the browser to IE 7."</p></blockquote>

]]>
    </description>
    <pubDate>Fri, 05 Jun 2009 08:11:53 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/non_warning_warning.asp</guid>
  </item>
<item>
  <title>In the enterprise, nothing is what it seems</title>
    <link>http://www.secretGeek.net/enterprise_ghost.asp</link>
    <description>
      <![CDATA[<p>There is a hidden network of bloggers (all around you), a kind of secret brotherhood...</p>
<p>These are the 'ghost bloggers'.</p>
<p>'Ghost-blogging' is the practice of sharing true stories about your own working life, true stories too cutting, too poignant and too true to share on your own blog.</p>
<p>The following is an example of a ghost blog entry, sent to me by someone I know, appalled at some of the Kafkaesque behaviour they've been subjected to inside the kind of enterprise everyone should find familiar.</p>
<p>(I've ghost-blogged my own personal stories on other blogs, at times...)</p>
<p>Here goes...</p>

<span style='float:right; background:black'><table ><tr><td style='background:black'><img src='http://secretGeek.net/image/WizardLollipop_70.jpg' alt='Version Control, Requirements Tracking, Deployments' style='float:right;border:1px solid #CCC;margin:10px;'  /><br /><center style='clear:right'><small style='color:#FFF'>Version Control,<br />
 Requirements Tracking<br /> 
 and Deployments</small></center><br /></td></tr></table></span>


<h2>In the enterprise, nothing is what it seems</h2>
<blockquote>
<p>In the enterprise when they say: <em>"don't worry about that, another team will do that for us"</em> what they mean is: <em>"you just took on a dependency that you have no control over"</em>.</p>

<p>In the enterprise when they say <em>"we want you to re-use this standard asset"</em> what they mean is <em>"we want you to hold on to this gold-plated, diamond encrusted anchor while we throw you over the side"</em>.</p>

<p>In the enterprise, the group allegedly responsible for <em>'provisioning developer desktops'</em> will, in actual fact,  be the group who expends every effort imaginable to stop developers from being able to actually install developer tools onto their desktops.</p>

<p>In the enterprise when there are three separate groups, allegedly responsible for version control, requirements tracking and deployments, you'll find in practice the requirements are documented through excel spreadsheets over email, the source code won't build, and the deployments take everyone by surprise, including the deployment team.</p>

<p>In the enterprise when they talk about <em>'strategic direction'</em>, they mean <em>'strategy tax'</em>.</p>

<p>In the enterprise when they ask you to <em>"simply call a web service"</em>, what they mean is, <em>"use ftp to push a fixed-width file onto a queue that feeds the mainframe which routes another file to a web service that calls you back on a random port"</em>. <strong>With a completely straight face.</strong></p>
</blockquote>
<p style='clear:both'>&nbsp;</p>
 
]]>
    </description>
    <pubDate>Fri, 22 May 2009 12:29:33 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/enterprise_ghost.asp</guid>
  </item>
<item>
  <title>How to get a Free iPhone</title>
    <link>http://www.secretGeek.net/iphone_free.asp</link>
    <description>
      <![CDATA[ 
<p>Follow this simple three step guide to become a proud member of the awesome club of people who loudly proclaim:
<blockquote><p><em>"I too am cool! I too have an iphone!"</em></p></blockquote></p>

<img src='http://secretGeek.net/image/gmail_iphone_th.jpg' alt='Go to the settings area of your mail client' style='float:right;border:5px solid #CCC;margin:10px;'  />


<ol>
<li><p>Go to the settings area of the mail client you use on your regular PC</p></li>
<img src='http://secretGeek.net/image/gmail_iphone_3.png' alt='Sent from my iPhone' style='float:right;clear:right;border:5px solid #CCC;margin:10px;'  />

<li><p>Change your email signature to read 'Sent from my iPhone'</p></li>
<img src='http://secretGeek.net/image/gmail_iphone_3a.png' alt='Sent from my iPhone' style='float:right;clear:right;border:5px solid #CCC;margin:10px;'  />

<li><p>Send short, pointless emails to everyone you know</p></li>
</ol>
</p>
<p>Okay, you won't <em>technically</em> have an iPhone. But for the most part, other iPhone users will *want* to believe that you have joined their "team" -- hence, they will be convinced.</p>

<p>And -- as a final twist -- once you're thought to be a member of their team, you'll find that acquiring an actual free iPhone will be easy. Other iPhone owners will be more than happy to let you borrow one of their iPhones next time you see them, if you claim to have momentarily misplaced yours, for example in the pocket of "your other white leather trousers".</p>
<p><em><code>--lb<br />
Sent from my iPhone</code></em></p><br/>
<br style='clear:both'>]]>
    </description>
    <pubDate>Wed, 13 May 2009 11:23:25 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/iphone_free.asp</guid>
  </item>
<item>
  <title>10 Simple Rules To Follow In Case Your Software Becomes Self-Aware</title>
    <link>http://www.secretGeek.net/10_simple_rules_self_aware_software.asp</link>
    <description>
      <![CDATA[<img src='http://secretGeek.net/image/1_Electric_Dreams_02.jpg' alt='happy face' style='float:right;clear:right;border:5px solid #CCC;margin:10px;'  />
<p>Well, It turns out that the 80's geek classic, 'War Games' has inspired a sequel, the film <p><a href='http://www.imdb.com/title/tt0865957/'>'War Games: the dead code'</a> was released in 2008. Though, perhaps the correct term is 'foisted.'</p>

<p><strong>WG: TDC</strong> is such a deliberately bad film that you can only begin to enjoy it once you grok that it's a comedic satire.</p>

<p>For the first hour and a half I assumed it was trying to be a cool, teenage-targetted tech-savvy thriller, like the original. This had me wincing in agony at every bad line and predictable twist. Only then did I realize it was all a joke: a parody of the teenage-targetted tech-savvy thriller. A kind of 'scary-movie' style satire of the entire genre. Hopefully?</p>

<p>Well, I've just finished watching it and it's inspired me to share a few helpful tips for up and coming programmers.</p>  

<p>As one of today's young parents, I can tell you what concerns us. Not swine flu, or global economic disasters and so forth. What really keeps us terrified at night is a desperate hope that we, as parents, take all of the right steps to ensure that our sons and daughters grow up to be thoughtful, well-meaning, much loved people. In short: How Can We Be Certain Our Children Will Become Programmers.</p>

<p>And a lot of hard work (err, blog posts) have gone into that endeavour, but as usual I like to look beyond the obvious problem, and into the deeper realms or possibility:</p>

<p>If you're child does (thank god!) grow up to be a Programmer -- what simple lessons can you provide to ensure they don't inadvertently destroy the planet?</p>

<p>Programming is a powerful profession, and as you well know, global apocalypse is but a keystroke away. We want to give our kids the right tips to ward off such misadventures -- to learn from our wisdom, as it were.</p> 
<p>Fortunately, like all global catastrophes, this one can be averted with another 3 minute guide from secretGeek.</p>

<p>Please, sit back, breath a deep sigh of relief for the salvation of your measly planet, and drink deep of this crucial lesson to imprint upon your younglings:</p>

<h2>10 Simple Rules To Follow Incase Your Software Becomes Self-Aware</h2>

<p>(I have included links to information about Government-Approved documentary films on each of these points. I only pray you heed my warnings and enforce these lessons before we are all <em>routinely</em> destroyed.)</p>

<ol>

<img src='http://secretGeek.net/image/1_wargames.jpg' alt='war games' style='float:right;clear:right;border:5px solid #CCC;margin:10px;'  />
<li>Teach your software that war is futile.
<p>If, after pre-supposing a minimal competency level in your opponent, a game's inevitable state upon termination is mutually-assured destruction, then the only winning move is not to play.</p>
<p><a href='http://www.imdb.com/title/tt0086567/' title='war games'>[reference]</a></p>
</li>




<li>Prepare a virus that can be used to remotely shut down the program from any terminal in the world.
<p>My personal contiuous integration suite won't let me commit any code until I can demonstrate 100% code-coverage with remote-shutdown killer viruses.</p>
<p><a href='http://www.imdb.com/title/tt0113957/' title='the net'>[reference]</a></p>
</li>


<img src='http://secretGeek.net/image/1_hal-reads-lips.jpg' alt='hal readin some lips' style='float:right;clear:right;border:5px solid #CCC;margin:10px;'  /> 
<li>Don't discuss switching off the computer if you are, in fact, being observed by the computer.
<p>This is s.o.p. (...that's standard operating practice, if you're not a super-spy type like me, who knows all the jargon). Never discuss shutting down your software until you have found a locked, sound-proof chamber, where the computer system cannot hear your discussion. Also, in case there is a remote possibility that your software has learnt to read lips, let me suggest you cover your mouth.</p><p> Simple, every day precautions.</p>
<p>[side note: a parody of this famous Kubrick scene was included in 'the dead code'. nice.]</p>
<p><a href='http://www.imdb.com/title/tt0062622/' title='2001 a space odyssey'>[reference]</a></p>
</li>


<img src='http://secretGeek.net/image/deep_thought.jpg' alt='deep thought deep in, well, thought' style='float:right;clear:right;border:5px solid #CCC;margin:10px;'  />
<li>Ensure that when faced with a tricky question, your software will either breakdown completely, or devote all of its resources for a long time.</li>
<p>Grandiose, open-ended philosophical questions tend to have a compute time in the order of millions of years.</p>
<p>Similarly, when given a dilemma (e.g. "This sentence contains a lie") a self-aware program will tend to explode spectacularly. A competent programmer will keep a few of these handy.</p>
<p><a href='http://www.imdb.com/title/tt0081874/'  title='HHGG'>[reference 1]</a></p>
<p><a href='http://www.imdb.com/title/tt0371724/'  title='H2G2'>[reference 2]</a></p>

 
<img src='http://secretGeek.net/image/1_termi.jpg' alt='angry bots' style='float:right;clear:right;border:5px solid #CCC;margin:10px;'  />
<li>In case of emergency, have time machine handy.
<p>You may need to send someone back in time to protect the mother of the person who leads the rebellion against the self-aware software in the future.</p></li>
<p><a href='http://www.imdb.com/title/tt0103064/' title='T2'>[reference]</a></p>




<img src='http://secretGeek.net/image/1_bladerunner_pris.jpg' alt='blade runner (do robots dream of electric sheep) -- pris' style='float:right;clear:right;border:5px solid #CCC;margin:10px;'  />
<li>Don't make your self-aware machine indistinguishable from a human.<br />
<p>Maybe you're not very creative, and don't have the time to give your machine a stunningly inventive new exterior. So you fall into the tired old pattern of mimicking the human body.</p>
<p>That way, badness lies.</p>


<p><a href='http://www.imdb.com/title/tt0083658/'  title='blade runner'>[reference]</a></p>
</li>


<img src='http://secretGeek.net/image/1_demonseedexamine.jpg' alt='demon seed freaked me out when i saw it as a child' style='float:right;clear:right;border:5px solid #CCC;margin:10px;'  />
<li>Should your software become self-aware, don't let it near your girl.
<p>Fairly self-evident that one.</p>
<p><a href='http://www.imdb.com/title/tt0087197/' title='electric dreams'>[reference 1]</a></p>
<p><a href='http://www.imdb.com/title/tt0075931/' title='demon seed'>[reference 2]</a></p>
</li>



<img src='http://secretGeek.net/image/1_edward.jpg' alt='scissor hands' style='float:right;clear:right;border:5px solid #CCC;margin:10px;'  />
<li>If applying temporary appendages to a self-aware robot, be considerate of your legislation governing public safety.
<p>Scissors for example, are not recommended, even if they are 'just for now'.</p>	 
<p><a href='http://us.imdb.com/title/tt0103064/' title='edward scissorhands'>[reference]</a></p>
</li>


<img src='http://secretGeek.net/image/1_frankenstein460.jpg' alt='badly chosen picture best i could find' style='float:right;clear:right;border:5px solid #CCC;margin:10px;'  />
<li>Be safety conscious.
<p>Switch off all electrical equipment during thunder storms.</p>
	 <p><a href='http://www.imdb.com/title/tt0072431/'  title='young frankenstein'>[reference]</a></p>
</li>





<img src='http://secretGeek.net/image/1_I.Robot.jpg' alt='3 clear rules' style='float:right;clear:right;border:5px solid #CCC;margin:10px;' />
<li>Use a rules engine.
<p>Hardwire 3 clear and unambiguous rules into the program's positronic brain that will ensure all humans are safe from harm.</p>
	 <p><a href='http://us.imdb.com/title/tt0103064/'  title='i, robot'>[reference]</a></p>
</li>

	 
	 
</ol>




<p>Hopefully, if you follow my advice, we can avoid any more major disasters. But please: always be nice to your inventions. Hopefully then, should the unthinkable happen, your self-aware creations will take pity on us and keep us barely alive in liquid chambers so they can gorge on our brains.<a href='http://www.imdb.com/title/tt0133093/' title='the matrix'>[reference]</a></p>


  
<p>Oh, and if you don't believe in self-aware robots... (cough cough) <a href='http://www.ted.com/index.php/talks/hod_lipson_builds_self_aware_robots.html'>here's some i prepared earlier.</a></p>

<p>See also (important information in similar vein)</p>

<ul>
<li><a href='http://www.vibrant.com/blog/servers-in-the-movies-our-top-ten/'>server in the movies</a></li>
<li><a href='http://www.cthreepo.com/cliche/'>The Grand List of Overused Science Fiction Cliches</a></li>
<li><a href='http://blogs.westword.com/latestword/2008/12/some_thoughts_on_the_coming_ro.php'>Some thoughts on the coming Robot Apocalypse</a></li>
<li><a href='http://blogs.westword.com/latestword/2008/12/pure_evil_the_most_eveil_robot.php'>Pure Evil: The 12 most evil robots of all time and how to thwart them</a></li>
</ul>

]]>
    </description>
    <pubDate>Fri, 08 May 2009 08:44:49 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/10_simple_rules_self_aware_software.asp</guid>
  </item>
<item>
  <title>Your next text editor is... MetaNote!</title>
    <link>http://www.secretGeek.net/metanote_1.asp</link>
    <description>
      <![CDATA[<span style='float:right; clear:right;background:white;border:1px solid #888;margin:8px'><table ><tr>
<td style='background:white'>
<img src='http://secretGeek.net/image/metanote_1_.png' alt='two toolbar buttons titled Lower and Upper.' style='float:right;'  />
<br />
<center>
<small style='color:#008'>Example: two toolbar buttons<br />titled 'Lower' and 'Upper'.</small></center><br /></td></tr></table></span>


<span style='float:right; clear:right;background:white;border:1px solid #888;margin:8px'><table ><tr>
<td style='background:white'>
<img src='http://secretGeek.net/image/metanote_2_.png' alt='two toolbar buttons titled Lower and Upper.' style='float:right;'  />
<br />
<center>
<small style='color:#008'>Right click the toolbar to edit a button<br />(or add a new one)</small></center><br /></td></tr></table></span>


<span style='float:right; clear:right;background:white;border:1px solid #888;margin:8px'><table ><tr>
<td style='background:white'>
<img src='http://secretGeek.net/image/metanote_3_.png' alt='two toolbar buttons titled Lower and Upper.' style='float:right;'  />
<br />
<center style='clear:right'>
<small style='color:#008'>The button hosts a python macro that does whatever you want. (The current<br /> document's main textbox is exposed as <code>txt</code>.)</small></center><br /></td></tr></table></span>



<span style='float:right;clear:right; background:white;border:1px solid #888;margin:8px'><table ><tr>
<td style='background:white'>
<img src='http://secretGeek.net/image/metanote_4_.png' alt='two toolbar buttons titled Lower and Upper.' style='float:right;'  />
<br />
<center style='clear:right'>
<small style='color:#008'>Add more buttons, edit the menus... <br />everything's extenisble... everything.</small></center><br /></td></tr></table></span>


<p>I've <a href='http://code.google.com/p/metanote/source/browse/#svn/trunk/MetaNote'>open-sourced</a> a side project of mine, <a href='http://code.google.com/p/metanote/'>MetaNote</a>.</p>
<p>Here's the gist of it...</p>
<p>MetaNote is a text editor. Ultimately, MetaNote intends to be the most versatile editor imaginable.</p>
<p>See that button in the toolbar? Right click on it, and edit the code behind it.</p>
<p>Don't like the way 'Find' works? -- right click on it, and edit the code.</p>
<p>Need a new button in the toolbar? So add it already, with a single click.</p>
<p>Share packs of extensions and macros with other users.</p>
<p>Everything in MetaNote is under your control, effortlessly, at runtime.</p>
<p>It's easier to show than to describe -- maybe the pictures on the right give you the idea.</p>
<p>The <a href='http://code.google.com/p/metanote/source/browse/#svn/trunk/MetaNote'>source code is available to browse or download.</a> This is very much pre-alpha. It is explorative and non-commercial.</p>
<p><a href='http://code.google.com/p/metanote/downloads/list'>binaries are also available to download.</a></p>
<p>The project is written in C#, and I need <strong>your</strong> help getting it done.</p> 
<p>I've got many of the basics done, but I'm only at the tip of what's needed.</p>
<p><strong>I'm looking for clever kids like you, willing to help out.</strong></p>
<p>What do you think? Can you take a look at the code, and lend your fellow programmer a few minutes of your time?</p>
<img src='http://secretGeek.net/image/this_feature_needs_you.jpg' alt='this feature needs you!' style='border:5px solid #CCC;margin:10px;'  />
<p>I'm not doing it for any commercial gain, i just want a text editor that I can bend to the whims of whatever writing task I come across.
<p>There's a great many features still in need of implementing, and already there are wrong turns to be corrected.</p>
<p>Down the track I really want to find some way to embed the <a href='http://www.hanselman.com/blog/HanselminutesPodcast147TheNewWPFbasedTextEditorInVisualStudio2010InterviewWithADev.aspx'>WPF-based Text Editor Control from VS2010</a>. It's the same one used in intellipad (part of Oslo) and in <a href='http://www.microsoft.com/downloads/details.aspx?FamilyID=c913aeab-d7b4-4bb1-a958-ee6d7fe307bc&displaylang=en'>Powershell 2.0's</a> (awesome) Integrated Scripting Environment -- I didn't have any success bringing it to life just yet. So, for now the text is plain text, and features like syntax highlighting and intellisense will have to wait.</p>  
<p><a href='http://www.i-think22.net/'>One of my mentors</a> tells me the smart approach would be to bring in <a href='http://code.msdn.microsoft.com/mef'>MEF</a> for giving a really powerful plugin model, where plugins can have plugins and so on.</p>
<p>The intermediate goal though, is just to make the tool sweet enough that I'd use it for my own day to day text editing needs.</p> 
<p>And one day, hopefully one day soon, this thing won't suck at all.</p>
 
]]>
    </description>
    <pubDate>Sun, 19 Apr 2009 11:21:32 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/metanote_1.asp</guid>
  </item>
<item>
  <title>Further proof that testing is for wimps and bad programmers</title>
    <link>http://www.secretGeek.net/testing_is_for_wimps.asp</link>
    <description>
      <![CDATA[ 
<img src='http://secretGeek.net/image/escape_csv_function.png' alt='Escape Csv' style='float:right;border:5px solid #CCC;margin:10px;'  />

<p>Couple of days ago I wrote a C# function for a colleague and emailed it to him.</p>

<p>This is the function:</p>

<blockquote><code>
        private static string EscapeCsv(string <font color='blue'>value</font>)<br />
        <font color='gray'>{</font><br />
        &nbsp;&nbsp;<font color='gray'>//</font><font color='blue'>Double</font> <font color='gray'>all</font> quote characters<br />
        &nbsp;&nbsp;<font color='blue'>value</font> = <font color='blue'>value</font>.<font color='magenta'>Replace</font>("\"", "\"\"");<br />
<br />
            &nbsp;&nbsp;//If it contains a comma or a quote char -- qualify it with quotes.<br />
            &nbsp;&nbsp;if (value.IndexOf('"<font color='red'>') > -1 || value.IndexOf('<font color='gray'>,</font>') > -1)<br />
            &nbsp;&nbsp;{<br />
            &nbsp;&nbsp;&nbsp;&nbsp;value = "\"" + value + "\"";<br />
            &nbsp;&nbsp;}<br />
<br />
            &nbsp;&nbsp;return value;<br />
        }</font><br />
<br />
</code></blockquote>
<br />

<p>The syntax highlighting looks very strange, because I wrote it in sql server management studio. It just happened that the only text editor i had open at the time was SQL server, so that's what i used.</p>

<p>(Real developers don't use any particular editor - they just use whatever's open at the time. Even the act of opening notepad is too cumbersome for the ubergeek.)</p>
 
<p>After I emailed it to my colleague I had a moment of weakness, when I suffered the tiniest smidgen of self doubt.</p>

<blockquote> 
<p>"<em>Perhaps I should've tested the code in some way.</em> Or -- at least -- compiled it?"</p>
</blockquote>

<p><a href='http://blog.scottbellware.com/'>Scott Bellware</a> and the cool <a href='http://laribee.com/blog/2007/04/10/altnet/'>alt.net</a> <a href='http://codebetter.com/'>kids</a> are always <a href='http://www.hanselman.com/blog/HanselminutesPodcast146TestDrivenDevelopmentIsDesignTheLastWordOnTDD.aspx'>banging on</a> about this sort of stuff, so I wrote an awesome console app to test it.</p>

<blockquote><code>
namespace tests_are_for_wusses<br />
{<br />
    &nbsp;&nbsp;class Program<br />
    &nbsp;&nbsp;{<br />
        &nbsp;&nbsp;&nbsp;&nbsp;static void Main(string[] args)<br />
        &nbsp;&nbsp;&nbsp;&nbsp;{<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Console.WriteLine(EscapeCsv("fred") == "fred");<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Console.WriteLine(EscapeCsv("fre,d") == "\"fre,d\"");<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Console.WriteLine(EscapeCsv("fre\"d") == "\"fre\"\"d\"");<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Console.ReadLine();<br />
        &nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
        &nbsp;&nbsp;&nbsp;&nbsp;private static string EscapeCsv(string value)<br />
        &nbsp;&nbsp;&nbsp;&nbsp;{<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Double all quote characters<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value = value.Replace("\"", "\"\"");<br />
<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//If it contains a comma or a quote char -- qualify it with quotes.<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (value.IndexOf('"') > -1 || value.IndexOf(',') > -1)<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value = "\"" + value + "\"";<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return value;<br />
        &nbsp;&nbsp;&nbsp;&nbsp;}<br />
    &nbsp;&nbsp;}<br />
}<br />
</code></blockquote>

<p>Naturally, the awesome code passed my awesome tests first go.</p>

<p>Thus I have once again shown that <strong>testing is a waste of time</strong> if you are awesome like me.</p>

<p>And the so-called cool kids from alt.net are just bad programmers.</p>

<p>Thank you.</p>

<p>Wait a second... I still feel I'm missing the point. Care to enlighten me?</p>

<p>(By the way -- pretty much every sentence in this post was sarcastic... while the story is true, my real interpretation is that i just got lucky this time. There's definitely some bugs still hidden even in a simple function like this)</p> 

]]>
    </description>
    <pubDate>Sat, 18 Apr 2009 10:21:54 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/testing_is_for_wimps.asp</guid>
  </item>
<item>
  <title>Drowning in things to do</title>
    <link>http://www.secretGeek.net/drowning_ttd.asp</link>
    <description>
      <![CDATA[<p>The heart of a good '<a href='http://en.wikipedia.org/wiki/Getting_Things_Done'>Getting Things Done</a>' process is to have a <strong><em>S</em></strong>ingle trusted system where you capture your tasks.</p>
<p>I guess I'm Doing It Wrong :-(. Here's all the places where I distribute my todo list...</p> 
<ul><li>In my current <a href='http://www.moleskine.com/'>moleskine</a> (pronounce it with me -- Moh-leh-skeen-ah) on pages 9, 12, 31, 57 etc.</li>
<li>in my phone</li>
<li>in outlook (at work)</li>
<li>in my code using <code>//TODO:</code> tags (scattered over numerous projects)</li>
<li>in my code using <code>NotImplementedException</code>s.</li>
<li>in timesnapper's hosted fogbugz account</li>
<li>in <a href='http://TimeSnapper.com/NextAction/'>'nextaction'</a> on my work pc</li>
<li>in <a href='http://TimeSnapper.com/NextAction/'>'nextaction'</a> on my home pc</li>
<li>in <a href='http://TimeSnapper.com/NextAction/'>'nextaction'</a> on my laptop</li>
<li>in my gmail account (emails labelled 'todo')</li>
<li>in my gmail account (emails marked with a star)</li>
<li>in my gmail account (any emails from me)</li>
<li>in my <em>other</em> moleskine, beside the bed</li>
</ul>

<p>Still, I think i'm pretty good because I do actually tend to 'get things done'. But also because i resist keeping lists in all these other places:</p>

<ul>
<li>in iGoogle</li>
<li>in sharepoint (at work)</li>
<li>in my gmail account (using the Gmail Tasks plugin)</li>
<li>on pieces of paper on my cubicle wall</li>
<li>in my other notebooks</li>
<li>in <a href='http://TimeSnapper.com'>timesnapper</a> using flags/tasks/notes
<li>in yet another <a href='http://ginatrapani.github.com/todo.txt-cli/'>todo.txt</a> file</li>
<li>on sticky notes randomly decorating places I inhabit</li>
<li>in <a href='http://twitter.com/secretGeek'>twitter</a></li>
<li>in <a href='http://www.tadalist.com/'>tada list</a></li>
<li>in that surprisingly popular <a href='http://www.codeproject.com/KB/applications/todolist2.aspx'>codeproject todo list</a></li> 
<li>in <a href='http://www.rememberthemilk.com/'>remember the milk</a></li>
<li>in a <a href='http://www.tiddlywiki.com/'>tiddly wiki</a></li>
<li>in the iphone i don't have</li>
<li>in the PDA i don't have</li>
<li>in chandler</li>
<li>at <a href='http://trimpath.com/demos/nextaction_static1/nextaction.htm'>trimpath 'next action'</a> web site</li> 
<li>on my blog</li>
<li>using tattoos (memento style)</li>
<li>in google calendar</li>

</ul>

<p>There's no shortage of places to keep your things to do.</p>
<p>I don't worry about having too many systems. A bigger fear is failing to capture a problem as it arises.</p>
<p>You frequently get just one chance to capture an idea, so I capture it anywhere I can.</p>
 
]]>
    </description>
    <pubDate>Sat, 18 Apr 2009 09:07:26 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/drowning_ttd.asp</guid>
  </item>
<item>
  <title>Small Moments in Software Philosophy</title>
    <link>http://www.secretGeek.net/sophilos101.asp</link>
    <description>
      <![CDATA[ 
<p>I've been using my tiny slice of computer time to write software lately, and haven't spared any cycles for writing articles. In lieu of that, here's a series of lost notes to accompany some of <a href='http://twitter.com/secretGeek'>my recent twitter outburts</a>.</p>   

<h2>Abstractions should be as high-level as possible, and no higher. <a href='http://twitter.com/secretGeek/status/1456309825'>#</a></h2>
<p>
Einstein of course <a href='http://www.quotedb.com/quotes/1360'>said</a>,
<blockquote><p>"Make everything as simple as possible, but no simpler."</p></blockquote>
<p>... and that's a kind of programming mantra, as so often in our race to simplify we end up over-simplifying. (The famous 'Worse Is Better' philosophy could be phrased as an argument that sometimes you should actually sacrifice correctness for the sake of the simplicity -- i.e. 'Einstein was wrong.')
<p>In a similar vein, I think there there is such a thing as 'too abstract'. And it is a terrible thing.</p>
<h2>Pre-emptive Abstraction is at least as bad as Premature Optimization <a href='http://twitter.com/secretGeek/status/1472231830'>#</a></h2>
<ul>
<li>If your class name contains the word "Abstract" -- you're doing it wrong.</li>
<li>If ClassName.Contains("FactoryFactory") -- you're doing it wrong.</li>
<li>If Your ClassName Ends With "BaseBase"  -- you're doing it wrong.</li>
<li>If ClassName.Contains("Factory") &amp;&amp; ClassName.Contains("Provider") -- you're doing it wrong.</li>
</ul>  
<h2>Economists re-evaluate bird in hand as 1.9 times bird in bush.
<a href='http://twitter.com/secretGeek/status/1444928099'>#</a></h2>
<p>A more appropriate tweet might've been:
<p>'Economists write down bird in bush to 0.45 times bird in hand.'</p>
<p>Or:</p>
<p>'Government provides 8 trillion birds-in-hand to replace 16 trillion birds lost in bush.'</p>  
<p>Someone (I think that cockroach poet <a href='http://en.wikipedia.org/wiki/Archy_and_mehitabel'>Archy</a>) once called humanity something like "a strange species of bipeds who cannot run fast enough to collect the money which they owe themselves."</p>
<h2>i am *not* homophobic. Infact, some of my best friends have iPhones.
<a href='http://twitter.com/secretGeek/status/1440901101'>#</a></h2>

<p>And I'm still waiting to see them make the millions of dollars from iPhone apps that they promised themselves last year.</p> 

<h2>If a job's not worth doing, it's not worth doing properly
<a href='http://twitter.com/secretGeek/status/1423867692'>#</a></h2>

<p>The original statement: "If a job's worth doing, it's worth doing properly" has the corollary that any job that is not worth doing properly is therefore not worth doing at all.</p>
<p>This is patently absurb and a kind of shining example of why perfectionism doesn't pay.</p>
<p>The slightly twisted variation:   
<blockquote><p>If a job's not worth doing, it's not worth doing properly</p></blockquote>
<p>...may seem defeatist and sloppy -- but i think it's the very soul of true productivity.</p>

<h2>That's what no one seems to appreciate about being rich: the first 100 bazillion is the hardest.
<a href='http://twitter.com/secretGeek/status/1417006514'>#</a></h2>

<p>After that, you can just sit back and live off the interest of the interest.</p>

<h2>And your next code editor is... a browser.
<a href='http://twitter.com/secretGeek/status/1412200850'>#</a></h2>
<p>I still think <a href='http://secretgeek.net/web_based_ide.asp'>it's true</a> -- and once i get a bunch of other things out of my todo pile -- i'm going to make it happen. Maybe.</p>

<p>Meanwhile I'm working on <a href='http://TimeSnapper.com'>TimeSnapper</a> v.Next, and tinkering on something tentatively called <a href='http://code.google.com/p/metanote/'>MetaNote</a> -- about which you'll be hearing more.</p> 


]]>
    </description>
    <pubDate>Wed, 08 Apr 2009 09:47:36 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/sophilos101.asp</guid>
  </item>
<item>
  <title>Differentiating between environments within SQL Server Management Studio</title>
    <link>http://www.secretGeek.net/sql_red_production.asp</link>
    <description>
      <![CDATA[<img src='http://secretGeek.net/image/drop_production.png' alt='you are about to execute a DROP statement in production, OK or Cancel?' style='float:right;border:5px solid #CCC;margin:10px;'  />

<p>When you're looking at a query window that's connected to <font color='red'>Production</font>, it would be nice if it was visually distinct from a non-production environment.</p>

<p>For example, there could be a <font color='red'>red</font> theme applied to the window.</p>
 
<p>Furthermore, there could be a warning before a potentially destructive query is executed. (Essentially, any query that isn't just a select - for example, a drop, delete, update, insert, create or alter)</p>

 
<p>This would be an effective way to lower the chance of something being done to production that was intended for another environment (pre-prod say, or development)</p>

<p>I can imagine a straw-man counter-argument to this concept that says:</p>
 
<blockquote><p>"The only people who should have access to production are people who know what they're doing"</p></blockquote>

<p>Or alternatively,</p>

<blockquote><p>"Developers shouldn't have access to production"</p></blockquote>

<p>And that's fine by me.</p>

<p>We can limit who accesses production, and we can give minimum privileges to those that do have access.</p>
 
<p>But even then:</p>

<p><strong>*Someone*</strong> will have destructive privileges in production.</p>

<p>And that person will definitely have access to more than one system.</p>

<p>And that person, no matter how smart or conscientious they are, <em>will</em> be fallible.</p>

<p>Hence, it's helpful for that person to be able to differentiate (visually) between the different environments.</p>

<p>Why am I writing this blog entry right now?</p>

<p>Don't worry. I stopped myself in time ;-)</p>

<p><small>(And like all blog posts everywhere, there is already <a href='http://stackoverflow.com/questions/168486/whats-your-1-way-to-be-careful-with-a-live-database'>a stackoverflow question that says the same thing and a whole lot more</a>)</small></p>  

]]>
    </description>
    <pubDate>Mon, 23 Mar 2009 07:28:26 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/sql_red_production.asp</guid>
  </item>
<item>
  <title>My code would suck less if...</title>
    <link>http://www.secretGeek.net/cruel_compiler.asp</link>
    <description>
      <![CDATA[ 
<p>My code would suck less if the C# compiler raised an error anytime it detected the following:
 
<ul><li>A button with no click handler.</li>
<li>A click handler with no code.</li>
<li>A parameter that is not used.</li>
<li>Code that throws A '<code>NotImplementedException</code>'</li>
<li>A <code>//TODO:</code> token.</li>
<li>An <code>#if DEBUG</code></li>
<li>A phrase that contains more than one dot, e.g. <code>Control.Parent.Parent.Parent.Controls[3].Controls["Accept"]</code></li>
</ul></p>

<p>Q: Why do I want the compiler to be so mean?</p>
<p>A: It takes a tough man to make a tender chicken.</p>
<p>(attributed to <a href='http://money.cnn.com/2005/04/01/news/newsmakers/perdue/'>Purdue</a>, quoted in <a href='http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.50.6083'>'Worse Is Better'</a>)</p>
<p>No, the common thread here is these are pitfalls common to a top-down, (or an outside-in) design approach.</p>
<p>As you move top-down, (or from front to back), you throw off "branches" -- kind of last strands -- that you need to back-track to complete later. I want the compiler to help me find those branches. (Tests are a poor substitute)</p>
<p>In his 2005 classic '<a href='http://www.charlespetzold.com/etc/DoesVisualStudioRotTheMind.html'>Does Visual Studio Rot the Mind?</a>' Charles Petzold showed how intellisense-and-friends encourage bottom-up programming.</p>
<p>These are some little features that could help out the die hard top-down coders.</p>

<p>Details...</p>
 
<img src='http://secretGeek.net/image/push_nothing.gif' alt="The Really Big Button That Doesn't Do Anything (Don't let this happen to you!)" style='float:right;border:5px solid #CCC;margin:10px;'  />

<h2>"A button with no click handler"</h2>

<p>Why does a button exist? Is it just to look good?</p>
<p>No! Buttons are for clicking!</p>
<p>A button with no click handler is a fail.</p>
<p>And a click handler with no code is a fail as well.</p>
<p>What does the user expect when you click a button?</p>
<p>Unless this is that Early Internet Phenomenom known as <a href='http://www.pixelscapes.com/spatulacity/button.htm'>The Really Big Button That Doesn't Do Anything</a>, a user expects *something* from a button.</p>
<p>Why would you check that in? What good can possible come from letting do-nothing buttons end up in the hands of unsuspecting users?</p>
<p>The world of static code analysis has gone very far - but does it stop and help us avoid this sort of psychological torture?</p>
<p>(This same concept may be true for many other objects that raise events. The object's author might be able to indicate "There's really no point using this thing unless you handle the following event(s).")  

<h2>A parameter that is not used.</h2>
 
<p>Unused variables raise a warning, but unused parameters don't.</p>

<p>This is a little bit good, but it's a little bit bad as well.</p>

<p>Here's an example where the unused parameter is clearly a bug:</p>
 
<blockquote><pre>
    private void CopyFile(string sourcefileName,
                        string targetFileName,
                        bool overwrite)
    {
        System.IO.File.Copy(sourcefileName, targetFileName);
    }
</pre></blockquote>
 
<p>Oops!</p>
<p>The programmer forgot all about the 'overwrite' parameter!</p>

<p>I consider that a pretty clear error.</p>

<p>But consider our click handler for a moment:</p>

<blockquote><pre>
    private void Button1_Click(object sender, EventArgs e)
    {
        MessageBox.Show("Hello");
    }
</pre></blockquote>
 
<p>Neither parameter is used.  But if we were to call this an error, a hell of a lot of code that's shipping today would fail.</p>

<p>Some design changes could alleviate the dilemma - I'll leave the consideration of possible solutions as an exercise for the interested reader. The goal is to avoid busy work, not create it.</p>

<h2>Code that throws A '<code>NotImplementedException</code>', and <code>//TODO:</code> token, <code>#if DEBUG</code> conditions and everyone from <code>System.Diagnostics.Debug</code></h2>

<p><em>Not Implemented Exceptions</em> are excellent stuff.</p>

<p>But your goal is always to eradicate them, right? They're a kind of hardcoded place holder. A warning ought to suffice. (You treat warnings as errors, most of the time, right?)</p>

<p>I put <code>//TODO:</code> tokens and <code>#if DEBUG</code> conditions in the same category. They're very handy scaffolding or place holders as you crank out your code -- but they're not supposed to remain indefinitely. A warning would be nice. Maybe <code>Debug.WriteLine</code> and its friends should fall into the same category.</p>


<h2>A phrase that contains more than one dot, e.g. <code>Control.Parent.Parent.Parent.Controls[3].Controls["Accept"]</code></h2>

<p>Why would a compiler let you get away with this kind of monstrosity?</p>
<p>It would be quicker to just replace that whole line with "<code>throw new NullReferenceException()</code>". The effect would be the same.</p>
<p>My point here is that this kind of implementation of the <a href='http://msmvps.com/blogs/peterritchie/archive/2009/01/27/house-of-cards-design-anti-pattern.aspx'>house of cards anti-pattern</a> is  easy for static analysis tools to pick up.</p>


<hr />


<p>I know that there are existing static analysis and code grepping tools that can be used for some of these cases, but they tend to run 'after the fact', outside the tight code-compile loop. Worse: they tend to produce a lot of noise and take a lot of care and feeding.
<p> StyleCop is the worst 'busy work' generator I've seen. (If only they'd finished the job and had it auto-correct many of the problems it finds... instead, like '100% code coverage' it's a kind of training tool for Coder's OCD.)
 
<p>Alrighty -- that's all I've got for now, though if I keep my eyes open, I bet I'll spot some more.</p>

]]>
    </description>
    <pubDate>Thu, 19 Mar 2009 10:30:32 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/cruel_compiler.asp</guid>
  </item>
<item>
  <title>"Architect" is a swear word.</title>
    <link>http://www.secretGeek.net/define_architect.asp</link>
    <description>
      <![CDATA[ 
<p>Ah! that's it!</p>

<p>I've often wondered what people really mean when they said 'Architect' while talking about software.</p> 

<p>None of the literal meanings seem to capture the way the word itself is applied in this context. But I think I've hit the thing on the noggin at last.</p>

<p>A 'swear word' is a word whose literal meaning differs wildly from its contextual intent -- and whose intent can be bent to suit a great many contexts.</p> 

<p>Take 'F---', for example. The word has a literal meaning, something like 'To copulate vigorously' -- but in actual use, the intent is generally bent to suit the context.</p>

<p>For example, when I hit my thumb with a hammer I say "F---!" and in that context the meaning is: "It hurts a lot when I hit my thumb with a hammer."</p>

<p>Or, when I get a flat tyre I say "F---!" and it means, "This flat tyre is an unexpected interruption to my day that will cause undue expense and wasteful exertion." The quickest way to say all that is simply "F---!".</p>

<p>Now imagine there is a guy in your organisation whose coding skills are terribly out of date, but who is not capable of performing any managerial duties. </p>

<p>If someone asks you, "Who is that guy?" then you probably won't waste your breath by saying, "Him? A guy whose coding skills are terribly out of date, but who is not capable of performing any managerial duties." Instead you'll permit yourself to emit a nasty little swear word and simply say, "Him? Architect." Ouch!</p>

<p>Now, just say you work with an impractical fool with an over-inflated sense of self-importance who destroys whatever thing he touches, never ceasing to bring layers of accidental complexity to even the simplest of contrivances, but who is, thankfully, kept out of harm's way by being assigned the task of writing grandiose-titled corporate documents that no one is ever expected to read. When someone asks you who that guy is, you draw your breath in deep, and prepare to say:</p>

<p>"Him? An impractical fool with an over-inflated sense of self-importance who destroys whatever thing he touches, never ceasing to bring layers of accidental complexity to even the simplest of contrivances, but who is, thankfully, kept out of harm's way by being assigned the task of writing grandiose-titled corporate documents that no one is ever expected to read." So, again, you'd just curse and say "Him? Architect?"</p>

]]>
    </description>
    <pubDate>Wed, 18 Mar 2009 19:16:13 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/define_architect.asp</guid>
  </item>
<item>
  <title>Plugins! Plugins! Plugins! It must be TimeSnapper 3.4</title>
    <link>http://www.secretGeek.net/ts_34_plugins.asp</link>
    <description>
      <![CDATA[<img src='http://secretGeek.net/image/animated_gif_menu_item.png' alt='' style='float:right;border:5px solid #CCC;margin:10px;'  />


<p><a href='http://timesnapper.com/releasenotes.aspx'>TimeSnapper version 3.4</a> went live a few days ago!</p>
<p>It can now run from a USB key, and is prettier in a few ways.</p>
<p>But the main feature is the new <a href='http://TimeSnapper.com/pluginhowto.aspx'>plugin model</a> which lets you extend TimeSnapper with your own features.</p>


<div style='margin-right:25px;'><a href='http://TimeSnapper.com'><div style="height:72px;width:220px;cursor:hand;cursor:pointer;padding-left:67px;padding-top:25px;font-weight:bold;font-size:1.2em;margin-left:10px;text-decoration:underline;background:url(http://secretGeek.net/image/timeclassic_.png) no-repeat;">TimeSnapper<sub style="font-weight:normal;font-size:0.85em;display:block;">down to $24.95!</sub></div></a></div>



<p>The plugin model has been there for quite some time, but we've never publicised it before, or released any plugins that use it.
<p>We've now released our first official plugin. A simple plugin that lets you <strong>create animated gifs</strong> from your snapshots. I've written a guide to help anyone who is interested in writing plugins of their own and provided a <a href='http://timesnapper.com/Downloads/SamplePlugin_VisualBasic.zip'>sample in VB</a>, and a <a href='http://timesnapper.com/Downloads/SamplePlugin_CSharp.zip'>sample in C#</a>. I can provide lots more examples, and information for anyone who is interested.</p>

<p>The animated gif plugin owes a debt of gratitude to <a href='http://weblogs.asp.net/jgalloway/'>Jon Galloway</a> -- we reuse the Gif.Components.dll that he put together for <a href='http://weblogs.asp.net/jgalloway/archive/2006/11/07/Animated-GIF-Plugin-for-Cropper-_2B00_-some-.NET-Animated-GIF-code.aspx'>his cropper plugin.</a></p>

<p>We're hoping to host plugins from other people -- we'll provide a nice page where people can download them. We'll help out with development, debugging and so on, wherever needed. If there's sufficient interest we'll spawn a separate forum for plugin development. (For now, <a href='http://forums.timesnapper.com/forums/'>the regular forum</a> is the best place to ask questions).</p>

<img src='http://secretGeek.net/image/animated_gif_creation_in_progress.png' alt='Creation of an animated gif is in progress...' style='clear:right;float:right;border:5px solid #CCC;margin:10px;'  /> 

<p>APIs are funny things -- and I received a hell of a lot of criticism while writing this API. The criticism came from a particular nasty and vocal user who never seems to be happy with any of the work I provide. That user is (of course) (in case you haven't yet guessed it) -- me.</p>
<p>So, if you're looking at the plugin model and you see something you don't like about it. Well, I understand. Constructive critcism and suggestions on how to improve the API are very welcome.</p>

<p>As always there are <a href='http://timesnapper.com/releasenotes.aspx'>full details in the release notes</a>, and there are lots more goodies on the way.</p>

 
]]>
    </description>
    <pubDate>Sun, 15 Mar 2009 02:25:12 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/ts_34_plugins.asp</guid>
  </item>
<item>
  <title>Age Old Questions: Resolved!</title>
    <link>http://www.secretGeek.net/age_old_resolved.asp</link>
    <description>
      <![CDATA[ 
<p>A few arguments I've been worried about. And, at last, definitive results.</p>
<ul>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=Tabs&word2=Spaces'  title='sorry tabs!'>Tabs versus Spaces</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=VB&word2=C%23'  title='sorry vb!'>VB versus C#</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=Java&word2=.net'  title='sorry java!'>Java versus .Net</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=Perfectionism&word2=Pragmatism'  title='sorry perfectionism!'>Perfectionism versus Pragmatism</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=Quality&word2=Quick+And+Dirty'  title='yay quality!'>Quality versus Quick and Dirty</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=Linux&word2=Windows'  title='sorry linux!'>Linux versus Windows</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=Apple&word2=Microsoft'  title='sorry apple!'>Apple versus Microsoft</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=Emacs&word2=vim'  title='sorry emacs!'>Emacs versus Vim</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=SQL+Server&word2=Oracle' title='sorry sql!'>SQL Server versus Oracle</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=credit&word2=debit' title='sorry debit'>credit versus debit</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=truth&word2=lies' title='yay truth!'>truth versus lies</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=lisp&word2=scala' title='sorry lisp.'>Lisp versus Scala</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=python&word2=ruby' title='sorry python!'>Python versus Ruby</a></li>
<li><a href='http://www.googlefight.com/index.php?lang=en_GB&word1=spider-man&word2=batman' title='sorry batman'>spider-man versus batman</a></li>
</ul>

]]>
    </description>
    <pubDate>Fri, 13 Mar 2009 21:15:11 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/age_old_resolved.asp</guid>
  </item>
</channel>
</rss>

