<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Scott Van Vliet</title>
        <link>http://geekswithblogs.net/svanvliet/Default.aspx</link>
        <description>Once a Developer, Always a Developer</description>
        <language>en-US</language>
        <copyright>svanvliet</copyright>
        <managingEditor>svanvliet@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Scott Van Vliet</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/svanvliet/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Let&amp;rsquo;s try this again&amp;hellip;</title>
            <link>http://geekswithblogs.net/svanvliet/archive/2010/03/23/lets-try-this-again-2010.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/svanvliet/archive/2010/03/23/lets-try-this-again-2010.aspx'&gt;http://geekswithblogs.net/svanvliet/archive/2010/03/23/lets-try-this-again-2010.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;So it’s been a really long time since I consistently blogged on my previous ASP.NET blog (and, let’s be honest, it wasn’t that consistent to begin with!)  With the mainstream use of microblogging sites like Facebook and Twitter, I’ve been able to post more frequent updates (&lt;a href="http://www.facebook.com/scott.vanvliet"&gt;http://www.facebook.com/scott.vanvliet&lt;/a&gt; &amp;amp; &lt;a href="http://twitter.com/scottvanvliet"&gt;http://twitter.com/scottvanvliet&lt;/a&gt;) but haven’t really authored any good content lately.&lt;/p&gt;
&lt;p&gt;Well, I decided it’s time for me to try again!&lt;/p&gt;
&lt;p&gt;I’ve relocated my blog from the ASP.NET weblogs site to my new home here at &lt;a href="http://geekswithblogs.net"&gt;http://geekswithblogs.net&lt;/a&gt; (thanks @jjulian and @jalexander!)  I hope to be posting musings on here about Silverlight, motion graphics, digital media, digital supply chain, and even personal/fun stuff.&lt;/p&gt;
&lt;p&gt;Stay tuned!&lt;/p&gt; &lt;img src="http://geekswithblogs.net/svanvliet/aggbug/138877.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>svanvliet</dc:creator>
            <guid>http://geekswithblogs.net/svanvliet/archive/2010/03/23/lets-try-this-again-2010.aspx</guid>
            <pubDate>Wed, 24 Mar 2010 03:17:23 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/svanvliet/comments/138877.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/svanvliet/archive/2010/03/23/lets-try-this-again-2010.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/svanvliet/comments/commentRss/138877.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/svanvliet/services/trackbacks/138877.aspx</trackback:ping>
        </item>
        <item>
            <title>IDataReader Extension Methods</title>
            <category>C#</category>
            <category>Extension Methods</category>
            <link>http://geekswithblogs.net/svanvliet/archive/2008/06/18/idatareader-extension-methods.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/svanvliet/archive/2008/06/18/idatareader-extension-methods.aspx'&gt;http://geekswithblogs.net/svanvliet/archive/2008/06/18/idatareader-extension-methods.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;First of all -- I'm a total liar.  I was supposed to offer up some great insight from Tech•Ed.  But alas, I had to leave early and fly to Seattle for a meeting.  So, I wasn't able to share any fun stuff :(&lt;/p&gt;
