<?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>Mind-boggling Demo of New Gaming Genre, aka Folder-Based Hangman, aka Fun with Recursion</title>
    <link>http://www.secretGeek.net/folderGame.asp</link>
    <description>
      <![CDATA[<p>I had a crazy idea recently for a new game - a game that defines an entire new *genre* of computer game, and a new style of programming computer games. Whether or not this idea will go on to change the way all computer games are written, I will let history decide.<p>

<p>It's such a simple idea that I don't know how it couldn't have possibly existed earlier. It doesn't require
massive graphic capabilities, no CUDA NUMA GPGPGPU and the like -- it's an idea so profoundly simple that you'll
be scraping your jaw off the floor with a spoon before you finish reading this blog post. </p>

<p>You run the 'game' and it sets up a directory structure to represent every possible state of the game. To play the game, you inspect the current folder, look at the currently available sub folders, and choose which one to navigate into. Each sub folder you see represents the next possible state of the game.</p>

<p><strong>There is no executable program running when you are playing. The game is just your act of navigating the folder structure. It's a clever form of madness!</strong></p>

<p>Here's some screenshots that show me playing the game, in a command prompt.</p> 

<p>I've changed my prompt to just a 'greater than' sign, by typing '<code>prompt $g</code>', to make it cleaner. Old-school DOS wizards do this kind of thing all the time. Hipster kids, try and keep up.</p>

<p>First I type '<code>dir /b</code>' to get a clean view of the current folder.<p>
<p> There is only one folder, '<code>__PLAY HANGMAN__</code>' so I navigate into it by typing&nbsp; '<code>cd[TAB][Enter]</code>'. <strong> The game has begun.</strong> </p>
<img src='http://secretGeek.net/image/shot0.png' alt='' style='padding:10px' /><br />
<p>Looking in that folder I see the empty scaffold, three underscores (representing a 3 letter word) and the available letters listed down the left hand side. We're playing with a reduced alphabet to keep the number of permutations within a reasonable amount.</p>
<img src='http://secretGeek.net/image/shot1.png' alt='' style='padding:10px' /><br />
<p>My first guess is the letter 'A'. To make this guess I type '<code>cd A[tab]</code>'. When I type '<code>dir /b</code>' to inspect the new state of the game I see that it was a good guess, as one of the letters of the word has been filled in. Also there is an 'x' next to the 'A' indicating that that letter has been guessed. That's all there is to it. Hear that pop? That was your cerebellum exploding through your temporal lobe.</p>
<img src='http://secretGeek.net/image/shot2.png' alt='' style='padding:10px' /><br />
<p>If I try guessing 'A' again, all I find is a folder containing a file named 'You have already guessed that letter.' To undo my mistake I back out by typing '<code>cd ..</code>' (You could, <em>theoretically</em> use this technique to undo any move, but that would be unsportsmanlike.)</p>
<img src='http://secretGeek.net/image/shot3.png' alt='' style='padding:10px' /><br />
<p>A couple of moves later and I've guessed every letter:</p>

<img src='http://secretGeek.net/image/shot8.png' alt='' style='padding:10px' /><br />
<p>The word is 'CAB'. There's no particular fanfare. Just the word 'WIN' declaring my victory.</p>

<p>Okay, now you've seen the whole thing I hope you're aching to not just download the game, but to write your own entry into this brave new genre. You could do for Gehtto-Folder-Games what John Carmack did for first person shooters!</p> 
<p>I'd love to see an implementation of tic-tac-toe, aka, naughts and crosses. Also, hangman could be minified by using <a href='http://technet.microsoft.com/en-us/sysinternals/bb896768'>junctions</a> (i.e. symbolic links) -- I'd love to see that implemented. The possibilities for new games are pretty much endless. Maybe six or seven.</p>

<p>Okay let me level with you. The mathematics of this idea were just ridiculous. For a full 26 character alphabet, I would've killed my little computer. (Care to accurately calculate how many folders are created for the given alphabet?) It's all based around N-factorial where N is the size of the alphabet. Factorial is not something you want to see in the real world. </p>

<p>I'm on holiday at the moment, so the only computer available to write it on was my dell mini, which doesn't have any serious coding environment. So rather than write it as a console app in visual studio (or even a powershell app) I wrote a javascript page that generates a batch file. It's very niche.</p>

<p>This also turned into an opportunity to learn the ins and outs of getting recursion wrong with javascript. The most common mistake you make with recursion in javascript, it turns out, is forgetting to declare a local variable. This means that the variable becomes global and your recursion goes nuts. Don't make that mistake. When your code is creating subfolders all over your hard drive it's a particularly painful mistake. It took me considerably less time to write the program than it did to debug it, and (considerably*considerably) less time to debug than the time to clean up all the folders left in unexpected places.</p> 
<p>But the funnest bit was the ascii sprite code.</p>

<p>I had one array that showed the final hanged man:</p>
<pre>
var hangyPicture = [
'   _______   ',
'   I     I   ',
'   I     O   ',
'   I   --I-- ',
'   I    I I  ',
'   I         ',
'--===--      '];
</pre>
<p>(Side point... why wasn't my ascii art better than this? Because | and \ are not valid in folder names.)</p>
<p>And I had another array that showed how many misses were required before a given character of the hangyPicture was shown:</p>
<pre>
var hangyMask = [
'             ',
'             ',
'         1   ',
'       33233 ',
'        4 4  ',
'             ',
'             '];
</pre>
<p>Then, with those two arrays in place, I can work out the names of the folders to create. I walk through the mask, one character at a time, and compare the digit I find to the current number of missed guesses. If the digit I find is less than (or equal to) the current number of missed guesses, then I include that character in the folder name, otherwise I mask it out with a space. Ah, I give in -- it's easier to just show the code:</p>

<pre>
for (var h in hangyPicture) {
  // use hangyMask[h] and numberOfMisses to mask chars out of hangyPictures[h] 
  for(var i = 0; i < hangyMask[h].length; i++) {
    if (hangyMask[h][i] == ' ' || hangyMask[h][i] <= numberOfMisses) {
      folders[h] += hangyPicture[h][i];
    } else {
      folders[h] += ' ';
    }
  }
}
</pre>
<p>Okay. Now you've been enlightened with the future of ultra-ghetto folder-based gaming, go ahead and make your own. I can wait.</p> 
<br />
<p><a href="http://secretGeek.net/ghettoHangMan.html" style="font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;">Here's the code</a></p>
<br />
<p>The accompanying program is a piece of javascript that creates a windows <em>batch</em> file. You run the batch file.</p>
 
 
]]>
    </description>
    <pubDate>Sat, 07 Jan 2012 10:57:31 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/folderGame.asp</guid>
  </item>
<item>
  <title>Got CSV in your javascript? Use agnes.</title>
    <link>http://www.secretGeek.net/agnes11.asp</link>
    <description>
      <![CDATA[ 

<img src='http://secretGeek.net/image/logo_r_t_s.png' style='float:right; margin:5px' />

<p>The only things that will survive the forthcoming nuclear+zombie apocalypse are cockroaches, javascript and <a href='http://en.wikipedia.org/wiki/Comma-separated_values' rel='nofollow'>CSV</a>.</p>

<p>So I've written an open source javascript library, <code>agnes.js,</code> that the cockroaches can use for dealing with CSV from javascript. And in the brief pre-apocalypse era you can use it too.</p>


<br />
<p><a href="http://agnes.codeplex.com/releases/view/77617" style="font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;">Download the zip</a></p>
<br />

<p>I've <a href='http://secretgeek.net/csv_trouble.asp'>written before</a> about how CSV starts off looking easy, but quickly descends into a world of insanity. So in javascript land, let <code>agnes</code> handle all the nasty quirks and edge cases (embedded delimiters, qualifiers, nulls and so on).</p>

<p>I wrote a bunch of unit tests to go with it, so you can tell exactly what it does with each weird bit of input you can throw at it.</p>

<p>You can download it from <a href='http://agnes.codeplex.com'>agnes.codeplex.com</a></p>

<p>This was a particularly fun little bus project, and what I like best about <em>agnes</em> is the content you get when you download her.</p>

<p>The <a href='http://secretGeek.net/agnes/readme.html'>readme</a> file has executable examples, that work by having a chunk of code displayed in a div, which is the exact code that is grabbed and executed when you click 'Try it'.</p>

<br />
<p><a href="http://agnes.codeplex.com/SourceControl/BrowseLatest" style="font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;">Browse source code</a></p>
<br />

<p>I like the unit tests that come with it, and the little <a href='http://secretGeek.net/agnes/tests.html'>unit test runner.</a> I could've gone really overboard with it, but I stopped myself before it went too far.</p>

<p>And I like the sample that performs <a href='http://secretGeek.net/agnes/twoWay.html'>Csv to Json conversion</a>, back and forth, back and forth. My favourite part of that is using html entities in the button titles, for left and right arrows.</p>

<br />
<p><a href="http://secretGeek.net/agnes/twoWay.html" style="font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;">Try it out</a></p>
<br />

<p>Now that I've got <code>agnes</code> out of the way, hopefully I can focus on my new bilion dollar idea, <a href='http://youmustget.com'>youmustget.com</a></p>
]]>
    </description>
    <pubDate>Sun, 27 Nov 2011 03:07:28 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/agnes11.asp</guid>
  </item>
<item>
  <title>I went to write down a book name and founded an internet empire instead.</title>
    <link>http://www.secretGeek.net/bought_youmustget.asp</link>
    <description>
      <![CDATA[ 
 
 
<a href='http://www.hammacher.com/Product/Default.aspx?sku=11862' rel='nofollow' style='float:right; clear:right; margin:5px;margin-top:0px;'><img src='http://secretGeek.net/image/tron-motorcycle.jpg' alt='tron motorcycle just 55K' style='border:2px solid #AAA' /></a>
<a href='http://www.facebook.com/pages/LAIKAhouse/162077150510565' rel='nofollow' style='float:right; clear:right;margin:5px;margin-top:50px;'><img src='http://secretGeek.net/image/at-at-dog-costume.jpg' alt='AT AT dog costume you must have' style='border:2px solid #AAA' /></a>
 
<p>Yesterday <a href='http://callvirt.net/blog/'>Joel</a> told me, 'hey you really should read  
<a href="http://www.amazon.com/gp/product/0393072231/ref=as_li_ss_tl?ie=UTF8&tag=secretgeek-20&linkCode=as2&camp=217145&creative=399369&creativeASIN=0393072231">"The Big Short"</a>
 by Michael Lewis' -- and I thought, yes, I'll write that in my list of books I must get and when I have a chance I'll order it and all the other books in my list of books i must get.</p>

<p>Looking through my iphone I was shocked to find I don't even *have* a list of books I must get. I've got a list of which Woody Allen movies I haven't seen, and I have a list of which Jeeves and Wooster books I own (or own twice) so I don't accidentally buy them again (or again again), but no "Books I must get". </p>

<p>And I realised it's not just books that I keep forgetting. It's everything in our stupid materialist world. It's gadgets, music, movies, games, t-shirts, toys, gifts for my wife, baby stuff, apps, power tools -- a whole big fat materialist world full of stuff I must get, that, realistically i'll never get, but which my inner taxonomist wouldn't mind having a list of somewhere.</p>

<p>Suddenly, before I could stop them, my hands had rushed off and spent 9.95 to buy all of the following websites...</p>



<ul>
<li>http://things.youmustget.com</li>
<li>http://books.youmustget.com</li>
<li>http://movies.youmustget.com</li>
<li>http://games.youmustget.com</li>
<li>http://gadgets.youmustget.com</li>
<li>http://apps.youmustget.com</li>
<li>http://stocks.youmustget.com</li>
<li>http://software.youmustget.com</li>
<li>http://dvds.youmustget.com</li>
<li>http://jokes.youmustget.com</li>
<li>http://vaccinations.youmustget.com</li>
<li>http://tattoos.youmustget.com</li>
<li>http://cars.youmustget.com</li>
<li>http://piercings.youmustget.com</li>
<li>http://hookers.youmustget.com</li>
<li>http://starewarsstuff.youmustget.com</li>
<li>http://drugs.youmustget.com</li>
<li>http://websites.youmustget.com</li>
<li>http://cakes.youmustget.com</li>
<li>http://clothes.youmustget.com</li>
<li>http://bikes.youmustget.com</li>
<li>http://girlfriends.youmustget.com</li>
<li>http://babystuff.youmustget.com</li>
<li>http://diseases.youmustget.com</li>
<li>http://travel.youmustget.com</li>
<li>http://tshirts.youmustget.com</li>
<li>http://shirts.youmustget.com</li>
<li>http://wines.youmustget.com</li>
<li>http://beers.youmustget.com</li>
</ul>


<p>...and so on, because i bought <a href='http://youmustget.com/'>'youmustget.com'</a>.</p>

<p>And now I have a slight dilemma. I already own too many urls that I'm not using (this brings my total internet empire to 11.5 sites) And I don't have time to execute on even the simplest ideas in my idea log.</p>

<p>So: how can I crank out a social recommendation/shopping app in under 5 bus trips!?</p>

<p>I want something that produces an output a little bit like <a href='http://www.thisiswhyimbroke.com/'>this is why i'm broke dot com</a> but where the recommendations come from people i respect, and with affiliate dollars flowing into my wallet on every recommended purchase. (And i'd like to come up with a less-sleazy way to monetize, if possible, but I do have to recoup that $9.95 <em>somehow</em>)</p>

<p>I've begun by creating a <a href='https://trello.com/board/things-youmustget-com/4ebb599886788fbdec0be37f'>Trello board</a> to capture all my ideas. I've got details for the home page, a products page, a user page, and a topic page. I've got a backlog of features that I won't implement at first, and I've got a list of ideas for what technology I'll use where. Next I'll put together some screen mockups and put them in front of my <strike>extended team of insult generators</strike> lunch buddies.</p> 
 
<p>In the mean time I'll need to keep a cricket bat handy with which to repel the hordes of nodding VCs.</p> 
<p>Thoughts?</p>
]]>
    </description>
    <pubDate>Sat, 12 Nov 2011 00:39:08 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/bought_youmustget.asp</guid>
  </item>
