                                              <?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dot Net Yuppie</title>
	<atom:link href="http://dotnetyuppie.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dotnetyuppie.com</link>
	<description>Web design, SQL, and .NET for the young, up-and-coming developer</description>
	<lastBuildDate>Mon, 05 Jul 2010 02:42:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>New Website: TechBuyingGuide.com</title>
		<link>http://dotnetyuppie.com/2010/07/04/new-website-techbuyingguide-com/</link>
		<comments>http://dotnetyuppie.com/2010/07/04/new-website-techbuyingguide-com/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 02:42:14 +0000</pubDate>
		<dc:creator>DotNetYuppie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dotnetyuppie.com/?p=109</guid>
		<description><![CDATA[TechBuyingGuide.com is a new website that is changing the way that consumers purchase computers online. Long story short: TechBuyingGuide (TBG) combines processor and graphics card benchmark data and mashing it up with a computer catalog.  The result allows consumers to visually see (on a scale of 0 to 10) how &#8220;powerful&#8221; each computer is. There&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://techbuyingguide.com"><img src="http://dotnetyuppie.com/wp-content/uploads/2010/07/download-1-209x300.png" alt="" title="TechBuyingGuide.com" width="209" height="300" class="alignright size-medium wp-image-110" style="float: right; margin: 0.3em;" /></a></p>
<h2><span style="font-weight: normal; font-size: 13px;"><a href="http://techbuyingguide.com">TechBuyingGuide.com</a> is a new website that is changing the way that consumers purchase computers online.</span></h2>
<p><span id="more-109"></span></p>
<h2><span style="font-weight: normal; font-size: 13px;">Long story short: TechBuyingGuide (TBG) combines processor and graphics card benchmark data and mashing it up with a computer catalog.  The result allows consumers to visually see (on a scale of 0 to 10) how &#8220;powerful&#8221; each computer is.</span></h2>
<p>There&#8217;s a few huge advantages to this system:</p>
<ol>
<li><strong>Buyers don&#8217;t have to translate complex hardware specifications.</strong> Instead of comparing clock speed, bus speed, L2/L3 cache, and other processor metrics, the raw performance of each machine is presented in an easy-to-understand number.</li>
<li><strong>Benchmark data is incredibly accurate.</strong> After reading <a href="http://techbuyingguide.com/About.aspx">the &#8220;About&#8221; page</a>, you&#8217;ll find that TBG collects a library of benchmark data from multiple sources.  Multiple sources means there&#8217;s less chance for bias.  Also, benchmark data gives you real-life, measurable performance data.  This real-life data is much more accurate than &#8220;expected&#8221; or theoretical performance (e.g. hardware specifications).</li>
<li><strong>Variety of hardware brands.</strong> The website compiles its catalog from a variety of sellers and manufacturers.  It&#8217;s currently lacking Apple products, but it does contain a wide array of other products.</li>
<li><strong>Free.</strong> The website has done a ton of legwork and research by combining benchmark data with specific computers.  The pre-research is incredibly valuable and really helps in finding the best computer for your needs.</li>
</ol>
<p>The website has a great <a href="http://techbuyingguide.com/About.aspx#Video">promotional video</a> describing the &#8220;how to&#8221; in greater detail.  TechBuyingGuide is still in its infancy, but it&#8217;s an awesome step in the direction of simplifying the process of buying a computer online.</p>

<img src="http://dotnetyuppie.com/?ak_action=api_record_view&id=109&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dotnetyuppie.com/2010/07/04/new-website-techbuyingguide-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple .NET Benchmarking</title>
		<link>http://dotnetyuppie.com/2010/03/21/simple-net-benchmarking/</link>
		<comments>http://dotnetyuppie.com/2010/03/21/simple-net-benchmarking/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 23:55:28 +0000</pubDate>
		<dc:creator>DotNetYuppie</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://dotnetyuppie.com/?p=97</guid>
		<description><![CDATA[While code optimization is a controversial topic, curiosity often gets the best of me and I want to know which method of doing something in VB.NET is more efficient. I&#8217;ve developed a very simple, fast method of benchmarking two different functions and determining which method is faster. If you&#8217;d like to download the entire code [...]]]></description>
			<content:encoded><![CDATA[<p>While code optimization is a <a href="http://www.codinghorror.com/blog/2009/01/the-sad-tragedy-of-micro-optimization-theater.html">controversial topic</a>, curiosity often gets the best of me and I want to know which method of doing something in VB.NET is more efficient.</p>
<p><img src="http://dotnetyuppie.com/wp-content/uploads/2010/03/Screenshot.png" alt="" title="Screenshot" width="667" height="309" class="aligncenter size-full wp-image-98" /></p>
<p><span id="more-97"></span></p>
<p>I&#8217;ve developed a very simple, fast method of benchmarking two different functions and determining which method is faster.  If you&#8217;d like to download the entire code (and skip the article&#8217;s text), there is a ZIP file at the end of this page.</p>
<p>As with any benchmarking test, but especially with tests that can execute quickly, you need to select a high-performance timing method that can detect small differences in execution time &#8212; enter<strong> QueryPerformanceCounter()</strong>.</p>
<p>QueryPerformanceCounter is an API function that returns by-reference the value of a high-performance counter in &#8220;counts&#8221; (which can be converted to milliseconds):</p>
<pre class="brush: vb">
Declare Function QueryPerformanceCounter Lib &quot;Kernel32&quot; (ByRef X As Long) As Short
</pre>
<p>To convert from &#8220;counts&#8221; to milliseconds, you&#8217;ll need to use the QueryPerformanceFrequency API function:</p>
<pre class="brush: vb">
Declare Function QueryPerformanceFrequency Lib &quot;Kernel32&quot; (ByRef X As Long) As Short
</pre>
<p>By using the QueryPerformanceCounter() function, you can calculate the amount of time elapsed between beginning and ending a function:</p>
<pre class="brush: vb">
Dim Speed1 As Long
Console.WriteLine(&quot;Starting benchmark test for function 1...&quot;)
QueryPerformanceCounter(lngStart)
Function1()
QueryPerformanceCounter(lngEnd)
Speed1 = lngEnd - lngStart
</pre>
<p>Finally, you can use this concept by comparing Function1() vs. Function2().  In this example, I&#8217;ve compared two different string concatenation method.  Again, you can download the source code below.</p>
<pre class="brush: vb">
Module Module1

    &#039;Read more at: http://support.microsoft.com/kb/306978
    Declare Function QueryPerformanceCounter Lib &quot;Kernel32&quot; (ByRef X As Long) As Short
    Declare Function QueryPerformanceFrequency Lib &quot;Kernel32&quot; (ByRef X As Long) As Short

    Sub Main()

        Dim lngStart As Long, lngEnd As Long

        If QueryPerformanceCounter(lngStart) = False Then
            Console.WriteLine(&quot;High-resolution performance counter not supported - ending.&quot;)
            Console.ReadKey()
            Exit Sub
        End If

        Dim Speed1 As Long
        Console.WriteLine(&quot;Starting benchmark test for function 1...&quot;)
        QueryPerformanceCounter(lngStart)
        Function1()
        QueryPerformanceCounter(lngEnd)
        Speed1 = lngEnd - lngStart

        Dim Speed2 As Long
        Console.WriteLine(&quot;Starting benchmark test for function 2...&quot;)
        QueryPerformanceCounter(lngStart)
        Function2()
        QueryPerformanceCounter(lngEnd)
        Speed2 = lngEnd - lngStart

        Console.WriteLine(vbCrLf &amp; &quot;Speed of function 1: &quot; &amp; ConvertCountsToMSec(Speed1) &amp; &quot; ms&quot;)
        Console.WriteLine(&quot;Speed of function 2: &quot; &amp; ConvertCountsToMSec(Speed2) &amp; &quot; ms&quot;)
        Console.WriteLine(&quot;Absolute difference: &quot; &amp; ConvertCountsToMSec(Math.Abs(Speed2 - Speed1)) &amp; &quot; ms&quot;)

        If Speed2 &gt; Speed1 Then
            Console.WriteLine(vbCrLf &amp; &quot;Function 2 was &quot; &amp; Math.Round(Speed2 / Speed1, 4) &amp; &quot;x faster&quot;)
        ElseIf Speed1 &gt; Speed2 Then
            Console.WriteLine(vbCrLf &amp; &quot;Function 1 was &quot; &amp; Math.Round(Speed1 / Speed2, 4) &amp; &quot;x faster&quot;)
        Else &#039; Speed1 = Speed2
            Console.WriteLine(vbCrLf &amp; &quot;No difference in speed&quot;)
        End If

        Console.WriteLine(vbCrLf &amp; &quot;Press any key to end ...&quot;)
        Console.ReadKey()

    End Sub

    Public Sub Function1()
        &#039;Do stuff (method #1)

        Dim s As String = &quot;&quot;, i As Integer
        For i = 0 To 1000
            s &amp;= Strings.StrDup(i, &quot;A&quot;)
        Next
    End Sub

    Public Sub Function2()
        &#039;Do stuff (method #2)

        Dim s As New Text.StringBuilder(&quot;&quot;), i As Integer
        For i = 0 To 1000
            s.Append(Strings.StrDup(i, &quot;A&quot;))
        Next
    End Sub

    Public Function ConvertCountsToMSec(ByVal Counts As Long) As Double
        Dim Freq As Long
        QueryPerformanceFrequency(Freq)

        Return Math.Round(Counts / Freq * 1000, 4)
    End Function

End Module
</pre>
<p>Download the entire code: <a href='http://dotnetyuppie.com/wp-content/uploads/2010/03/SimpleFunctionBenchmarking.zip' class='icon-zip'>SimpleFunctionBenchmarking.zip [79kb]</a></p>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div><img src="http://dotnetyuppie.com/?ak_action=api_record_view&id=97&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dotnetyuppie.com/2010/03/21/simple-net-benchmarking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ten Commandments of Exceptional Web Design</title>
		<link>http://dotnetyuppie.com/2010/01/28/ten-commandments-of-exceptional-web-design/</link>
		<comments>http://dotnetyuppie.com/2010/01/28/ten-commandments-of-exceptional-web-design/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 17:00:11 +0000</pubDate>
		<dc:creator>DotNetYuppie</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://dotnetyuppie.com/?p=46</guid>
		<description><![CDATA[In an effort to garner web design inspiration, I frequently visit CSS galleries to increase my design vocabulary and see new, cutting-edge design trends. Often times, however, these websites are consistently making the same amateur design mistakes that shouldn&#8217;t ever be done by gallery-worthy web designs. Thou shalt preload all CSS:hover images If you&#8217;re willing [...]]]></description>
			<content:encoded><![CDATA[<p>In an effort to garner web design inspiration, I frequently visit CSS galleries to increase my design vocabulary and see new, cutting-edge design trends.  Often times, however, these websites are consistently making the same amateur design mistakes that shouldn&#8217;t ever be done by gallery-worthy web designs.</p>
<ol>
<li><strong>Thou shalt preload all CSS:hover images</strong> If you&#8217;re willing to put the time into changing an image on :hover, isn&#8217;t it worth your time to do it right?  Often, users won&#8217;t even notice your :hover efforts because it&#8217;ll take too long to load a new image on-demand.  To read more about preloading background images, check out <a href="http://dotnetyuppie.com/2008/04/20/please-preload-your-css-images/">Please preload your CSS images</a></li>
<p><span id="more-46"></span></p>
<li><strong>Thou shalt build content-oriented designs</strong> If your design contains a greater percent of advertisement real estate than content area, you need to go back to the drawing board.  I understand the need to monetize your site, but sometimes less is more.</li>
<li><strong>Thou shall not animate favicon.ico</strong> Animations on the web are difficult to deal with as it is &#8212; a fancy, dancing web icon at the top of my browser does nothing more than distract my attention away from your content.  Instead, create a tastefully done, static icon.</li>
<li><strong>Thou shalt not design an all-Flash website</strong> Flash may have some place in web design, but its utility is diminishing very quickly with the growing popularity of javascript frameworks like jQuery and with HTML5 on the horizon.  All-Flash websites are a nightmare for maintenance, SEO, and accessibility.  Leave Flash for games, media, non-critical navigation, and eye candy visual effects only.</li>
<li><strong>Thou shalt not play sounds</strong> It seems like modern websites, particularly those being accepted to CSS Gallery websites, would have phased out this practice many years ago.  This practice is especially common in Flash-oriented websites.  See commandment #4.</li>
<li><strong>Thou shalt not create a dark (#000000) design</strong> While there are some very few exceptions to this rule, black backgrounds are usually extremely difficult to pull off.  At the very least, a tasteful, artistic collection of gray and black can sometimes save a design, but you&#8217;re usually better off with something lighter.  And please, just say &#8220;no&#8221; to black backgrounds with dark gray text.</li>
<li><strong>Thou shalt not use background-attachment: fixed;</strong> Again, there may be some very rare artistic exceptions, but for the most part, very few web designs can pull off a fixed background image.  Fixed backgrounds remove the sense of motion while scrolling a page and hardly ever add to the creativity of a design.</li>
<li><strong>Thou shalt beware the removal of text-decorations</strong> Years ago, it was quite popular to remove the underline text decoration from links.  While this can still be tastefully done, it can become problematic when your links are hard to differentiate from your text content.  Links, when placed within a paragraph, should pop out so the user can find them easily while scanning.  Although less common, some sites rely on link color alone to differentiate links from text.  This practice can become problematic for colorblind readers who may rely on bolding or underlining for links.</li>
<li><strong>Thou shalt create a meaningful &lt;TITLE&gt;</strong> &#8216;Untitled Page&#8217; and &#8216;[Your Website Name]&#8216; are simply unacceptable.  &lt;TITLE&gt; tags are free SEO fodder, so take advantage by using your &lt;TITLE&gt; to describe the content, not the title of your website.</li>
<li><strong>Thou shalt avoid CSS hacks at all costs</strong> In almost all situations, CSS hacks will eventually come back to haunt you.  Not only do many hacks invalidate your CSS, but they also require a design update when a new browser is released.  Unless in very rare cases, you&#8217;re much better off sticking to CSS cannon and learning clever IE/Firefox workarounds, not hacks.</li>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div><img src="http://dotnetyuppie.com/?ak_action=api_record_view&id=46&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dotnetyuppie.com/2010/01/28/ten-commandments-of-exceptional-web-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Permalinks and mod_rewrite Headaches in WordPress with IIS</title>
		<link>http://dotnetyuppie.com/2009/09/21/permalinks-and-mod_rewrite-headaches-in-wordpress-with-iis/</link>
		<comments>http://dotnetyuppie.com/2009/09/21/permalinks-and-mod_rewrite-headaches-in-wordpress-with-iis/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 15:15:56 +0000</pubDate>
		<dc:creator>DotNetYuppie</dc:creator>
				<category><![CDATA[Windows/IIS]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://dotnetyuppie.com/?p=63</guid>
		<description><![CDATA[I recently switched from Apache/Linux to IIS/Windows in order to develop ASP.NET applications on my shared web host (ixwebhosting.com). Unfortunately, IIS6 doesn&#8217;t support WordPress permalinks because it doesn&#8217;t have the ability to use mod_rewrite unless you install a third-party ISAPI filter. Because I&#8217;m on a shared hosting plan, I don&#8217;t have access to install ISAPI [...]]]></description>
			<content:encoded><![CDATA[<p>I recently switched from Apache/Linux to IIS/Windows in order to develop ASP.NET applications on my shared web host (<a href="http://ixwebhosting.com">ixwebhosting.com</a>).  Unfortunately, IIS6 doesn&#8217;t support WordPress permalinks because it doesn&#8217;t have the ability to use mod_rewrite unless you install a third-party ISAPI filter.  Because I&#8217;m on a shared hosting plan, I don&#8217;t have access to install ISAPI filters and my web host won&#8217;t install them for me.</p>
<p>There are a few different 404 page-based hacks that allow you to retain your permalinks, even with IIS.  The most popular fix, which worked fine for me, was <a href="http://www.keyboardface.com/archives/category/installing-wordpress/">Keyboard Face&#8217;s IIS Permalink Fix</a>.  I used his fix, and a GET variable fix from <a href="http://www.ikailo.com/94/url-modrewrite-workaround-iis-60/">Ikailo</a> to make a PHP-based 404 page that redirects all 404 pages back into WordPress, thereby bypassing the need for mod_redirect.</p>
<p><span id="more-63"></span></p>
<p>The two fixes above are great, except for the fact that they don&#8217;t allow for a real 404 page.  In other words, if a visitor types in an invalid URL, they won&#8217;t be redirected to a friendly 404 page &#8212; they&#8217;ll get a blank, white page.  This is a common complaint, and to date I haven&#8217;t seen a fix for it.</p>
<p>Although I&#8217;m not proud of it, I have found a temporary fix until my web host upgrades to IIS7 and/or adopts an ISAPI filter solution for permalink redirections:</p>
<pre class="brush: php">
&amp;lt;?php

function customError($errno, $errstr, $errfile, $errline)
  {
	echo chr(0);
  }
set_error_handler(&amp;quot;customError&amp;quot;);

//http://www.keyboardface.com/archives/category/installing-wordpress/
$qs = $_SERVER[&#039;QUERY_STRING&#039;];
$_SERVER[&#039;REQUEST_URI&#039;] = substr($qs, strpos($qs, &#039;:80&#039;)+3);
$_SERVER[&#039;PATH_INFO&#039;] = $_SERVER[&#039;REQUEST_URI&#039;];

//http://www.ikailo.com/94/url-modrewrite-workaround-iis-60/
foreach ( $_GET as $var =&amp;gt; $val ) {
	if ( substr($var, 0, 3) == &#039;404&#039;) {
		if ( strstr($var, &amp;quot;?&amp;quot;) ) {
			$newvar = substr($var, strpos($var, &#039;?&#039;) + 1);
			$_GET[$newvar] = $val;
		}
		unset($_GET[$var]);
	}
	break;
}
include(&#039;index.php&#039;);
?&amp;gt;
</pre>
<p>As you can see, I added a custom error handler into the script.  When the error handler is called, it&#8217;ll send a chr(0) code (which for all intents and purposes is a blank, length-less character).  Once this code is sent, no header()&#8217;s or location-redirects can be sent, meaning that the code won&#8217;t die and present a blank page.  Instead, it will redirect to your wordpress 404 template page you have installed.</p>
<p>Again, this is not a pretty fix, but it gets the job done.</p>
<p><strong>Update 9/22/2009</strong> &#8211; Be advised that this hack will force all your 404 pages to be sent as 200 OK headers, which can hurt your SEO standing with websites.  It&#8217;s a buggy fix, so hopefully someone more experienced with PHP/WordPress will come up with a better solution soon.</p>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div><img src="http://dotnetyuppie.com/?ak_action=api_record_view&id=63&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dotnetyuppie.com/2009/09/21/permalinks-and-mod_rewrite-headaches-in-wordpress-with-iis/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Website Review of DoshDosh.com</title>
		<link>http://dotnetyuppie.com/2008/04/30/website-review-of-doshdoshcom/</link>
		<comments>http://dotnetyuppie.com/2008/04/30/website-review-of-doshdoshcom/#comments</comments>
		<pubDate>Thu, 01 May 2008 04:38:43 +0000</pubDate>
		<dc:creator>DotNetYuppie</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Website Reviews]]></category>

		<guid isPermaLink="false">http://dotnetyuppie.com/?p=55</guid>
		<description><![CDATA[Maki, the author of an internet marketing and social media blog called Dosh Dosh, recently revamped his website with a completely new design, which received both positive and negative feedback on his blog post announcing the new theme. Being a long-term subscriber of his website, I would like to provide a review of his new [...]]]></description>
			<content:encoded><![CDATA[<p>Maki, the author of an internet marketing and social media blog called <a href="http://doshdosh.com">Dosh Dosh</a>, recently revamped his website with a completely new design, which received both positive and negative feedback on <a href="http://www.doshdosh.com/dosh-dosh-finally-gets-a-new-site-design/">his blog post announcing the new theme</a>.  Being a long-term subscriber of his website, I would like to provide a review of his new theme.  As a developer, I&#8217;ve found that one of the best ways to improve my own skills is to evaluate the skills of others.</p>
<p>If you haven&#8217;t heard of <a href="http://doshdosh.com">DoshDosh.com</a>, I highly encourage you to visit &#8212; he has phenomenal content related to blogging, freelancing, marketing, etc. that would be extremely useful for any web developer.</p>
<p><span id="more-55"></span></p>
<p><strong>Overview</strong><br />
DoshDosh&#8217;s theme was designed to give &#8220;precedence to the content&#8221; &#8212; the design is minimalistic, with a two-column fixed-width (948px) centered layout.  The content takes up almost 2/3rds of the width of the page, and the sidebar allows for two 125&#215;125 ads to be placed side-by-side.</p>
<p><img src="http://dotnetyuppie.com/wp-content/uploads/2008/04/doshdoshthumb.jpg" alt="" title="DoshDosh.com Thumbnail" width="320" height="256" border="0" class="aligncenter size-full wp-image-56" /></p>
<p><strong>Color Scheme</strong><br />
The color scheme is very minimalistic &#8212; it is essentially black, white, and gray with a hint of <span style="color: #FFF; background-color: #993333;">#993333</span> (scarlet red).  Because of the simple color scheme, the sidebar&#8217;s advertisements bring extra attention to themselves due to their color variety.  The links are all colored in the same #993333 red color, which brings a good consistency to the layout.</p>
<p><img src="http://dotnetyuppie.com/wp-content/uploads/2008/04/doshdoshpalette.png" alt="" title="Dosh Dosh Color Palette" width="200" height="30" class="aligncenter size-full wp-image-57" style="border: 1px solid #000;" /></p>
<p><strong>Logo</strong><br />
David Airey, the designer of the logo, has an <a href="http://www.davidairey.com/logo-design-for-dosh-dosh/">excellent post regarding the logo&#8217;s design from conception to implementation</a>.  David mentions that the final selection of a logo was between the current logo (&#8220;H&#8221;), and logo &#8220;B&#8221;, as seen below.  I would have much rather had the more complex &#8220;B&#8221; logo instead of the current logo.  Additionally, the gray/white/black color scheme for the logo is dreary.  A splash of color would have made the logo much more effective.  On the upside, the current simplistic logo degrades very nicely into favicon.ico.</p>
<p><img src="http://dotnetyuppie.com/wp-content/uploads/2008/04/doshdoshlogos.png" alt="" title="Dosh Dosh Logos by David Airey" width="321" height="143" class="aligncenter size-full wp-image-61" /></p>
<p><strong>Header</strong><br />
The header takes up 55px, which is quite short for a header, but the intention of the new design was to bring focus to the content.  I don&#8217;t mind the header/logo, but I don&#8217;t think it&#8217;s optimal for the design &#8212; it&#8217;s almost <em>too simplistic and too monochrome</em>.  </p>
<p><img src="http://dotnetyuppie.com/wp-content/uploads/2008/04/doshdoshheader.png" alt="" title="Dosh Dosh Header" width="226" height="91" class="aligncenter size-full wp-image-59" border="0" /></p>
<p>The worst design faux pas committed by the new design is the fact that there is no tagline, description, or explanation of what doshdosh.com is within the header.  The first sentence of the website&#8217;s &#8220;about&#8221; page describes doshdosh.com as, &#8220;Dosh Dosh is a blog offering internet marketing and blogging tips, alongside social media strategies&#8221;.  The downside to his minimalist header is that it doesn&#8217;t describe his website at all &#8212; a simple sentence in the header could improve his new visitor retention.</p>
<p><strong>Header Navigation</strong><br />
I&#8217;m very happy to see the use of color with the navigation menu, but I&#8217;ve never been a fan of keeping the navigation highlighted respective to the current page.  For example, if you go to the &#8220;About&#8221; page, the &#8220;About&#8221; navigation icon will appear red by default.  While it adds some needed color, it isn&#8217;t entirely accurate.  If you navigate to any specific article, the &#8220;Home&#8221; navigation item still appears red, despite the fact that you are not at the &#8220;Home&#8221; page.</p>
<p><img src="http://dotnetyuppie.com/wp-content/uploads/2008/04/doshdoshnavigation.png" alt="" title="Dosh Dosh Navigation" width="356" height="91" class="aligncenter size-full wp-image-60" /></p>
<p><strong>SEO</strong><br />
To the writer&#8217;s credit, all the &lt;TITLE&gt; tags are optimized for search engines.  Even on his home page, which is rare for blogs to do, he puts a description of his blog ahead of the title of his blog (&#8220;Internet Marketing and Social Media: Dosh Dosh&#8221;).  Because of his domain name, he will easily score well on search engines for the words &#8220;dosh dosh&#8221;, so it isn&#8217;t necessary to have a title tag that only displays the name of the blog.  By putting a description of his site first, he has attained a #2 rank for the term <a href="http://www.google.com/search?q=internet+marketing+social+media">&#8220;internet marking social media&#8221;</a>.</p>
<p>Based on the HTML comments hidden within the design, it appears that the <a href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/">All in One SEO Pack</a> is installed, but it isn&#8217;t being used to its fullest extent.  By not manually specifying a description and series of keywords for each post, he is getting stuck with poor-SEO terms.  For example, in <a href="http://www.doshdosh.com/dosh-dosh-finally-gets-a-new-site-design/">his post announcing the new theme</a>, his keywords are &#8220;general stuff&#8221; and the description is made up of the first thirty words of his post.  I realize that there is some debate regarding the lack of beneficial effect to well-formed &lt;META&gt; SEO tags, but it can&#8217;t hurt to spend an extra minute to hammer out a few keywords about your post.</p>
<p><strong>Sidebar</strong><br />
I&#8217;m very impressed with the sidebar design.  Its width is enough to allow for two ads per row, but it&#8217;s not so wide that it receives more attention than the content.  All too often, web designers get greedy and overtake their websites with gaudy, animated ads that distract from the beauty of their design.</p>
<p>I fully understand the need to make money through advertisements, and the more money the better, but eight ads at the top of the sidebar promotes ad blindness and doesn&#8217;t make any one of the advertisements unique.  A design of four advertisements (at twice the advertising cost) would both decrease ad blindness and allow for each individual ad to stand out more.</p>
<p>I don&#8217;t like the placement of the rest of the items within the sidebar.  Below the advertisements include: &#8220;Recent Posts&#8221;, &#8220;Categories&#8221;, &#8220;Top 10 Most Viewed Articles Today&#8221;, &#8220;Google Custom Search&#8221;, &#8220;My Twitter Updates&#8221;, &#8220;My Digg Submissions&#8221;, and &#8220;My StumbleUpon Profile&#8221;.  I&#8217;ll address the google custom search below, but I feel like &#8220;Recent Posts&#8221; and &#8220;Top 10 Most Viewed Articles Today&#8221; would be better placed within the footer, rather than in the sidebar.  I could be wrong, but it seems like a reader is more likely to notice both sections if they were placed in the footer because they get lost in the clutter of the sidebar.  Conversely, the three social networking website feeds could be placed in the footer instead to reduce the sidebar clutter.</p>
<p><strong>Google Custom Search</strong><br />
I can&#8217;t imagine the search box gets used very often because it&#8217;s knee-deep in sidebar clutter.  I understand that you can make Adsense money by using Google&#8217;s search feature, but WordPress has excellent search functionality that trumps Google&#8217;s ability to display blog posts.  Again, I understand that some sacrifices can and should be made in the name of website revenue, but you could place your own, small Adsense advertisements at the top of a search page if you wanted while still retaining a WordPress-driven search page.</p>
<p><img src="http://dotnetyuppie.com/wp-content/uploads/2008/04/googlecustomsearch.jpg" alt="" title="Dosh Dosh's positioning of google custom search" width="192" height="440" class="aligncenter size-full wp-image-62" /></p>
<p>Aside from the fact that the search functionality uses Google, I can&#8217;t understand the reason for its placement.  For the most part, a visitor, who wants to search for a term on your website, is probably going to hope to find the search box somewhere in the header or at the top of the sidebar.  Again, it seems that revenue has trumped good design practices &#8212; while the search box should probably go at the very top of the sidebar, it has been pushed down by the RSS/e-mail subscription sign-up (which increases traffic and subsequent revenue) and by the advertisements.</p>
<p><strong>Accessibility</strong><br />
Because of the minimalist design, the page degrades very nicely when CSS is not enabled.  The sidebar&#8217;s text is placed after the content, which makes it easier for visitors with screen readers to get directly to the content.  Normally I would suggest an invisible &#8220;Jump to Content&#8221; link, but because he has four navigation links before the content, I don&#8217;t think it&#8217;s necessary.</p>
<p><strong>Conclusion</strong><br />
Dosh Dosh&#8217;s new design is clean and minimalistic, specifically focusing on content over fancy web design.  The design is almost too simplistic, particularly the logo and color scheme, but the biggest fault is the cluttered sidebar.  I appreciate the desire to have a minimalistic design, and the designer accomplished this goal, but as a frequent reader, I would have liked to see a fancier CSS or artwork built into the design.</p>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div><img src="http://dotnetyuppie.com/?ak_action=api_record_view&id=55&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dotnetyuppie.com/2008/04/30/website-review-of-doshdoshcom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling SSL (HTTPS) for IIS in Windows XP</title>
		<link>http://dotnetyuppie.com/2008/04/26/enabling-ssl-https-for-iis-in-windows-xp/</link>
		<comments>http://dotnetyuppie.com/2008/04/26/enabling-ssl-https-for-iis-in-windows-xp/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 04:26:19 +0000</pubDate>
		<dc:creator>DotNetYuppie</dc:creator>
				<category><![CDATA[Windows/IIS]]></category>

		<guid isPermaLink="false">http://dotnetyuppie.com/?p=53</guid>
		<description><![CDATA[A reader recently asked about enabling SSL for a web application, but without the hassle of applying for a verified certificate. This article will outline the process to enable HTTPS on a Windows XP machine, but the process of creating a self-signed certificate is applicable to just about any version of Windows. What is a [...]]]></description>
			<content:encoded><![CDATA[<p>A reader recently asked about enabling SSL for a web application, but without the hassle of applying for a verified certificate.  This article will outline the process to enable HTTPS on a Windows XP machine, but the process of creating a self-signed certificate is applicable to just about any version of Windows.</p>
<p><strong>What is a certificate?</strong><br />
A certificate is a file that contains a set of instructions, which are read by a client computer, outlining the process of properly encrypting and decrypting data.  The certificate is unique to a website, and ensures the security of the client&#8217;s data to and from a server.</p>
<p><span id="more-53"></span></p>
<p>To increase security, these certificates are often signed by a third party, called a <a href="http://en.wikipedia.org/wiki/Certificate_authority">certificate authority</a>, who verifies that the server is who they say they are.  Unfortunately, the process of obtaining a third-party verification costs money and takes time.</p>
<p><strong>Why self-sign?</strong><br />
If you don&#8217;t want to pay money to have an official SSL certificate, but you still want the security of an encrypted HTTP session, then you can self-sign the certificate.  Self-signing simply means that instead of having a third-party verify the integrity of the server/certificate, you&#8217;re doing it yourself.  A client computer won&#8217;t recognize your self-signature as being reliable, but at least you&#8217;ll have encrypted data.</p>
<p>Obviously if you&#8217;re running a full-scale, professional website you&#8217;ll want to get a third-party verification, but if you&#8217;re running small-scale web applications off a personal computer for your own use, then there&#8217;s no reason to spend money for verification.  Unfortunately, Windows XP doesn&#8217;t make it easy to self-sign your certificate to enable SSL on your local machine.</p>
<p><strong>How to create your own SSL certificate</strong></p>
<ol>
<li><strong>Download and install OpenSSL</strong>.  The OpenSSL project doesn&#8217;t distribute compiled binary files, but Shining Light Productions offers a Windows installation (currently &#8220;Win32 OpenSSL v0.9.8g Light&#8221;), which you can <a href="http://www.slproweb.com/products/Win32OpenSSL.html">download here (1MB)</a>.  Its default installation is to c:\OpenSSL.</li>
<li><strong>Open the Web Server Certificate Wizard</strong>.  Open up IIS 5.1 (your results may vary in other versions), right click &#8216;Default Web Site&#8217; and select &#8216;Properties.  Click on the &#8216;Directory Security&#8217; tab, and then the &#8216;Server Certificate&#8230;&#8217; button.  The wizard should appear.
<p><img src="http://dotnetyuppie.com/wp-content/uploads/2008/04/ssl1.jpg" alt="" title="Default Web Site Properties window" width="473" height="460" class="aligncenter size-full wp-image-54" />
</li>
<li><strong>Create a new certificate request</strong>.  Once in the wizard, select &#8220;Create a new certificate&#8221;, and &#8220;Prepare the request now, but send it later&#8221;.  You can fill out the remainder of the certificate request as you see fit &#8212; for the most part, leave things as their default values, but change the name of the website/organization/organizational unit/common name/country/region/etc. to whatever you prefer.  When you get to the end of the wizard, it will ask you where you want to save the certificate request (default c:\certreq.txt).  Save it to wherever you want, but keep the certreq.txt filename so the rest of the instructions work.</li>
<li><strong>Create the security certificate</strong>.  Open up a command-line window, and type out the following commands.  Note that this assumes that your OpenSSL directory is c:\OpenSSL and your certificate request is c:\certreq.txt
<p><strong>cd c:\OpenSSL\bin</strong></p>
<p><strong>openssl genrsa -des3 -out CA.key 1024</strong><br />
(Note that you will be asked for a pass phrase &#8212; you&#8217;ll have to make one up that is 4-511 character is length)</p>
<p><strong>openssl req -new -key CA.key -x509 -days 1095 -out CA.cer</strong><br />
(Note that you will have to enter the pass phrase from the previous step.  In addition, it will ask you the same questions that were asked from IIS &#8212; fill in the same answers or hit enter for default responses)</p>
<p><strong>openssl x509 -req -days 730 -in c:\certreq.txt -CA CA.cer -CAkey CA.key -CAcreateserial -out SelfSignedCert.cer</strong><br />
(Note that you will have to enter the pass phrase from the previous two steps again)</p>
</li>
<li>If all goes well, you will have a file at <strong>C:\OpenSSL\bin\SelfSignedCert.cer</strong> that is your self-signed certificate.</li>
<li>Open the Web Server Certificate Wizard again (from step 2).  You&#8217;ll note that you have a new option, called &#8220;Process the pending request and install the certificate&#8221;.  Select this option and target the path/filename to C:\OpenSSL\bin\SelfSignedCert.cer.</li>
<li>Now, you can enable SSL for any application on your server by right-clicking it, going to &#8220;Properties&#8221;, the &#8220;Directory Security&#8221; tab, and the &#8220;Edit&#8230;&#8221; button at the bottom.</li>
<li>To enable SSL, select &#8220;Require secure channel (SSL)&#8221; and hit OK.
<p><img src="http://dotnetyuppie.com/wp-content/uploads/2008/04/ssl2.jpg" alt="" title="Secure Communications window" width="410" height="386" class="aligncenter size-full wp-image-51" />
</li>
</ol>
<p><strong>A note about the warning to clients</strong><br />
Whenever a browser goes to a self-signed HTTPS site, they will receive a notification that the security of the site cannot be validated.  This warning makes sense because you signed the certificate, and you are not one of the few certificate authorities.  Regardless, be sure to &#8220;accept&#8221; the warning and the site&#8217;s certificate &#8212; the web session will still be securely encrypted.</p>
<p><img src="http://dotnetyuppie.com/wp-content/uploads/2008/04/ssl3.jpg" alt="" title="Unknown Authority Certificate error window" width="500" height="354" class="aligncenter size-full wp-image-52" /></p>
<p><strong>Conclusion</strong><br />
Once Windows Server 2003 came out, Microsoft realized how essential it was to be able to SSL on the fly, so they made it much, much easier to self-sign certificates.  For those still using XP, however, you&#8217;re stuck using OpenSSL to self-sign certificates.</p>
<p>Keep in mind that this process is really only meant for personal applications &#8212; users don&#8217;t like to get unfriendly &#8220;unknown certificate&#8221; messages when they visit your site.</p>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div><img src="http://dotnetyuppie.com/?ak_action=api_record_view&id=53&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dotnetyuppie.com/2008/04/26/enabling-ssl-https-for-iis-in-windows-xp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Handling and Recording Exceptions in .NET</title>
		<link>http://dotnetyuppie.com/2008/04/22/handling-and-recording-exceptions-in-net/</link>
		<comments>http://dotnetyuppie.com/2008/04/22/handling-and-recording-exceptions-in-net/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 03:35:55 +0000</pubDate>
		<dc:creator>DotNetYuppie</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Facade]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://dotnetyuppie.com/?p=13</guid>
		<description><![CDATA[There&#8217;s nothing more amateur than displaying a big, yellow unhandled exception page for a .NET application. Professionally done ASP.NET websites need adequate error handling and recording. It&#8217;s not enough to catch exceptions and display a friendly error page &#8212; you need to record any unhandled errors so that they can be fixed. Proper Error Handling [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s nothing more amateur than displaying a big, yellow unhandled exception page for a .NET application.  Professionally done ASP.NET websites <em>need</em> adequate error handling <strong>and recording</strong>.  It&#8217;s not enough to catch exceptions and display a friendly error page &#8212; you need to record any unhandled errors so that they can be fixed.</p>
<p><img src="http://dotnetyuppie.com/wp-content/uploads/2008/04/unhandledexception.jpg" alt="" title="Unhandled Exception" width="400" height="244" class="alignright size-full wp-image-47" /></p>
<p><span id="more-13"></span></p>
<p><strong>Proper Error Handling &#8211; Step 1</strong><br />
The first step to handling errors is to Try/Catch them before they occur.  If you&#8217;re performing some action that has a high probability of throwing an error (e.g. anything relating to a call to a database or read/write to a file), you should enclose your logic in a Try/Catch statement.</p>
<p>Keep in mind, however, that throwing exceptions is bad.  Generally speaking, exception handling takes up a lot of resources and is a very slow process.  If exceptions are being thrown, it&#8217;s probable that you didn&#8217;t do enough error checking ahead of time to prevent the exception from being thrown.  If you record your exceptions (as I&#8217;ll show you how to do), you can retrospectively look back and see what type of preemptive error checking you should have done to prevent the exception from being thrown in the first place.</p>
<pre class="brush: vb">
Public Sub ErrorProneCode()

    &#039;Inadequate error checking here

    Try
        &#039;Make call to database or file I/O that
        &#039; throws a nasty exception
    Catch ex As Exception
        &#039;Catch the exception -- either display a message
        &#039; to the user that an error occurred, or redirect
        &#039; the user to a standard &quot;error&quot; page

        &#039;Don&#039;t forget to record the exception so that
        &#039; you can investigate at a later time
    Finally
        &#039;Also, don&#039;t forget to clean up (destroy)
        &#039; any(objects) that might cause a leak
    End Try

End Sub
</pre>
<p><strong>Proper Error Handling &#8211; Step 2</strong><br />
Sometimes, developers don&#8217;t have enough foresight to Try/Catch/Finally every single error-prone line of code, and exceptions go unhandled.  Unfortunately, if you haven&#8217;t set up a standardized error page, users are rudely presented with a big, yellow Microsoft error page that means absolutely nothing to the end-user.  To add insult to injury, Microsoft&#8217;s error page does not record the exception that occurred, which means you (the developer) won&#8217;t hear about it unless the end-user complains.</p>
<p>For the instances when you don&#8217;t have an exception wrapped up in a Try/Catch, you need to add a Global.asax.  To do so, open your project, &#8220;Add New Item&#8221;, and then select &#8220;Global Application Class&#8221;.  The default name is Global.asax.</p>
<p>Within Global.asax, you can specify what happens when the <strong>Application_Error</strong> event fires.  Application_Error occurs when an unhandled exception occurs and is not caught by a Try/Catch.  When you add Global.asax, it adds several event handlers automatically &#8212; add your code to the Application_Error event, similar to this:</p>
<pre class="brush: vb">
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
    &#039; Code that runs when an unhandled error occurs
    &#039; The exception was not caught with a Try/Catch

    &#039;Get the last exception that occurred
    &#039; (which sent us to Application_Error)
    Dim ex As Exception = Server.GetLastError

    &#039;Record the error somewhere so that you can prevent this
    &#039; from happening in the future.  RecordException() is a method
    &#039; that you need to write yourself.  I have included psuedocode
    &#039; for it below
    RecordException(ex, SomeURL)

    &#039;Response.Redirect() the user to a generalized &quot;Error&quot; page
End Sub
</pre>
<p><strong>Recording Your Error</strong><br />
Regardless of whether you had a handled or unhandled exception, you still need to record it so that you can take steps to prevent the exception from occurring in the future.  Typically, errors can be recorded by inserting them into a database.  Of course, if your exception is originating because you can&#8217;t connect to the database, then you won&#8217;t be able to record any exceptions.</p>
<p>The variables that you record are important so that you can track down problems.  I prefer to have any session or user data (e.g. UserID, SessionID, username, etc.), the date/time, the stack trace, the inner stack trace, the exception message, and the URL that originated the exception.  Your data preference may vary, but the most important section is the stack trace.</p>
<p>The following pseudocode is an example of how to record an exception.  This method would be called by either the Catch section of a Try/Catch or Global.asax&#8217;s Application_Error:</p>
<pre class="brush: vb">
Public Sub RecordException(ByVal ex As Exception, ByVal OriginatingURL As String)

    Dim ParamList As New ArrayList

    ParamList.Add(New Data.SqlClient.SqlParameter( _
        &quot;Username&quot;, Session(&quot;Username&quot;)))
    ParamList.Add(New Data.SqlClient.SqlParameter( _
        &quot;DateOfError&quot;, Now))
    ParamList.Add(New Data.SqlClient.SqlParameter( _
        &quot;StackTrace&quot;, ex.StackTrace))
    ParamList.Add(New Data.SqlClient.SqlParameter( _
        &quot;InnerStackTrace&quot;, ex.InnerException.StackTrace))
    ParamList.Add(New Data.SqlClient.SqlParameter( _
        &quot;ExceptionMessage&quot;, ex.Message))
    ParamList.Add(New Data.SqlClient.SqlParameter( _
        &quot;ExceptionMessage&quot;, OriginatingURL))

    &#039;Open connection to SQL database and insert
    &#039; the exception data into a table

End Sub
</pre>
<p><strong>Conclusion</strong><br />
There are many ways to catch and record exceptions, but there are two basic principles.  First, you need to present the end-user with some sort of notification that notifies them that something weird is going on, and that you&#8217;ve been notified about it.  Microsoft&#8217;s default error page is not an adequate error page.  Second, you need to record any exceptions that were not expected.  I prefer to record my exceptions in an SQL database, and then use the database as a &#8216;to do&#8217; list when I&#8217;m tracking down bugs.  Regardless of your method for recording exceptions, it needs to be done so that the end-user doesn&#8217;t have to manually report bugs to you.</p>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div><img src="http://dotnetyuppie.com/?ak_action=api_record_view&id=13&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dotnetyuppie.com/2008/04/22/handling-and-recording-exceptions-in-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Please Preload Your CSS Images</title>
		<link>http://dotnetyuppie.com/2008/04/20/please-preload-your-css-images/</link>
		<comments>http://dotnetyuppie.com/2008/04/20/please-preload-your-css-images/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 03:36:42 +0000</pubDate>
		<dc:creator>DotNetYuppie</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://dotnetyuppie.com/?p=41</guid>
		<description><![CDATA[Please, for your own good, preload your CSS images. It&#8217;s becoming more popular to use the :hover pseudo-class to toggle a background-image in a &#60;div&#62; block to simulate various visual effects, but many developers are making the mistake of not preloading the :hover image. It looks unprofessional when a user hovers over an image and [...]]]></description>
			<content:encoded><![CDATA[<p>Please, for your own good, preload your CSS images.</p>
<p>It&#8217;s becoming more popular to use the :hover pseudo-class to toggle a background-image in a &lt;div&gt; block to simulate various visual effects, but many developers are making the mistake of not preloading the :hover image.  It looks unprofessional when a user hovers over an image and has to wait for a new background-image to download and display.</p>
<p><img src="http://dotnetyuppie.com/wp-content/uploads/2008/04/cssbackgroundhover.gif" alt="" title="The Wrong Way to :Hover" width="275" height="63" class="aligncenter size-full wp-image-45" /><br />
As you can see above, there is a small, awkward delay, which isn&#8217;t always so small, that occurs when a :hover background-image is not properly preloaded.</p>
<p><span id="more-41"></span></p>
<p><strong>How To Preload Your Own Images</strong><br />
There are various ways to preload images, but the most efficient and popular way is to use CSS and a sprite, combined image to accomplish the appearance of a preload.</p>
<ol>
<li><strong>Create a single image file with both the normal and the :hover background images.</strong>  I have included an example, called Example.png, below:<br />
<img src="http://dotnetyuppie.com/wp-content/uploads/2008/04/example.png" alt="" title="ExampleButtonHover" width="191" height="105" class="aligncenter size-medium wp-image-44" style="border: 1px solid #000" /></li>
<li><strong>Specify the image dimensions of the first background-image.</strong>  The first button&#8217;s dimensions start at {0,0} and end at {191,52}, after which the second image button begins.  When you specify your image CSS, you need to constrain the background image using the following code &#8212; this will only display the top button in the image file:
<pre class="brush: css">
#SomeBackgroundImage {
	background: url(&#039;Example.png&#039;) 0px 0px no-repeat;
	width: 191px;
	height: 52px;
}
</pre>
</li>
<li><strong>Specify the image dimensions for the :hover background</strong><br />
Now that you&#8217;ve set up the initial image, you need to set up the dimensions for when the user&#8217;s mouse hovers over the image.  Once the image hovers, you want the background position to change so that you only see the bottom portion of the image (and exclude the top portion).  All we&#8217;re really doing is telling CSS that our background image starts 53 pixels below where it normally would.  This is achieved by the following code:</p>
<pre class="brush: css">
#SomeBackgroundImage:hover {
	background: url(&#039;Example.png&#039;) 0px -53px no-repeat;
	width: 191px;
	height: 52px;
}
</pre>
</li>
</ol>
<p><strong>Why is this method so much better?</strong><br />
Many developers make the honest mistake of creating two separate image files &#8212; like Example.png and ExampleHover.png.  CSS does <strong>not</strong> preload any images &#8212; :hover background-images are not loaded until the pseudo-class is called (i.e. when the user initiates a mouse hover).  This lack of preloading creates the awkward delay between the mouse hovering over an object and CSS displaying a new background-image.</p>
<p>In the example above, a single image file contains both forms of the toggled object, which actually creates two beneficial effects.  First, our :hover image is preloaded because it is part of the original background-image &#8212; CSS only has to move the location of the background image position.  Second, it&#8217;s more efficient to load one larger image than to load two smaller images because there is a performance penalty each time the browser has to make a new HTTP request to a server.  The fewer requests, the better.</p>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div><img src="http://dotnetyuppie.com/?ak_action=api_record_view&id=41&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dotnetyuppie.com/2008/04/20/please-preload-your-css-images/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Serializable MailMessage Class</title>
		<link>http://dotnetyuppie.com/2008/04/02/serializable-mailmessage-class/</link>
		<comments>http://dotnetyuppie.com/2008/04/02/serializable-mailmessage-class/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 04:29:38 +0000</pubDate>
		<dc:creator>DotNetYuppie</dc:creator>
				<category><![CDATA[Serialization]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dotnetyuppie.com/2008/04/02/serializable-mailmessage-class/</guid>
		<description><![CDATA[In response to my article on Custom Binary Serialization in .NET, a visitor asked me for a specific example of a custom serialization class of .NET&#8217;s MailMessage class. As I mentioned in the article, I struggled with the MailMessage and MailAddress class because they cannot be serialized unless you use custom serialization (which can be [...]]]></description>
			<content:encoded><![CDATA[<p>In response to my article on <a href="http://dotnetyuppie.com/2008/02/17/custom-binary-serialization-in-net">Custom Binary Serialization in .NET</a>, a visitor asked me for a specific example of a custom serialization class of .NET&#8217;s MailMessage class.</p>
<p>As I mentioned in the article, I struggled with the MailMessage and MailAddress class because they cannot be serialized unless you use custom serialization (which can be a big pain because it takes quite a bit of time to create a custom class).  I spent days trying to serialize the MailMessage class using conventional methods, only to find that there is no quick workaround for it other than custom serialization.</p>
<p><span id="more-37"></span></p>
<p><strong>Download My Custom SerialMailMessage Class</strong><br />
If you&#8217;re interested in using my class, you can <a href='http://dotnetyuppie.com/wp-content/uploads/2008/04/serialmailmessage.zip' title='SerialMailMessage'>download the SerialMailMessage code here</a>.</p>
<p>Within the zipped file, you will find the following classes:</p>
<ol>
<li><strong>SerialMailMessageExample </strong>- I have included a simple example that utilizes the SerialMailMessage class.</li>
<li><strong>SerialMailMessage </strong>- A custom serializable class that uses both SerialMailAddress and SerialMailAttachment to create a serializable form of .NET&#8217;s MailMessage class.</li>
<li><strong>Serialization </strong>- A simple class to perform serialization and deserialization of serializable objects</li>
<li><strong>SerialMailAddress </strong>- A custom serializable class that replaces .NET&#8217;s MailAddress class (which is not serializable).</li>
<li><strong>SerialMailAttachment </strong>- A custom serializable class that replaces .NET&#8217;s MailAttachment class (which is not serializable).</li>
</ol>
<p>Please keep in mind that my SerialMailMessage code was intended for a web service, so there were certain limitations built into the design of the classes.  If you aren&#8217;t using these classes with a web service, you&#8217;ll have quite a bit more flexibility than I did.  I highly encourage you to modify and improve on my code &#8212; there is a shameful lack of useful custom serializable classes available online, hence the reason for me having to write my own.</p>
<p>If you have any questions, please post them as comments so that everyone can benefit from a discussion.</p>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div><img src="http://dotnetyuppie.com/?ak_action=api_record_view&id=37&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dotnetyuppie.com/2008/04/02/serializable-mailmessage-class/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Maximizing Your Firefox Screen Real Estate</title>
		<link>http://dotnetyuppie.com/2008/03/27/maximizing-your-firefox-screen-real-estate/</link>
		<comments>http://dotnetyuppie.com/2008/03/27/maximizing-your-firefox-screen-real-estate/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 15:54:33 +0000</pubDate>
		<dc:creator>DotNetYuppie</dc:creator>
				<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://dotnetyuppie.com/2008/03/27/maximizing-your-firefox-screen-real-estate/</guid>
		<description><![CDATA[If you&#8217;re developing on a laptop with a smaller screen, you can use all the screen real estate that you can get. I have recently optimized my Firefox in order to maximize the amount of screen space available for web pages. Hide the main menubar As you can see above, I have hidden the &#8220;File, [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re developing on a laptop with a smaller screen, you can use all the screen real estate that you can get.  I have recently optimized my Firefox in order to maximize the amount of screen space available for web pages.</p>
<p><img src='http://dotnetyuppie.com/wp-content/uploads/2008/03/optimizedscreenshot.jpg' alt='Optimized screen' /></p>
<p><span id="more-30"></span></p>
<p><strong>Hide the main menubar</strong><br />
As you can see above, I have hidden the &#8220;File, Edit, View, &#8230;&#8221; menu at the top, particularly because I rarely use my mouse to access the menu.  I almost always use hotkeys (like CTRL-B to access my bookmarks) to access the menu.  There is a Firefox extension, called <a href="https://addons.mozilla.org/en-US/firefox/addon/4762">Hide Menubar</a>, that allows you to hide the menu unless it is in use.  As you can see in the image below, you can enable or disable the main menu by right-clicking in the menu bar.  <a href="https://addons.mozilla.org/en-US/firefox/addon/4762">Click here to download the Hide Menubar extension.</a></p>
<p><img src='http://dotnetyuppie.com/wp-content/uploads/2008/03/hide-menubar.jpg' alt='Hide Menubar' /></p>
<p><strong>Use small icons for your theme</strong><br />
By right-clicking the main menu and clicking &#8216;Customize&#8230;&#8217;, you can reduce the size of your theme icons so that they are the same height as your URL textbox.  Select the &#8216;Use Small Icons&#8217; checkbox as shown below.</p>
<p><img src='http://dotnetyuppie.com/wp-content/uploads/2008/03/rightclickmenu.jpg' alt='Customize…' /></p>
<p><img src='http://dotnetyuppie.com/wp-content/uploads/2008/03/smallicons.jpg' alt='Small Icons' /></p>
<p><strong>Total Space Saved</strong><br />
On my machine, by both hiding the menu bar and using small icons, I save about 30 pixels of screen space (about 4% of my total screen resolution).  A 4% reduction in wasted space doesn&#8217;t seem like much, but it makes a significant visual difference while not diminishing the usability of Firefox.</p>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div><img src="http://dotnetyuppie.com/?ak_action=api_record_view&id=30&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dotnetyuppie.com/2008/03/27/maximizing-your-firefox-screen-real-estate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