&lt;p&gt;We'll, I actually have a tiny bit of time to write, and I thought I'd share the result of recent code review.&lt;/p&gt;
&lt;p&gt;I'm currently teaching .NET (Framework fundamentals, C#, et al.) to some of my clients who are preparing to take over the support of a very large application (we're going on 2 years of development and deployment!) As we were looking at some of the code, I came across some stuff from our offshore team that slipped by my team's radar. In this particular project, we found hundreds of lines that looked like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;theatre.ID = (reader["theatre_id"] is DBNull) ? &lt;br /&gt;    &lt;/code&gt;&lt;code&gt;0 : Convert.ToInt32(reader["theatre_id"]); &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;theatre.Code = (reader["theatre_code"] is DBNull) ? &lt;br /&gt;    &lt;/code&gt;&lt;code&gt;String.Empty : reader["theatre_code"].ToString(); &lt;/code&gt;&lt;/p&gt;
&lt;p mce_keep="true"&gt;Ick!  I was very bummed to come across this while teaching my clients about best practice -- was a bit 'the fool'.  Not wanting to let this pass, I quickly redirected the discussion to talk about refactoring and reuse (which was kind of a nice segue to some OO topics.)  In this discussion, we wrote an Extension Method to the IDataReader class to clean-up this code.  The new code looked pretty:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;theatre.ID = reader.GetValueOrDefault&amp;lt;int&amp;gt;("theatre_id"); &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;theatre.Code = reader.GetValueOrDefault&amp;lt;string&amp;gt;("theatre_code");&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;The details of this Extension Method are as follows:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/// &amp;lt;SUMMARY&amp;gt;&lt;br /&gt;/// Contains extension methods for the IDataReader interface. &lt;br /&gt;/// &amp;lt;/SUMMARY&amp;gt;&lt;br /&gt;public static class DataReaderExtender &lt;br /&gt;{ &lt;br /&gt;  /// &amp;lt;SUMMARY&amp;gt;&lt;br /&gt;  /// This method will return the value of the specified columnName, cast to &lt;br /&gt;  /// the type specified in T. However, if the value found in the reader is &lt;br /&gt;  /// DBNull, this method will return the default value of the type T. &lt;br /&gt;  /// &amp;lt;/SUMMARY&amp;gt;&lt;br /&gt;  /// &amp;lt;TYPEPARAM name="T"&amp;gt;The type to which the value found in the reader should be cast.&amp;lt;/TYPEPARAM&amp;gt; &lt;br /&gt;  /// &amp;lt;PARAM name="reader"&amp;gt;The reader in which columnName is found.&amp;lt;/PARAM&amp;gt; &lt;br /&gt;  /// &amp;lt;PARAM name="columnName"&amp;gt;The columnName to retrieve.&amp;lt;/PARAM&amp;gt; &lt;br /&gt;  /// &amp;lt;RETURNS&amp;gt;The column value within the reader typed as T.&amp;lt;/RETURNS&amp;gt; &lt;br /&gt;  &lt;/code&gt;&lt;code&gt;public static T GetValueOrDefault&amp;lt;T&amp;gt;(this IDataReader reader, string columnName)&lt;br /&gt;  { &lt;br /&gt;    &lt;/code&gt;&lt;code&gt;object columnValue = reader[columnName]; &lt;br /&gt;    T returnValue = default(T); &lt;br /&gt;    if (!(columnValue is DBNull)) &lt;br /&gt;    { &lt;br /&gt;      &lt;/code&gt;&lt;code&gt;returnValue = (T)Convert.ChangeType(columnValue, typeof(T)); &lt;br /&gt;    } &lt;br /&gt;    return returnValue; &lt;br /&gt;  &lt;/code&gt;&lt;code&gt;} &lt;br /&gt;} &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Enjoy! (I've posted the code here: &lt;a href="http://weblogs.asp.net/blogs/skillet/Code/DataReaderExtender.zip" mce_href="http://weblogs.asp.net/blogs/skillet/Code/DataReaderExtender.zip"&gt;DataReaderExtender.zip&lt;/a&gt;)&lt;/p&gt; &lt;img src="http://geekswithblogs.net/svanvliet/aggbug/138875.aspx" width="1" height="1" /&gt;</description>
            <guid>http://geekswithblogs.net/svanvliet/archive/2008/06/18/idatareader-extension-methods.aspx</guid>
            <pubDate>Thu, 19 Jun 2008 06:55:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/svanvliet/comments/138875.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/svanvliet/archive/2008/06/18/idatareader-extension-methods.aspx#feedback</comments>
            <slash:comments>10</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/svanvliet/comments/commentRss/138875.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/svanvliet/services/trackbacks/138875.aspx</trackback:ping>
        </item>
        <item>
            <title>Hello from Tech&amp;#183;Ed</title>
            <category>Silverlight</category>
            <category>WPF</category>
            <link>http://geekswithblogs.net/svanvliet/archive/2008/06/03/hello-from-tech-ed.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/svanvliet/archive/2008/06/03/hello-from-tech-ed.aspx'&gt;http://geekswithblogs.net/svanvliet/archive/2008/06/03/hello-from-tech-ed.aspx&lt;/a&gt;&lt;/p&gt;&lt;p mce_keep="true"&gt;Hey everyone -- just got out of the &lt;a target="_blank" href="http://www.microsoft.com/events/teched2008/developer/default.mspx"&gt;Tech·Ed &lt;/a&gt;2008 keynote and learned that this was Bill's last keynote as chairman of Microsoft... kind of cool to witness.  Was a good session, outlining SQL Server Data Services and some other stuff -- but nothing "new", per se.  But hopefully we'll see some good stuff in the sessions...&lt;/p&gt;