<item>
  <title>NimbleText: Origins</title>
    <link>http://www.secretGeek.net/nimbletext_origins.asp</link>
    <description>
      <![CDATA[ 
<p>I started shipping <a href='http://NimbleText.com'>NimbleText</a> at the end of January 2011. That's eight months after NimbleText was *almost* ready for release back in May 2010, when I published this roadmap: <a href='http://secretgeek.net/microIsv_ToDoOrNot.asp'>24 things to do, and 100 things *not* to do (yet) for building a MicroISV</a>. Back in May, instead of powering on with the last few tasks, I invested my spare time writing <a href='http://secretgeek.net/dod_intro.asp'>Dos-based web frameworks</a> and <a href='http://secretgeek.net/json_query_5.asp'>5 different json editors</a>. I guess having a new little baby girl counts as something of a distraction too. ;-) (Very happily).</p>

<p>When I finally starting shipping, Joe Cooney <a href='http://twitter.com/#!/josephcooney/status/30612770298798080'>said</a>:

<blockquote><p>I tip my hat to you - I think in the time I've re-written a few bits of UI you shipped a product.</p></blockquote>
<p>...in reference to his awesome <a href='http://www.lognv.com/'>LogEnvy tool</a>. But it's not a fair comparison, for two reasons.</p>
<p>Firstly, <a href='http://www.lognv.com/'>LogEnvy</a> is a much more sophisticated product than <a href='http://NimbleText.com'>NimbleText</a>. <a href='http://www.lognv.com/'>LogEnvy</a> does all kinds of powerful manipulation of events logs in a wide range of formats and intersperses it with all the kind of dazzling UI you expect from a WPF ninja. <strong>But most of all</strong> his statement is incorrect because NimbleText was almost <em>six years in the making</em>.</p>

<p style='clear:both' ></p>
<img src='http://secretgeek.net/image/merger_75.png' style='float:right;clear:right;border:0px solid #FFF;padding:10px;'>
<p>I wrote <a href='http://secretgeek.net/programmers_mate.asp'>the first version</a> in February 2005 and published it as part of a blog post soon after. I wrote it the very <a href='http://secretgeek.net/screenshot_journal.asp'>same day</a> I came up with the idea for <a href='http://TimeSnapper.com'>TimeSnapper</a>. It was a stressful week when I desperately needed both of those tools.</p>
<p>Although I was already a .net programmer, I wrote the original code in server-side VBScript for easier deployment. It was just a dozen or so lines. I called it variously 'the data pattern merge tool', 'the merger,' 'the programmer's mate' or the 'text multiplier.' Starting from that day, and continuing right up until the present, I have depended on this tool absolutely daily.</p>

<img src='http://secretgeek.net/image/w2scg_75.png' style='float:left;clear:left;border:0px solid #FFF;padding:10px;'>
<p>I released a <a href='http://secretgeek.net/New_Generator.asp'>second version</a> in July 2005, and called it 'the world's <em>second</em> simplest code generator'.</p>
<p>The source code is largely a comment block listing all the extra features I wished it had. (And almost all of which, by the way, are implemented in more recent verisons)</p>

<img src='http://secretgeek.net/image/wscg_example_50.PNG' style='float:right;clear:right;border:0px solid #FFF;padding:10px;'>
<p>A complete <a href='http://secretgeek.net/wscg_sneak.asp'>rewrite occurred in May 2006</a> when I started huffing the XSLT pixie dust and thought XSL could solve everything. Its dynamic nature gave it big advantages over the vbscript implementation.</p>
<p>But it soon turned into an exercise in writing a fully fledged compiler and I knew I was headed in the wrong direction.</p>

<p>I wrote an "offline version" around that time, in Windows Forms (VB.net version 1.1) I was never happy with it and didn't release it. If I have the code for it, I don't know where. My clearest memory of it was the way parts of the UI would animate (using a Timer control, of course :-) ).</p>

<p style='clear:both' ></p>
<img src='http://secretgeek.net/image/wscgjs_th.PNG' style='float:left;clear:left;border:0px solid #FFF;padding-right:10px;padding:10px;'>
<p>I <a href='http://secretgeek.net/wscgjs_th.asp'>re-wrote the tool in August 2007</a>, this time in javascript. Why did I rewrite it in Javasript? Because I was momentarily trapped on a machine that had no development tools, but I still felt like cutting some code. I assumed that browser performance would kill the tool, but I was dead wrong. Javascript was the perfect language for the problem, and the performance of Javascript was just beginning to take off as the browser wars re-ignited.</p>

<p>It was a clear victory for <a href='http://www.codinghorror.com/blog/2007/07/the-principle-of-least-power.html'>Atwood's Law</a>:</p>
<blockquote><p>"any application that <em>can</em> be written in JavaScript, <em>will</em> eventually be written in JavaScript."</p></blockquote>
<p>Or a pre-cursor to <a href='https://twitter.com/#!/secretGeek/status/119229415086501888'>Bambrick's Premonition</a>:</p>
<blockquote><p>"I don't know when skynet will take over. But I know what it will be written in: JavaScript."</p></blockquote>
<p style='clear:both' ></p>
<img src='http://secretgeek.net/image/wpftour_th1.PNG' style='float:right;clear:right;border:0px solid #FFF;padding:10px;'>
<p>I wrote a (playful) <a href='http://secretgeek.net/wpf_firstapp.asp'>WPF version</a> in Oct 2007 (in C#). 

<p>I wasn't happy with the tooling for WPF (maybe someone should <a href='http://fixwpf.org'>fix</a> that?), but more-so the dynamic behaviour of javascript trumped C# for this tool, so the WPF version never went anywhere.</p>
<p>Around that time I wrote other undocumented, unreleased versions in powershell and one in ruby (<a href='https://github.com/whymirror/shoes/tree'>shoes</a>). Powershell was well suited as a language, but lacked the reach of javascript, plus the performance (at that time) was dreadful. The <a href='http://en.wikipedia.org/wiki/Shoes_(GUI_toolkit)'>shoes</a> version dissappeared around the same time as <a href='http://ejohn.org/blog/eulogy-to-_why/'>_why</a>. (Coincidence? I think not.)</p>

<p>Late last year I decided to release it as a windows app, using a polished and thoroughly <a href="http://secretgeek.net/code_commute.asp">bus-tested</a> version of the javascript implementation, wrapped in a browser control inside a skinny winforms shim. Early this year I <a href='http://secretgeek.net/nimbletext_is_alive.asp'>went live</a> with it, under the new official title of NimbleText. I've hunted down <a href="http://secretgeek.net/nt_lesscrash.asp">bugs</a> and added features in the months since.</p>

<style type='text/css'>
.wtf { display:none}
</style>

<img src='http://secretgeek.net/image/sample_shot.png' style='float:left;clear:left;border:0px solid #FFF;padding:10px;'>

<p>The <a href='http://nimbletext.com/Version/Notes#1.4.0.37771'>latest release</a> looks a little more <a href='http://secretgeek.net/win8mullet.asp'>metro</a> than any previous version, as I stripped away a lot of the padding and extraneous lines, simplifying the appearance (and improving a few features as well, of course).</p>

<p>It's kind of amusing that after I chose to shun all of Microsoft's native application development toolkits  (wpf, silverlight, and winforms) going with HTML for the UI, it seems like Microsoft have now decided to meet me half way, making HTML a first class citizen in Metro.</p>

<p>Anytime I'm faced with a new platform, I usually implement a version of nimbleText as my own personal hello world, and it looks like Metro will make it easy for me. Porting the heart of this baby to Metro should be a breeze. I'll still have to put in some design effort around how the supporting features are presented (what will happen to the menus, toolbars etc?). But I expect it will be a good ice-breaker.</p>

<p>Meanwhile -- if you ever write code or munge data, save yourself some time and use NimbleText. Both <a href='http://nimbletext.com/Download/NimbleText.exe'>the download</a> and the <a href='http://nimbletext.com/live'>online version</a> are <strong>FREE</strong>. There's no time-limit on the application and you only choose to pay if you want the extended features (customizability and commandline integration).</p>

<p>If you have features you want, please leave a comment here or send an email to <code>support<span class='wtf'>exclude this bit</span>@<span class='wtf'>exclude this bit</span>NimbleText.com</code> </p>
]]>
    </description>
    <pubDate>Thu, 29 Sep 2011 13:26:31 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/nimbletext_origins.asp</guid>
  </item>
<item>
  <title>The Windows 8 Mullet</title>
    <link>http://www.secretGeek.net/win8mullet.asp</link>
    <description>
      <![CDATA[ 
<a href='http://secretGeek.net/image/win8mullet.png'><img src='http://secretGeek.net/image/win8mullet_50.png' style='float:right;clear:right;border:0px solid #FFF;padding:10px;' alt='Windows 8 is a mullet: Classic Windows Business at the front, Metro Party at the back'></a>

<p>I think i get it now. In Windows 8 you have two modes: metro and classic. </p>

<p>Metro is for exciting responsive new apps that you can use while sitting on a designer couch. </p>
<p>Classic is the Windows of spreadsheets and complex applications that we've used in our day jobs for years.</p>
<p>It's basically a mullet. Business in the front, party in the back.</p>
<p>I'm looking forward to joining the Metro party. I don't know if the business guy is going to host a very good party. But his client list is so long that a lot of great people are bound to be there.</p>
<p>Maybe I'm a little worried it will be like the party that Rick Moranis's character, <a href='http://www.imdb.com/title/tt0087332/quotes'>Louis</a>, is hosting in ghostbusters:</p>
<img src='http://secretGeek.net/image/rick_moranis_33.jpg' style='float:left;clear:left;border:0px solid #FFF;padding:10px;padding-right:-10px' alt="I'm givin' this whole thing as a promotional expense, that's why I invited clients instead of friends.">
<blockquote style='float:left;'><p>Louis: I'm givin' this whole thing as a promotional expense, that's why I invited clients instead of friends. You havin' a good time, Mark? <br />
[heads across the room, greeting other guests]</p></blockquote>
<p style='clear:both'>It's all going well until a terror dog turns up and terrifies the guests. But I digress.</p>
<p>At first I thought that this metro-fad would only have as much take-up as designing sidebar gadgets in Vista (i.e. approximately none). But the killer features to attract devs is the app store. Having your apps readily available to (potentially) hundreds of millions of people, is a very tempting proposition and bound to attract a lot of developers, possibly including me.</p>
<p>So, does anybody wanna play Parcheesi?</p> 
]]>
    </description>
    <pubDate>Sat, 17 Sep 2011 02:42:52 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/win8mullet.asp</guid>
  </item>
<item>
  <title>Introducing Cosby, spontaneous striped background generator</title>
    <link>http://www.secretGeek.net/cosby_code.asp</link>
    <description>
      <![CDATA[ 
<a href='http://cosby.secretgeek.net/Home/Play/V/50/000000/50/FF8800/50/000000/50/ed15ed'><img src='http://secretgeek.net/image/cos_stripy_50.png' style='float:right;clear:right;border:0px solid #FFF;padding:10px;' alt='cosby playground'></a>

<p><a href='http://cosby.secretGeek.net'>'Cosby'</a> is a small site for generating striped backgrounds (or gradient edges). You can incorporate the code from Cosby into your own asp.net/mvc applications and create striped backgrounds directly from within your Css file.</p>

<p>Once you've got Cosby in place, you can start to magically conjur stripy images out of thin air. Just reference a Cosby image as if it already exists, and it will cause the relevant image to be generated spontaneously and stored on disk for eternity.</p>

<p>For example, if you write: "background-image: url(/Image/Stripes/V/20/FFF/1/000);" then you will get a background with vertical ('V') stripes, alternating between 20 pixels of white (FFF) and 1 pixel of black (000). A moment later you decide you want the black stripes a little wider. Just alter the css (change the 1 to a 2) and they will be. No need to jump back and forth between image editor, filesystem, IDE and browser.</p>

<p>Cosby includes <a href='http://cosby.secretgeek.net/Home/Play'>a playground</a> where you can experiment with creating your own backgrounds.</p>
<br />
<p><a href='http://cosby.secretgeek.net/Home/Play' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;'>Play with cosby</a></p>
<br />
<p><a href='http://cosby.codeplex.com/SourceControl/list/changesets' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;'>Get the code</a></p>
<br />
<p><a href='http://cosby.secretgeek.net/' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;'>Visit the site</a></p>

<h2 style='clear:right'>But Why!?</h2>

<p>While I was <strike>procrastinating about</strike> working on my <a href='http://secretgeek.net/wdcnz_mvc3.asp'>talk for WDCNZ</a> I wanted to mess around with MVC's <a href='http://msdn.microsoft.com/en-us/library/system.web.mvc.fileresult.aspx'>'FileResult'</a> which lets you return a file from an action. So I resurrected and mutated the idea behind a <a href='http://secretgeek.net/GradientMaker.asp'>Gradient Maker</a> I wrote SIX years ago, using asp.net 1.0, and ended up with this latest monstrosity. (Cosby also lets you generate gradients, though I haven't done much with that feature)</p>

<p>The code is published at <a href='http://cosby.codeplex.com/SourceControl/list/changesets'>cosby.secretGeek.net</a>, so feel free to grab it, criticise it, and forget about it.</p>
<p>And of course the name is a reference to Bill Cosby's infamous <a href='http://thecosbysweaterproject.tumblr.com'>Cosby sweaters</a>, which get their own <a href='http://en.wikipedia.org/wiki/Koos_Van_Den_Akker#The_Bill_Cosby_Sweaters'>detailed write up on wikipedia</a>. I was recently heartened to see 'Cosby sweater' amongst the text generated by the <a href='http://hipsteripsum.me/'>hipster ipsum</a> random text generator.</p>

<p>That's all for now.</p>
]]>
    </description>
    <pubDate>Wed, 24 Aug 2011 05:18:00 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/cosby_code.asp</guid>
  </item>
<item>
  <title>Slides from WDCNZ: Live Coding Asp.net MVC3</title>
    <link>http://www.secretGeek.net/wdcnz_mvc3.asp</link>
    <description>
      <![CDATA[ 
<img src='http://secretgeek.net/image/wdcnz_15.png' style='float:right;clear:right;border:0px solid #FFF;padding:10px;' alt='talkin in wellington'>

<p>I am just returned from an excellent holiday in New Zealand, wherein I talked about MVC 3 at the first ever <a href='http://wdcnz.com'>WDCNZ</a> in Wellington.</p>

<p>On the day of the talk I was deathly ill, so it was a very much <a href='http://www.flickr.com/photos/wdcnz/sets/72157627148171169/with/5972187758/'>less animated</a> talk than I wanted to give, but still enjoyable (for me, if not the audience). I missed out on seeing the rest of the conference, which is a real bugger.</p>
<p>In particular I wanted to see <a href='http://paulirish.com/'>Paul Irish</a> on Html5, but I did at least get to meet him for a quick chat the day before. Other speakers I met the day before were pretty interesting to talk to and I very much wanted to see the talks by <a href='http://pageofwords.com/blog/'>Kirk Jackson</a> and <a href='http://jwegesin.com/'>Jeffrey Wegesin</a>, <a href='http://koziarski.com/'>among</a> <a href='http://twitter.com/#!/turtlespin'>others</a>.</p>

<p>Here's my slides, using an updated version of <a href='http://higgins.codeplex.com'>Higgins</a>. You'll need to unzip them, then you can see the readme file, the slides themselves (by viewing higgins.html) or look at the included code.</p>

<p>&nbsp;</p>
<p><a href='http://secretGeek.net/content/wdcnz_mvc3_leon.zip' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;'>Slides and Code for 'Live Coding Asp.net MVC 3'</a></p>
<p>&nbsp;</p>
<p>The talk covers Razor syntax, Display and Editor Templates, custom Code Templates and custom Project templates. Thankfully, there is no video.</p>

<p><a href='http://jcooney.net/'>Joseph Cooney</a> built a special utility to help with the talk, called <a href='http://jcooney.net/post/2011/07/15/Increased-Presentation-Impact-with-BigNote.aspx'>'BigNote'</a> -- available from <a href='http://bignote.codeplex.com'>bignote.codeplex.com</a>.</p>
<p>This is a handy tool for presenters. Invoke it with a hotkey (ctrl-F1) and then it lets you write in giant letters on top of the desktop. Very slick.</p>
<p>I had a slight panic during the talk when I realised that Joe Cooney, creator of <a href='http://ComputerUnlocked.com'>ComputerUnlocked.com</a> could have used the opportunity to slip any kind of nasty prank into the tool, just to punk me in front of a room full of strangers. But luckily he slipped up and missed the opportunity.</p>

<p>One other thing I ought to mention: the Dell laptop I bought in anticipation of the presentation turned out to be a total dud. I was only rescued the day before leaving Australia when <a href='http://www.PaulStovell.com'>Paul Stovell</a> managed to hook me up with an old laptop of his, which performed flawlessly. Thanks Paul!</p>
]]>
    </description>
    <pubDate>Sun, 31 Jul 2011 03:17:57 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/wdcnz_mvc3.asp</guid>
  </item>
<item>
  <title>MVC 3, "Third Times a Charm" references</title>
    <link>http://www.secretGeek.net/mvc3_Refs.asp</link>
    <description>
      <![CDATA[ 
<p>For the last few months I've been on an MVC 3 binge, learning as much as I can fit in my tiny brain. (Had to throw a few <a href='http://www.silverlight.net/'>other</a> <a href='http://en.wikipedia.org/wiki/Windows_CardSpace'>things</a> out first of course.)</p>
<p><a href='http://wdcnz.com/'>Web Dev Conf New Zealand (WDCNZ)</a>, is in Wellington very soon (<a href='http://lanyrd.com/2011/wdcnz/schedule/'>schedule on lanyrd</a>), and I'll be talking there about all things MVC 3. This is keeping me awake nights, I can tell you.</p>
<p>I've applied to talk at the <a href='http://blog.stackoverflow.com/2011/06/devdays-is-back/'>stack overflow dev days</a> conference in Sydney in October. That would be an absolute blast. I rank my chances pretty low, but my excitement is high regardless.</p>
<p>Recently I talked at <a href='http://www.qmsdnug.org/'>QMSDNUG</a>, on 'MVC 3: Third Times a Charm', alongside <a href='http://jcooney.net/'>Joe Cooney</a>. It was a lot of fun, and we allegedly broke a record with our crowd size. It's basically a preview of what I'll cover in Wellington, though some material will be in or out as I revise.</p>
<p>(<a href='http://higgins.codeplex.com/'>Higgins</a> got another workout, and had some html5 goodness baked in)</p>
<p>I promised to put up the references from my talk. They're mostly about customizating your MVC 3 experience in Visual Studio. Here they are.</p>

<table class='t'>
 <thead>
   <tr>
     <th>url</th>
     <th>topic</th>
   </tr>
 </thead>
 <tbody>
  <tr>
    <td><a href='http://download.microsoft.com/download/D/6/D/D6DFC36D-604F-448A-A189-15EC874ABAAF/ASPNETWebPagesWithRazorSyntax-Book-Beta3.pdf' title='http://download.microsoft.com/download/D/6/D/D6DFC36D-604F-448A-A189-15EC874ABAAF/ASPNETWebPagesWithRazorSyntax-Book-Beta3.pdf'>bit.ly/d71zIJ</a></td>
    <td>razor: ebook [pdf]</td>
  </tr>
  <tr>
    <td><a href='http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-3-default-templates.html' title='http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-3-default-templates.html'>bit.ly/3Vwjvj</a></td>
    <td>editor &amp; display templates (Brad Wilson)</td>
  </tr>
  <tr>
    <td><a href='http://code.google.com/p/mvc-mini-profiler/' title='http://code.google.com/p/mvc-mini-profiler/'>bit.ly/dIUPo4</a></td>
    <td>MVC Mini profiler (Sam Saffron)</td>
  </tr>
  <tr>
    <td><a href='http://www.hanselman.com/blog/ModifyingTheDefaultCodeGenerationscaffoldingTemplatesInASPNETMVC.aspx' title='http://www.hanselman.com/blog/ModifyingTheDefaultCodeGenerationscaffoldingTemplatesInASPNETMVC.aspx'>bit.ly/h8vQfX</a></td>
    <td>Code templates (Scott Hanselman)</td>
  </tr>
  <tr>
    <td><a href='http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/' title='http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/'>bit.ly/hwNUNS</a></td>
    <td>MVC Scaffolding (Steve Sanderson)</td>
  </tr>
  <tr>
    <td><a href='http://haacked.com/archive/2011/06/06/creating-a-custom-asp-net-mvc-project-template.aspx' title='http://haacked.com/archive/2011/06/06/creating-a-custom-asp-net-mvc-project-template.aspx'>bit.ly/khm2GL</a></td>
    <td>Project Templates (Phil Haack)</td>
  </tr>
  <tr>
    <td><a href='http://weblogs.asp.net/jgalloway/archive/2011/03/17/asp-net-mvc-3-roundup-of-tutorials-videos-labs-and-other-assorted-training-materials.aspx' title='http://weblogs.asp.net/jgalloway/archive/2011/03/17/asp-net-mvc-3-roundup-of-tutorials-videos-labs-and-other-assorted-training-materials.aspx'>bit.ly/hfWA6Z</a></td>
    <td>Roundup of tutorials (Jon Galloway)</td>
  </tr>
 </tbody>
</table>
<br />
<p>If you use MVC 3, what are your favourite bits? What would you cover in a talk? If you don't use it, why not? And what are the sort of things you'd like to see deomonstrated?</p>
]]>
    </description>
    <pubDate>Sat, 02 Jul 2011 02:41:41 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/mvc3_Refs.asp</guid>
  </item>
