<?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>Joel Hainley</title>
	<atom:link href="http://www.joelhainley.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joelhainley.com</link>
	<description>my thoughts and adventures</description>
	<lastBuildDate>Mon, 22 Feb 2010 17:25:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Snowshoeing Trip #2 &#8211; February 21, 2010</title>
		<link>http://www.joelhainley.com/index.php/2010/02/22/snowshoeing-trip-2-february-21-2010/</link>
		<comments>http://www.joelhainley.com/index.php/2010/02/22/snowshoeing-trip-2-february-21-2010/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 17:25:06 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=283</guid>
		<description><![CDATA[Got out for some snowshoeing up at Yuba Gap this weekend. Mike and Weilei brought one of Mike&#8217;s coworkers from India along and I took Mom out for her first time snowshoeing. She loved it and is already planning her next trip. It snowed on us most of the trip but the roads were in [...]]]></description>
			<content:encoded><![CDATA[<p>Got out for some snowshoeing up at Yuba Gap this weekend. Mike and Weilei brought one of Mike&#8217;s coworkers from India along and I took Mom out for her first time snowshoeing. She loved it and is already planning her next trip. It snowed on us most of the trip but the roads were in good shape, the only problem with the driving was the traffic going home. I couldn&#8217;t quite understand why there were so many cars on the road until I was informed that this last week was a snow week for a lot of schools so that probably explains all of the traffic.</p>
<p>The next time we go we&#8217;re gonna leave early in the morning and see if we can get out for a longer trip, but it&#8217;s enough work that I hesitate to take people out for 6 miles on their first day of shoeing.  Some photos are included below to bore those of you who like photos</p>

<a href='http://www.joelhainley.com/index.php/2010/02/22/snowshoeing-trip-2-february-21-2010/img_0180/' title='IMG_0180'><img width="150" height="150" src="http://www.joelhainley.com/wp-content/uploads/2010/02/IMG_0180-150x150.png" class="attachment-thumbnail" alt="" title="IMG_0180" /></a>
<a href='http://www.joelhainley.com/index.php/2010/02/22/snowshoeing-trip-2-february-21-2010/img_0179/' title='IMG_0179'><img width="150" height="150" src="http://www.joelhainley.com/wp-content/uploads/2010/02/IMG_0179-150x150.png" class="attachment-thumbnail" alt="" title="IMG_0179" /></a>
<a href='http://www.joelhainley.com/index.php/2010/02/22/snowshoeing-trip-2-february-21-2010/img_0182/' title='IMG_0182'><img width="150" height="150" src="http://www.joelhainley.com/wp-content/uploads/2010/02/IMG_0182-150x150.png" class="attachment-thumbnail" alt="" title="IMG_0182" /></a>
<a href='http://www.joelhainley.com/index.php/2010/02/22/snowshoeing-trip-2-february-21-2010/img_0185/' title='IMG_0185'><img width="150" height="150" src="http://www.joelhainley.com/wp-content/uploads/2010/02/IMG_0185-150x150.png" class="attachment-thumbnail" alt="" title="IMG_0185" /></a>
<a href='http://www.joelhainley.com/index.php/2010/02/22/snowshoeing-trip-2-february-21-2010/img_0181/' title='IMG_0181'><img width="150" height="150" src="http://www.joelhainley.com/wp-content/uploads/2010/02/IMG_0181-150x150.png" class="attachment-thumbnail" alt="" title="IMG_0181" /></a>
<a href='http://www.joelhainley.com/index.php/2010/02/22/snowshoeing-trip-2-february-21-2010/img_0183/' title='IMG_0183'><img width="150" height="150" src="http://www.joelhainley.com/wp-content/uploads/2010/02/IMG_0183-150x150.png" class="attachment-thumbnail" alt="" title="IMG_0183" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/02/22/snowshoeing-trip-2-february-21-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>State Of The Bicycle &#8211; February 22, 2010</title>
		<link>http://www.joelhainley.com/index.php/2010/02/22/state-of-the-bicycle-february-22-2010/</link>
		<comments>http://www.joelhainley.com/index.php/2010/02/22/state-of-the-bicycle-february-22-2010/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 15:06:42 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[bicycle]]></category>
		<category><![CDATA[State of the Bicycle]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=281</guid>
		<description><![CDATA[No update for last week, so the update for this week will include two weeks of numbers.
Recap
starting weight: 214.5
ending weight: 212.5
total mileage : 242.8
total calories burned on bicycle : 16609
The last two weeks have been extremely busy with work related matters. I&#8217;ve shuffled some things around and should be able to increase my weekly mileage [...]]]></description>
			<content:encoded><![CDATA[<p>No update for last week, so the update for this week will include two weeks of numbers.</p>
<p><strong>Recap<br />
<span style="font-weight: normal;">starting weight: 214.5<br />
ending weight: 212.5<br />
<strong><span style="font-weight: normal;">total mileage : 242.8<br />
total calories burned on bicycle : 16609</span></strong></span></strong></p>
<p><strong><span style="font-weight: normal;"><strong><span style="font-weight: normal;">The last two weeks have been extremely busy with work related matters. I&#8217;ve shuffled some things around and should be able to increase my weekly mileage as I work towards the double century without too many more hassles.  Points of interest while cycling the last few weeks was a day where we rode to the top of Mt. Diablo via the North Gate entrance, rode down to the bottom of Mt. Diablo via the South Gate road and rode back to the top again. </span></strong></span></strong></p>
<p>Interesting site seen while cycling in the last two weeks, along with huge &#8220;herds&#8221; of turkeys, I saw two squirrels aggressively making an effort to bring new squirrels into the world.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/02/22/state-of-the-bicycle-february-22-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>State Of The Bicycle &#8211; February 8, 2010</title>
		<link>http://www.joelhainley.com/index.php/2010/02/08/state-of-the-bicycle-february-8-2010/</link>
		<comments>http://www.joelhainley.com/index.php/2010/02/08/state-of-the-bicycle-february-8-2010/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 16:30:58 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[bicycle]]></category>
		<category><![CDATA[State of the Bicycle]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=273</guid>
		<description><![CDATA[Busy week at work and I didn&#8217;t get to ride much this week. However I was able to get out for a good long ride on Sunday. 
Weekly Recap:
starting weight: 219
ending weight: 214.5
total mileage for the week: 107.6
total calories burned this week on the bicycle: 7365
]]></description>
			<content:encoded><![CDATA[<p>Busy week at work and I didn&#8217;t get to ride much this week. However I was able to get out for a good long ride on Sunday. </p>
<p><strong>Weekly Recap:</strong><br />
starting weight: 219<br />
ending weight: 214.5<br />
total mileage for the week: 107.6<br />
total calories burned this week on the bicycle: 7365</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/02/08/state-of-the-bicycle-february-8-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>State of the Bicycle &#8211; February 1, 2010</title>
		<link>http://www.joelhainley.com/index.php/2010/02/01/state-of-the-bicycle-february-1-2010/</link>
		<comments>http://www.joelhainley.com/index.php/2010/02/01/state-of-the-bicycle-february-1-2010/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 14:24:04 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[bicycle]]></category>
		<category><![CDATA[State of the Bicycle]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=270</guid>
		<description><![CDATA[The riding week have a few rain days in it this past week, and I was out of town this weekend so I didn&#8217;t hit my mileage goal for the week. I&#8217;m pretty happy with what I was able to get done during this week and I think overall things are looking pretty good. This [...]]]></description>
			<content:encoded><![CDATA[<p>The riding week have a few rain days in it this past week, and I was out of town this weekend so I didn&#8217;t hit my mileage goal for the week. I&#8217;m pretty happy with what I was able to get done during this week and I think overall things are looking pretty good. This posting also marks the first month of being back on the bike regularly as well as the first full month making a focused effort at dropping some weight, the weight loss as been somewhat successful and hope that it will continue over the next few months.</p>
<p><strong>Weekly Recap:</strong><br />
starting weight: 225<br />
ending weight: 219<br />
total mileage for the week: 74.6<br />
total ride time for the week : 05:08:51<br />
total calories burned this week on the bicycle: 5588</p>
<p><strong>Monthly Recap:</strong><br />
starting weight: 242<br />
ending weight: 219<br />
total mileage for the month: 494.3<br />
total ride time for the month: 13:20:05<br />
total calories burned this month on the bicycle: 37,757</p>
<p>Overall it was a pretty good month, the total mileage on the Cannondale is up to 5,324 miles, and it is still trucking along just fine. I need to spend some time adjusting the front brakes, and tuning the shifting a bit but that&#8217;s normal stuff. Colin has been giving me a hard time about having a rack and a rack bag on my bike but that rack has been following me around for the last 5324 miles and it&#8217;s never complained once so I&#8217;m inclined to leave it right where it is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/02/01/state-of-the-bicycle-february-1-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>State of the Bicycle &#8211; January 25, 2010</title>
		<link>http://www.joelhainley.com/index.php/2010/01/25/state-of-the-bicycle-january-25-2010/</link>
		<comments>http://www.joelhainley.com/index.php/2010/01/25/state-of-the-bicycle-january-25-2010/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 15:37:22 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[bicycle]]></category>
		<category><![CDATA[State of the Bicycle]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=266</guid>
		<description><![CDATA[A lot of rain came in this last week. So for most of the week I spent time riding on the indoor trainer, listening to books on tape. Good workouts for sure, but nothing beats getting out and putting some pavement under your wheels. On Saturday I got out for a ride with Colin and [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of rain came in this last week. So for most of the week I spent time riding on the indoor trainer, listening to books on tape. Good workouts for sure, but nothing beats getting out and putting some pavement under your wheels. On Saturday I got out for a ride with Colin and ended up with 75 miles for the day. Colin introduced me to the beauty of espresso and I don&#8217;t think I&#8217;ll ever be the same. Good Stuff!</p>
<p>starting weight : 229.5<br />
ending weight : 225<br />
total mileage for the week : 75.7<br />
total ride time for the week : 06:29:05<br />
total calories burned this week on the bicycle : 7987</p>
<p>Hopefully the weather will cooperate a little more this week and I can get out and put some miles on, if not, I&#8217;m right in the middle of Spook Country by William Gibson and it&#8217;s starting to get good! Well that&#8217;s it for the week, go ride your bike.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/01/25/state-of-the-bicycle-january-25-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Notes #3 &#8211; Except and Intersect</title>
		<link>http://www.joelhainley.com/index.php/2010/01/24/sql-server-notes-3-except-and-intersect/</link>
		<comments>http://www.joelhainley.com/index.php/2010/01/24/sql-server-notes-3-except-and-intersect/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 17:28:30 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Notes Series]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=261</guid>
		<description><![CDATA[I&#8217;m sure you&#8217;ve all heard about the Union operator, it joins result sets together into a single record set.  I haven&#8217;t used UNION very often but it&#8217;s definitely one of those operations that you are happy for when you need it. The thought of having to write a bunch of temporary table, select/insert queries [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure you&#8217;ve all heard about the Union operator, it joins result sets together into a single record set.  I haven&#8217;t used UNION very often but it&#8217;s definitely one of those operations that you are happy for when you need it. The thought of having to write a bunch of temporary table, select/insert queries to get the same data is not an appealing one.  </p>
<p>Along with UNION there are two other similar operations that perform logic upon those result sets instead of just pushing them together and returning them. These operations are EXCEPT and INTERSECT. Some of you will probably be laughing at me when I tell you that I wasn&#8217;t aware of the EXCEPT and INTERSECT operators. Well you don&#8217;t have to laugh any more because now I know! Simply put these operators do much the same thing as UNION except that they perform comparisons between the results of two queries and produce a result set based on the existence of the records in both tables. Good stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/01/24/sql-server-notes-3-except-and-intersect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET AJAX AutoCompleteExtender not working</title>
		<link>http://www.joelhainley.com/index.php/2010/01/19/asp-net-ajax-autocompleteextender-not-working/</link>
		<comments>http://www.joelhainley.com/index.php/2010/01/19/asp-net-ajax-autocompleteextender-not-working/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 15:19:01 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET AJAX]]></category>
		<category><![CDATA[AutoCompleteExtender]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=239</guid>
		<description><![CDATA[I was working on some new features for a client recently and they had a need for an AutoCompleteExtender on one of their forms. I hadn&#8217;t used the AutoCompleteExtender yet so I read through the documentation, coded up a webservice, and added  the appropriate items to the page and ran the app. When I tried [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on some new features for a client recently and they had a need for an AutoCompleteExtender on one of their forms. I hadn&#8217;t used the AutoCompleteExtender yet so I read through the documentation, coded up a webservice, and added  the appropriate items to the page and ran the app. When I tried typing into the TextBox that the AutoCompleteExtender was pointed at, nothing happened. In this posting I will detail the things that I looked at, and try to put together an accurate guide to making sure you&#8217;re AutoComplete works. I tried some of the &#8220;tips&#8221; that are out there after I had things working and they don&#8217;t help. So hopefully this will be a bit more definitive and useful than what I came across.</p>
<p>The first thing that I looked at was the method signature of the webservice. The <a href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx"title="Documentation"  onclick="javascript:pageTracker._trackPageview('/outbound/article/www.asp.net');">documentation</a> indicates that you need to use one of the following method signatures :</p>
<div class="codesnip-container" >public string[] GetCompletionList(string prefixText, int count) { &#8230; }</div>
<p>..OR..</p>
<div class="codesnip-container" >public string[] GetCompletionList(    string prefixText, int count, string contextKey) { &#8230; }</div>
<p>What the documentation doesn&#8217;t tell you is that the name/spelling/capitalization of the method signature must match EXACTLY. If you decide that you don&#8217;t like the camelcase on the prefixText and want to use prefixtext instead&#8230;.IT WON&#8217;T WORK. So make sure you have those signature matching correctly. I have seen some indications on the internet that you should use a static method such as :</p>
<div class="codesnip-container" >public static string[] GetCompletionList(string prefixText, int count) { &#8230; } // !!! DON&#8221;T DO THIS !!!</div>
<p>DON&#8217;T DO THIS. It doesn&#8217;t work. Only the exact methods defined in the documentation and shown above will work. </p>
<p>Back to my project, I get these methods defined properly, compile the project, go to my textbox start to type and still I get NOTHING. So I look over the documentation and see some information about the class/method attributes that must be added. The documentation shows the following :</p>
<div class="codesnip-container" >[System.Web.Services.WebMethod]<br />
[System.Web.Script.Services.ScriptMethod]<br />
public string[] GetCompletionList(<br />
    string prefixText, int count) { &#8230; }</div>
<p>What they don&#8217;t show in the documentation is that you need to also add the following to the class definition</p>
<div class="codesnip-container" >[System.Web.Script.Services.ScriptService]</div>
<p>So I make these changes and run the application again, and STILL it doesn&#8217;t work. I&#8217;m stumped. I put a break at the webservice method and run again and it&#8217;s not even hitting the webservice. After a little bit of digging I come across <a href="http://www.asp.net/AJAX/Documentation/Live/ConfiguringASPNETAJAX.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.asp.net');">Adding ASP.NET AJAX Configuration Elements to an Existing Web Site</a> and a lightbulb goes on. This project was not setup as an AJAX.NET site, in fact it predates ASP.NET AJAX by a couple of years. Sure enough as I start to dig through the documentation I notice mappings to handlers for the webservice calls. So I follow the changes specified and run the site and it worked!</p>
<p>It took me a while to get this figured out, and I suspect there might be a few others out there that might have some problems getting this working. Below is a complete class that you can use as a reference. I haven&#8217;t included any of the code defining the AutoCompleteExtender because the documentation seems sufficient and I didn&#8217;t have any problems. There is also a video on the ASP.NET AJAX site that walks you through configuring your first AutoCompleteExtender and does a good job, as long as your site is configured properly!</p>
<p>Good luck!</p>
<div class="codesnip-container" >using System;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Web;<br />
using System.Web.Services;<br />
using System.Web.Services.Protocols;<br />
using System.Web.Script.Services;<br />
using DALInterface;<br />
using CGWeb.framework;</p>
<p>namespace CGWeb.webservices {<br />
    /// <summary><br />
    /// Summary description for NewDXCompletion<br />
    /// </summary><br />
    /// </p>
<p>    [WebService(Namespace = "http://tempuri.org/")]<br />
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]<br />
    [ToolboxItem(false)]<br />
    [System.Web.Script.Services.ScriptService]<br />
    public class NewDXCompletion : System.Web.Services.WebService {</p>
<p>        [System.Web.Services.WebMethod]<br />
        [System.Web.Script.Services.ScriptMethod]<br />
        public string[] GetCompletionList(string prefixText, int count) { &#8230; }<br />
    }<br />
}</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/01/19/asp-net-ajax-autocompleteextender-not-working/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>State of the Bicycle &#8211; January 18, 2010</title>
		<link>http://www.joelhainley.com/index.php/2010/01/18/state-of-the-bicycle-january-18-2010/</link>
		<comments>http://www.joelhainley.com/index.php/2010/01/18/state-of-the-bicycle-january-18-2010/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 17:12:37 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[bicycle]]></category>
		<category><![CDATA[State of the Bicycle]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=242</guid>
		<description><![CDATA[The week went pretty well. I was able to get out and ride all week long, Sunday we started getting some rain and I was still a bit tired from Saturday&#8217;s ride so since I was ahead of my scheduled miles for the week I decided to just take another day off.
starting weight : 234.5
ending [...]]]></description>
			<content:encoded><![CDATA[<p>The week went pretty well. I was able to get out and ride all week long, Sunday we started getting some rain and I was still a bit tired from Saturday&#8217;s ride so since I was ahead of my scheduled miles for the week I decided to just take another day off.</p>
<p>starting weight : 234.5</p>
<p>ending weight : 229.5</p>
<p>total mileage for the week : 138.6</p>
<p>total ride time for the week : 9:29:17</p>
<p>total calories burned this week while bicycling : 9273</p>
<p>I&#8217;ve started doing a bit of weight lifting and some core work in addition to my bicycling and boxing. With any luck this will help when the mileage starts to get longer. That&#8217;s all for the week, go ride your bike.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/01/18/state-of-the-bicycle-january-18-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Notes #2 &#8211; How To Ensure SQL Server Will Ignore Your Indexes</title>
		<link>http://www.joelhainley.com/index.php/2010/01/14/sql-server-notes-2-how-to-ensure-sql-server-will-ignore-your-indexes/</link>
		<comments>http://www.joelhainley.com/index.php/2010/01/14/sql-server-notes-2-how-to-ensure-sql-server-will-ignore-your-indexes/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 19:49:37 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server Notes Series]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=203</guid>
		<description><![CDATA[Hopefully that title got your attention. When I started reading about some of the things that can cause the query optimizer to ignore your indexes it really caught my attention. Below are a few seemingly innocuous things that you can do in your sql statements to force the query optimizer to happily ignore your indexes.

Use [...]]]></description>
			<content:encoded><![CDATA[<p>Hopefully that title got your attention. When I started reading about some of the things that can cause the query optimizer to ignore your indexes it really caught my attention. Below are a few seemingly innocuous things that you can do in your sql statements to force the query optimizer to happily ignore your indexes.</p>
<ul>
<li><strong><em>Use a NOT operator in your WHERE clause</em></strong> &#8211; That&#8217;s right, if you don&#8217;t want to use indexes just drop a NOT operator in your WHERE clause</li>
<li><strong><em>When Using An OR operator, reference columns that are not indexed</em></strong> &#8211; If you specify columns in an OR operator that are not indexed, all indexes that are associated with columns in the or clause will be ignored.</li>
<li> <strong><em>Put a leading wildcard character in your WHERE clause</em></strong> &#8211; If you do something along the lines of &#8220;select NAME from school_records WHERE name is like %XX%&#8221;, the index that you put in to speed up searches of the names will do absolutely no good.</li>
</ul>
<p>There will probably be MANY more things that I will discover as time goes along related to nuances of indexes but I thought these were interesting because they seem really harmless. I think it&#8217;s useful to know that how you go about logically selecting data can impact query performance in potentially drastic ways</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/01/14/sql-server-notes-2-how-to-ensure-sql-server-will-ignore-your-indexes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snowshoeing Trip #1</title>
		<link>http://www.joelhainley.com/index.php/2010/01/11/snowshoeing-trip-1/</link>
		<comments>http://www.joelhainley.com/index.php/2010/01/11/snowshoeing-trip-1/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 22:44:51 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[Exercise]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=224</guid>
		<description><![CDATA[Got out this weekend for a bit of snowshoeing. My mom bought some snowshoes for Amy and I for Christmas and it was the first weekend that we&#8217;ve been able to get out and give them a test run. So Sunday morning we drove up to Roseville REI and picked up a 2010 Sno-Park Pass [...]]]></description>
			<content:encoded><![CDATA[<p>Got out this weekend for a bit of snowshoeing. My mom bought some snowshoes for Amy and I for Christmas and it was the first weekend that we&#8217;ve been able to get out and give them a test run. So Sunday morning we drove up to Roseville REI and picked up a 2010 Sno-Park Pass and then headed up to Donner Pass to do our first run. Parking was easy, and it was just a short walk from the parking lot to the left of Boreal under I-80 to the north where the trail started.  There were a lot of dogs and Brodie didn&#8217;t know whether to go and play with them or roll around in the snow. To say he likes snow is an understatement.</p>
<p><img class="alignnone size-full wp-image-221" title="SNOWSHOE03" src="http://www.joelhainley.com/wp-content/uploads/2010/01/SNOWSHOE03.png" alt="SNOWSHOE03" width="640" height="480" /></p>
<p>We headed up the hill and into a meadow covered with snow. There were trails going everywhere so we opted to follow a trail that meandered through the meadow hoping that it went somewhere interesting. After about 10 minutes the trail left the meadow and started climbing up a hill. Within about 5 minutes of climbing I could definitely feel the altitude but it was just so quiet and peaceful it was worth all of the work. We stopped where we had a bit of a view and shared some water and a Clif Bar and Amy fed Brodie snow.</p>
<p><img class="alignnone size-full wp-image-220" title="SNOWSHOE02" src="http://www.joelhainley.com/wp-content/uploads/2010/01/SNOWSHOE02.png" alt="SNOWSHOE02" width="640" height="480" /></p>
<p>As we approached the highest elevation we would see for the day, we could look back across the valley and just see the top of Boreal (see image below). We wandered around along the top of the trail looking to see where we could drop back down to the meadow when we caught sight of another trail and were able to move down the hill and come out north of the meadow, after about 10 minutes of walking we were back in the meadow and headed for the car.</p>
<p><img class="alignnone size-full wp-image-219" title="SNOWSHOE01" src="http://www.joelhainley.com/wp-content/uploads/2010/01/SNOWSHOE01.png" alt="SNOWSHOE01" width="640" height="426" /></p>
<p>I was surprised about how much work snowshoeing was, but the rewards were definitely worth it. We were able to get outdoors and take the dog for a walk and see some really great views. We debated going into Reno for dinner and to see some friends but we got a late start and figured we wouldn&#8217;t get home until 10pm if we went to Reno and we both had things that needed to be done before work on Monday. So we dropped back into Auburn, stopped at Ikeda&#8217;s for a burger and headed home. Brodie slept in the backseat the whole way home.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/01/11/snowshoeing-trip-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>State of the Bicycle &#8211; January 11, 2010</title>
		<link>http://www.joelhainley.com/index.php/2010/01/10/state-of-the-bicycle-january-11-2009/</link>
		<comments>http://www.joelhainley.com/index.php/2010/01/10/state-of-the-bicycle-january-11-2009/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 05:19:41 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[bicycle]]></category>
		<category><![CDATA[State of the Bicycle]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=213</guid>
		<description><![CDATA[First off, we&#8217;re heading into the rainy season here in Northern California and I have made some riding commitments for this year that are gonna require me to ride rain or shine. I went down to REI and picked up some warmer bicycling clothes because I was just sick and tired of freezing all of [...]]]></description>
			<content:encoded><![CDATA[<p>First off, we&#8217;re heading into the rainy season here in Northern California and I have made some riding commitments for this year that are gonna require me to ride rain or shine. I went down to REI and picked up some warmer bicycling clothes because I was just sick and tired of freezing all of the time. All in all, I would just like to say wool is gooder.</p>
<p>Not a lot to report this week about things other than mileage, and that I&#8217;m having a good time training at the moment. It provides a nice break in my day and gives me a chance to clear my head each day. I&#8217;m also focusing on my diet trying to shed some weight to help ease the effort required per mile, it seems cheaper than buying a lighter bike. So I&#8217;ll probably be giving information about that when I do these weekly updates.</p>
<p>Information of interest for the first week of 2010 were :</p>
<p><strong>starting weight</strong> : 242 lbs (Unfortunately,  I weighed in the evening for the starting weight, and in the morning for the ending weight. This skews the results for this week, but all future weighing will be done first thing in the morning)</p>
<p><strong>ending weight</strong> : 234.5</p>
<p><strong>total mileage</strong> : 124.2</p>
<p><strong>total ride time for the week </strong>: 9:40:14</p>
<p><strong>total calories burned this week while bicycling</strong> : 8,622</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/01/10/state-of-the-bicycle-january-11-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Notes #1 &#8211; Boolean Operator Precedence</title>
		<link>http://www.joelhainley.com/index.php/2010/01/07/sql-server-notes-1-boolean-operator-precedence/</link>
		<comments>http://www.joelhainley.com/index.php/2010/01/07/sql-server-notes-1-boolean-operator-precedence/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 00:42:10 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server Notes Series]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=200</guid>
		<description><![CDATA[This shocked me a bit because I&#8217;ve never run into a problem with the evaluation of the boolean operators. I suspect this is because I make liberal use of parenthesis when I&#8217;m writing out SQL statements.  However boolean operators are evaluated in the following order : NOT, AND, OR.  As I said it&#8217;s not a [...]]]></description>
			<content:encoded><![CDATA[<p>This shocked me a bit because I&#8217;ve never run into a problem with the evaluation of the boolean operators. I suspect this is because I make liberal use of parenthesis when I&#8217;m writing out SQL statements.  However boolean operators are evaluated in the following order : NOT, AND, OR.  As I said it&#8217;s not a huge problem to deal with, a few parenthesis will fix any issues that you might encounter, but it could create some interesting problems if you aren&#8217;t aware of it and the parenthesis keys on your keyboard is broken.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/01/07/sql-server-notes-1-boolean-operator-precedence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sql Server Notes Series</title>
		<link>http://www.joelhainley.com/index.php/2010/01/07/sql-server-notes-series/</link>
		<comments>http://www.joelhainley.com/index.php/2010/01/07/sql-server-notes-series/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 16:53:07 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Notes Series]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=195</guid>
		<description><![CDATA[The new year always brings with it the optimism that can only come with a perceived &#8220;clean slate&#8221;, a chance to start over and actually make good on your commitments to yourself. The ability to prove to yourself and others that if you commit to something you will have the integrity to follow through, this [...]]]></description>
			<content:encoded><![CDATA[<p>The new year always brings with it the optimism that can only come with a perceived &#8220;clean slate&#8221;, a chance to start over and actually make good on your commitments to yourself. The ability to prove to yourself and others that if you commit to something you will have the integrity to follow through, this time. In the spirit of this notion, I have identified a couple of technical areas where I really want to spend some time getting a deeper, more complete understanding.</p>
<p>One of the these things is SQL Server. I spend a lot of time working with SQL Server and I have a good understanding of SQL Server but as stated previously I would like to spend some time getting a deeper understanding. The great thing about doing something like this is that it tends to generate a lot of interesting things to write about. So I&#8217;m going to start a new series of blog posts called the Sql Server Notes. To give myself a framework on which to learn these new things I am going to be working towards the SQL Server Database Developer Certification. I think this will provide a good study guide for me to gain the sort of deeper level of understanding I am looking for, and it will give me something to show for it when I&#8217;m done. Please note, the focus here is to really gain an understanding of SQL Server and the Certification is a secondary benefit of the study.</p>
<p>The posts in this series might not be very long, and they will probably be known to most people, but they will be things that I either find important to know, problems I find in the reading/study materials that I am using, or other random bits of information. I will try to make at least one posting a week and keep it up until I have finished my studies. Hopefully we can all learn something new, if not, at least I will have worked on my writing skills and put up a good amount of updates to the site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/01/07/sql-server-notes-series/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m still here&#8230;.</title>
		<link>http://www.joelhainley.com/index.php/2009/11/24/im-still-here/</link>
		<comments>http://www.joelhainley.com/index.php/2009/11/24/im-still-here/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 00:21:26 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=188</guid>
		<description><![CDATA[Well enough people have mentioned that I haven&#8217;t updated in a while that I suppose it&#8217;s time for an update.
Work stuff.. Business has been picking up and I&#8217;ve been spending a lot of time with my head in an IDE working. I&#8217;ve been learning a ton of good stuff and maybe I&#8217;ll post some things [...]]]></description>
			<content:encoded><![CDATA[<p>Well enough people have mentioned that I haven&#8217;t updated in a while that I suppose it&#8217;s time for an update.</p>
<p>Work stuff.. Business has been picking up and I&#8217;ve been spending a lot of time with my head in an IDE working. I&#8217;ve been learning a ton of good stuff and maybe I&#8217;ll post some things I&#8217;ve learned at some point. I&#8217;ve also been plugging away on a new product and I have a demo of it up and available to a limited group of beta testers, there&#8217;s a bunch to do but I&#8217;m pretty happy with the results thus far.</p>
<p>Exercise stuff.. I&#8217;ve been doing some boxing and that has been a lot of fun, the workout for boxing is great and it&#8217;s nice to get into the gym 2-3 times a week and just go hard for couple of hours. I&#8217;m finally starting to get acclimated to the workout and have been able to start focusing on technique a little bit more and that&#8217;s been a lot of fun. There&#8217;s a lot to learn and it gets me out of my head each time I go. I also setup a website for the gym you can find it at <a href="http://www.oldschoolboxinggym.com"title="Old School Boxing Gym, Concord CA"  onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oldschoolboxinggym.com');">www.oldschoolboxinggym.com</a></p>
<p>Bicycling&#8230; I&#8217;ve done some bicycling off and on since I got home from Washington in July but nothing terribly focused. Colin and I were talking the other day and I think I&#8217;m going to shoot for doing the Davis Double Century in May next year, although Colin is trying to pressure me into doing the Solvang Double at the end of March. It&#8217;ll take some time to get my base built up for a double so I&#8217;m not sure if I can swing end of march but it&#8217;s a goal.</p>
<p>Getting Things Done &#8230; I read Getting Things Done about 6 weeks ago and I&#8217;ve taken a couple of things from that book and implemented them. Setting up a decent filing system, setting up a tickler file and setting up some other processes to make my paperwork/mail processing/etc is now a lot easier to keep track of than it was before. I also picked up OmniFocus for both my computer and my iphone and those are working out  pretty good. I don&#8217;t know if it would work for everyone, but I think it&#8217;s worth giving it a shot. I have definitely noticed a huge boost in productivity as a result  and I have also noticed that it&#8217;s a lot easier for me to get into a flow state as a result of having things all in front of me in a reasonable manageable way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/11/24/im-still-here/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>50 miles on the Centurion&#8230;</title>
		<link>http://www.joelhainley.com/index.php/2009/08/31/50-miles-on-the-centurion/</link>
		<comments>http://www.joelhainley.com/index.php/2009/08/31/50-miles-on-the-centurion/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 00:26:42 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[Exercise]]></category>
		<category><![CDATA[bicycle]]></category>
		<category><![CDATA[friends]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=175</guid>
		<description><![CDATA[Got a call Sunday morning from Mike &#8220;wanna go for a ride?&#8221;. So I got up made coffee and started putting together the things I needed for a ride. I have been looking for my cycling shoes for the Cannondale for about 3 weeks now and haven&#8217;t been able to find them so I decided [...]]]></description>
			<content:encoded><![CDATA[<p>Got a call Sunday morning from Mike &#8220;wanna go for a ride?&#8221;. So I got up made coffee and started putting together the things I needed for a ride. I have been looking for my cycling shoes for the Cannondale for about 3 weeks now and haven&#8217;t been able to find them so I decided to take the Centurion out for the day.</p>
<p>When I went up to Washington to be with Mom and Dad while he was dealing with cancer my Dad gave me his old Centurion Elite, the frame is a little big for me but it actually fits quite well once I&#8217;m up in the saddle. So one day to get Dad out of the house we went over to REI in Redmond and picked up parts for the Yakima rack for the Honda and got parts for me to get the bicycle back on the road. I rode it a few times while I was in Washington but then Dad&#8217;s health really started to go downhill and leaving the house became more difficult to do. I brought the Centurion home and have been using it to do riding and run errands like going to the post office, it&#8217;s a good solid bike, very comfortable and has a rather unique personality after having spent the last few years on Cannondales.</p>
<p>Anyways, I popped up to BART and rode out to Millbrae and the rode down to San Mateo to Mike&#8217;s place and we went down to the bike path along the shore and rode south to Sun&#8217;s campus then across to Palo Alto for lunch. Then we went through Woodside and back up Canada road to a bike path and then dropped back down into San Mateo along what I think was CrystalSprings Road. We talked for a bit and then I headed back to BART on the bicycle to catch a train and get home.</p>
<p>It was a good day and I had a lot of fun, got a sunburn but I got to lose myself for a while and just ride. The best part was that when I got home Amy had found my cycling shoes so that search is over and I can get to doing some serious riding. I had a great laugh with Mike on the ride when I told him that when I was riding regularly I spent more time at gas stations than anywhere else. Gas stations being the best place to buy water and fuel for the next 20 miles, it brings back good memories for me.</p>
<p>So the ride was most excellent and today I&#8217;m pretty tired but it was definitely a highlight of the last several months.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/08/31/50-miles-on-the-centurion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eating my own dogfood</title>
		<link>http://www.joelhainley.com/index.php/2009/08/17/eating-my-own-dogfood/</link>
		<comments>http://www.joelhainley.com/index.php/2009/08/17/eating-my-own-dogfood/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 23:12:10 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[uISV]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=163</guid>
		<description><![CDATA[Work on Clik Clock is continuing at a rapid pace, there is still a lot of work to do but this weekend saw a major milestone reached. I am now able to enter/edit data using the UI that I have been designing for the Time Entry module. The other modules are all still being edited [...]]]></description>
			<content:encoded><![CDATA[<p>Work on Clik Clock is continuing at a rapid pace, there is still a lot of work to do but this weekend saw a major milestone reached. I am now able to enter/edit data using the UI that I have been designing for the Time Entry module. The other modules are all still being edited with the development UI but it&#8217;s getting closer. There&#8217;s something magical when the code you&#8217;ve been working on suddenly starts doing some small piece of what you&#8217;ve been envisioning. When it does enough that it can now support you in your efforts and you are able to &#8220;eat your own dogfood&#8221; it&#8217;s like it has taken it&#8217;s first breath and is now starting to take on a life of it&#8217;s own. It&#8217;s really a special time, at least for me.</p>
<p>Paul Graham ( the y combinator guy ) stated in the book Founders At Work that he wished they had setup an online store and sold SOMETHING so they would have had better insight into their customer experience. I can definitely see the value in this as I am more likely to overlook the bumps and bruises of something when I have my engineering hat on than when I have my user hat on. You get annoyed with things that you might not as a developer, watching fancy animations over and over again because they make the screen transitions cool comes to mind as something a developer might like but a user is going to eventually say &#8220;just get on with it.&#8221; I know powerpoint does a boatload of wipes and dissolves but I rarely see more than the default setting unless I&#8217;m watching the first handful of powerpoint presentations the person has made.</p>
<p>Anyways, I&#8217;m eating my own dogfood now and it tastes pretty damned good.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/08/17/eating-my-own-dogfood/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Saturday bicycle ride with Mike</title>
		<link>http://www.joelhainley.com/index.php/2009/08/16/saturday-bicycle-ride-with-mike/</link>
		<comments>http://www.joelhainley.com/index.php/2009/08/16/saturday-bicycle-ride-with-mike/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 18:32:29 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[bicycle]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=161</guid>
		<description><![CDATA[On Thursday afternoon Mike hit me on instant messenger and mentioned that he was thinking of doing 50 miles or so on Saturday. However, he wasn&#8217;t sure committed to the plan yet so I should give him a call on Saturday. So first thing Saturday morning after putting in my time on ClikClock I gave [...]]]></description>
			<content:encoded><![CDATA[<p>On Thursday afternoon Mike hit me on instant messenger and mentioned that he was thinking of doing 50 miles or so on Saturday. However, he wasn&#8217;t sure committed to the plan yet so I should give him a call on Saturday. So first thing Saturday morning after putting in my time on ClikClock I gave him a ring Saturday and made plans to meet him for a ride.</p>
<p>I went back and forth in my head on which bike to take and ended up taking the fixed gear but flipped it over to the freewheel side for some single speed love without all of the drama. After some logistical issues we finally ended up in the same parking lot and were able to eventually meet up using cell technology and successive approximation. Pleasantries were exchanged and we set off to the south.</p>
<p>Now it&#8217;s a funny thing, I haven&#8217;t ridden in MONTHS, except for a couple of mountain bike rides in Marin with the fellas out there and I&#8217;m just wanting to keep up with Mike. Mike has ridden the loop we&#8217;re going to be doing pretty regularly and has had 150 mile weekends at least once in the last 2 months. So I&#8217;m just trying to stay up next to him and keep myself from burning out. However every time I pull up next to him he goes a little bit faster, pretty soon we&#8217;re cooking right along.</p>
<p>We made pretty good time to the midway point for the day&#8217;s ride and then pulled in at a gas station and raided the convenience store attached to it and sat under a tree coming up with the next big idea that was going to make us fabulously frustrated in our inability to actually finish the project. (Always keep in mind that these are the same pair of minds that brought you cackl.com &#8211; I came up with the domain name, he did all the work <img src='http://www.joelhainley.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ) Anyways we started back and Mike began to point out places that he had taken breaks before, the closer we got to being done the more he pointed out premium resting spots. &#8220;Joel, If you need a break, we can pull over here so you can recover&#8221;</p>
<p>Now I appreciated this but I didn&#8217;t want to be the one to take a break so I just kept trying to keep up with him and he kept going faster every time I got alongside of him. We finally made it back to our starting point and got the bikes put away and headed to Fuddruckers for a bite to eat before we went our separate ways. It was during this meal that Mike said &#8220;I haven&#8217;t ever ridden that trail that fast, but I was trying to keep up with you&#8221;..&#8221;Huh? I was trying to keep up with you!?&#8221;..I suppose that&#8217;s the danger of having unchecked feedback loops.</p>
<p>Please note: the events of this story might be slightly altered as I tangled with some Jagermeister, Black Horse, and Macallans last night and I think the three of them pretty much beat the hell out of me. Mike&#8217;s version of the events might be different and most likely a lot more amusing than my mine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/08/16/saturday-bicycle-ride-with-mike/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Showers are gooder&#8230;so is First Aid</title>
		<link>http://www.joelhainley.com/index.php/2009/08/03/showers-are-gooder-so-is-first-aid/</link>
		<comments>http://www.joelhainley.com/index.php/2009/08/03/showers-are-gooder-so-is-first-aid/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 18:21:08 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=155</guid>
		<description><![CDATA[So finally after several years of various problems with my shower, I finally have all new plumbing from the main main shutoff valve all the way to the shower. Saturday night I finished up soldering in the last pipe and turned on the water. It all worked and there were no leaks. ( I definitely [...]]]></description>
			<content:encoded><![CDATA[<p>So finally after several years of various problems with my shower, I finally have all new plumbing from the main main shutoff valve all the way to the shower. Saturday night I finished up soldering in the last pipe and turned on the water. It all worked and there were no leaks. ( I definitely think I have this soldering thing down now. )</p>
<p>It had gotten to the point in the shower that the only way to get wet was to take a cold shower, the hot water pressure was so bad that it just dribbled out. I&#8217;ve taken at least three showers with a full pressure shower that is hot, in fact, they got so hot that I had to turn it down a little bit&#8230;WOOT!</p>
<p>Sunday morning got up and headed over to the Red Cross for a class in First Aid. That was pretty interesting and I did well on the little test that they had on the end. So I&#8217;m all set on that deal now I guess.  I was hoping that they covered some more advanced things, but the basics that they went over were all really great to know. I would highly recommend that anyone take this course, especially if you have children.</p>
<p>I&#8217;ve been doing a lot of thinking and a lot of soul searching ( not to get all new age ) the last few months and I&#8217;m starting to develop some clarity in my desires for the next couple of years. This is normally a very good thing for me because once things begin to come into focus for me they tend to start happening at a rapid pace.  Dealing with loss isn&#8217;t always easy and it impacts you in very non-obvious ways, so I&#8217;m trying NOT to jump into things too quickly but I feel like I&#8217;m getting closer to some real answers. I guess we&#8217;ll see.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/08/03/showers-are-gooder-so-is-first-aid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Now I&#8217;m in hot water!!</title>
		<link>http://www.joelhainley.com/index.php/2009/07/28/now-im-in-hot-water/</link>
		<comments>http://www.joelhainley.com/index.php/2009/07/28/now-im-in-hot-water/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 03:55:44 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[home repair]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=152</guid>
		<description><![CDATA[Well amazingly enough the hot water side of the plumbing replacement project went off without a hitch. I replaced all of the lines, hooked up the water heater and opened it up and there wasn&#8217;t a leak in the entire system. This means one of two things : 1. I got lucky. 2. I finally [...]]]></description>
			<content:encoded><![CDATA[<p>Well amazingly enough the hot water side of the plumbing replacement project went off without a hitch. I replaced all of the lines, hooked up the water heater and opened it up and there wasn&#8217;t a leak in the entire system. This means one of two things : 1. I got lucky. 2. I finally have a handle on soldering water pipes. I&#8217;m going to go with the latter until there is convincing evidence to the contrary.</p>
<p>This completes the first phase of this project. The second phase is to redo the plumbing up in the wall behind the shower, and then to put in a new bathroom sink, toilet, floor and to refinish the bathtub itself. I will probably also spend some time and retile the shower. Thankfully tomorrow I have a mountain bike ride scheduled with the fellas so the shower is going to have to wait another day or two before it gets some love.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/07/28/now-im-in-hot-water/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A programmer does some plumbing&#8230;</title>
		<link>http://www.joelhainley.com/index.php/2009/07/27/a-programmer-does-some-plumbing/</link>
		<comments>http://www.joelhainley.com/index.php/2009/07/27/a-programmer-does-some-plumbing/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 18:39:58 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[home repair]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=148</guid>
		<description><![CDATA[On Friday night I had enough.  I have been dealing with a mostly useless shower for the better part of 4 years, coupled with bad water pressure everywhere in the house I decided it was time to do something about it. Time to replace all of the water pipes in the house. About 4 years [...]]]></description>
			<content:encoded><![CDATA[<p>On Friday night I had enough.  I have been dealing with a mostly useless shower for the better part of 4 years, coupled with bad water pressure everywhere in the house I decided it was time to do something about it. Time to replace all of the water pipes in the house. About 4 years ago I had replaced all of the kitchen lines with copper piping but the majority of the house was still running on galvanized lines. Galvanized pipes seem to do only one thing, get clogged and fail. So I decided it was time to bite the bullet and switch everything over to copper.</p>
<p>So Friday afternoon with very little ceremony and absolutely no fanfare I shutoff the main water in the house. I pulled out the sawzall, a couple of pipe wrenches, and a large dose of optimisim and started to demo the cold water pipes in the house.  Before I went to bed I had the cold water side removed from within the house.</p>
<p>Saturday morning I just had to deal with going back up the main water supply line until I found a logical place to tie into things. So I get up in the morning, make a pot of coffee ( stole water from the neighbors hosebib ) and got to digging. By 1pm I had a list of the major stuff that I needed so it was off to Home Depot to spend some money on parts.</p>
<p>The rest of Saturday was spent running cold water pipes back into the house, changing the flow of a couple of lines to make it easier to do repairs in the future. I went to bed mostly discouraged that I hadn&#8217;t made faster progress but at least things were moving along. Sunday I got up and continued working on the cold water side. I was almost done when I realized that I needed a pipe cutter that would fit close to a wall. Another trip to Home Depot and I had the cold side done. I turned on the water slowly and except for 1 small leak, it held. ( I eventually had another small leak appear after a few hours, but that was easily fixed ).</p>
<p>I learned one thing that has been very useful, if you put water into a system and then you have to solder it, the best thing to do is to get all of the water out of the pipes before you start soldering again. If you have water in those pipes it will never get warm enough to melt the solder. I was able to siphon the water out of one side, and the other time I had to use some pressurized air, but I was able to get it all out and get things buttoned up very neatly.</p>
<p>On Sunday afternoon, I started on the hot water side, I made fair progress but an overlooked part and general weariness ensured that I wasn&#8217;t able to get things done on Sunday. Having cold running water is better than having no water, and it shouldn&#8217;t take too long to get the rest of the hot water system done.</p>
<p>The water pressure on the cold water side is amazing, I don&#8217;t recall the water EVER running that well in the house. With this done, I guess you could say that the cold water system was optimized? Hopefully reusing the same pattern on the hot water side will have the same results.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/07/27/a-programmer-does-some-plumbing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# Partial Classes and NUnit</title>
		<link>http://www.joelhainley.com/index.php/2009/04/13/c-partial-classes-and-nunit/</link>
		<comments>http://www.joelhainley.com/index.php/2009/04/13/c-partial-classes-and-nunit/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 05:30:03 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[nunit]]></category>
		<category><![CDATA[partial classes]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=136</guid>
		<description><![CDATA[Shad, a fellow developer and good friend, and I were hiking a great new loop I found in Mt. Diablo State Park the other day and after solving the rest of the world&#8217;s problems we eventually came around to talking about things that were driving us nuts in our current projects. We both had recently [...]]]></description>
			<content:encoded><![CDATA[<p>Shad, a fellow developer and good friend, and I were hiking a great new loop I found in Mt. Diablo State Park the other day and after solving the rest of the world&#8217;s problems we eventually came around to talking about things that were driving us nuts in our current projects. We both had recently found ourselves with code that was initially a quick and dirty library with a &#8220;Button 1&#8243; interface. ( You know the type, programmer&#8217;s make them. They have a single command button on them and you click them and then they do stuff..and never notify you when they are done, and don&#8217;t resize and a host of other things that a normal UI should have ). These &#8220;Button 1&#8243; quick and dirty apps have a nasty habit of turning themselves into indispensible tools for production/operations stuff.</p>
<p>The big problem we were both having was that while the apps were decent enough for their initial use we were being asked to extend them and both of us wanted to do some refactoring of the application before we released them into the wild. The best approach for this sort of thing is to develop unit tests so that, once refactored, we could be sure that we hadn&#8217;t broken anything important.</p>
<p>The biggest problem with dropping unit testing into an application after the fact is that sometimes you run into problems where you have to refactor just to get the unit tests access to all of the routines that you want to test. This isn&#8217;t an ideal situation, as you quickly end up wondering if you are breaking things just trying to get some unit tests built that are supposed to ensure you aren&#8217;t breaking anything. So you start wondering if instead of refactoring if you simply make functions that wrap your private functions and expose the behaviour might be the answer, pretty soon you have stuff everywhere and you wonder which is your testing code and which is your unit testing code to make all of this possible. Madness.</p>
<p>As we dropped off of the fire trail back into a heavily wooded area with a nice creek, it came up in conversation that perhaps partial classes were the way to go. If you haven&#8217;t used c# partial classes, you will. You can write class code in multiple files and yet at compile time it is assembled into a single logical unit. Several days later I had some free time and was able to verify that this would indeed work, I could drop all of my unit testing code into a single file that would provide all of the unit testing logic and wouldn&#8217;t muddy up the existing class. Furthermore, with a couple conditional complilation statements I could get rid of all of the unit testing code from the final release of the new library.</p>
<p>This is obviously not the approach you want to take if you can avoid it. It is arguable that you do not want your classes invaded in such a way for the purposes of unit testing. This is something you can work around if you use unit testing from the beginning, but what if you inherit a project and it doesn&#8217;t have any unit test capabilities built into it? What if the way that the classes are structured make unit testing pieces of the application difficult? Do you just plow forward and hope for the best? I hope not, and hopefully this stop gap measure to get unit tests built into the classes so that you can test existing functionality is the way to go. With these &#8220;nunit partials&#8221; in place you should be able to then start refactoring the rest of the application to be a little bit better structured for unit tests without having to risk dropping anything.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/04/13/c-partial-classes-and-nunit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An experiment with xhtml strict</title>
		<link>http://www.joelhainley.com/index.php/2009/03/26/an-experiment-with-xhtml-strict/</link>
		<comments>http://www.joelhainley.com/index.php/2009/03/26/an-experiment-with-xhtml-strict/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 03:27:13 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[UI]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[hamtesting]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[strict]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=132</guid>
		<description><![CDATA[I met with a company recently about doing some work for them. During the meeting one of the UI developers let me know that they were using xhtml in strict mode.  Now I have to admit it has been a while since I looked at xhtml and I&#8217;ve never actually done anything with the strict [...]]]></description>
			<content:encoded><![CDATA[<p>I met with a company recently about doing some work for them. During the meeting one of the UI developers let me know that they were using xhtml in strict mode.  Now I have to admit it has been a while since I looked at xhtml and I&#8217;ve never actually done anything with the strict variant before. So I got a little curious and decided to spend some time and see what it was all about.</p>
<p>I pulled up the xhtml specification the next day and read through it. The name &#8220;xhtml strict&#8221; kinda hints at what you would expect to find and it does a pretty good job of living up to its name. It&#8217;s a very precise way of working with xhtml, it doesn&#8217;t allow you to &#8220;get away&#8221; with sloppiness, it requires that all attributes must be quoted, all tags must be well formed, and closed properly, attributes must be lowercase, you can&#8217;t have &#8220;name&#8221; attributes they are all id attributes and a bunch of other things like that. My initial impression was that this doesn&#8217;t seem that arduous, it&#8217;s simply a way of enforcing a convention upon a document. .</p>
<p>In order to see how it stands up in the &#8220;real world&#8221; I decided that I would update hamtesting.com to be xhtml 1.1 strict compliant just to see what sorts of things a developer could run into while working in this environment. Below are some of my thoughts about the process.</p>
<p>My initial efforts at getting all of the templates into shape went pretty quickly in about 45 minutes I was able to get all of the main site templates updated to be compliant. Things like updating the br&#8217;s and hr&#8217;s and adding /&#8217;s to input items on forms were all of the things that I expected. Also expected was that all attribute values need to be lowercased. So if you have an onclick defined for something in your page it can&#8217;t be onClick or ONCLICK or anything else, it needs to be onclick.</p>
<p>The first thing that kinda gave me pause for a bit was that it is really picky about which elements can be just below the root element in a document. This ends up not being an issue and actually leads to a lot more consistence in the document structure. It was a little bit of a pain at first but it quickly got into shape. The specification does spent a certain amount of time talking about which elements can contain other elements and such things, so it&#8217;s probably good to have that floating around in your head. Or use a validator plugin ( see below )</p>
<p>The second thing that was a little difficult was that I had used the name attribute in a lot of places for some of my javascript interactions. So first I made everything xhtml compliant by switching things from name attributes to id attributes, with this done the site didn&#8217;t work terribly well. So I updated one javascript routine in my main library and then whammo everything was working well again.</p>
<p>With this all done I spent a bit of time and knocked the css document into shape and got it validated as well. So now when you go to www.hamtesting.com you will see badges from w3c for the site being both xhtml compliant and css compliant. Kinda fun.</p>
<p>Probably the biggest lesson learned was that while the w3c&#8217;s online validator services are fine for a page or two they can be a pain after a while, especially if you are trying to validate pages that are in an authenticated area of your site. Do yourself a favor and go get a html/sgml/xhtml validator plugin for firefox so that you can just pull up the errors as you run across them.</p>
<p>In the end, this wasn&#8217;t as difficult as I thought it was going to be. My impressions are that xhtml is kinda nice, and using the strict variant definitely enforces a certain amount of discipline into your efforts. It&#8217;s a good exercise if you have some spare cycles and want to dig in a little.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/03/26/an-experiment-with-xhtml-strict/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS-X/MySQL : A newer version of this software already exists on this volume.</title>
		<link>http://www.joelhainley.com/index.php/2009/03/22/mac-os-x-a-newer-version-of-this-software-already-exists-on-this-volume/</link>
		<comments>http://www.joelhainley.com/index.php/2009/03/22/mac-os-x-a-newer-version-of-this-software-already-exists-on-this-volume/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 23:44:13 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[exists]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Uninstall]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=131</guid>
		<description><![CDATA[I ran into this over the weekend and since it took a bit of time to find I thought it might be useful for others.  I was setting up an ATG development environment and had installed a version of MySQL that was known not to work with ATG..(oops..I&#8217;ll cover this in another posting). I [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into this over the weekend and since it took a bit of time to find I thought it might be useful for others.  I was setting up an ATG development environment and had installed a version of MySQL that was known not to work with ATG..(oops..I&#8217;ll cover this in another posting). I uninstalled MySQL using the following steps :</p>
<ol>
<li>cd /usr/local</li>
<li>sudo rm mysql</li>
<li>sudo rm -rf mysql-&lt;some version number here&gt;</li>
</ol>
<p>With this done I downloaded a different version of MySQL and tried to install it, however I received the following error.</p>
<p>&#8220;You cannot install MySQL blah-version-blah for Mac OS X on this volume. A newer version of this software already exists on this volume&#8221;</p>
<p>After digging around about this for a while I was finally able to come up with the problem. You need to go into the /Library/Receipts directory and delete the Mysql related items in there was well. An example :</p>
<ul>
<li>cd /Library/Receipts/</li>
<li>rm -rf Mysql&lt;blah blah blah&gt;</li>
</ul>
<p>With this done. I was able to continue installing the new version and get back to stuff. Hopefully this helps someone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/03/22/mac-os-x-a-newer-version-of-this-software-already-exists-on-this-volume/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Example of Proxying Binary Data With ASP.NET</title>
		<link>http://www.joelhainley.com/index.php/2009/02/28/example-of-proxying-binary-responses-with-aspnet/</link>
		<comments>http://www.joelhainley.com/index.php/2009/02/28/example-of-proxying-binary-responses-with-aspnet/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 03:29:31 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[.NET C# Proxying Binary Responses]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=129</guid>
		<description><![CDATA[Recently I was working on a project and needed to proxy a request to a website that was returning a binary file.  I ran into some problems with my first pass at a solution. I believe the problem was a consequence of proxying binary data without getting at the underlying streams. I&#8217;m not sure how [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was working on a project and needed to proxy a request to a website that was returning a binary file.  I ran into some problems with my first pass at a solution. I believe the problem was a consequence of proxying binary data without getting at the underlying streams. I&#8217;m not sure how often I&#8217;ll need to do this, but I thought it might be useful to post here for others to know about in case they ran into the same problem I did. So here&#8217;s the code that worked for me, hopefully it&#8217;ll work for you too.</p>
<hr/>
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(&#8221;http://to.some.binary.data&#8221;);<br />
req.Timeout = &#8220;blah&#8221;;<br />
req.Method = &#8220;GET&#8221;;</p>
<p>HttpWebResponse resp = (HttpWebResponse)req.GetResponse();<br />
Stream reader = resp.GetResponseStream();<br />
// you might want to set your responses content type here<br />
System.IO.Stream r = Response.OutputStream;</p>
<p>int Length = 256;<br />
Byte [] buffer = new Byte[Length];</p>
<p>int bytesRead = reader.Read(buffer, 0, Length);<br />
while(bytesRead &gt; 0){<br />
r.Write(buffer, 0, bytesRead);<br />
bytesRead = reader.Read(buffer, 0, Length);<br />
}</p>
<hr />
Hope that helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/02/28/example-of-proxying-binary-responses-with-aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alternatives to Throwing Exceptions to Flex/Silverlight Clients From a .NET Web Service &#8211; part 2</title>
		<link>http://www.joelhainley.com/index.php/2009/02/07/alternatives-to-throwing-exceptions-to-flexsilverlight-clients-from-a-net-web-service-part-2/</link>
		<comments>http://www.joelhainley.com/index.php/2009/02/07/alternatives-to-throwing-exceptions-to-flexsilverlight-clients-from-a-net-web-service-part-2/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 00:10:00 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[.NET Webservices Exceptions Silverlight Flex]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=125</guid>
		<description><![CDATA[In part 1 of this article I argued that exceptions sent &#8220;over the wire&#8221; to flex/silverlight clients from a webservice weren&#8217;t necessarily the right way to put things together. I argued that that exposing your clients to raw exceptions happening in your server was not elegant in the same way that throwing raw exceptions to [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.joelhainley.com/index.php/2009/01/22/throwing-exceptions-to-flexsilverlight-clients-from-a-net-web-service-part-1/"title="part 1"  >part 1</a> of this article I argued that exceptions sent &#8220;over the wire&#8221; to flex/silverlight clients from a webservice weren&#8217;t necessarily the right way to put things together. I argued that that exposing your clients to raw exceptions happening in your server was not elegant in the same way that throwing raw exceptions to a user in a windows desktop app was not elegant. In talking about the last article with some people I realized that I needed to make a point. There are times when an exception is appropriate, and I&#8217;m not advocating avoiding exceptions altogether. My point was that I felt people were relying on exceptions too heavily when a more appropriate method might be possible.</p>
<p>Let&#8217;s take a look at input validation to see what we mean about relying too heavily on exceptions. Validation is a bear, you want to try and have your validation rules in one spot only. This way you can avoid the chore of duplicating validation logic on the client and the server. This seems to be one of the main reasons people are looking at bubbling exceptions over the wire because if they can simply put the validation logic in the server side, then they can throw an exception back to the client and deal with it there. It solves the the problem of duplication of validation logic and allows developers to deal with validation errors in the same way that they do within desktop application environments.</p>
<p>The question now becomes can we avoid exceptions and still provide for a rich validation environment? I believe that we can and I&#8217;m going to spend the rest of this article describing an approach. It may not be the best approach, it may not be the only approach, but it was worked well for me on the last few projects and enough people I&#8217;ve talked to about the approach seem to feel that it&#8217;s powerful enough to consider for their future efforts along these lines.</p>
<p>In order to provide a framework upon which to hang our theory let&#8217;s consider a simplified method of a web service named &#8220;CreateAccount&#8221; that takes as it&#8217;s only parameter an Account object.</p>
<p style="text-align: center;"><a href="http://www.joelhainley.com/wp-content/uploads/2009/02/20090207-account.png" ><img class="alignnone size-medium wp-image-126 aligncenter" title="20090207-account" src="http://www.joelhainley.com/wp-content/uploads/2009/02/20090207-account.png" alt="Account UML" width="176" height="201" /></a></p>
<p style="text-align: left;">When we want to create a new account we will fill out the information about the account as described and then pass it to the CreateAccount method of the webservice. However, instead of just having a void for the return value and throw exceptions if there are errors you simply use a response object such that the method signature would look something like the following :</p>
<blockquote>
<p style="text-align: left;">CreateAccountResponse  CreateAccount( Account acct)</p>
</blockquote>
<p style="text-align: left;">This is certainly not a new concept. Response objects litter many namespaces, but in this particular situation they allow us to avoid having a lot of exceptions flying out of our webservice and doing all sorts of ridiculous plumbing hacks to get it all to operate nicely.  Now let&#8217;s take a quick look at the CreateAccountResponse class and see what it looks like, then we can talk about how a response object allows us to avoid duplicate validation and exceptions. Below is the UML for the CreateAcountResponse object</p>
<p style="text-align: center;"><a href="http://www.joelhainley.com/wp-content/uploads/2009/02/20090207-createaccountresult.png" ><img class="alignnone size-medium wp-image-127" title="20090207-createaccountresult" src="http://www.joelhainley.com/wp-content/uploads/2009/02/20090207-createaccountresult.png" alt="" width="174" height="234" /></a></p>
<p style="text-align: left;">We see that this class mmics the Account class pretty closely with the addition of a couple of routines that would be needed to actually communicate results. The Success flag would indicate whether the account creation was successful and the error message would only be filled out if there was a particular error that you wanted to communicate to the user such as &#8220;You do not have the rights to create accounts&#8221; or something along those lines. The other fields would be filled out if there were problems with the validation of the individual fields of the account object. This would allow us to have all of the validation/error messages specified on the server side in a single location and still be able to get the information out to your users. Such that if you require the state field to be only 2 characters long and someone puts in 4 you could set the success flag to false and then add error text to the State field of the response object that could then be displayed to the end user.</p>
<p style="text-align: left;">WIth this approach if there was an exception generated in the webservice, we could trap it server side and provide the appropriate message to the CreateAccountResponse object and not have to require the client to exception handling just to know what is happening.</p>
<p style="text-align: left;">Now one of the complaints  that I have heard about this approach is &#8220;but now you have to create all of these response objects&#8221;. Well yeah, but one way or another you&#8217;re going to have to write some code to deal with errors and wouldn&#8217;t it be nice if you could deal with the errors and the error messages in a single place? Also you could simply create a generic results object that would suffice for most of the calls that you want to make. Then again consider that in some of the more mature environments such as .NET WebServices  you can easily create webservices that provide this sort of functionality and the WSDL&#8217;s and whatnot are all created for you.So it&#8217;s not nearly as much work to do this as it could be.</p>
<p style="text-align: left;"><em><strong>What about the overhead of all of these custom classes? </strong></em>Is it really any more overhead than the throwing of exceptions? Exception throwing, and handling are expensive operations. I find it a little be cleaner to my thinking because now you have a clear and concise definition of what you need to program against when you are dealing with your WebService&#8217;s API.</p>
<p style="text-align: left;">I&#8217;m not saying this is necessarily the best approach for all occassions, and I&#8217;m not really down on exceptions in general, or even for web services. However I think that there are many times when the extra effort you have to go through just to get robust exception handling done will lead you into a lot of needless efforts. Especially if you are just trying to provide validation/failure information back to the client applications.Keep in mind that what I&#8217;ve presented here isn&#8217;t a blueprint, it&#8217;s more like a pattern of how you might consider structuring your webservices in certain situations.</p>
<p style="text-align: left;">Your mileage may vary.</p>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2009/02/07/alternatives-to-throwing-exceptions-to-flexsilverlight-clients-from-a-net-web-service-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