&lt;p mce_keep="true"&gt; I'm off to a WPF session, and will be posting some tibdits as I find them.  Talk soon.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/svanvliet/aggbug/138874.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>svanvliet</dc:creator>
            <guid>http://geekswithblogs.net/svanvliet/archive/2008/06/03/hello-from-tech-ed.aspx</guid>
            <pubDate>Tue, 03 Jun 2008 21:55:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/svanvliet/comments/138874.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/svanvliet/archive/2008/06/03/hello-from-tech-ed.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/svanvliet/comments/commentRss/138874.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/svanvliet/services/trackbacks/138874.aspx</trackback:ping>
        </item>
        <item>
            <title>Live Search -- Cashback Infinite Redirect</title>
            <category>Community News</category>
            <link>http://geekswithblogs.net/svanvliet/archive/2008/05/22/live-search-cashback-infinite-redirect.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/svanvliet/archive/2008/05/22/live-search-cashback-infinite-redirect.aspx'&gt;http://geekswithblogs.net/svanvliet/archive/2008/05/22/live-search-cashback-infinite-redirect.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;
Classic... try it yourself: &lt;a href="http://search.live.com/cashback"&gt;http://search.live.com/cashback&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://weblogs.asp.net/blogs/skillet/Images/cashback.png" border="1" /&gt;&lt;/p&gt;
&lt;p&gt;
And I was all excited about getting some of that proverbial "fat cash".  (And yes, I tried this on both PC and Mac -- IE, Firefox and Safari!)&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;&lt;h3&gt;Update&lt;/h3&gt;
Working now -- must have been some last-minute host header redirect from msn.com to live.com (see the screenshot.)
 &lt;img src="http://geekswithblogs.net/svanvliet/aggbug/138873.aspx" width="1" height="1" /&gt;</description>
            <guid>http://geekswithblogs.net/svanvliet/archive/2008/05/22/live-search-cashback-infinite-redirect.aspx</guid>
            <pubDate>Fri, 23 May 2008 04:09:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/svanvliet/comments/138873.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/svanvliet/archive/2008/05/22/live-search-cashback-infinite-redirect.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/svanvliet/comments/commentRss/138873.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/svanvliet/services/trackbacks/138873.aspx</trackback:ping>
        </item>
        <item>
            <title>Tom Brokaw -- C# or VB.NET?</title>
            <category>Microsoft</category>
            <category>.NET</category>
            <category>Visual Studio</category>
            <link>http://geekswithblogs.net/svanvliet/archive/2008/02/28/tom-brokaw-c-or-vb-net.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/svanvliet/archive/2008/02/28/tom-brokaw-c-or-vb-net.aspx'&gt;http://geekswithblogs.net/svanvliet/archive/2008/02/28/tom-brokaw-c-or-vb-net.aspx&lt;/a&gt;&lt;/p&gt;&lt;p mce_keep="true"&gt;Not sure why this hasn’t been covered yet on the blogosphere, but yesterday at Microsoft 2008 Launch Event, &lt;strong&gt;Tom Brokaw&lt;/strong&gt; gave a ~15 minute monologue about technology to introduce Steve Ballmer , the plight of our planet, and how technology (and those who deploy it) should be used for the greater good.&lt;/p&gt;
&lt;p mce_keep="true"&gt;Tom Brokaw!  That’s right – TB; to introduce Visual Studio 2008 and other products.  Relevance?  I wonder if he’s a C# guy, or perhaps more of an IT Pro.  LMAO.  It was a cool experience, and quite different from the usual (a la Christopher Lloyd as Doc Brown in a De Lorean), which set the stage for this *unique* event.&lt;/p&gt;
&lt;p mce_keep="true"&gt;I’ve been to my share of launches and airlifts – and the most bizarre part about this one was – surprisingly not Brokaw – but the spandex-wearing “living art” performers that graced the walkway from the Nokia Live Theatre to the LA Convention Center.  It was something from an episode of The State.&lt;/p&gt;
&lt;p mce_keep="true"&gt;What did you think about the event?  Hyper-V does look awesome, and of course Visual Studio 2008 is bliss (we’ve been using it since RTM last November!)  Cheers.&lt;br /&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/svanvliet/aggbug/138872.aspx" width="1" height="1" /&gt;</description>
            <guid>http://geekswithblogs.net/svanvliet/archive/2008/02/28/tom-brokaw-c-or-vb-net.aspx</guid>
            <pubDate>Thu, 28 Feb 2008 23:02:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/svanvliet/comments/138872.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/svanvliet/archive/2008/02/28/tom-brokaw-c-or-vb-net.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/svanvliet/comments/commentRss/138872.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/svanvliet/services/trackbacks/138872.aspx</trackback:ping>
        </item>
        <item>
            <title>Looking for a Consulting Career in the Entertainment Industry?</title>
            <category>Jobs</category>
            <link>http://geekswithblogs.net/svanvliet/archive/2007/09/27/looking-for-a-consulting-career-in-the-entertainment-industry.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/svanvliet/archive/2007/09/27/looking-for-a-consulting-career-in-the-entertainment-industry.aspx'&gt;http://geekswithblogs.net/svanvliet/archive/2007/09/27/looking-for-a-consulting-career-in-the-entertainment-industry.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Does working on projects for a movie studio sound exciting to you?  Do you want to parlay your consulting job into an acting career?  Do you have a garage band and want to drop your demo tape at your record label client's desk?  If you answered 'yes' to any of these questions, please read on! (All in jest, of course)