<item>
  <title>Custom Errors in ASP.Net MVC: It couldn't be simpler, right?</title>
    <link>http://www.secretGeek.net/custom_errors_mvc.asp</link>
    <description>
      <![CDATA[ 
<a href='http://github.com/404'><img src='http://secretGeek.net/image/github404.png' style='float:right;background:#333;padding:1px;margin:5px;margin-top:-2px;' alt='parallaxing 404 at github' /></a>
<p>Cool looking 404 pages are the new hotness. <a href='http://github.com/404'>Github has an amazing parallaxing 404 page</a> that allegedly cost more than any other feature on their site.</p>
<p>For a lot of sites, the 404 page is the most visited page, so it's worth getting it right.</p>

<p>The website for my new product, <a href='http://NimbleText.com/'>NimbleText</a>, uses asp.net mvc. A framework I really enjoy. <a href='http://weblogs.asp.net/scottgu/'>The gu</a> wrote it on a plane. Before takeoff.</p>
<p>One of the more voodoo aspects of getting NimbleText.com into production was setting up a succesful custom 404 page. Here's what I came up with: <a href='http://NimbleText.com/missingPageExample'>check it out.</a></p>
<p>Some of the articles out there that cover custom errors in asp.net MVC seemed to be a little bit confused about exactly what is going on, many are out of date or incomplete and some are downright misleading.</p>
<p>So once and for all I want to give a definitive guide to error handling in asp.net MVC.</p>

<p>Here we are. Just <strong>eleven simple steps to follow for amazing results.</strong></p>

<p>First, map a catch-all route in <code>global.asax</code>, at the end of your other routes. E.g.</p>

<blockquote><code>
routes.MapRoute(<br />
&nbsp;&nbsp;    "404-PageNotFound",<br />
&nbsp;&nbsp;    "{*url}",<br />
&nbsp;&nbsp;    new { controller = "StaticContent", action = "PageNotFound" }<br />
);
</code></blockquote>


<p>Second, create an Error Controller, like this:</p>

<blockquote><code>
    public class ErrorController : Controller<br />
    {<br />
&nbsp;&nbsp;        [AcceptVerbs(HttpVerbs.Get)]<br />
&nbsp;&nbsp;        public ViewResult Unknown()<br />
&nbsp;&nbsp;        {<br />
&nbsp;&nbsp;&nbsp;&nbsp;             Response.StatusCode = (int)HttpStatusCode.InternalServerError;<br />
&nbsp;&nbsp;&nbsp;&nbsp;             return View("Unknown");<br />
&nbsp;&nbsp;        }<br />
 <br />
&nbsp;&nbsp;        [AcceptVerbs(HttpVerbs.Get)]<br />
&nbsp;&nbsp;        public ViewResult NotFound(string path)<br />
&nbsp;&nbsp;        {<br />
&nbsp;&nbsp;&nbsp;&nbsp;             Response.StatusCode = (int)HttpStatusCode.NotFound;<br />
&nbsp;&nbsp;&nbsp;&nbsp;             return View("NotFound", path);<br />
&nbsp;&nbsp;        }<br />
    }<br />
</code></blockquote>
	
<p>Third and fourth -- create custom views to handle the Unknown and NotFound actions above.</p>

<p>Fifth, create a page called Custom404.htm and add it to the root of your application. Use it to display a helpful, edgy and hopefully cool message. But don't be too edgy.</p>

<p>Sixth, add this to web.config, inside the <code>system.web</code> node:</p>
<blockquote><code>&lt;<a href='http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx'>customErrors</a> mode=&quot;RemoteOnly&quot; defaultRedirect=&quot;GenericErrorPage.htm&quot;&gt;<br />
&nbsp;&nbsp; &lt;error statusCode=&quot;404&quot; redirect=&quot;/Custom404.htm&quot; /&gt;<br />
&lt;/customErrors&gt;
</code></blockquote>

<p>Seventh, add a <a href='http://www.iis.net/ConfigReference/system.webServer/httpErrors'>httpErrors</a> element inside the <code>system.webServer</code> node:</p>
	
<blockquote><code>&lt;httpErrors&gt;<br />
&nbsp;&nbsp;            &lt;error statusCode=&quot;404&quot; subStatusCode=&quot;-1&quot; path=&quot;/custom404.htm&quot; responseMode=&quot;Redirect&quot; /&gt;<br />
        &lt;/httpErrors&gt;
</code></blockquote>

<p>Eighth, inside your existing controllers, if there is no data to serve (e.g. if someone asks for a UserId that doesn't exist) then use this snippet of code:</p>

<blockquote><code>throw new HttpException(404);</code></blockquote>

<p>Ninth, inside Global.asax, look for the <code>RegisterGlobalFilters</code> method (it will be called during <code>Application_Start</code>), and add another global filter, to handle any specific exceptions in your code, like this:</p>

<blockquote><code>
filters.Add(new HandleErrorAttribute<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; ExceptionType = typeof(FileNotFoundException),<br />
&nbsp; &nbsp; &nbsp; &nbsp; View = "Custom404",  // Custom404.cshtml is a view in the Shared folder.<br />
&nbsp; &nbsp; &nbsp; &nbsp; Order = 2<br />
&nbsp; &nbsp; });
</code></blockquote>
<p>Tenth, add a view called <code>Custom404.cshtml</code> under views/shared.</p>
			
<p>And, eleventh, take care to handle the global application error event, capturing and logging any errors, before redirecting to the views you're after:</p>

<blockquote><code>
protected void Application_Error(object sender, EventArgs e)<br />
{<br />
&nbsp; &nbsp; Exception exception = Server.GetLastError();<br />
&nbsp; &nbsp; Response.Clear();<br />
&nbsp; &nbsp; HttpException httpException = exception as HttpException;<br />
&nbsp; &nbsp; if (httpException != null)<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; string action;<br />
&nbsp; &nbsp; &nbsp; &nbsp; switch (httpException.GetHttpCode())<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 404:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // page not found<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; action = "HttpError404";<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 500:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // server error<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; action = "Internal500";<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; default:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; action = "General";<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; // clear error on server<br />
&nbsp; &nbsp; &nbsp; &nbsp; Server.ClearError();<br />
&nbsp; &nbsp; &nbsp; &nbsp; Response.Redirect(String.Format("~/Error/{0}/?message={1}", action, exception.Message));<br />
&nbsp; &nbsp; }<br />
}<br />
</code></blockquote>			

<img src='http://secretGeek.net/image/unhandledException.png' style='float:right;background:#F33;padding:1px;margin:5px;margin-top:-2px;' alt='unexpected error' />


<p>Good. </p>

<p>Now your website is well and truly borked.</p>
<p>Every request will bounce around your application like a demented pinball tripping on acid.</p>
<p>When an error happens, a bunch of different code modules will go to war.</p>
<!-- 

<p>You'll get a different error handler depending on what version of IIS you have, what version of MVC you're using, whether you've deployed in debug or release, whether you're visiting locally or remotely, whether it's sunny or raining.</p>
-->
<!--
<p>Every request will bounce around your application like a demented pinball tripping on acid inside a labyrinthine machine extracted by nazi scientists from the darkest corners of Rube Goldberg's tortured mind during an opium nightmare of Lewis Carrol proportions.</p>
-->
<!-- too much? -->

<!--
<p>When an error happens, chaos will reign. A beast will arise from the north, and one from the sea and one from the earth. A mighty beast with seven-heads and ten horns will stalk the land, the howls and lamentations of the sinners will drown out the cries of the vanquished, blood will fill the sky, and all reason and hope will flee as a horde of code modules go to war.</p>
-->


<p>The victorious code module will tear out the entrails of all those who oppose it, and throw them in the visitor's face.</p>
<p>You'll get a different error handler depending on what version of IIS you have, what version of MVC you're using, whether you've deployed in debug or release, whether you're visiting locally or remotely, whether it's sunny or raining.</p>
<p>Your server will be reduced to a pile of smouldering rubble from which reboot is impossible.</p>
<p>But if you want to get truly weird, try setting up a custom 40<em><strong>3</strong></em> page. That's about three times as odd.</p>
<p>Or, switch to <a href='http://Dod.CodePlex.Com/'>Dos on Dope</a>*. Life will be simple again.</p>
<p>Sorry I didn't really have time to write a definitive guide to this stuff. Error handling in MVC is crazy man, I'm busy fighting a clandestine war against hackers and crackers and bots and beuracrats: I can't be documenting that kind of mystery wrapped in an enigma.</p>
<p>If someone does write a <strong>complete</strong> guide to error handling in MVC, that includes the meaning and interaction behind each of these snippets, plus how the interplay between IIS, asp.net and MVC truly works, then I will happily update this article to include a link to it, right up top.</p>
<hr />
<p><small><strong>* Don't</strong> switch to Dos On Dope.</small></p>
]]>
    </description>
    <pubDate>Sat, 11 Jun 2011 01:10:49 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/custom_errors_mvc.asp</guid>
  </item>
<item>
  <title>Anatomy of a Domain Hijacking, part 2: The Website Who Came In From The Cold</title>
    <link>http://www.secretGeek.net/sg_hijack_2.asp</link>
    <description>
      <![CDATA[ <p>When secretGeek.net was taken I swore a solemn oath to myself:</p>
<blockquote><p>My relentless campaign of jokes and nonsense will not be stopped.</p></blockquote>
<p>And now, just a couple of long weeks later, here I am, happy to report I'm back in control of secretGeek.net.</p>
<p>Right when I was ready to migrate over to leonbambrick.com, I got an email from the Russian registrar, Regtime Ltd, saying:</p>
<blockquote><p>Sorry&nbsp;&nbsp;for answer delay. Domain was transferred onto you account.</p></blockquote>
<p>The number one thing, I think, that helped get the site back was when a good friend, Madina, translated a lengthy email into fluent Russian for me to send to the Russian Registrar.</p> 
<p>She re-structured the email to put the sob-story up front, all about how much personal meaning this site has for me, and the positive effects it has had on my life. I think that did the trick.</p>

<h2>So what did we learn?</h2>
<p>I learnt that passwords at google <a href='http://seclists.org/fulldisclosure/2009/Jul/254'>can be brute forced, if pop is enabled</a>. This can be sped up by use of multiple IP addresses, or a <a href='http://www.abuse.ch/?p=3294'>botnet</a>.</p>
<p>That's the most likely way they got access to my account. My password was 'good' by gmail standards but is now 'freaking solid' by any standard.</p>
<p>And I've turned on <a href='http://googleblog.blogspot.com/2011/02/advanced-sign-in-security-for-your.html'>2-step verification</a>, plus all the other <a href='http://secretgeek.net/sg_hijack_1.asp'>recommendations from part 1.</a></p>
<p>Thanks for the encouragement and support. It was dark times, but now the nonsense can continue.</p>

]]>
    </description>
    <pubDate>Tue, 07 Jun 2011 21:33:47 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/sg_hijack_2.asp</guid>
  </item>
