<?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>Beautiful Futility &#187; Software Engineering</title>
	<atom:link href="http://beautifulfutility.com/index.php/category/software-engineering/feed/" rel="self" type="application/rss+xml" />
	<link>http://beautifulfutility.com</link>
	<description>Cynicism is humor in ill health. H.G. Wells</description>
	<lastBuildDate>Sun, 18 Jul 2010 03:22:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Checking for Existing Index In RavenDB</title>
		<link>http://beautifulfutility.com/index.php/2010/07/17/checking-for-existing-index-in-ravendb/</link>
		<comments>http://beautifulfutility.com/index.php/2010/07/17/checking-for-existing-index-in-ravendb/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 03:06:44 +0000</pubDate>
		<dc:creator>KevDog</dc:creator>
				<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://beautifulfutility.com/?p=330</guid>
		<description><![CDATA[For my current personal project (i.e., code I am writing for my wife) I am using RavenDB for a few reasons:

 It&#8217;s time to break out of the OO/RDBMS impedance mismatch
 Ayende is a freaking monster
 It seems the most promising of the document db&#8217;s out there

In order to do queries by anything other than [...]]]></description>
			<content:encoded><![CDATA[<p>For my current personal project (i.e., code I am writing for my wife) I am using <a href="http://ravendb.net/">RavenDB</a> for a few reasons:</p>
<ul>
<li> It&#8217;s time to break out of the OO/RDBMS impedance mismatch</li>
<li> <a href="http://ayende.com/Blog/default.aspx">Ayende</a> is a freaking monster</li>
<li> It seems the most promising of the document db&#8217;s out there</li>
</ul>
<p>In order to do queries by anything other than an id, you need to create an index. The problem space for this site is theater and here is the code I want to write.</p>
<p><code><br />
private static readonly IndexDefinition  FindByNameIndex = new IndexDefinition<br />
{<br />
    Map = shows =&gt; from show in shows select new { show.Title }<br />
};</p>
<p>public static void ConfigureIndices(DocumentStore documentStore)<br />
{<br />
var showsIndex = documentStore.DatabaseCommands.GetIndex("ShowsByTitle");<br />
if(showsIndex !=null)<br />
documentStore.DatabaseCommands.PutIndex("ShowsByTitle", FindByNameIndex);<br />
}<br />
</code></p>
<p>What I find odd about the API at this point is that the GetIndex method throws an InvalidOperationException index doesn&#8217;t exist (which is fine, no problems there) but that there doesn&#8217;t seem to be a way to check if the index does exist, something like:</p>
<p><code><br />
bool indexExists = documentStore.DatabaseCommands.DoesIndexExist("ShowsByTitle");<br />
</code></p>
<p>I could just wrap the current call in a try/catch, but that seems a little strange for what seems to be a standard use case of checking to see if something exists.</p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulfutility.com/index.php/2010/07/17/checking-for-existing-index-in-ravendb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Day of Pomodoro</title>
		<link>http://beautifulfutility.com/index.php/2010/05/21/the-day-of-pomodoro/</link>
		<comments>http://beautifulfutility.com/index.php/2010/05/21/the-day-of-pomodoro/#comments</comments>
		<pubDate>Fri, 21 May 2010 13:48:26 +0000</pubDate>
		<dc:creator>KevDog</dc:creator>
				<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://beautifulfutility.com/?p=326</guid>
		<description><![CDATA[I have a problem with shiny things distracting me. But since the shiny things are so compelling, I need a mental way to deal with them. It needs to be streamlined, simple, and effective. I&#8217;ve tried the GTD way, but I can&#8217;t seem to hold onto doing it for than a week at a time.
For [...]]]></description>
			<content:encoded><![CDATA[<p>I have a problem with shiny things distracting me. But since the shiny things are so compelling, I need a mental way to deal with them. It needs to be streamlined, simple, and effective. I&#8217;ve tried the <a href="en.wikipedia.org/wiki/Getting_Things_Done">GTD</a> way, but I can&#8217;t seem to hold onto doing it for than a week at a time.</p>
<p>For a couple of years now, I&#8217;ve seen posts on <a href="http://www.pomodorotechnique.com/">The Pomodoro Technique</a>, the 25 minute at a time way to manage daily work. </p>
<p>So far, so good. No matter how it goes, I think I really need to take a lesson from Scott Hanselman. That guy gets tons done in a day and there must be a reason.</p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulfutility.com/index.php/2010/05/21/the-day-of-pomodoro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using CodedUITest in Visual Studio 2010</title>
		<link>http://beautifulfutility.com/index.php/2010/05/20/using-codeduitest-in-visual-studio-2010/</link>
		<comments>http://beautifulfutility.com/index.php/2010/05/20/using-codeduitest-in-visual-studio-2010/#comments</comments>
		<pubDate>Thu, 20 May 2010 20:07:28 +0000</pubDate>
		<dc:creator>KevDog</dc:creator>
				<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://beautifulfutility.com/?p=321</guid>
		<description><![CDATA[Since the company I work for doesn&#8217;t have a big QA presence (we&#8217;re working on it), it&#8217;s often the case that UI changes break things with no one being aware of it.
I&#8217;m not a giant fan of automated UI tests, my brief experience with them has shown them to be brittle. Regardless, I was still [...]]]></description>
			<content:encoded><![CDATA[<p>Since the company I work for doesn&#8217;t have a big QA presence (we&#8217;re working on it), it&#8217;s often the case that UI changes break things with no one being aware of it.</p>
<p>I&#8217;m not a giant fan of automated UI tests, my brief experience with them has shown them to be brittle. Regardless, I was still excited when the CodedUITest functionality was baked into Visual Studio 2010.</p>
<p>Here&#8217;s how things have gone for me so far:</p>
<p>1. Rookie mistake, don&#8217;t launch your web application in debug mode. If you do, you won&#8217;t be able to generate the code from what you have recorded.</p>
<p>2. Make the first action be to click on the browser to bring it into focus.</p>
<p>3. Like all unit tests, keep the assertions small. The first test I got to run successfully only checked that after I logged in, my name was in the welcome tag.</p>
<p>I&#8217;m going to be trying this feature out over the next couple of weeks and hope to post something more substantive on it. Maybe one of those vaunted series of posts all the cool kids do.</p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulfutility.com/index.php/2010/05/20/using-codeduitest-in-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom DataAnnotation for US States</title>
		<link>http://beautifulfutility.com/index.php/2009/11/28/custom-dataannotation-for-us-states/</link>
		<comments>http://beautifulfutility.com/index.php/2009/11/28/custom-dataannotation-for-us-states/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 04:54:46 +0000</pubDate>
		<dc:creator>KevDog</dc:creator>
				<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://beautifulfutility.com/?p=310</guid>
		<description><![CDATA[Pivoting off this post by Phil Haack about creating custom data annotations, I found myself in need of one today when putting together some code for a project for the spousal unit. I wanted to be sure that a given field contained a valid abbreviation for a U.S. State.
It&#8217;s simple, but it works. I&#8217;m going [...]]]></description>
			<content:encoded><![CDATA[<p>Pivoting off <a href="http://haacked.com/archive/2009/11/19/aspnetmvc2-custom-validation.aspx" target="_blank">this post</a> by Phil Haack about creating custom data annotations, I found myself in need of one today when putting together some code for a project for the spousal unit. I wanted to be sure that a given field contained a valid abbreviation for a U.S. State.</p>
<p>It&#8217;s simple, but it works. I&#8217;m going to be creating a lot of these custom validators now that I know how easy it is. Let&#8217;s go to the code:</p>
<p>public class IsStateAttribute : ValidationAttribute<br />
{<br />
private static string stateAbbreviationsRegex =  @&#8221;\A(?:AL|AK|AS|AZ|AR|CA|CO|CT|DE|DC|FL|FM|GA|GU|HI|ID|IL|IN|</p>
<p>IA|KS|KY|LA|ME|MH|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|</p>
<p>NC|ND|MP|OH|OK|OR|PW|PR|RI|SC|SD|TN|TX|UT|VT|VI|VA|WA|WV|WI|</p>
<p>WY|AE|AA|AP)\Z&#8221;;<br />
public override bool IsValid(object value)<br />
{<br />
if (value == null)<br />
{<br />
return true;<br />
}<br />
var state = (string)value;<br />
if (Regex.IsMatch(state, stateAbbreviationsRegex))<br />
{<br />
return true;<br />
}</p>
<p>return false;<br />
}<br />
}</p>
<p>A couple of things to notice:</p>
<p>1. If there is no entry, the attribute returns true. This is another tidbit I got from Phil, let the RequiredAttribute do its thing. We&#8217;re only here to validate if the value is present.</p>
<p>2. For the keen-eyed, there are more than 50 entries in the regex. Why? Because I included U.S. Territories like Guam (Guam is a funny word in and of itself. Back in the stand-up comedy days, I used it more than once in a punchline. Sorry if I&#8217;m offending anyone reading this in Guam.) as well as military abbreviations. You don&#8217;t have to use them in whatever drop-down you&#8217;re filling this field with, I added them for completeness.</p>
<p>Usage is what you would expect:</p>
<p>[IsState(ErrorMessage="Please Enter a Valid State Abbreviation")]<br />
[Required(ErrorMessage = "State is Required")]<br />
public string State { get; set; }</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulfutility.com/index.php/2009/11/28/custom-dataannotation-for-us-states/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linq to Sql Won&#8217;t Generate Partial Methods for View</title>
		<link>http://beautifulfutility.com/index.php/2009/11/23/linq-to-sql-wont-generate-partial-methods-for-view/</link>
		<comments>http://beautifulfutility.com/index.php/2009/11/23/linq-to-sql-wont-generate-partial-methods-for-view/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 18:37:58 +0000</pubDate>
		<dc:creator>KevDog</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[LinqToSql]]></category>

		<guid isPermaLink="false">http://beautifulfutility.com/?p=308</guid>
		<description><![CDATA[So let&#8217;s say that you drag your view onto the design surface in L2S. Why, you ask, aren&#8217;t there the extensibility methods for OnCreated() and the rest of the INotifyPropertyChanged interface?
Because a view doesn&#8217;t have a primary key and without one there is nothing to track.
Set a PK, save, and watch the magic happen.
]]></description>
			<content:encoded><![CDATA[<p>So let&#8217;s say that you drag your view onto the design surface in L2S. Why, you ask, aren&#8217;t there the extensibility methods for OnCreated() and the rest of the INotifyPropertyChanged interface?</p>
<p>Because a view doesn&#8217;t have a primary key and without one there is nothing to track.</p>
<p>Set a PK, save, and watch the magic happen.</p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulfutility.com/index.php/2009/11/23/linq-to-sql-wont-generate-partial-methods-for-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Join the Steve Jobs Dead Pool</title>
		<link>http://beautifulfutility.com/index.php/2008/12/16/join-the-steve-jobs-dead-pool/</link>
		<comments>http://beautifulfutility.com/index.php/2008/12/16/join-the-steve-jobs-dead-pool/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:56:36 +0000</pubDate>
		<dc:creator>KevDog</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://beautifulfutility.com/?p=139</guid>
		<description><![CDATA[Apple and Steve Jobs have only themselves to blame for the rampant speculation that Jobs is seriously ill. Steve-O is skipping what has traditionally been the highlight MacBoy day of the year, the Macworld keynote address.
I have no idea whether or not the rumors are true (that&#8217;s the whole point of rumors, after all), but [...]]]></description>
			<content:encoded><![CDATA[<p>Apple and Steve Jobs have only themselves to blame for the <a href="http://forums.macrumors.com/showthread.php?t=618061">rampant speculation</a> that Jobs is seriously ill. Steve-O is skipping what has traditionally been the highlight MacBoy day of the year, the <a href="http://www.macrumors.com/2008/12/16/apple-jobs-will-not-present-at-apples-final-macworld-keynote/">Macworld keynote address</a>.</p>
<p>I have no idea whether or not the rumors are true (that&#8217;s the whole point of rumors, after all), but Apple&#8217;s overarching corporate culture of secrecy is at least partially to blame here. When your CEO is all but synonymous with the brand, being able to stay on the right side of the grass isn&#8217;t just good from a personal standpoint, it becomes an investment strategy.</p>
<p>Sitting around my house right now are four Macs and there is an iPhone in my pocket. As a consumer, I love their products. However, as a professional software engineer, I hate dealing with Apple. It&#8217;s a royal pain in the ass and you are made to feel as if they are doing you a favor by letting you write code for their platform. </p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulfutility.com/index.php/2008/12/16/join-the-steve-jobs-dead-pool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Close With Humor (or, The Tiger Did What?)</title>
		<link>http://beautifulfutility.com/index.php/2008/12/10/close-with-humor-or-the-tiger-did-what/</link>
		<comments>http://beautifulfutility.com/index.php/2008/12/10/close-with-humor-or-the-tiger-did-what/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 01:40:58 +0000</pubDate>
		<dc:creator>KevDog</dc:creator>
				<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://beautifulfutility.com/?p=57</guid>
		<description><![CDATA[I had a job interview for a software engineering gig today. Hey, not all of us get to lead glamorous lives as full-time bloggers. As is increasingly common, I was asked to do a technical presentation. Here&#8217;s the slide I closed with:

To ask the quintessential focus group question, does this picture improve your image of [...]]]></description>
			<content:encoded><![CDATA[<p>I had a job interview for a software engineering gig today. Hey, not all of us get to lead glamorous lives as full-time bloggers. As is increasingly common, I was asked to do a technical presentation. Here&#8217;s the slide I closed with:</p>
<p><a href="http://beautifulfutility.com/wp-content/uploads/2008/12/closingslide1.png"><img src="http://beautifulfutility.com/wp-content/uploads/2008/12/closingslide1.png" alt="" title="closingslide1" width="500" height="375" class="alignnone size-full wp-image-60" /></a></p>
<p>To ask the quintessential focus group question, does this picture improve your image of me, worsen your image of me, or no effect? </p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulfutility.com/index.php/2008/12/10/close-with-humor-or-the-tiger-did-what/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Learning C#</title>
		<link>http://beautifulfutility.com/index.php/2008/12/02/learning-c/</link>
		<comments>http://beautifulfutility.com/index.php/2008/12/02/learning-c/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 03:12:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Effective C#]]></category>

		<guid isPermaLink="false">http://beautifulfutility.com/?p=9</guid>
		<description><![CDATA[In 10 years of programming, I've needed to switch languages frequently. Sometimes as many as five times a year. It's good to have a breadth of knowledge, but there's nothing wrong with depth.]]></description>
			<content:encoded><![CDATA[<p>In 10 years of programming, I&#8217;ve needed to switch languages frequently. Sometimes as many as five times a year. It&#8217;s good to have a breadth of knowledge, but there&#8217;s nothing wrong with depth. For the last year I have been programming almost exclusively in C# and in order to beat the New Year&#8217;s rush I am making an early resolution to be a bad-ass in this language.</p>
<p>I&#8217;ve got two resources in mind to get started on this track, not coincidentally both are published by Microsoft. <a href="http://www.amazon.com/Effective-Specific-Improve-Software-Development/dp/0321245660/ref=pd_bbs_sr_2?ie=UTF8&amp;s=books&amp;qid=1228273027&amp;sr=8-2">Effective C#</a> and <a href="http://www.amazon.com/More-Effective-Specific-Software-Development/dp/0321485890/ref=pd_bxgy_b_text_b">More Effective C#</a> (catchy titles, no?).</p>
<p>I chose these two because they are easily broken up into digestible chunks and are not related to any particular solution domain that I am working on. </p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulfutility.com/index.php/2008/12/02/learning-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