&lt;/p&gt;&lt;p&gt;We're currently looking for highly-skilled Microsoft Solution Developers to work on projects at our entertainment clients throughout Southern California.  Specifically, we're looking for go-getters with the following skillsets:
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Solutions Developers (all levels) – C#, WinForms, ASP.NET, Web Service, WCF, SCSF (CAB), EntLib
&lt;/li&gt;&lt;li&gt;Database Developers (all levels) – SQL Server 2005 Integration Service (SSIS), Reporting Service (SSRS)
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If you are interested, please send your resume ASAP to svanvliet[at]gmail[dot]com.  I will follow-up with a full job description and more details on our firm (one of the largest technology consulting and outsourcing companies in the world!)  Local candidates only, please.
&lt;/p&gt;&lt;p&gt;I look forward to hearing from you!&lt;/p&gt; &lt;img src="http://geekswithblogs.net/svanvliet/aggbug/138871.aspx" width="1" height="1" /&gt;</description>
            <guid>http://geekswithblogs.net/svanvliet/archive/2007/09/27/looking-for-a-consulting-career-in-the-entertainment-industry.aspx</guid>
            <pubDate>Fri, 28 Sep 2007 06:55:21 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/svanvliet/comments/138871.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/svanvliet/archive/2007/09/27/looking-for-a-consulting-career-in-the-entertainment-industry.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/svanvliet/comments/commentRss/138871.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/svanvliet/services/trackbacks/138871.aspx</trackback:ping>
        </item>
        <item>
            <title>Gaming Crosses Over to Real Life</title>
            <link>http://geekswithblogs.net/svanvliet/archive/2007/08/06/gaming-crosses-over-to-real-life.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/svanvliet/archive/2007/08/06/gaming-crosses-over-to-real-life.aspx'&gt;http://geekswithblogs.net/svanvliet/archive/2007/08/06/gaming-crosses-over-to-real-life.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;So I've boarded my flight to DFW (en route to Orlando.)  Having been upgraded to First Class, (thank you elite status) I started getting comfortable in my bulk head isle seat (my favorite, of course.)  Just as I'm about to buckle-up, a gentleman asks if I'm too attached to my seat to move so that he and his buddy can sit together.  Now, I'm very cognizant of people who are jerks and can't move so that families and friends can sit together (I'll post on my recent Amsterdam to Los Angeles flight with wife and kids in tow later.)  Thus, I acquiesced and offered my seat to this gentleman.