<item>
  <title>Anatomy of a Domain Hijacking, part 1</title>
    <link>http://www.secretGeek.net/sg_hijack_1.asp</link>
    <description>
      <![CDATA[ 
<p>Two weeks ago I'd never heard the term <a href='http://en.wikipedia.org/wiki/Domain_hijacking'>'Domain Hijacking'</a>. Right now, I'm in the middle of a fight to regain control of my hijacked domain, <a href='http://secretGeek.net' rel='nofollow'>secretGeek.net</a>. It's not an easy fight, I haven't yet won, and I may never win.</p>

<p><strong>If you have any information that could help me get control of my domain again please leave a comment, or tweet me (<a href='http://twitter.com/#!/secretGeek'>@secretgeek</a>), or get in touch via my (now re-secured) email address, leonbambrick@gmail.com</strong></p>

 
<h2>From Russia with Love</h2>
 
<p>On Monday 9th May, I checked my gmail account at around 3:40 in the afternoon, and I was confronted with a dark red message at the top of the screen (in the area where you normally see messages like 'Your email has been sent'). The message said:</p>
 
 <p style='text-align:center'><span style='background-color:#980000; color:white;padding:4px;border-radius:4px'><strong>Warning: we believe your account was recently accessed from: Russia. <span style='text-decoration:underline'>Show details and preferences</span> | <span style='text-decoration:underline'>Ignore</span></strong></span></p>
 
 <p>I clicked on 'show details and preferences', and a new window opened with this message:</p>
 <a href='http://secretGeek.net/image/russian_ip_full.png'><img src='http://secretGeek.net/image/russian_ip_zoom.png' style='border:0px solid #000'/></a>
 <p>(click to see the message in context -- [note that my own ip addresses are redacted])</p>
 
 <p>This was definitely not me. At 4:19 AM, and 5:40am I had been far too busy being fast asleep, preparing for a big week, to get to Russia and back for some casual email reading. So someone had infiltrated my email. The freaking out sensation began immediately. I couldn't move. I was frozen completely still.</p>
 <p>I followed google's advice and immediately changed my password, then notified my wife. My mind was racing as to what the implications could be.</p>
 <p>A little voice told me to check the trash. I was really hesitant, I think I knew the trash would contain something I didn't want to see.</p>
 <p>In the trash I found two messages, received at 5:45am.</p>
 <img src='http://secretGeek.net/image/messages_in_trash.png' style='border:0px solid #000'/>
 <p>The content of the messages was to explain that my domain, secretGeek.net, had been succesfully transferred from my registrar, <a href='http://GoDaddy.com'>GoDaddy</a>, to a Russian registrar, <a href='http://www.webnames.ru/'>Regtime Ltd</a>.</p>
 <p>I felt completely unreal, like this was a dream, or a prank. I logged into my GoDaddy account to check on my domains. They all still appeared to be there. I took a few deep breaths. I felt it must be all just a daydream. I read the list carefully. No -- secretGeek.net was missing from the list. All of the others were still there.</p>
<p>I started sending emails to GoDaddy. I replied to the emails I'd found in the trash, telling them that it was a mistake, the result of my email being violated.</p>
<p>I lodged support requests with GoDaddy. When I went back to the trash to read the deleted emails again I found there were <em>new</em> messages in the trash. Emails from godaddy in response to my support requests had been automatically deleted. This was *weird*. It was a few minutes before the penny dropped.</p>
<p>I looked in my gmail filters and there were two new ones. The two new filters were designed to delete any messages containing the words 'GoDaddy' or 'Webnames'. (I later found that 'Webnames.ru' is the trading name of 'Regtime Ltd', the Russian registrar holding secretGeek.net)</p>
<img src='http://secretGeek.net/image/new_filters.png' style='border:0px solid #000'/>
<p>This was starting to become very 'real'. This wasn't some kind of misunderstanding. It was definitely a thing. It was a deliberate, targeted attack, by a person or people who knew what they were doing and had either done this thing before or had thought it through very carefully.</p>
<p>I turned to my friend, <a href='http://JCooney.net'>Joe Cooney</a>, to show him what I'd found. He was equally gobsmacked. He told me to call GoDaddy on their support number and see what they said.</p>
<p>A whois request on secretGeek.net showed that my name servers were still listed, but the registrar was Regtime ltd, and the contact information was all blank.</p>
<p>The support guy at GoDaddy told me to contact the gaining registrar and find out what their policy is for transfer disputes. He told me there was nothing GoDaddy could do (turns out this was bad advice, by the way)</p>
<p>I was busy worrying about what else was in danger. My wife was already on the task of changing every password, keycode, and security question associated with all of our bank accounts, credit cards, online identities, home pcs etc, and checking at each of these places for any trace of unusual activity.</p>
<p>In order to send a support request to the Russian registrar, I had to sign up as a member (and I noted with some distaste that they sent me my new password in plain text.) I sent them multiple emails explaining what happened. Then I re-sent each of those messages, in Russian this time, translated by translate.google, and including the original text.</p>
<p>I worked late that day to make up for the lost time and somehow managed another check-in before I went home.</p>
<p>That night I called GoDaddy again, hoping to get more help. By now I'd read about <a href='http://www.davidairey.com/google-gmail-security-hijack/'>the similar case of David Airey</a> where a gmail vulnerability led to a domain hijacking, which also involved godaddy. This time I got a more helpful support staff member. She told me to fill out the <a href='http://www.godaddy.com/agreements/ShowDoc.aspx?pageid=Dispute_On_Transfer_Away_Form'>'dispute on transfer away'</a> form at GoDaddy, which I promptly did. This meant that the right people at godaddy would be notified, and they'd contact the Russian registrar to request the domain be returned.</p>

<h2>Wrapping up part 1.</h2>

<p>While there's more that's happened since, things haven't really progressed since that day at all.</p>

<p>I still haven't regained control of the domain.  I'm waiting on word from the Russian registrar. I remain hopeful that any minute now I'll get an email from them saying "Ah, we're sending back your domain!" -- but my hope is fading.</p>

<p>The name servers haven't been changed, so my content continues to be served up as always. If it does go down, the plan is to launch a new and improved secretGeek at <a href='http://LeonBambrick.com'>LeonBambrick.com</a>. Announcements or news will be via twitter (<a href='http://twitter.com/#!/secretGeek'>@secretGeek</a>) or from my business website, <a href='http://nimblething.net'>NimbleThing.net</a>.

<p><strong>If you have any information that could help me get control of my domain again please leave a comment, or tweet me (<a href='http://twitter.com/#!/secretGeek'>@secretgeek</a>), or get in touch via my (now re-secured) email address, leonbambrick@gmail.com</strong></p>

<p> In the next part of the story I want to discuss gmail security, all of the possible ways I could've been hacked, and the one I think is most likely. But I can't wait until then to put out the following checklists. These are steps that you can do to protect your email account and to protect your domains:</p>

<h2>What can you do to stop this happening to you?</h2>
<p><strong>Protect your email via:</strong></p>
<ul>
<li>Change your password often. For example, right now.</li>
<li>Make your password very strong.</li>
<li>In gmail: disable POP.</li>
<li>Ensure your password recovery options are as strong as your password.</li>
<li>Make sure 'always use https' is selected.</li>
<li>In gmail: check for unusual activity (it's available at the foot of the screen).</li>
<li>In gmail: don't let any other apps be associated with your account.</li>
<li>Use two-step authentication.</li>
</ul>
<p><strong>Protect your domains via:</strong></p>
<ul>
<li>Pay for private domain registration.</li>
<li>Pay for enhanced transfer protection. (e.g. at GoDaddy they call it 'Deadbolt' protection, and it means they require you to send them identification before they'll approve a transfer.)</li>
</ul>
]]>
    </description>
    <pubDate>Sun, 22 May 2011 13:30:20 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/sg_hijack_1.asp</guid>
  </item>
<item>
  <title>secretGeek.net domain has been stolen. The site may go down.</title>
    <link>http://www.secretGeek.net/sg_hijack.asp</link>
    <description>
      <![CDATA[ 
<p><em>The short story:</em></p>
<p>A person with a Russian IP address broke into my email account and used that access to transer ownership of the secretGeek.net domain to a Russian registrar, webNames.ru.</p>
<p>The full story is jam packed with intrigue, daring adventure, black ops helicopters, sexy double agents, Ukrainian php developers, and a liberal dash of nerdy security best practices.</p>
<p>I will tell the full story once I have secured my domain again.</p>
<p>In the meantime, if your beloved secretGeek.net is suddenly replaced by a spammy porn site or variant thereof, do not despair. Follow me on twitter (<a href='http://twitter.com/#!/secretGeek'>@secretGeek</a>) or head to my business website (<a href='http://NimbleThing.net'>NimbleThing.net</a>) where (if necessary) I will mirror the original secretGeek content and continue blogging until I've taken charge of the domain again.</p>
]]>
    </description>
    <pubDate>Tue, 10 May 2011 11:37:25 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/sg_hijack.asp</guid>
  </item>
<item>
  <title>Boring article about fixing a 'Login failed... untrusted domain' issue when connecting to SQL Server.</title>
    <link>http://www.secretGeek.net/boring_sql_one.asp</link>
    <description>
      <![CDATA[<p>This will be the most boring and dry technical post I've ever written. I promise. I'm only writing it down because I hear <a href='http://www.codinghorror.com/blog/'>Jeff Atwood's</a> voice in my head telling me that if I haven't shared the solution then there's almost no value in solving it.</p>

<p>So here was the problem...</p>
<p>On one of my machines, in recent months, anytime I tried to run an asp.net application that attempts to connect to a SQL Server database I receive this error:</p>

<blockquote><p>Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.</p></blockquote>

<p>This is in a scenario where everything is local: I'm on a home computer, using a local database server. And it doesn't matter if I'm using IIS, webdevserver, or IIS Express. It doesn't matter if I'm trying to connect to SQL Express or SQL Server 2008 r2. I can enter the credentials using the machine name or IP address. The result is the same.</p>

<p>Looking in the Windows Event Viewer I see:</p> 

<blockquote><p>SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of failure.  [CLIENT: <local machine>]. </p></blockquote>

<p>Most of the 'solutions' online were not applicable because they involve domain issues. This is just a local machine.</p>


<p>One particular forum message involved a guy with a similar setup to me. He <a href='http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/54824854-0dc2-4d9b-9ad7-482701929a6e/'>solved the problem</a> for himself, but left behind only this very abbreviated and somewhat cryptic explanation:</p>

<blockquote><p>Solved. Traced the prob. to my net setup. The clue was this a msg in the Win System Log from Lsasrv about the target name and it showed the fqdn. Did some checks and the fqdn didn't look right, cleaned up my network config (I had customized it for another project), and now it's workin.</p></blockquote>

<p>The 'fqdn' is the fully qualified domain name. I found three different ways to find my fqdn, and one of them disagreed with the others! So this was a smoking gun.</p>

<p>Method 1 for finding the fqdn: When I right clicked on "computer" in the start menu and looked at the properties, the 'full computer name' was reported as '<code>Leon_xps</code>'.

<p>Method 2 for finding the fqdn: When I ran "</code>ipconfig /all</code>" and got these values for Host Name and Primary Dns Suffix:</p>
<blockquote><pre>   Host Name . . . . . . . . . . . . : Leon_xps
   Primary Dns Suffix  . . . . . . . : 
</pre></blockquote>   
<p>(Add them together and you get a fqdn of just 'Leon_xps'</p>

<p>Method 3 for finding the fqdn: In <code>cmd</code> when I ran '<code>ping -a Leon_xps</code>' I saw a <em>very</em> unexpected result!</p>

<p>It said:</p>

<blockquote><pre>Pinging leonx_xps [192.168.1.2] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.</pre></blockquote>

<p>Notice that it's changed the name '<code>leon_xps</code>' into '<code>leon<strong style='font-size:large'>x</strong>_xps</code>' and come up with the ipaddress of '<code>192.168.1.2</code>'. instead of what I expected (such as a loopback address, 127.0.0.1... or some IPv6 nonsense)</p>

<p>There's only one kind of alchemy I know of for turning a good name into a crazy ipaddress: and that's <a href='http://secretgeek.net/block_sites.asp'>the magic of the HOSTS file</a>.</p>

<p>So I looked in there for '<code>leon<strong style='font-size:large'>x</strong>_xps</code>' and I found it. Found this crazy nonsense line, probably added by myself during some other wild-goose-chase for a solution to some other messed up problem:</p>

<blockquote><pre>192.168.1.2 leonx_xps leon_xps</pre></blockquote>

<p>Once I'd commented out that rule, the asp.net application immediately started to connect succesfully to SQL Server 2008 r2. And I can move forward with my testing of <a href='https://github.com/robconery/massive'>Massive</a> and <a href='https://github.com/SamSaffron/dapper-dot-net'>Dapper</a>.</p>

<p>But just mentioning the probable cause of this (not cleaning up during an earlier problem-panic) I remember that earlier tonight, while frantically trying to fix this problem I added some stupid rules to the windows firewall. I had better go and remove them now before my computer gets owned. Hey wait a moment!? Why is my CPU at 100%? Be right back...</p>
 
]]>
    </description>
    <pubDate>Sun, 08 May 2011 13:30:04 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/boring_sql_one.asp</guid>
  </item>
<item>
  <title>Coding While You Commute</title>
    <link>http://www.secretGeek.net/code_commute.asp</link>
    <description>
      <![CDATA[<a href='http://secretGeek.net/higgins/slides_alt_net.html' style='float:right; margin:5px'><img src='http://secretGeek.net/image/codeslide_bus.png' alt='coding on the bus' style='border:2px solid #AAA' /></a>

<p>I gave a talk at <a href='http://www.meetup.com/Brisbane-Alt-Net-Group/'>Brisbane's alt.net</a> recently. You can download the slides <a href='http://secretGeek.net/higgins/slides_alt_net.zip'>here (1.5M zipped)</a> or:</p>
<p>&nbsp;</p>

<p><a href='http://secretGeek.net/higgins/slides_alt_net.html' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:20px;padding:10px;margin-left:45px;-moz-border-radius: 15px; border-radius: 15px;' title='slides for coding on the bus talk'>View the 97 slides online here</a></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (use arrow keys to advance)</p>
<p>&nbsp;</p>
<p>The theme was '<strong>Coding on the Bus</strong>' -- the optimisations and approach I've used for cranking out a dozen mini projects on my daily commute in the last year.</p>
<p>A bus is a seemingly counter-productive environment. As I say in one of the slides: 
<blockquote><p>If your workplace was like a bus: everyone would quit.</p></blockquote>
<p>And yet I'm producing a lot of stuff while on that short ride, definitely pushing the limits of my abilities. So this talk was an attempt to extract all the lessons I could from this real life productivity success story.</p>
<h1>TL;DR;</h1>
<p>Here's the quick version:</p>
<blockquote><p>
#1 Internet is bad<br />
#2 Keep it damn simple<br />
#3 Value your tools/libraries/snippets<br />
#4 Don't be a hero</p></blockquote>


<p>The people at Brisbane Alt.Net are a very cluey bunch so it was great to get their input on the whole thing. They were a very attentive and helpful bunch. It was a massive buzz talking to them. I highly recommend it.</p>

<a href='http://higgins.codeplex.com/' style='float:right;margin:5px'><img src='http://secretGeek.net/image/higgins_logo.png' alt='higgins presenter' style='border:5px solid #C00' /></a>

<h2>...And Introducing Higgins</h2>
<p>Naturally, I wrote the slides about writing on the bus, <em>while on the bus</em>. I don't have Powerpoint on my bus netbook, so I also had to write my own html-based slide presenter, which I've codenamed Higgins.</p>
<p>I've since added higgins to codeplex. You can <a href='http://higgins.codeplex.com'>get Higgins from codeplex</a> and use it yourself, if you're so inclined.</p>
<p>&nbsp;</p>

<p><a href='http://higgins.codeplex.com' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:20px;padding:10px;margin-left:45px;-moz-border-radius: 15px; border-radius: 15px;'>Visit higgins at codeplex</a></p>
<p>&nbsp;</p>
<p><a href='http://higgins.codeplex.com/releases/64531/download/228871' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:20px;padding:10px;margin-left:45px;-moz-border-radius: 15px; border-radius: 15px;'>Download higgins here</a></p>

<p style='clear:right'>&nbsp;</p>

<img src='http://secretGeek.net/image/briz_alt_net_20.jpg' alt='briz alt net sign kind of ironic i think' style='border:2px solid #AAA; display:block;float:center;margin:5px;margin-left:auto;margin-right:auto;' />

<p style='clear:both'>&nbsp;</p>
]]>
    </description>
    <pubDate>Sat, 16 Apr 2011 03:33:12 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/code_commute.asp</guid>
  </item>
<item>
  <title>Test Driven Dentistry Is A Good Thing</title>
    <link>http://www.secretGeek.net/t_d_dentistry,asp.asp</link>
    <description>
      <![CDATA[ 
<p>I saw this quote in the footer of an email...</p>

<blockquote>
<p>"Test-driven Dentistry (TDD!) - Not everything should be test driven"<br />
- <a href='http://www.slideshare.net/fogus/fertile-ground-the-roots-of-clojure'>Michael Fogus</a></p>
</blockquote>

<p>I'm no TDD-lover, not by a long shot, but I dismiss the claim that you shouldn't do test driven dentistry.</p>

<p>I think you probably *should* do test driven dentistry.</p>

<p>First write your test:</p>

<blockquote>
<pre>
Setup:
   Put on lead coat.
   Perform X Ray.
   
Test:
   Assert: There are no unfilled cavities.

Teardown:
   Remove lead coat.
</pre>      
</blockquote>

<p>And then:</p>
<blockquote>
<pre>
Run the test: it fails.

Fill the cavity.

Run the test: it passes.
</pre>
</blockquote>

<p>The only special nuance of test-driven-dentistry is that you must resist the urge to refactor the mouth, as this would require re-executing your tests, which may cause unnecessary irradiation of the patient. Side effects are an encumbrance but not a show stopper.</p>
]]>
    </description>
    <pubDate>Fri, 01 Apr 2011 01:13:34 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/t_d_dentistry,asp.asp</guid>
  </item>
<item>
  <title>The 'less crashy' release of NimbleText</title>
    <link>http://www.secretGeek.net/nt_lesscrash.asp</link>
    <description>
      <![CDATA[<a href='http://NimbleText.com/'><img src='http://secretgeek.net/image/ns_sample_shot.png' style='float:right;clear:right;border:0px solid #FFF;padding:10px;'></a>
<p>I put out a minor update to <a href='http://NimbleText.com'>NimbleText</a> the other day and called it <a href='http://nimbletext.com/Version/Notes#1.2.0.34040'>the 'less crashy' edition.</a></p>
<p>Here's the backstory.</p>
<p>I've received intermittent reports for a while that NimbleText would crash on startup. But I couldn't reproduce the problem, and even the people reporting the problem could rarely reproduce the problem.</p>
<p>After I put out a major update on Mar 17 I got this crash report from <a href='http://www.hanselman.com/blog/'>Scott Hanselman</a>, via <a href='http://twitter.com/#!/shanselman/status/48503165393444864'>twitter</a>:

<blockquote><p>@secretgeek I was going to tweet about it, but it crashes on startup for me.</p></blockquote>
<p>Now this is vexing. I was on a bus at the time, with limited resources. I asked for a stack trace. (And I asked nicely, <a href='http://imgur.com/jacoj'>not like this guy</a>)</p>
<p>But unfortunately:</p>
<blockquote><p>@secretGeek can't...doesn't even start. Watson's before the UI shows up.</p></blockquote>
<p>...which is even more vexing. (For the younger readers: to 'Watson' is to crash, and refers to <a href='http://en.wikipedia.org/wiki/Dr._Watson_(debugger)'>Dr Watson</a>. Internally at microsoft, this nomenclature is still used.)</p>
<p>So I asked for system specifications from the crashee, and learnt:</p>
<blockquote><p>@secretGeek win64, ie9. Visit site, download, run, crash</p></blockquote>
<p>Note that twitter is sufficient for most of the pertinent information, provided the crashee in <a href='http://www.hanselman.com/blog/FizzBinTheTechnicalSupportSecretHandshake.aspx'>fizzbin savvy</a>. Non-fizzbin customers often have to give you the full backstory of their life and times before confirming that they are indeed using a Windows computer.</p>
<p>Well I haven't used IE9 myself, so that's the 'odd man out' for me. In fact as a chrome user, and occasional firefox user, I haven't tried running it from IE at all. When you write a windows application you don't think that testing various browsers should be a part of your regime.</p>
<p>But I had an <a href='http://twitter.com/#!/TheColonial/status/48518600327303168'>immediate counter claim</a> from <a href='http://buffered.io/'>OJ</a>:</p>
<blockquote><p>@secretGeek @shanselman I have Win7 x64, IE9, and it works fine for me. Download, run, all good. Leon, are you using 3rd party native dlls?</p></blockquote>
<img src='http://secretgeek.net/image/womm.png' style='float:right;clear:right;border:0px solid #FFF;padding:10px;'>
<p>NimbleText is a very simple application. It has *no* dlls. It does use obfuscation though, and this is where my suspicions immediately shifted (wrongly as it turns out).</p>


<p>Once I was at a real computer again I tried downloading the app from IE and running it. It worked fine for me. Perhaps I could re-badge it with the <a href='http://jcooney.net/post/2007/02/01/New-Application-Certification-Program-It-Works-on-My-Machine.aspx'>'works on my machine'</a> certification and be done with it? No, these gloomy ruminations aren't helpful.</p>
<p>I tried again and again, and the trick soon announced itself.</p>
<p>When you click on an exe, what do you do next? Do you choose "run" or "save"? Personally I always choose "save". This became ingrained behavior in me many years ago. So it never occurred to me to press 'run'. But consider the psychology of the crashee: <strong>Scott Hanselman has personally installed every single piece of software on the entire internet.</strong> To allow him to perform this incredible feat he is going to be taking shortcuts anywhere he can. So instead of downloading the file and then running it, I tried just pressing "run". Instantly: the app would hang, then crash. Bingo.</p>

<p>Once you've got a repro, everything is straightforward.</p>
<p>The line that failed was an <code>Assembly.Load</code>:</p>
<blockquote><code>var a = Assembly.Load(assemblyShortName);</code></blockquote>
<p>Why does this fail when I run it from IE, but not when I download it and run it?</p>
<p>I assumed that some kind of security limitation didn't allow an Assembly Load in that scenario.</p>
<p>Rather than solve the problem of why the <code>Assembly.Load</code> failed, i looked at the code in question and found I could instead just use:
<blockquote><code>var a = Assembly.GetExecutingAssembly();</code></blockquote>
<p>This code does *not* fail when the app is executed directly in IE. So I updated NimbleText and put out the new, less crashy, release.</p>
<p>But the mystery still wasn't solved to my satisfaction. I wanted to learn exactly why the <code>Assembly.Load</code> would fail. If it was a security exception, why didn't it look like one? I googled to no avail. I binged without success.</p>
<p>Next I built a small console app that tried many variations around the problem. I found I <em>could</em> get an <code>Assembly.Load</code> to succeed if I used the <strong>full</strong> name of the assembly, like this:</p>
<blockquote><code>var a = Assembly.Load("NimbleText, Version=1.2.0.29995, Culture=neutral, PublicKeyToken=null");</code></blockquote>
<p>What's the difference? I was expecting to need to use <a href='http://msdn.microsoft.com/en-us/library/e74a18c4.aspx'>FUSLOGVW.exe</a> the assembly binding log viewer, something I don't look on with any great excitement.</p>
<p>Then did I noticed that when you run an app directly from IE it not only gets downloaded to temporary internet files, it also gets *renamed*. I tried this out locally and saw that renaming the file was the killer. Any old copy of NimbleText would crash if I renamed the executable.</p>
<p>The <a href='http://msdn.microsoft.com/en-us/library/ff649676.aspx'>CLR assembly resolver </a> expects that your assembly name is your assembly short name plus .dll or .exe. Hence, it's quite rude of IE to rename the file under you. So I blame IE. I'm not the first person to blame IE, and I won't be the last.</p>
<p>But I also blame myself, or rather my code. I'll no longer be using shortnames when trying to resolve an assembly. It's strong names or nothing as far as I'm concerned. As of now, I scoff at short names.</p>
<p>And, you should use <a href='http://NimbleText.com/'>NimbleText</a> for all your text manipulating, data extracting, code generating needs. It boasts <strong>less crashiness.</strong></p>
 
]]>
    </description>
    <pubDate>Sun, 20 Mar 2011 00:52:27 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/nt_lesscrash.asp</guid>
  </item>
<item>
  <title>Rethinking Toolbars in Visual Studio (or any IDE)</title>
    <link>http://www.secretGeek.net/vs_toolbar_st.asp</link>
    <description>
      <![CDATA[<span style='float:right'><img src='http://secretGeek.net/image/arrows_in_vs2010.png' style='border:0px;'/><p style='text-align:center;margin-top:-4px;font-size:0.8em'>Count the Arrows on the Toolbar</p>
</span>

<p>Toolbars are kind of ridiculous. You start off with row after row of cryptic icons which mean almost nothing to you. Even after years of using a program you've probably only ever used half of them, and have no clear idea what the other half do, and probably don't need them anyway. Not to mention that it's so hard to come up with meaningful icons that most of them end up just being <a href='http://secretgeek.net/Too_Many_Arrows.asp'>an arrow of some kind.</a></p>

<p>To (supposedly) overcome these kinds of problems Microsoft invented the '<a href='http://blogs.msdn.com/b/jensenh/archive/2006/04/04/568249.aspx'>ribbon</a>,' but it hasn't made its way into Visual Studio yet. I think a different solution could be better:</p>

<p><strong>Toolbars could work the same way as the taskbar does in Windows 7:</strong></p>
<p>It would start out <em>empty</em>. </p>

<span style='float:left'><img src='http://secretGeek.net/image/vs_empty_toolbar.png' style='border:0px;' />
</span>

<p style='clear:left'>&nbsp;</p>
<p>Clean. Beautiful. This is far preferable to today's approach: starting out full of clutter.</p>

<p>Thereafter, when you run a command (by selecting it from a menu option, for example), it would show up on the toolbar (in the same way that running an application in Windows 7 show up on the taskbar.</p>

<p>After that you would be able to right click it and choose to 'pin it' in place, so it stays.</p>

<p>There would need to be some difference in the behaviour, since commands and tasks don't work the same way as each other. Tasks are long running things, so an unpinned icon (in Windows 7) stays visible only so long as the task stays running. Commands are short running things, so if we followd the model exactly they would flicker onto the toolbar and then almost immediately dissappear before we have a chance to pin them. So instead the toolbar could show a 'rolling history' of (say) the ten or twenty most recently used commands. Or perhaps it would show all the commands used during this session. Or use a simple forumla to show commands that are used recently and or most often (similar to the way voting works at <a href='http://news.ycombinator.com'>sites like</a> <a href='http://www.reddit.com/r/programming'>reddit</a>).</p>

<p>And you would be able to simply drag to rearrange the items on the toolbar, just like you can on the windows 7 taskbar.</p>

<p>I think this is better than a ribbon.</p>

<p>Some refinements of this idea are:</p>
<p>1. You might have a setting to say "Don't add a command to the toolbar if i've invoked it via a keyboard shortcut." Since you know the shortcut, you're unlikely to need the icon. </p>
<p>2. Some icons should only appear when you're editing certain types of files. The 'jumplist' for a given icon could let you quickly apply this kind of conditional showing/hiding.</p>
<p>3. Your toolbar settings could be exported, synchronised across computers (via dropbox) or shared with friends. They would be human readable.</p>
<p>4. It would be crucial to have an effective way to search for commands. This is <a href='http://secretgeek.net/ribbonfinder.asp'>true of the ribbon as well.</a> (this part was <a href='http://www.codinghorror.com/blog/2007/06/incremental-feature-search-in-applications.html'>well covered by Jeff Atwood</a> in 2007).</p>

<p>See also: <a href='http://channel9.msdn.com/shows/Going%2BDeep/Rico-Mariani-Visual-Studio-Today-Tomorrow-and-Beyond/'>Rico Mariani discussing the future of Visual Studio</a> (from 2008). He's no ribbon fan.</p>
<p>And a beta-tester of my blog tells me Hanselman has been <a href='http://www.hanselman.com/blog/SimplifyYourVisualStudio2010ToolbarAndFreeYourMind.aspx'>covering similar territory</a> in the last few days. That VS UI has just got to lighten up!</p>
]]>
    </description>
    <pubDate>Wed, 16 Mar 2011 12:31:38 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/vs_toolbar_st.asp</guid>
  </item>
<item>
  <title>Where shall we have lunch?</title>
    <link>http://www.secretGeek.net/lunch_app.asp</link>
    <description>
      <![CDATA[<p>All wise students of the <em>Hitchhiker's Guide to the Galaxy</em> will remember <a href="http://en.wikiquote.org/wiki/The_Hitchhiker's_Guide_to_the_Galaxy">this quote:</a></p>
<blockquote><p>The History of every major Galactic Civilization tends to pass through three distinct and recognizable phases, those of Survival, Inquiry and Sophistication, otherwise known as the How, Why and Where phases.</p>
<p>For instance, the first phase is characterized by the question <em>How can we eat?</em> the second by the question <em>Why do we eat?</em> and the third by the question <em>Where shall we have lunch?</em></p></blockquote>
<p>In accordance with that philosophy, I've studied the complex decision making usually required to reach group consensus on a lunch venue, and embodied the resulting deterministic algorithm in this  simple web site:</p>
<br />
<p><a href='http://secretgeek.net/lunch/' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:20px;padding:10px;margin-left:45px;-moz-border-radius: 15px; border-radius: 15px;'>http://secretgeek.net/lunch/</a></p>
<br />
<p>So any day you're wondering where I'm gonna be for lunch, just visit that site and it should be correct. <small style='color:#888'>(For the next two weeks.)</small></p>
]]>
    </description>
    <pubDate>Mon, 14 Mar 2011 11:11:26 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/lunch_app.asp</guid>
  </item>
<item>
  <title>Setting up email for your microIsv</title>
    <link>http://www.secretGeek.net/25step_9_EmailForMicroISV.asp</link>
    <description>
      <![CDATA[<p>This is one of the simplest things you need to do for your microIsv, but even this one has a few decisions and a few pitfalls. It's also Step 9 of <a href='http://secretgeek.net/25steps.asp'>25 steps for building a microISV.</a></p>
<p>I've recently gone through the process of getting email in place to support <a href='http://NimbleText.com'>NimbleText</a>, so I thought I'd document it while it's still fresh in the old mind.</p>

<p>The first thing you need to work out is how you intend to use email in your microIsv, and from this you'll determine what accounts you need.</p>
<p>For example, here's where I'm using it, or planning to use it:</p>
<ol><li>When licenses go out</li>
<li>When support requests come in</li>
<li><strike>potentially for 'mass mailouts'</strike></li>
</ol>
<p>I ruled out 'mass mailouts' but only for now.</p>
<p>To handle these simple cases I could have a whole bunch of addresses such as 'licensing', 'sales', 'support', 'marketing', 'leon', 'ceo' and so on. But that's exactly the sort of over-engineering you need to avoid. In a microIsv you need to be thoroughly minimalist in everything you do.</p>
<p>The simplest thing that can possibly work is to have exactly one account, 'support', so that's what I've done with NimbleText.</p>


<a href='http://secretGeek.net/image/mail_1_create.png'><img src='http://secretGeek.net/image/mail_1_create_th.png' alt='create email account' style='border:1px solid #CCC;margin:10px;float:right;' /></a>

<h2>Step 1: Create the account.</h2>
<p>I'm hosting my sites at <a href='http://www.arvixe.com'>Arvixe</a> these days, so in their control panel I set up a new email account.</p>
<p>I also tell it to forward to my gmail account (this won't be enough to get the forwarding working, we need to tell gmail as well)</p>
<p>I also told it to act as a catch-all address. So if someone writes to 'unknown@...' etc then I should still get it.</p>


<p style='clear:both'>&nbsp;</p>
<a href='http://secretGeek.net/image/mail_2_sendmailas.png'><img src='http://secretGeek.net/image/mail_2_sendmailas_th.png' alt='send mail as your new account' style='border:1px solid #CCC;margin:10px;float:right;' /></a>

<h2>Step 2: Set up 'send mail as' at gmail.</h2>

<p>In gmail you need to configure another account you can send email from.</p>
<p>I seem to 5 or 6 of these in use by now.</p>
<p>Within gmail, you go into settings in the top right hand corner. Choose the tab called called "Accounts and import". In the 'Send mail as' section, click the button to "Send mail from another address."</p>
<p>Enter sensible values, and pick the defaults. To complete this process, gmail sends an email to your new account, that contains a confirmation code you need to enter back in gmail.</p>

 

<h2>Step 3: Create a filter at gmail.</h2>
<p>You want any new support requests, etc, to be highlighted, and grouped together.</p>
<p>So create a filter in gmail that applies a new label, named after your microIsv. Tip: for any label I really care about, such as this one, I pre-pend the name with an underscore so it is alphabetically near the top of my labels. (I have a lot of labels). In this case the label is "_NimbleText".</p>
<p>I also tell the filter to apply a star to all emails from my support address. I can leave the star in place until a support request has been followed up sufficiently. I treat anything with a 'star' as an open case.</p>
<p>(Yes, this is a poor man's bug tracking system. The startup package from fogBugz is free and powerful. I assume Atlassian's Jira has a similar deal.)</p>

<p style='clear:both'>&nbsp;</p>
<img src='http://secretGeek.net/image/color_label.png' alt='color the label you created' style='border:1px solid #CCC;margin:10px;float:right;' />

<h2>Step 4: Color the label.</h2>

<p>Once the filter is created and the label is created we can then set a color for the filter, so that any new support messages stand out in the inbox.</p>

<h2>Step 5: Listing email address online</h2>

<p>Now you need to list the email address in a couple of places. I've put it on the <a href='http://nimbletext.com/home/about'>about page</a>, the <a href='http://nimbletext.com/Home/Help'>help page</a> and the <a href='http://nimbletext.com/Home/Purchase'>purchase page</a>.</p>

<p>I was *particularly* pleased with the idea of putting the email address on the purchase page, as I think it's just the kind of reassurance which might help people make the leap of faith required to put your money in the hands of a stranger.</p>

<h2>Step 6: List email address in your application</h2>
<p>Stupid me hasn't done this yet.</p>
<p>It's a good idea to make your email address available from the help menu of your application -- perhaps two links, one for 'add a suggestion ;-)' and one for 'report a report :-('.</p>

<p>Also, when the app crashes *hard*, your real clever applications catch the otherwise unhandled exception, and encourage the user to send them to the support address.</p> 

<p>A more sophisticated approach is to send the crash reports over http. If you're integrated with <a href='http://www.fogcreek.com/fogbugz/'>Fogbugz</a>, as we are with <a href='http://TimeSnapper.com/'>TimeSnapper</a>, then you can use their <a href='http://www.fogcreek.com/FogBUGZ/docs/40/Articles/GetCrashReportsFromUsersA.html'>'bugzscout'</a> dll to deliver crash reports, with customer permission. (also, here's an interesting <a href='http://www.codeproject.com/KB/exception/ExceptionHandling.aspx'>codeproject article</a> from 2004 on handling exceptions by some weird unknown guy called Wumpus1)</p>



<p style='clear:both'>&nbsp;</p>
<a href='http://secretGeek.net/image/mail_7_whensending.png'><img src='http://secretGeek.net/image/mail_7_whensending_th.png' alt='pick correct from-address when sending' style='border:1px solid #CCC;margin:10px;float:right;' /></a>


<h2>Step 7: When sending, pick correct 'from' address</h2>
<p>This is pretty self-explanatory. If you're sending an email in your capacity as CEO of your new microIsv, pick the relevant email address in the 'from' drop-down list, rather than your regular email address.</p>

<h2>Step 8: Sending email programmatically.</h2>

<p>At times you'll need to send one or two emails programatically. For example when a purchase occurs and you want to send out a license.
<p>You don't want those emails to be categorised as spam. There's a bunch of things to keep in mind, <a href='http://stackoverflow.com/questions/371/how-do-you-make-sure-email-you-send-programmatically-is-not-automatically-marked'>head to stackoverflow</a> to read more.</p>

<p>When performing mass mailouts it becomes <strong>much</strong> more difficult to avoid being classified as spam (even if you're not sending spam) so when I've done that in the past I've outsourced it to a specialist company. I've used <a href='http://www.campaignmonitor.com/'>Campaign Monitor</a> and was seriously impressed by the whole experience. I'd recommend you use them for any bulk promotional emails you need to send. (No, I'm not affiliated with them.)</p>

<h2>Wrap it up already</h2>

<p>That's it. That's every detail I can think of for getting email up and running to suit the tiniest of enterprises.</p>
<p>Comments, suggestions, feedback, bring it.</p>
]]>
    </description>
    <pubDate>Mon, 07 Mar 2011 10:04:03 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/25step_9_EmailForMicroISV.asp</guid>
  </item>
<item>
  <title>The NO Visual Studio movement: Compiling .net projects in Notepad++</title>
    <link>http://www.secretGeek.net/NoVS.asp</link>
    <description>
      <![CDATA[ 
<a href='http://secretGeek.net/tryCompile.txt'><img src='http://secretGeek.net/image/tryCompile.png' style='border:0px;float:right;border:1px solid #444'/></a>

<h2>What is the NO Visual Studio Movement?</h2>

<p>I don't talk about it much, but I'm the chief of an underground technical movement called the 'NO Visual Studio' movement, or <em>NoVS</em> to its friends.</p>

<p>NO in this case doesn't mean 'No.' We steal from the <a href='http://geekandpoke.typepad.com/geekandpoke/2011/01/nosql.html'>NoSQL</a> movement and re-define NO to mean 'Not Only'.</p>

<p>In NoVS we respect that sometimes a <a href='http://www.linqpad.net/'>set</a> <a href='http://www.kaxaml.com/'>of</a> <a href='http://nimbletext.com/'>lightweight</a> <a href='http://www.albahari.com/queryexpress.aspx'>tools</a> can be more powerful (and certainly more enjoyable) than the 'one tool to rule them all' philosophy of VS. Sometimes low-power = high productivity.</p>

<p><em>The movement</em> has its roots in this talk by Charles Petzold, <a href='http://charlespetzold.com/etc/DoesVisualStudioRotTheMind.html'>'Does Visual Studio Rot the Mind?'</a> The final section, '<strong>The Pure Pleasures of Pure Coding</strong>' is most relevant:

<blockquote><p>
I decided to use plain old ANSI C, and to edit the source code in Notepad -- which has no IntelliSense and no sense of any other kind -- and to compile on the command line...</p>

<p>...there's no APIs, there's no classes, there's no properties, there's no forms, there's no controls, there's no event handlers, and there's definitely no Visual Studio. </p>

<p>It's just me and the code, and for awhile, I feel like a real programmer again.</p>
<p></blockquote>

<p>He says everything right there in a nutshell. Every word is like strong whiskey.</p>

<p>In keeping with the NoVS movement, my favourite machine is a mini-laptop I use on the bus. It's a true 'No Visual Studio' machine where the only IDE is <a href='http://notepad-plus-plus.org/'>Notepad++</a>.</p>

<p>Mostly I write javascript, and occasionally C# and Silverlight. <a href='http://nimbletext.com/'>NimbleText,</a> for example, was developed almost entirely 'NoVS' style.</p>

<p>I've tweaked my setup lately so that I can compile entire .net projects from inside notepad++ -- and I thought I'd share that bit with you now.</p>

<h2>Compiling .net projects in Notepad++</h2>

<p>Download this file and put it in your <code>Documents</code> folder:</p>

<p><a href='http://secretGeek.net/tryCompile.txt' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;'>Download tryCompile.txt (rename it as .bat)</a></p>
<br />

<p><strong>Rename it to <code>tryCompile.bat</code>... and always read batch files before running them on your own machine. (On a stranger's machine you can afford to be less cautious)</strong></p>

<p>Once you've got that file in place, find notepad++'s shortcuts file. It should be here: <code>%APPDATA%\NotePad++\shortcuts.xml</code>

<p>Edit that file. And under this tag <code>&lt;UserDefinedCommands&gt;</code> add the following node:</p>

<blockquote><code>
     &lt;Command name="MSBuild" Ctrl="yes" Alt="no" Shift="yes"
Key="66"&gt;%USERPROFILE%\Documents\tryCompile.bat
&amp;quot;$(CURRENT_DIRECTORY)&amp;quot;&lt;/Command&gt;
</code></blockquote>

<p>Now, while editing <em>any</em> file that is part of an existing .net project, hit <code>Ctrl-Shift-B</code>. That will launch 'TryCompile.bat' which will in turn locate and build the correct project file for you. (It will also add an <code>MSBuild</code> option to the <code>Run</code> menu in Notepad++)</p>
<p>This works for C# projects, VB.net projects, Data dude projects -- anything that includes a <code>proj</code> file that MSBuild can consume.</p>

<p>If you have other tools, hacks or tweaks to further <em>the cause</em> don't hesitate to share them.</p>
]]>
    </description>
    <pubDate>Sat, 26 Feb 2011 03:54:09 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/NoVS.asp</guid>
  </item>
<item>
  <title>ZeroOne: the editor for programmers who think in binary</title>
    <link>http://www.secretGeek.net/zo_intro.asp</link>
    <description>
      <![CDATA[ 
<a href='http://www.videosnice.com/video/klZLfHAWfxE/Tommy-Pinball-Wizard.html'><img src='http://secretGeek.net/image/pinball_wiz_75.png' style='float:right; clear:both;border:0px solid #FFF' alt='joel on the pinnies' /></a><br />

<p>One of my <a href='http://callvirt.net/blog/'>buddies</a> has
turned into a bit of a Pinball Junkie lately.</p>

<p>That's a picture of him at right. He takes things to extremes.</p>
<p>His new goal in life is to get his name at the top of the high scores.</p>
<p>Which left a few of us wondering how <em>data entry</em> works on
a pinball machine. </p>
<p>If there are only two buttons, left and right, it must be hard to enter your initials for the high score. My guess was that you'd scroll back and forth through the
letters, but I wasn't sure how you'd confirm your letter, once you
found it. <a href='http://www.i-think22.net/'>Rhys</a> was confident that you could do it with only two
options, by some kind of binary tree navigation exercise.</p>
<h2>How could a pinball machine inspire a programmer's editor?</h2>
<p>The conversation quickly devolved into a design for an editor with
just two buttons, one and zero. This would be a serious improvement over fuv.</p>

<p>You might have seen this famous cartoon before: 'Real Programmers Code In Binary'</p>
<p><img src='http://secretGeek.net/image/real-programmers-code-in-binary.jpg' style='float:left'/></p>
<p style='float:left'><span style='vertical-align:top'>(corrected -->)</span><img src='http://secretGeek.net/image/real-programmers-code-in-binary_ftfy.png' /></p>
<p style='clear:left'>(I'm not the only person annoyed by the extraneous use of an 'enter' key in that image... I've gone and fixed that.)</p>
<p>(And of course you've seen the infamous <a href='http://xkcd.com/378/'>xkcd 378</a> which deals with the same topic.)</p> 

<h2>So Build It Already</h2>

<p>As soon as I had a chance I started work on just such an editor, and it's <a href='http://zo.codeplex.com'>available now from codeplex</a>.</p>

<br />
<p><a href='http://zo.codeplex.com' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;'>Visit ZeroOne on codeplex</a></p>
<br />
<p>And you can download it, too:</p>
<br />
<p><a href='http://zo.codeplex.com/releases/61278/download/209657' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;'>Download ZO.exe</a></p>
<br />


<a href='http://secretGeek.net/image/zo_helloworld.png'>
<img src='http://secretGeek.net/image/zo_helloworld_35.png' alt='you know the feeling' style='border:0px solid #CCC;margin:10px;float:right;' />
</a>

<p>Only two buttons are needed for input - Zero and One. So the editor is called ZeroOne, or 'zo' for short.
<p>If it helps, you can think of one and zero as the left and right buttons on a pinball machine.</p>
<p>If you enter 'esc' (by typing 0011011) you enter 'Command mode'.</p>
<p>In command mode there are three commands - 'o' (open), 's' (save) and 'q' (quit). 
<p>For example, in command mode if you enter 'oc:\fred.txt' the first letter is the 'o' command and the remainder is the file path and name. So a file 'fred.txt' would be opened from 'c:\'. 
<p>To save a file you need to specify the filename. E.g. 'sc:\fred.txt'. Again, the first letter ('s') is the command.</p>
<p>To execute your command, enter a line feed character (0001010).</p>
<p>To exit command mode, enter 'esc' again (0011011).</p>



<p style='clear:right'>&nbsp;</p>

<a href='http://secretGeek.net/image/zo_error.png'>
<img src='http://secretGeek.net/image/zo_error_35.png' alt='you know the feeling' style='border:0px solid #CCC;margin:10px;float:right;' />
</a>


<p>If you press any key other than Zero or One, your document is wiped. (This is a <a href='http://secretGeek.net/fuv_intro.asp'>fuvism</a>) See screenshot at right.</p>

<p>If you send the wrong character into the editor, ZO can be quite forgiving: you can enter a Backspace by typing 0001000. There are no navigation commands though, so you should endeavor to enter the right text from the very start.</p>

<p>I've put together a <a href="http://vimeo.com/20149349">short screencast</a> to demonstrate ZO in action.</p>




<iframe src="http://player.vimeo.com/video/20149349" width="400" height="300" frameborder="0"></iframe><p style='font-size:0.8em'><a href="http://vimeo.com/20149349">ZeroOne - the editor where you can only press Zero and One</a> from <a href="http://vimeo.com/secretgeek">secretGeek</a> on <a href="http://vimeo.com">Vimeo</a>.</p>



<p>&nbsp;</p>

<p>... and what was my friend's reaction when I showed him ZeroOne in action? I think his face says it all:</p>

<p><img src='http://secretGeek.net/image/pinball_joel.jpg' /></p>
]]>
    </description>
    <pubDate>Sun, 20 Feb 2011 00:00:59 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/zo_intro.asp</guid>
  </item>
<item>
  <title>Mercurial workflow for personal projects (with a .net bias)</title>
    <link>http://www.secretGeek.net/personal_mercurial.asp</link>
    <description>
      <![CDATA[ 

<p>I'm using <a href='http://hg-scm.com/'>mercurial</a> for personal projects and thought I'd share the approach I use with you so you can teach me to improve it.</p>
<p>(If you don't have mercurial, <a href='http://mercurial.selenic.com/wiki/Download'>download it and install it now</a>, so you can follow along)</p>
<p>(This isn't a "joke" post by the way. Sometimes my sarcasm runs so deep that I need to stop and reassure people when I'm not being sarcastic. In particular, I need to reassure myself ;-) )</p>
<p>Say I'm creating an open source project, such as <a href='http://secretGeek.net/fuv_intro.asp'>fuv</a>. I create the project online, then clone it locally:</p>
<blockquote><pre>
c:\projects&gt;md fuv
c:\projects&gt;cd fuv
c:\projects\fuv&gt;hg clone https://hg01.codeplex.com/fuv</pre></blockquote>

<p>(If I'm just creating it locally, like if it's closed-source, then I begin instead with '<code>hg init</code>.')</p>

<p>The very first thing I add is a <a href='http://mercurial.selenic.com/wiki/.hgignore'>.hgignore</a> file. This is the file where you tell mercurial *not* to check in all of those pesky user-specific files that a visual studio project generates, and to avoid versioning the <code>bin</code> and <code>obj</code> folders etc.</p>
<p>I've stolen the <code>.hgignore</code> file from the <a href='http://code.google.com/p/funnelweb/source/browse/'>Funnel Web project</a> because 1) the guys working on that project are much more thorough and intelligent than me, and 2) it was the first .hgignore file I found lying around on my hard drive.</p>
<p>The <code>.hgignore</code> goes in the same folder as the <code>.hg</code> folder. It doesn't go *in* the <code>.hg</code> folder (you don't normally have to go in there at all). It goes in the parent of the <code>.hg</code> folder.</p>

<p>Now it's time to write the code. You could either copy code in from elsewhere (if you had already started it) or if starting from scratch, create a new solution in the folder you've just created.</p>

<img src='http://secretGeek.net/image/postBuild_hg.png' alt='post build action in visual studio 2010' style='float:right;'/>

<p>Here's the bit that I think is clever/stupid. I put a 'post-build' action on the project, so that everytime I build succesfully I check in the work in progress.</p>

<p>It's as simple as adding this to the post build step:</p>
<blockquote><pre>
hg addremove
hg commit
</pre></blockquote>

<p>This is clever because it means that every tiny change you make is tracked. And it's stupid for the same reason. The main reason reason it's stupid is that it means everytime something has changed you are asked to enter a commit note in a notepad.</p>
<p>It's quite annoying at first. But soon you get into the spirit of it. You realise that it is making you act in a more mindful manner. You are concentrating on every build, more aware of what you are doing, and better focused on your tasks.</p>
<p>Still, that bit could be improved, and it definitely wouldn't be to everyone's taste.</p>


<p>When you've completed a feature you push your work to the server using <code>hg push</code>, like this:</p>

<blockquote><pre>
hg push
</pre></blockquote>
<p>You have to enter a username and password at that point. Or, if you're pushing often you can store the username/password in mercurial's configuration.</p>

<p>There's a lot of different places and ways you can store this info. I'm going to describe one in particular, but I'm not saying it's the best one. Opinions or improvements welcome.</p>

<p>Remember I said earlier that you don't need to go into <code>.hg</code> folder.... well... go in there. There's a file called '<code>hgrc</code>.' Editing it using something better than notepad (as it seems to have unix-style  line-endings rather than windows-style line-endings (aka '\n' not '\r\n', aka 'Lf' not 'CrLf'  aka 'char 10' not 'char13 char10').
<p>Add three lines to it, to tell it the user name and passowrd, and which site they refer to:</p>

<blockquote><pre>
[auth]
codeplex.prefix = https://hg01.codeplex.com/fuv
codeplex.username = secretGeek
codeplex.password = joshua
</pre></blockquote>


<p>(Joshua is not my real password by the way. And the word before the  "." can be whatever word you want as long as it's consistent across all three lines. It's just for grouping purposes.)</p>

<p>Here's the <a href='http://stackoverflow.com/questions/2584407/how-to-save-username-and-password-with-mercurial'>stackoverflow question on mercurial passwords</a> that I got this from.</p>


<h2>Automate your pushes!</h2>
<p>Once you've got your username/password in place, you can make the <code>push</code> a post build action too!</p>
<p>To make it so that a <code>push</code> only occurs on a '<code>release</code>' build, try this:</p>
<blockquote><pre>
if /I "$(ConfigurationName)" == "Release" hg push
</pre></blockquote>
<p>After that you've got an automated, integrated approach to version control even for the most insignificant of little projects.</p>
<p>Getting it setup and in place takes just a minute or two for a new project.</p>

<p>Some of the tweaks I'd like to make to this system are:</p>

<p>1. use some kind of a custom script to generate a proposed commit message. Perhaps it could look in your todo list (such as <a href='http://timesnapper.com/nextaction/'>nextaction</a>) to grab the item you are currently working on.</p>
<p>2. somehow 'flattening' the local commits when pushing, so that all of the in-between personal revisions are squished out of the way.</p>

<p>Also, I've been thinking about using mercurial (with 'auto commit' as described above) for managing a todo.txt file. Every time you save it commits, and a script looks at the diffs to see what tasks were deleted, marked as done, edited, added, etc. While it's an intriguing idea, I think it would need you to be very disciplined and somewhat restricted in the way you use the todo list.</p>

<p>(<a href='http://timesnapper.com/nextaction/'>nexaction</a>, by the way, lets you run custom shell commands when you complete a task. So you could use this to commit the file every time you complete a task. It's a feature I've never discussed with humans, out loud.)</p>
]]>
    </description>
    <pubDate>Mon, 14 Feb 2011 11:55:43 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/personal_mercurial.asp</guid>
  </item>
<item>
  <title>I see you're using vim. Let me fix that for you.</title>
    <link>http://www.secretGeek.net/fuv_intro.asp</link>
    <description>
      <![CDATA[<a href='http://fuv.codeplex.com'><img src='http://secretGeek.net/image/fuv_in_action.png' alt='fuv in action' style='border:0px solid #000;float:right' /></a>



<p>'<code>fuv</code>' is a programmer's editor that is an excellent replacement for vim.

<p>If you've been using vim for a while, you're probably frustrated with its lack of hardcore power.

<p>In vim it's far too easy to wimp out and use 'insert mode' to type text directly into a document.


<p><code>fuv</code> fixes that.
<p>In fuv, <strong>there is no direct entry of text.</strong></p>
<p>There is just a regular expression search/replace function.</p>
<p>*All* editing is done by searching and replacing over the existing text, using regular expressions.</p>
<p>And every search term *must* contain at least one non-escaped regular expression special character.</p>
<p>If, for example, you tried to replace "a" with "b" -- <code>fuv</code> wouldn't run it. It would emit the 'why bother?' error message and discard your document.</p>
<p>Instead you'd want to try replacing "[a]" with "b", only then will <code>fuv</code> consider your input worthy of applying.</p>

<p>If no matches are found for any given search/replace then <code>fuv</code> revises its opinion of you and discards your document. It may, on a whim, locate another document on your machine and discard that too.</p>

<p><code>fuv</code>'s native format for storing a document, a .<code>fuv</code> file, is not the resulting text but rather the series of replacements required to recreate that document from scratch. This is particularly helpful for avoiding merge conflicts from source control systems, mostly because it ensures that no one else will contribute.</p>

<p>Oh, and it's worth mentioning that <code>fuv</code> does not let you see the document itself. Upon launching <code>fuv</code>, all of your monitors go blank. Thereafter you must issue at least one command every minute or <code>fuv</code> assumes you have died and summarily discards all your work, overwriting every byte on disk at least 8 times to avoid recoverable <a href='http://en.wikipedia.org/wiki/Data_remanence#Overwriting'>data remanence</a>. And it's certainly best to keep <code>fuv</code> busy, as it only uses *spare* cycles for searching your hard drives in order to locate configuration files from competing editors that it can delete, reverse, or otherwise insidiously corrupt. <code>fuv</code> is playful. i guess.</p>

<p>To exit <code>fuv</code> you need to enter the termination command ::q&*$&(#&. Be careful to get it right. And please, whatever you do, don't try to "paste" in the termination command, or any other command. <code>fuv</code> treats all use of the clipboard as a dire insult.  I've promised not to reveal what happens, lest it should happen again to myself or the people I love (<code>fuv</code> is reading this as i type). Let me put it this way. Have you seen any of the "saw" films? <code>fuv</code> makes "saw" look like the dux of charm school.</p>

<p>Once you tire of <code>fuv</code>, it's time to consider emacs. Be careful though; emacs is no picnic. After you've been coddled by the niceties of <code>fuv</code>, emacs can seem outright cruel.</p>

<p>I've implemented the core features of fuv and <a href='http://fuv.codeplex.com'>put the source on codeplex</a>. Download the source, compile it, or, if you're feeling particularly foolish, <a href='http://fuv.codeplex.com/releases/60595/download/206344'>get the binary here</a>.</p>

<p>&nbsp;</p>
<p><a href='http://fuv.codeplex.com/releases/60595/download/206344' style='font-size:small; background-color:#333;color:#F00;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 5px; border-radius: 5px;'>Get "fuv.exe" Now (not a sane choice)</a></p>
<p>&nbsp;</p>
<p><a href='http://fuv.codeplex.com' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;'>Visit fuv on codeplex (wiser)</a></p>
<p>&nbsp;</p>
]]>
    </description>
    <pubDate>Tue, 08 Feb 2011 10:19:28 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/fuv_intro.asp</guid>
  </item>
<item>
  <title>The worst recruitment spam I've ever read</title>
    <link>http://www.secretGeek.net/recruiter_spam.asp</link>
    <description>
      <![CDATA[
<a href='http://secretGeek.net/image/recruitment_spam.png'><img src='http://secretGeek.net/image/recruitment_spam_th.png' alt='Spam from Bog Vogt' style='border:0px solid #000;float:right' /></a>

<p>Sorry 'Bob Vogt' but you've sent me the worst recruitment spam I've ever read.</p>
<p>I've taken the time to catalog precisely what it is that makes your recruitment spam email, out of thousands of other competing emails, so very definitely the worst I have seen, will ever see or could ever see.</p>
<p>Here are the 7 ways you fail, in order from least to most significant.</p>

<ol>
  <li>Bad: You've sent me unsolicited email.</li>
  <li>Bad: You've included a massive image in your email.</li>
  <li>Bad: The job is in the US. (I'm in Australia)</li>
  <li>Worse: The job is in Dayton OHIO.</li>
  <li>Worse: Your grammar is an atrocity.</li>
  <li>Worse: The job involves sharepoint.</li>
  <li>Worst: You're using comic fucking sans.</li>
</ol>
<p style='clear:right'>&nbsp;</p>
]]>
    </description>
    <pubDate>Thu, 03 Feb 2011 11:13:25 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/recruiter_spam.asp</guid>
  </item>
<item>
  <title>A thank you I forgot to say</title>
    <link>http://www.secretGeek.net/nt_thankyou.asp</link>
    <description>
      <![CDATA[ 

<p>In my <a href='http://secretgeek.net/nimbletext_is_alive.asp'>last</a> blog post I forgot to thank some excellent people who gave me a lot of help with NimbleText.</p>
<p>I spent about a fortnight in a private beta, receiving helpful feedback, bug reports and suggestions from <a href='http://harriyott.com/index.aspx'>Simon Harriyott</a>, <a href='http://timesnapper.com/about.aspx'>Atli Oddsson</a>, <a href='http://jcooney.net/'>Joseph Cooney</a> and <a href='http://www.i-think22.net/'>Rhys Parry</a>.</p>
<p>A private beta is a great idea if you're trying to get your product up to the public stage. There's <a href='http://www.useit.com/alertbox/20000319.html'>ample evidence</a> that you only need a small number of active participants to run a successful beta. I kept the feedback from the participants separate (no shared email threads, for example) so that people's opinions wouldn't be unduly influenced. I quickly found the opinions overlapped on most of the mistakes I'd made. When the bug reports began to slow down and overlap, I figured it was time to move to public beta.</p>
<p>Meanwhile, one of the bugs discovered after launch was that I don't actually receive the payments that people make. They would end up at a kind of dead letter office at paypal. That was a pretty bad bug. I've fixed it now. Feel free to <a href='http://NimbleText.com/Home/Purchase'>try it out</a> ;-)</p>
]]>
    </description>
    <pubDate>Tue, 01 Feb 2011 10:58:20 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/nt_thankyou.asp</guid>
  </item>
<item>
  <title>My new product, NimbleText, is live</title>
    <link>http://www.secretGeek.net/nimbletext_is_alive.asp</link>
    <description>
      <![CDATA[<a href='http://NimbleText.com'><img src='http://secretgeek.net/image/nimbleText_plain_narrow_50.png' style='float:right;clear:right;border:0px solid #FFF'></a>

<p>I just released my new product, <a href='http://NimbleText.com'>NimbleText</a>. Technically I guess it's in public beta now. This means you get the opportunity to be one of the cool kids performing beta testing.</p>

<p><a href='http://NimbleText.com'>NimbleText</a> is a downloadable version of 'the world's simplest code generator.' It's free, and adds a few features to the <a href='http://NimbleText.com/Live/'>existing online version</a>. If you register it, it adds more features again.</p>

<p>&nbsp;</p>
<p><a href='http://NimbleText.com/Download/NimbleText.exe' style='font-size:large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px; border-radius: 15px;'>Get "NimbleText.exe" Now</a></p>


<p>&nbsp;</p>

<p>I'd appreciate any feedback you've got. Maybe you have:</p>
<ul><li>Suggestions for new features</li>
<li>bug reports!</li>
<li>feedback on the website (<a href='http://NimbleText.com'>NimbleText</a>)</li>
<li>questions</li>
<li>comforting words</li>
</ul>
<style type='text/css'>
.wtf { display:none}
</style>
<p>Feel free to email me:  <code><strong>LeonBambrick<span class='wtf'>exclude this bit</span>@<span class='wtf'>exclude this bit</span>gmail.com</strong></code></a>
]]>
    </description>
    <pubDate>Fri, 28 Jan 2011 22:02:58 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/nimbletext_is_alive.asp</guid>
  </item>
<item>
  <title>Grabbing the free songs of Jonathan Coulton (with Powershell)</title>
    <link>http://www.secretGeek.net/get_jonathan.asp</link>
    <description>
      <![CDATA[<p><a href='http://www.jonathancoulton.com/'>Jonathan Coulton</a> is a much loved musician amongst your nerd types, like me.</p>
<p>He's put out quite a few free songs in MP3 format over the years too, and these remain available online.</p>
<p>I found Rob Olson wrote <a href='http://thinkingdigitally.com/archive/download-all-of-jonathan-coultons-free-songs-with-ease/'>a script with wget</a> (<a href='https://gist.github.com/137183'>and another with curl</a>) that downloads all the free songs for you. So for my Microsoft-enslaved brethren I now provide a translation into powershell-ese.</p>
<p>Here it is -- <a href='http://secretGeek.net/get-joco.ps1'>Get-JoCo.ps1</a></p>
<p>Just download it and run it in powershell. (You may have to <a href='http://technet.microsoft.com/en-us/library/ee176961.aspx'>set the execution policy</a> to <a href='http://www.codinghorror.com/blog/2010/12/the-dirty-truth-about-web-passwords.html'>gawker-level</a> first. And don't read the script before you execute it or anything. Security is for girly-boys who don't have the guts to run my code at full trust.)</p>
<p>And of course, like all the repetitive code I write, this was written with <a href='http://secretGeek.net/wscg.htm'>NimbleText</a>.</p>
<p>It's natural at this point to also encourage you to buy one of his albums, donate money to him, or perhaps whistle one of his tunes while performing a good deed that advances civilization. Your call.</p>
<br />
<p><a href='http://secretGeek.net/get-joco.ps1' style='font-size:x-large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px;
border-radius: 15px;'>Get "get-JoCo.ps1" Now</a></p>
]]>
    </description>
    <pubDate>Mon, 03 Jan 2011 22:31:31 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/get_jonathan.asp</guid>
  </item>
<item>
  <title>Using NimbleSet to compare lists</title>
    <link>http://www.secretGeek.net/nimbleSet_intro.asp</link>
    <description>
      <![CDATA[<p>I wrote a simple tool called <a href='http://secretGeek.net/NimbleSet.htm'>NimbleSet</a> and I find it handy. Maybe you'll get some use from it too.</p> 
<p><a href='http://secretGeek.net/NimbleSet.htm'>NimbleSet</a> helps you compare two lists.</p>
<p>Go play with it now. If you can't figure out what it does, then come back here and I'll demonstrate it for you.</p>
<p>You're back? Okay, let's talk it through.</p>
<p>Say you have two sets of data, two lists, and you want to compare them. We can demonstrate this problem with the awesome power of a Venn diagram:</p>

<img src='http://secretGeek.net/image/nimbleset_venn_image.png' />

<p>The venn diagram has three interesting areas:</p>
<ul><li>the bit on the left ('Left only')</li>
<li>the bit in the middle (the 'intersection')</li>
<li>the bit on the right ('Right only')</li>
</ul>
<p>Imagine our two sets are: 'the beatles' and 'the gospels of the new testament'. (Sorry for my Anglo-Christian bias here, I couldn't find another well-known, short, pair of sets with an intersecting member)</p>
<table>
<tr><th>Beatles</th><th>Gospels</th></tr>
<tr><td>john</td><td>matthew</td></tr>
<tr><td>paul</td><td>mark</td></tr>
<tr><td>george</td><td>luke</td></tr>
<tr><td>ringo</td><td>john</td></tr>
</table>


<a href='http://secretGeek.net/image/nimbleSet_intersection.png'><img src='http://secretGeek.net/image/nimbleSet_intersection_th.png' style='float:right; clear:both;border:0px solid #FFF' /></a><br />
<p>If we want to see what items they have in common, click the 'intersection' button.</p>
<blockquote><p>result (1 row)<br />john</p></blockquote>
 
<a href='http://secretGeek.net/image/nimbleSet_left_only.png'><img src='http://secretGeek.net/image/nimbleSet_left_only_th.png' style='float:right; clear:both;border:0px solid #FFF' /></a><br />
<p>To see which items are in the list on the left but not in the list on the right? Click 'left only.'</p>
<blockquote><p>result (3 rows)<br />paul<br />george<br />ringo</p></blockquote>

<a href='http://secretGeek.net/image/nimbleSet_right_only.png'><img src='http://secretGeek.net/image/nimbleSet_right_only_th.png'  style='float:right; clear:both;border:0px solid #FFF'/></a><br />
<p>To see the 'right only' items click 'right only.'</p>
<blockquote><p>result (3 rows)<br />matthew<br />mark<br />luke</p></blockquote>

<a href='http://secretGeek.net/image/nimbleSet_union.png'><img src='http://secretGeek.net/image/nimbleSet_union_th.png'  style='float:right; clear:both;border:0px solid #FFF'/></a><br />
<p>To grab all the items press 'union.' (You may notice that items from both lists will be repeated accordingly).</p>
<blockquote><p>result (8 rows)<br />john
<br />paul
<br />george
<br />ringo
<br />matthew
<br />mark
<br />luke
<br />john
</p></blockquote>

<a href='http://secretGeek.net/image/nimbleSet_union_distinct.png'><img src='http://secretGeek.net/image/nimbleSet_union_distinct_th.png'  style='float:right; clear:both;border:0px solid #FFF'/></a><br />
<p>To find the distinct members of the result set, press 'distinct' (under the 'result')</p>
<blockquote><p>result (7 rows)<br />john
<br />paul
<br />george
<br />ringo
<br />matthew
<br />mark
<br />luke
</blockquote>

<a href='http://secretGeek.net/image/nimbleSet_union_distinct_sort.png'><img src='http://secretGeek.net/image/nimbleSet_union_distinct_sort_th.png'  style='float:right; clear:both;border:0px solid #FFF'/></a><br />
<p>To sort the results, as you often need to, press the sort button, under the result.</p>
<blockquote><p>result (7 rows)<br />george
<br />john
<br />luke
<br />mark
<br />matthew
<br />paul
<br />ringo
</blockquote>

<p>There are also buttons to invert the list (in effect a sort descending), or to copy the result back up into either the left or right list.</p>

<p>That's about it.</p>

<p>It's much less powerful than the <a href='http://secretgeek.net/json_query_5.asp'>Json Query editors</a> I demonstrated previously, but so much easier to use I much prefer it.</p>

<p>Any modifications? Improvements? Bugs? Please send them through. I've used it on lists up to 50,000 members. Chrome is my browser of choice, but even IE can handly fairly large lists.</p>
<br />
<p><a href='http://secretGeek.net/nimbleSet.htm' style='font-size:x-large; background-color:#333;color:#AFA;font-weight:bold;margin:10px;padding:10px;-moz-border-radius: 15px;
border-radius: 15px;'>Try NimbleSet Now</a></p>
]]>
    </description>
    <pubDate>Sat, 18 Dec 2010 09:29:37 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/nimbleSet_intro.asp</guid>
  </item>
<item>
  <title>Wanted: Wiki Lists (dot org)</title>
    <link>http://www.secretGeek.net/wiki_lists.asp</link>
    <description>
      <![CDATA[ 
<p>Something I'd like to see:</p>
<p>A site that maintains all the world's 'lookup tables.'</p>
<p>Every lookup table you'll ever need, exposed in open, compatible and readily-consumable ways.</p>
<p>All lists can be retrieved as html or xml, as <a href='http://secretgeek.net/json_3mins.asp'>json</a>, as <a href='http://secretgeek.net/csv_trouble.asp'>csv</a> (the one format guaranteed to outlive the cockroach), or any other commonly used** data format.</p>
<p>Lists at 'wiki lists' are more complete, more accessible, and much lighter-weight than the <a href='http://simple.wikipedia.org/wiki/Category:Lists'>Lists</a> at wikipedia.</p> 
<p>The lists are crowd-sourced, contributed by anyone and curated by the detail-oriented masses. The faceless trainspotters and plane spotters, the aspies and cybrarians.</p>
<p>Lists that are currently shown in <a href='http://en.wikipedia.org/wiki/Wikipedia:Lists'>haphazard ways</a> inside wikipedia could instead source their content from such wiki-lists.</p>
<p>Where a list can be reliably sourced from a canonical source, it is done so programmatically and the attribution provided in a standard way.</p>
<p>Example lists include...</p>
<ul>
<li>Every sovereign nation</li>
<li>Their dialing code, currencies, major languages</li>
<li>The three letter codes for every airport, landing strip and helipad in the world</li>
<li>The name and abbreviation of every state in the united states (and every other nation)</li>
<li>Zip codes and postal codes</li>
<li>Monarchs of England</li>
<li>Breeds of dog</li>
<li>Keywords in C</li>
<li>Mayors of southhampton</li>
<li>Notes in F major pentatonic</li>
<li>Winners of the Belgian grand prix</li>
<li>Stocks that trade on the NYSE</li>
</ul> 
<p>And a thousands other reference lists. Short lists. Information that changes slowly, slow enough for humans to curate it.</p>
<p>And they're the kind of lists that you (or someone like you) needs to reference in their applications and research all the time.</p>

<p>(See also this thread at <a href='http://news.ycombinator.com/item?id=1484960'>Hacker News</a> which prompted me to write down this idea I've thought for so long.)</p>

<p><small>** Note I said 'commonly used' rather than 'standard'. CSV is commonly used, but it doesn't have a standard. Oh you might point out that there are standards for CSV, and of course there are. Where there's standards, plural, there is no 'standard'.</small></p>
]]>
    </description>
    <pubDate>Thu, 11 Nov 2010 03:49:39 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/wiki_lists.asp</guid>
  </item>
<item>
  <title>DOS on Dope: The last MVC web framework you'll ever need</title>
    <link>http://www.secretGeek.net/dod_intro.asp</link>
    <description>
      <![CDATA[ 
<p>When you've done everything you can with <a href='http://rubyonrails.org/'>Ruby On Rails</a>....</p>
<p>When you've reached the limits of <a href='http://haskell.on-a-horse.org/'>Haskell on a Horse</a>...</p>
<p>If <a href='http://fubumvc.com/'>FubuMVC</a> is not for you...</p>
<p>It's time to meet the MVC web framework to end all MVC Web frameworks.</p>
<p><strong><a href='http://dod.codeplex.com/'>DOS on DOPE</a></strong> is the modern MVC framework built on the awesome power of <strong>Batch scripts</strong>.</p>
<p>All of the controllers in DoD are batch files.</p>
<p>All of the views are batch files.</p>
<p>The model is based on batch files. The helper functions are... you guessed it! Beautiful batch files!</p>
<p>The complete <a href='http://dod.codeplex.com/SourceControl/changeset/view/9785ed4d623a'>Source code</a> and <a href='http://dod.codeplex.com/wikipage?title=GettingStarted'>tutorials</a> are available at <a href='http://dod.codeplex.com/'>DoD.CodePlex.com</a></p>
<h2>With DosOnDope, it's this simple:</h2>
<p>open a cmd window, and write:</p>
<pre>dope site Blog</pre>
<p>You just built a website, called 'blog'. Here it is:</p>
<img src='http://secretGeek.net/image/dod_congrats.png' alt='dod_congrats' style='border:0px solid #FFF;' />
<p>Oops. It moves too fast, I can't keep up.</p>
<p>Here's all the folders that have been created for us...</p>
<pre>C:\temp\blog>dir /s/a:d/b
C:\temp\blog\Content
C:\temp\blog\Controllers
C:\temp\blog\h
C:\temp\blog\Models
C:\temp\blog\Scripts
C:\temp\blog\Views
C:\temp\blog\Controllers\Home
C:\temp\blog\Views\Shared</pre>
<p>And all the files...</p>
<pre>C:\temp\blog>dir /s/a:-d/b
C:\temp\blog\Default.aspx
C:\temp\blog\favicon.ico
C:\temp\blog\Global.asax
C:\temp\blog\web.config
C:\temp\blog\Content\Site.css
C:\temp\blog\Content\li.png
C:\temp\blog\Content\Logo.png
C:\temp\blog\Controllers\_actionMissing.bat
C:\temp\blog\Controllers\_controllerMissing.bat
C:\temp\blog\Controllers\Home\Index.bat
C:\temp\blog\h\a.bat
C:\temp\blog\h\h1.bat
C:\temp\blog\h\h2.bat
C:\temp\blog\h\h3.bat
C:\temp\blog\h\p.bat
C:\temp\blog\Models\split.vbs
C:\temp\blog\Views\Shared\_header.bat</pre>
<p>Let's create a new controller action, and see how it looks.</p>
<img src='http://secretGeek.net/image/dod_about_action.png' alt='dod_about_action' style='border:0px solid #FFF;' />
<p>Let's improve the look of that page. You type a little... </p>
<img src='http://secretGeek.net/image/dod_about_improved_edit.png' alt='dod_about_improved edit' style='border:0px solid #FFF;' />
<p>...hit refresh and see what changed.</p>
<img src='http://secretGeek.net/image/dod_about_improved_view.png' alt='dod_about_improved view' style='border:0px solid #FFF;' />
<p>It worked.</p>
<p>Notice the use of html helper methods like '<code>p.bat</code>' and use of the partial, '<code>_header.bat</code>' to give styling and a title to the page.</p>
<p>But websites don't live in a vacuum. We need some data to bring this thing to life.</p>
<p>In DoD we embrace the NoSQL movement and jump straight to the data-store of the future: a CSV file.</p>
<pre>C:\temp>CD Blog\Models
C:\temp\Blog\Models>copy con Posts.csv
ID`Title`Article
^Z</pre>
<p>Posts.csv is both the model that describes our data, and the store which will contain the data itself.
<p>Let's generate actions for administering our Posts:</p>
<pre>C:\temp\blog\Models>dope gen Post
Generating actions for MODEL Post in Controller Home...</pre><p>
<p>Check in a browser...</p>
<img src='http://secretGeek.net/image/dod_home_adding.png' alt='dod_home_adding' style='border:0px solid #FFF;' />
<p>The generator has created a nice page for us, with a name and textbox for every field, so we can create new posts.</p>
<p>Once we've added a few articles, let's see what the index looks like:</p>
<img src='http://secretGeek.net/image/dod_home_index_2.png' alt='dod_home_index 2' style='border:0px solid #FFF;' />
<p>If we look inside the posts.csv file, we see the data:</p>
<pre>C:\temp\blog\Models>type Posts.csv
ID`Title`Article
1`Hello Brazil!`Yes, yes, hello indeed!
2`Let's add a second for good measure`Oh yeah</pre>
<h2>Frequently Asked Questions</h2>
<h2>Does it scale?</h2>
<p>So far I haven't run into any performance problems. Whenever I've opened up a DoD website to several users, my hard drive tends to get wiped long before I discover performance issues.</p>
<h2>What about security?</h2>
<p>If you can't trust public visitors from the internet, who can you trust? Executing user input as commands inside the operating system is the most direct way to get things done, and that's what matters most. Isn't it?</p>
<p>Well, that's about it. <a href='http://dod.codeplex.com/SourceControl/changeset/view/9785ed4d623a'>Source code</a> and <a href='http://dod.codeplex.com/wikipage?title=GettingStarted'>tutorials</a> available at <a href='http://dod.codeplex.com/'>DoD.CodePlex.</a></p>
<p>A full-featured web development framework with the smallest possible concept count.</p>
<p><strong>Feedback welcome.</strong></p>]]>
    </description>
    <pubDate>Mon, 06 Sep 2010 05:11:09 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/dod_intro.asp</guid>
  </item>
<item>
  <title>JSON Query Languages: 5 special purpose editors</title>
    <link>http://www.secretGeek.net/json_query_5.asp</link>
    <description>
      <![CDATA[ 
<p>A few weeks ago I put out a <a href='http://secretgeek.net/SQLike_editor.asp'>simple editor for SQLike.</a></p>

<p>Since then I've researched a bunch of other JSON Query Languages, and created similar editors for each of them.</p>

<p>Here's the full set:</p>

<ul>
<li><a href='http://secretGeek.net/SQLike'>An editor for SQLike</a></li>
<li><a href='http://secretGeek.net/JsLinq'>An editor for JsLinq</a></li>
<li><a href='http://secretGeek.net/JSinq'>An editor for JSinq</a></li>
<li><a href='http://secretGeek.net/JLinq'>An editor for JLinq</a></li>
<li><a href='http://secretGeek.net/JimmyLinq'>An editor for JimmyLinq</a></li>
</ul>


<h2>What are they?</h2>


<h2>Plus, Minus, Interesting</h2>

<p>Here's a quick PMI comparison of each of them.</p>


<style>
table.pmi { border: 1px solid #CCC; vertical-align:text-top;border-collapse:collapse;border-top:1px solid #888;border-bottom:1px solid #888;Margin:10px}
table.pmi tr {vertical-align:text-top;}
table.pmi tr td{vertical-align:text-top;left-padding:2pt}
.lib {border-top:1px solid #888}
.summary {font-weight:light}
table.pmi tr th { text-align:left;padding:4px}
td.plus, th.plus {background-color:#f0f8f0}
td.plus ul li {list-style-image: url('image/plus_silk.png')}
td.interesting, th.interesting {background-color:#f0f0f8}
td.minus ul li {list-style-image: url('image/minus_silk.png')}
td.minus, th.minus {background-color:#f8f0f0}

td.interesting ul li {list-style-image: url('image/interesting_silk.png');}

</style>

<table class='pmi'>
<tr><td colspan='3' class='lib'><h2>"SQLike"</h2></td></tr>
<tr><td colspan='3' class='summary'><p><a href='http://thomasfrank.se/'>Thomas Frank's</a> <a href='http://thomasfrank.se/sqlike.html'>SQLike</a> uses SQL-style JSON for Querying JSON. 
<a href='http://secretGeek.net/SQLike/' class='tryit'>Try it.</a>
</p></td></tr>
<tr><th class='plus'>Plus</th><th class='minus'>Minus</th><th class='interesting'>Interesting</th></tr>
<tr><td class='plus'>
<ul class='plus'><li>Most complete join syntax.</li>
    <li>Uses a SQL metaphor rather than Linq metaphor, hence larger audience</li>
    </ul>
</td>
<td class='minus'>
<ul><li>Keywords like 'sum' need to be embedded in pipe characters.</li>
	<li>Function syntax is a little ceremonious (compared to sql)</li>
	</ul>
</td>
<td class='interesting'>
<ul><li>Query is structured as JSON rather than fluidic api</li>
	</ul>
</td>
</tr>


<tr><td colspan='3' class='lib'><h2>"JsLinq"</h2></td></tr>
<tr><td colspan='3' class='summary'><p><a href='http://pietschsoft.com/'>Chris Pietschmann's</a> <a href='http://jslinq.codeplex.com/'>Linq to Javascript (JsLinq)</a> uses Fluent javascript for Querying JSON. <a href='http://secretGeek.net/JsLinq/' class='tryit'>Try it.</a>
</p></td></tr>

<tr><th class='plus'>Plus</th><th class='minus'>Minus</th><th class='interesting'>Interesting</th></tr>
<tr>
<td class='plus'>
<ul>
	<li>Most complete implementation of Linq.</li>
	</ul>
</td>
<td class='minus'>
<ul><li>Join syntax not as thorough as SQLike(?)</li>
</ul>
</td>
<td class='interesting'>
<ul><li>The fork at gitHub which targets node.js is by Marak Squires who recently got in trouble for <a href='http://patorjk.com/blog/2010/06/21/asciimo/'>stealing code</a></li></ul>
</td>
</tr>
<tr><td colspan='3' class='lib'><h2>"JSinq"</h2></td></tr>
<tr><td colspan='3' class='summary'><p><a href='http://kaijaeger.com/'>Kai Jaeger's</a> <a href='http://jsinq.codeplex.com/'>JSinq</a> uses Fluent javascript or linq-like strings for Querying JSON. <a href='http://secretGeek.net/JSinq/' class='tryit'>Try it.</a></p></td></tr>

<tr><th class='plus'>Plus</th><th class='minus'>Minus</th><th class='interesting'>Interesting</th></tr>
<tr>
<td class='plus'>
<ul>
<li>Includes embedded expression language</li>
<li>Separate "create query" and "execute query" steps. </li>
	<li>Can write queries as a single embedded string rather than pure javascript. :-)</li>
</ul>
</td>
<td class='minus'>
<ul>
<li>Can write queries as a single embedded string rather than pure javascript. :-(</li>
</ul>
</td>
<td class='interesting'>
<ul>
<li>Can write queries as a single embedded string rather than pure javascript. (c;</li>
</ul>
</td>
</tr>
<tr><td colspan='3' class='lib'><h2>"jLinq"</h2></td></tr>
<tr><td colspan='3' class='summary'><p><a href='http://www.hugoware.net/'>Hugo Bonacci's</a> <a href='http://jlinq.codeplex.com/'>JLinq</a> uses Fluent javascript for Querying JSON. 
<a href='http://secretGeek.net/JLinq/' class='tryit'>Try it.</a></p></td></tr>

<tr><th class='plus'>Plus</th><th class='minus'>Minus</th><th class='interesting'>Interesting</th></tr>
<tr>
<td class='plus'>
<ul><li>Includes really thorough/practical set of predicate functions</li></ul>
</td>
<td class='minus'>
<ul><li>No joins other than intersect and union</li></ul>
</td>
<td class='interesting'>
<ul><li>Love the styling at <a href='http://www.hugoware.net/'>Hugo's website</a>. This guy is <em>intense</em>.</li></ul>
</td>
</tr>
<tr><td colspan='3' class='lib'><h2>"jimmyLinq"</h2></td></tr>
<tr><td colspan='3' class='summary'><p><a href='http://netindonesia.net/blogs/jimmy/'>Jimmy Chandra's</a> blogpost that I've dubbed <a href='http://netindonesia.net/blogs/jimmy/archive/2007/07/16/Javascript-LINQ_3F003F003F00_.aspx'>JimmyLinq</a> uses Fluent javascript for Querying JSON. <a href='http://secretGeek.net/JimmyLinq/' class='tryit'>Try it.</a>
</p></td></tr>

<tr><th class='plus'>Plus</th><th class='minus'>Minus</th><th class='interesting'>Interesting</th></tr>
<tr>
<td class='plus'>
<ul><li>Simple. A good starter if you want to write your own version of such a library.</p>
	</li>
</ul>
</td>
<td class='minus'>
<ul><li>Too simple.</li></ul>
</td>
<td class='interesting'>
<ul><li>Most amateur/"rough and ready" of the lot. Doesn't take itself as seriously as the others.</li></ul>
</td>
</tr>
</table>

<p>Some other JSON Query languages I could've looked into if my travel time was significantly longer:</p>

<ul><li><a href='http://code.google.com/p/trimpath/wiki/TrimQuery'>TrimQuery</a></li>
<li><a href='http://www.sitepen.com/blog/2008/07/16/jsonquery-data-querying-beyond-jsonpath/'>JsonQuery</a></li>
<li><a href='http://code.google.com/p/jaql/wiki/JaqlOverview'>Jaql</a></li></ul>
<p>All of which would stop me from getting back to <a href='http://secretgeek.net/microIsv_ToDoOrNot.asp'>releasing the product I should be releasing</a>, or any of the other technical obsessions I'm trying to develop. So if you're interested in any of those... you're on your own.</p>


]]>
    </description>
    <pubDate>Wed, 04 Aug 2010 13:35:21 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/json_query_5.asp</guid>
  </item>
<item>
  <title>What then, is b?</title>
    <link>http://www.secretGeek.net/whatThenIsb.asp</link>
    <description>
      <![CDATA[
<p>(This was going to be an article about how impossible it is to design one language that has all my favourite features. But instead, became a scene from "A Coder's Edition of Saw.")</p>

<p>You wake up, in unfamiliar surroundings.</p>

<p>You must've experienced some kind of memory loss because you have no idea how you got to where you are. Your forehead is brittle with dried blood.</p>

<p>In front of you is a computer screen, and on the screen it says:</p>

<blockquote><pre>
a = Add(2,3);

//a is 5.

b = Add(2);

//what is b?
</pre></blockquote>
<p>Intriguing. What <em>is</em> <code>b</code>?</p>

<p>Because you're uncertain of the language in question, you can't be sure.

<p>It could be that <code>Add</code> is an overloaded function, in which case <code>b</code> would be an integer. Its exact value is anyone's guess.</p>

<p>Or it could be that <code>Add</code> has an optional second parameter. Again <code>b</code> would be an integer, though its value could be anything.</p>

<p>It could be that the code refuses to run. The missing parameter is a deal breaker.</p> 
<p>But you look at the tattoo on the back of your hand, the 11th letter of the greek alphabet, and you are certain.</p>

<p>What then, is <code>b</code>?</p>
 
]]>
    </description>
    <pubDate>Sun, 18 Jul 2010 12:08:02 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/whatThenIsb.asp</guid>
  </item>
<item>
  <title>SQLike: A simple editor</title>
    <link>http://www.secretGeek.net/sqlIke_editor.asp</link>
    <description>
      <![CDATA[<a href='http://secretGeek.net/SQLike/'><img src='http://secretGeek.net/image/jslike_editor_th.png' alt='editor for JSLike' style='border:1px solid #CCC;margin:10px;float:right;' /></a> 
<p>Here's a <a href='http://secretGeek.net/SQLike/'>SQLike editor</a> I wrote. It lets you get your hands dirty with SQLike, the client-side query engine from <a href='http://www.thomasfrank.se/'>Thomas Frank.</a></p>
<p>This started a few weeks back. I read that Thomas had created a nifty DSL in Json for querying (and modifying) arrays of Json. The correct name for it would've been 'JQuery' but that name had already been taken, so he called it <a href='http://thomasfrank.se/sqlike.html'>SQLike</a>. ;-)</p>
<p>I set about writing a simple editor for it (in the style of <a href='http://secretGeek.net/WSCG.htm'>the World's Simplest Code Generator</a>) and came up with <a href='http://secretGeek.net/SQLike/'>this fairly usable SQLike editor</a>.</p>
<p>I don't assume you've got any Json to query, and instead expect you to start with a chunk of CSV. I turn <em>that</em> into an array of <a href='http://secretgeek.net/json_3mins.asp'>Json</a> (named 'JsonData') then exec your query over it.</p>
<p>The UI lets you join and query up to two tables at once. I meant to extend it to <em>N</em> tables, but bus-time only lets me do so much, and I keep running into interesting people when I ought to be programming.</p>

<img src='http://secretGeek.net/image/SQLike_logo.png' alt='editor for JSLike' style='border:0px solid #CCC;margin:10px;float:right;' />

<p>In my day job I hand write a lot of sql. And with this editor I quickly found that even though SQLike is lighter than XML it's  quite 'ceremonious' compared to writing pure SQL.</p>

<p>Apparently Thomas is hoping to making the syntax for SQLike a lot lighter yet, based on <a href='http://ajaxian.com/archives/two-js-solutions-to-run-sql-like-statements-on-arrays-and-objects'>comments here</a> including:</p>
<blockquote>"...stop using pipes - the hell with it: reserve a few words :-D..."</blockquote>
<p>...a sentiment I fully agree with. I look forward to any future versions. If you're listening Thomas: keep going! This is an intriguing project!</p>
<p>Also, I want to add I've already found SQLike useful in helping to achieve my day-to-day data-manipulation activities. I can go straight from CSV to 'queries' without having to put the data into a database first.</p>
<p>Sometimes I can't help but picture the future as an endless sea of cubicles, populated by workers struggling to perform data-manipulation duties. And many will continue to get by without any real tools at all. No sql. No sqlike. Not even a <a href='http://secretGeek.net/WSCG.htm'>wscg</a> or an excel-formula to help them out.</p>

<p>A future "bus project" might be to implement a similar editor for the overlapping project: <a href='http://jslinq.codeplex.com/'>JsLinq</a>.</p>

<p>Feedback, criticisms, ideas and suggestions always welcome.</p>]]>
    </description>
    <pubDate>Fri, 02 Jul 2010 15:44:57 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/sqlIke_editor.asp</guid>
  </item>
<item>
  <title>Yet Another BizPlan Generator.</title>
    <link>http://www.secretGeek.net/yabizplan.asp</link>
    <description>
      <![CDATA[<p>I'm so sick of being me that I outsourced being me to a miniscule script that just sits there, being me, all day long. Here it is -- <a href='http://secretGeek.net/YABizPlan.html'>'yet another business plan generator.'</a></p>

<p>Gorn. --&gt; <a href='http://secretGeek.net/YABizPlan.html'>Try it out.</a> &lt;--</p>

<p style='color:#BBB;font-size:x-small;'>Also, deep within the myriad combinations, I've buried a clue about <a href='http://secretgeek.net/microIsv_ToDoOrNot.asp'>the new micro-Isv i'm building</a> ;-).</p>
]]>
    </description>
    <pubDate>Fri, 25 Jun 2010 15:57:59 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/yabizplan.asp</guid>
  </item>
<item>
  <title>HOT GUIDS: A hot or not site for guids</title>
    <link>http://www.secretGeek.net/hotguids.asp</link>
    <description>
      <![CDATA[<p>Social software seems to be going into a lot of niche areas lately. I thought I'd try and jump ahead of the next wave and build my own social website:</p>
<p style='font-size:20pt'><a href='http://secretGeek.net/HotGuids/'>HOT GUIDS - Socializing the Guid</a></p>
<a href='http://secretGeek.net/HotGuids/'><img src='http://secretGeek.net/Image/hot_guids.png' alt='HOT GUIDS - Socializing the Guid' /></a>
<p>Finally there's a place where people can vote on and discuss their favorite guids.</p>
<p>I've built in pretty much all the best social features. You can vote on a guid, see other votes for a guid, adopt a guid, or email a guid to your friends. And if you get sick of the guid you're looking at: with the click of a button you can move onto a whole new guid.</p>
<p>I'm trying to really take the long tail of human interest by storm. If I get just <em>one</em> customer for each guid, then I'll get... oh I don't know, it must be a *lot* of hits.</p>
<p>Thanks to <a href='http://StackOverflow.com'>Stack Overflow</a> for the <a href='http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript'>guid generating snippet</a>. The web template started out the same as <a href='http://secretGeek.net/cco/cco.htm'>'CreditCardOlogy'</a> but with a little (Powerpoint + MSPaint + PngOut) I took it to a new place entirely.</p>
<p>If you're unsure what any of this is about, please <a href='http://en.wikipedia.org/wiki/Globally_Unique_Identifier'>read about guids (& UUIDs)</a> at wikipedia, or try running this <a href='http://stackoverflow.com/questions/1705008/simple-proof-that-guid-is-not-unique'>Simple Proof That Guid is not Unique</a>.</p>
<p>And make sure email me if you see any particular delicious looking <a href='http://www.guidscotchdrink.com/'>guids</a>. There's some beauties out there.</p>
]]>
    </description>
    <pubDate>Sun, 30 May 2010 13:06:20 GMT</pubDate>
    <dc:creator>Leon Bambrick</dc:creator>
    <guid>http://www.secretGeek.net/hotguids.asp</guid>
  </item>

</channel>
</rss>