&lt;/p&gt;&lt;p&gt;With a gracious "thank you," the guys proceeded to take their seats.  It was at this time that I noticed their shirts and bags, which donned the "&lt;a href="http://www.blizzard.com/blizzcon07/"&gt;BlizzCon&lt;/a&gt;" logo.  This brought me back to earlier, as I waited to board, when I heard some fellas talking about "the Horde" as if it were real life.  Knowing a little about World of Warcraft (WoW,) I quipped, "Just take it easy on me in WoW."  This is where it started.
&lt;/p&gt;&lt;p&gt;"You play?!" responded the gent.  "A little," I responded, which evoked, "What faction?  Alliance or Horde"
&lt;/p&gt;&lt;p&gt;"Uh, Alliance, I think?"
&lt;/p&gt;&lt;p&gt;"AAAAAAHHHHH… Take your seat back!" was the response from the two men, as the laughed out loud.
&lt;/p&gt;&lt;p&gt;Now, I'm a geek – no doubt.  But this was just crazy!  Nevertheless, I quickly put on my headphones and closed my eyes to escape the conversation I was not interested in having.
&lt;/p&gt;&lt;p&gt;About 5 minutes later, the man was rubber-necking to try and get my attention.
&lt;/p&gt;&lt;p&gt;"What server do you play on?  I'd like to give you some Gold for your seat."
&lt;/p&gt;&lt;p&gt;Holy shit… I couldn't believe that I was being offered FAKE money as a gift for my kindness!
&lt;/p&gt;&lt;p&gt;"Uh, I don't know."
&lt;/p&gt;&lt;p&gt;I had only signed up for a 14-day trial to WoW, and don't really have time to play any games these days.  But it just goes to show how gaming is widely becoming part of everyday life, and in some cases bleeding the edge of reality.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/svanvliet/aggbug/138870.aspx" width="1" height="1" /&gt;</description>
            <guid>http://geekswithblogs.net/svanvliet/archive/2007/08/06/gaming-crosses-over-to-real-life.aspx</guid>
            <pubDate>Tue, 07 Aug 2007 04:03:34 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/svanvliet/comments/138870.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/svanvliet/archive/2007/08/06/gaming-crosses-over-to-real-life.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/svanvliet/comments/commentRss/138870.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/svanvliet/services/trackbacks/138870.aspx</trackback:ping>
        </item>
        <item>
            <title>UTF8 Encoding Changes in Vista (Hashing Gotcha)</title>
            <link>http://geekswithblogs.net/svanvliet/archive/2007/05/02/utf8-encoding-changes-in-vista-hashing-gotcha.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/svanvliet/archive/2007/05/02/utf8-encoding-changes-in-vista-hashing-gotcha.aspx'&gt;http://geekswithblogs.net/svanvliet/archive/2007/05/02/utf8-encoding-changes-in-vista-hashing-gotcha.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;If you've used hashing to store passwords for your application, you may want to double-check you code to ensure it works on Vista. &lt;/p&gt;&lt;p&gt;Thanks to information found in &lt;a href="http://blogs.msdn.com/shawnste/archive/2006/06/16/634666.aspx"&gt;Shawn Steele's post&lt;/a&gt; from almost a year ago, it seems Microsoft made changes in the .NET Framework for Vista to comply with the Unicode 5.0 specification, which requires invalid characters previously omitted in earlier versions of the .NET Framework for Windows XP, Server 2003, etc. As such, hashes computed on previous versions of Windows may not match hashes created on Vista. &lt;/p&gt;&lt;p&gt;For example, if you hash the string '&lt;span style="font-size: 10pt; color: #c00000; font-family: Consolas"&gt;Password&lt;/span&gt;' on Windows XP using &lt;span style="font-size: 10pt; color: #2b91af; font-family: Consolas"&gt;MD5CryptoServiceProvider&lt;/span&gt;, the hashed UTF8 string result would be '&lt;span style="font-size: 10pt; color: #c00000; font-family: Consolas"&gt;d~^g◄U7R↑!+9d&lt;/span&gt;'. Now, hashing the same value on Vista (without the fore mentioned solution) would result in '&lt;span style="font-size: 10pt; color: #c00000; font-family: Consolas"&gt;�d~�^g_�U7R_!+9d&lt;/span&gt;' as the UTF8 string output. Note the addition of the Unicode Replacement Character (&lt;span style="font-size: 10pt; color: #c00000; font-family: Consolas"&gt;\xFFFD&lt;/span&gt;) interspersed in the latter output. This is due to the fact that the Unicode 5.0 specification requires this character be provided rather than omitted, as allowed in Unicode 4.1 (implemented in the aforementioned previous versions of the .NET Framework for Windows.) &lt;/p&gt;&lt;p&gt;Now, as noted in Shawn's post, you can yield the same results on Vista as previous versions of Windows using &lt;span style="font-size: 10pt; color: #2b91af; font-family: Consolas"&gt;EncoderFallback&lt;/span&gt; derived classes. These will allow you to specify non-default characters to use in place of the Unicode Replacement Character. For example, consider the following setup: &lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt; font-family: Consolas"&gt;&lt;span style="color: #2b91af"&gt;Encoding&lt;/span&gt; encoding = &lt;span style="color: #2b91af"&gt;Encoding&lt;/span&gt;.UTF8.Clone() &lt;span style="color: blue"&gt;as&lt;/span&gt; &lt;span style="color: #2b91af"&gt;Encoding&lt;/span&gt;;&lt;br /&gt;encoding.EncoderFallback = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;EncoderReplacementFallback&lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.Empty);&lt;br /&gt;encoding.DecoderFallback = &lt;span style="color: blue"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af"&gt;DecoderReplacementFallback&lt;/span&gt;(&lt;span style="color: blue"&gt;string&lt;/span&gt;.Empty);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt; font-family: Consolas"&gt;&lt;/span&gt;Based on the snippet above, the encoding will use an empty string for encoding/decoding; thus, the result would be the same as that from Windows XP in the previous example (which simply omitted by default.) &lt;/p&gt;&lt;p&gt;While this solution will work (had to make things work in an existing codebase,) I would recommend using Base64-encoding strings to store hashes, as they would not suffer from the same issues of invalid UTF8 characters. The same string, '&lt;span style="font-size: 10pt; color: #c00000; font-family: Consolas"&gt;Password'&lt;/span&gt;, hashed using bytes obtained from &lt;span style="font-size: 10pt; font-family: Consolas"&gt;&lt;span style="color: #2b91af"&gt;Encoding&lt;/span&gt;.UTF8.GetBytes(&lt;span style="color: blue"&gt;byte&lt;/span&gt;[])&lt;/span&gt; with or without the fallbacks yields '&lt;span style="font-size: 10pt; color: #c00000; font-family: Consolas"&gt;3GR+tl5nEeFVN1IYISs5ZA==&lt;/span&gt;' using &lt;span style="font-size: 10pt; font-family: Consolas"&gt;&lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToBase64String(&lt;span style="color: blue"&gt;byte&lt;/span&gt;[])&lt;/span&gt;. &lt;/p&gt; &lt;img src="http://geekswithblogs.net/svanvliet/aggbug/138869.aspx" width="1" height="1" /&gt;</description>
            <guid>http://geekswithblogs.net/svanvliet/archive/2007/05/02/utf8-encoding-changes-in-vista-hashing-gotcha.aspx</guid>
            <pubDate>Wed, 02 May 2007 10:45:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/svanvliet/comments/138869.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/svanvliet/archive/2007/05/02/utf8-encoding-changes-in-vista-hashing-gotcha.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/svanvliet/comments/commentRss/138869.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/svanvliet/services/trackbacks/138869.aspx</trackback:ping>
        </item>
        <item>
            <title>How-to: Change Windows Hostname and Keep Oracle 10g Running</title>
            <category>Oracle</category>
            <link>http://geekswithblogs.net/svanvliet/archive/2007/04/03/how-to-change-windows-hostname-and-keep-oracle-10g-running.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/svanvliet/archive/2007/04/03/how-to-change-windows-hostname-and-keep-oracle-10g-running.aspx'&gt;http://geekswithblogs.net/svanvliet/archive/2007/04/03/how-to-change-windows-hostname-and-keep-oracle-10g-running.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;So I realize it seems like I'm posting a bunch of stuff on Oracle and little on .NET, but it's all related to a large Smart Client application we're developing for our client, using Oracle 10g; thus, it's relative &lt;span style="font-family: Wingdings"&gt;J&lt;/span&gt; &lt;/p&gt;&lt;p&gt;In a geographically-diverse team structure, it can be quite difficult to manage the development environment used by each team member (especially when you have little control over the workstation configuration of your offshore team.) Thus, for many of our engagements we heavily leverage virtualization – specifically Virtual PC 2007 – to help minimize the cost of environment setup and configuration. &lt;/p&gt;&lt;p&gt;One of the challenges we've faced with leveraging Virtual PC, specifically a shared image, is the unique naming of virtual machines. Now, in many cases it is acceptable to keep the virtual machine name the same across developer environments; however, for our purposes, unique machine names are required based on the following: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;TFS Workspace names rely on machine name for unique naming (in combination with username) &lt;/li&gt;&lt;li&gt;Using our host VPN connection and Internet Connection Sharing (ICS), we provide our guest VPN access; although through NAT, the machine name (NetBIOS) still passes through when accessing corporate network resources, thus causing issues with the same &lt;/li&gt;&lt;li&gt;When using local network access directly on the guest, name conflicts occur; furthermore, two guest machines have issues accessing each other due to similar NetBIOS naming issues as outlined above (we often communicate guest-to-guest from different developer environments) &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;For all intents and purposes, this is a trivial matter. However, when dealing with Oracle, reliance on the installation-time hostname – at least from my experience and research – is critical. Thus, changing the hostname can cause problems. &lt;/p&gt;&lt;p&gt;Consequently, we've learned to deal with this process by following the steps outlined below. &lt;/p&gt;&lt;h3&gt;Step 1 – Create Hosts Entry for Old Hostname &lt;/h3&gt;&lt;p&gt;Locate your hosts file, typically located at &lt;span style="font-size: 9pt; font-family: Courier New"&gt;%WINDIR%\system32\drivers\etc\hosts&lt;/span&gt; and add an entry for the old (current) &lt;span style="background-color: yellow"&gt;hostname&lt;/span&gt;. &lt;/p&gt;&lt;div&gt;&lt;table border="0" style="background: #eeece1; border-collapse: collapse"&gt;&lt;colgroup span="1"&gt;&lt;col span="1" style="width: 638px" /&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;&lt;tr&gt;&lt;td style="padding-right: 8px; padding-left: 8px; padding-bottom: 4px; padding-top: 4px; border: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;#&lt;br /&gt;# HOSTS file &lt;br /&gt;# &lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: yellow"&gt;win2k3r2&lt;/span&gt;    &lt;span style="background-color: aqua"&gt;172.16.10.10&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;Note the &lt;span style="background-color: aqua"&gt;IP address&lt;/span&gt; – this is the address of a Loopback Adapter installed on the guest machine. As outlined by the Oracle Installer, a Loopback Adapter is required on systems that do not have a static IP address (as do virtual machines using NAT, etc.) &lt;/p&gt;&lt;h3&gt;Step 2 – Uninstall Enterprise Manager Console &lt;/h3&gt;&lt;p&gt;Because there are configuration settings stored with Enterprise Manager Console that reference the hostname, the same must be uninstalled. &lt;/p&gt;&lt;div&gt;&lt;table border="0" style="background: #eeece1; border-collapse: collapse"&gt;&lt;colgroup span="1"&gt;&lt;col span="1" style="width: 638px" /&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;&lt;tr&gt;&lt;td style="padding-right: 8px; padding-left: 8px; padding-bottom: 4px; padding-top: 4px; border: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;emca -deconfig dbcontrol db -repos drop&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;Note, before executing this command, ensure that the Oracle instance is running – it has to be in order for Enterprise Manager Configuration Assistance to drop the repository and de-configure the Console. &lt;/p&gt;&lt;h3&gt;Step 3 – Stop All Oracle Services &lt;/h3&gt;&lt;p&gt;Once the uninstall of Enterprise Manage Console has completed, stop all Oracle Services on the guest machine. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;iSQL*Plus Service – typically named &lt;span style="text-decoration: underline"&gt;Oracle&amp;lt;OracleHomeName&amp;gt;iSQL*Plus&lt;/span&gt; &lt;/li&gt;&lt;li&gt;Oracle Listener Service – typically named &lt;span style="text-decoration: underline"&gt;Oracle&amp;lt;OracleHomeName&amp;gt;TNSListener &lt;/span&gt;&lt;/li&gt;&lt;li&gt;Oracle Database Instance Service – typically named &lt;span style="text-decoration: underline"&gt;OracleServer&amp;lt;SID&amp;gt;&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Step 4 – Update listener.ora and tnsnames.ora &lt;/h3&gt;&lt;p&gt;Once all the Oracle services have stopped, update the listener.ora and tnsnames.ora files, located in &lt;span style="font-size: 9pt; font-family: Courier New"&gt;%ORACLE_HOME%\network\admin&lt;/span&gt; to reflect the desired (new) hostname. &lt;/p&gt;&lt;div&gt;&lt;table border="0" style="background: #eeece1; border-collapse: collapse"&gt;&lt;colgroup span="1"&gt;&lt;col span="1" style="width: 638px" /&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;&lt;tr&gt;&lt;td style="padding-right: 8px; padding-left: 8px; padding-bottom: 4px; padding-top: 4px; border: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;LISTENER = &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;(DESCRIPTION_LIST = &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;(DESCRIPTION = &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = &lt;span style="background-color: yellow"&gt;win2k3r2&lt;/span&gt;)(PORT = 1521)) &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;) &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;table border="0" style="background: #eeece1; border-collapse: collapse"&gt;&lt;colgroup span="1"&gt;&lt;col span="1" style="width: 638px" /&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;&lt;tr&gt;&lt;td style="padding-right: 8px; padding-left: 8px; padding-bottom: 4px; padding-top: 4px; border: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;DEVBOX = &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;(DESCRIPTION = &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = &lt;span style="background-color: yellow"&gt;win2k3r2&lt;/span&gt;)(PORT = 1521)) &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;(CONNECT_DATA = &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;(SERVER = DEDICATED) &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;(SERVICE_NAME = devbox) &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;) &lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;h3&gt;Step 5 – Rename Host and Restart &lt;/h3&gt;&lt;p&gt;Now, rename the computer and restart the guest machine. &lt;/p&gt;&lt;h3&gt;Step 6 – Ensure Oracle Instance is Running &lt;/h3&gt;&lt;p&gt;Once the guest machine has started up, log in and ensure the Oracle instance is running using the following command line (typically required, unless the instance, not the Windows Service, is configured to auto-start.) &lt;/p&gt;&lt;div&gt;&lt;table border="0" style="background: #eeece1; border-collapse: collapse"&gt;&lt;colgroup span="1"&gt;&lt;col span="1" style="width: 638px" /&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;&lt;tr&gt;&lt;td style="padding-right: 8px; padding-left: 8px; padding-bottom: 4px; padding-top: 4px; border: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;oradim -startup –sid devbox&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;h3&gt;Step 7 – Reinstall Enterprise Manager Console &lt;/h3&gt;&lt;p&gt;After ensuring the Oracle instance is running, reinstall Enterprise Manager Console using the following command line: &lt;/p&gt;&lt;div&gt;&lt;table border="0" style="background: #eeece1; border-collapse: collapse"&gt;&lt;colgroup span="1"&gt;&lt;col span="1" style="width: 638px" /&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;&lt;tr&gt;&lt;td style="padding-right: 8px; padding-left: 8px; padding-bottom: 4px; padding-top: 4px; border: black 0.5pt solid"&gt;&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;emca -config dbcontrol db -repos create&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;h3&gt;Step 8 – Validate Enterprise Manager Console Installation &lt;/h3&gt;&lt;p&gt;Lastly, after the successful installation of Enterprise Manager Console, validate the installation by navigating to the logon page – typically &lt;a href="http://localhost:1158/em/"&gt;&lt;span style="font-size: 9pt; font-family: Courier New"&gt;http://&amp;lt;hostname&amp;gt;:1158/em/&lt;/span&gt;&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;At this point, you should be crankin' away with your Oracle instance running as it should! We spent a lot of time working on this issue, so hopefully this post helps you out in some way – I wished there was an article like this when I was scouring &lt;a href="http://otn.oracle.com/"&gt;OTN&lt;/a&gt; with no results! &lt;/p&gt;&lt;p&gt;Thanks to Mike Huffine for the initial pointers.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/svanvliet/aggbug/138868.aspx" width="1" height="1" /&gt;</description>
            <guid>http://geekswithblogs.net/svanvliet/archive/2007/04/03/how-to-change-windows-hostname-and-keep-oracle-10g-running.aspx</guid>
            <pubDate>Wed, 04 Apr 2007 03:41:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/svanvliet/comments/138868.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/svanvliet/archive/2007/04/03/how-to-change-windows-hostname-and-keep-oracle-10g-running.aspx#feedback</comments>
            <slash:comments>45</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/svanvliet/comments/commentRss/138868.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/svanvliet/services/trackbacks/138868.aspx</trackback:ping>
        </item>
        <item>
            <title>こんにちは東京から / Hello from Tokyo!</title>
            <category>Personal</category>
            <link>http://geekswithblogs.net/svanvliet/archive/2007/03/25/hello-from-tokyo.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/svanvliet/archive/2007/03/25/hello-from-tokyo.aspx'&gt;http://geekswithblogs.net/svanvliet/archive/2007/03/25/hello-from-tokyo.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This is my first time visiting Japan, and it's already been an incredible experience. Dinner tonight was an interesting blend of Japanese fare, most of which tasted completely unfamiliar. And the long ride from Narita to the Westin Tokyo allowed me to view some of the city's multifaceted beauty. &lt;/p&gt;&lt;p&gt;Tokyo is the start of my mini World Tour of client meetings; I'm off to Hong Kong in a couple days, then to Mumbai only a day later. Stay tuned for more interesting musings.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/svanvliet/aggbug/138867.aspx" width="1" height="1" /&gt;</description>
            <guid>http://geekswithblogs.net/svanvliet/archive/2007/03/25/hello-from-tokyo.aspx</guid>
            <pubDate>Sun, 25 Mar 2007 20:48:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/svanvliet/comments/138867.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/svanvliet/archive/2007/03/25/hello-from-tokyo.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/svanvliet/comments/commentRss/138867.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/svanvliet/services/trackbacks/138867.aspx</trackback:ping>
        </item>
    </channel>
</rss>