<?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>Technology In The Gap &#187; Programming</title>
	<atom:link href="http://tech.minthegap.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.minthegap.com</link>
	<description>Technology insight from a Software Engineer</description>
	<lastBuildDate>Fri, 20 Apr 2012 20:53:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Dreaming About Maps</title>
		<link>http://tech.minthegap.com/2011/11/dreaming-about-maps/</link>
		<comments>http://tech.minthegap.com/2011/11/dreaming-about-maps/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 13:28:33 +0000</pubDate>
		<dc:creator>MInTheGap</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[dreams]]></category>
		<category><![CDATA[maps]]></category>

		<guid isPermaLink="false">http://tech.minthegap.com/2011/11/dreaming-about-maps/</guid>
		<description><![CDATA[Yesterday at work a coworker who is working with some map APIs and census data found an interesting anomaly.&#160; It turns out that if your GPS location is on the Tappan Zee Bridge you don’t have a zip code.&#160; This is important if you’re trying to give physical address locations to GPS coordinates. While he [...]]]></description>
			<content:encoded><![CDATA[<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="businessman with laptop" border="0" alt="businessman with laptop" align="right" src="http://tech.minthegap.com/wp-content/uploads/2011/11/businessman-with-laptop.jpg" width="184" height="244" /></p>
<p>Yesterday at work a coworker who is working with some map APIs and census data found an interesting anomaly.&#160; It turns out that if your GPS location is on the Tappan Zee Bridge you don’t have a zip code.&#160; This is important if you’re trying to give physical address locations to GPS coordinates.</p>
<p>While he went off to figure out what he was going to do with this discovery, I went on my merry way, not thinking about it until later that night—while sleeping.</p>
<p><span id="more-79"></span>
<p>Last night, I had a dream that I was called before Congress to testify about why, when a person has a phone that gives a GPS reading of location, the person was shown to be inside the building they were standing next to, instead of outside of it.&#160; The discussion went on for some time when I said, “Well, if you don’t like using <a href="http://maps.google.com">Google Maps</a>, why don’t you use <a href="http://www.bing.com/maps/">Bing Maps</a>, <a href="http://maps.yahoo.com/">Yahoo Maps</a> and even <a href="http://www.mapquest.com/">Mapquest</a> is still around.</p>
<p>The legislators were surprised, and asked me to hook up to their projector so I could show them these weird, “new” technologies.</p>
<p>I can only assume that this is because of the discussion of maps and how mapping works with my coworker earlier in the day.&#160; Strange!</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.minthegap.com/2011/11/dreaming-about-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Renaming a Branch in SVN</title>
		<link>http://tech.minthegap.com/2011/05/renaming-a-branch-in-svn/</link>
		<comments>http://tech.minthegap.com/2011/05/renaming-a-branch-in-svn/#comments</comments>
		<pubDate>Thu, 05 May 2011 15:38:45 +0000</pubDate>
		<dc:creator>MInTheGap</dc:creator>
				<category><![CDATA[SVN]]></category>
		<category><![CDATA[branches]]></category>
		<category><![CDATA[renaming]]></category>

		<guid isPermaLink="false">http://tech.minthegap.com/2011/05/renaming-a-branch-in-svn/</guid>
		<description><![CDATA[What happens when you have a branch that you’re working in that has stuff in it that really doesn’t belong with the name.&#160; I mean, naming is one of things that can be the most tricky. Is renaming a branch hard?&#160; Nope. Fire up the repo-browser. Right click on the branch you want to rename. [...]]]></description>
			<content:encoded><![CDATA[<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="Help" border="0" alt="Help" align="right" src="http://tech.minthegap.com/wp-content/uploads/2011/05/Help.jpg" width="244" height="184" /></p>
<p>What happens when you have a branch that you’re working in that has stuff in it that really doesn’t belong with the name.&#160; I mean, naming is one of things that can be the most tricky.</p>
<p>Is renaming a branch hard?&#160; Nope.</p>
<ol>
<li>Fire up the repo-browser.</li>
<li>Right click on the branch you want to rename.</li>
<li>Specify the name you want it to have.</li>
<li>Specify a note for why you changed.</li>
</ol>
<p>Bingo!</p>
<p><span id="more-69"></span>
<p>Ahh, but now the fun beings.&#160; If you have a local folder on your file system, it probably points to the old repository folder.&#160; That means that you’ll have to do a SVN Checkout to get the new folder and merge any outstanding changes (you did check in everything before you did this, right?)</p>
<p>After doing this, you should be ready to go.&#160; Again, that wasn’t so difficult and you have all of your checkin history preserved.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.minthegap.com/2011/05/renaming-a-branch-in-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Calendar For Multiple Blogs</title>
		<link>http://tech.minthegap.com/2011/05/wordpress-calendar-for-multiple-blogs/</link>
		<comments>http://tech.minthegap.com/2011/05/wordpress-calendar-for-multiple-blogs/#comments</comments>
		<pubDate>Thu, 05 May 2011 13:34:02 +0000</pubDate>
		<dc:creator>MInTheGap</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[editing]]></category>
		<category><![CDATA[scheduling]]></category>

		<guid isPermaLink="false">http://tech.minthegap.com/2011/05/wordpress-calendar-for-multiple-blogs/</guid>
		<description><![CDATA[One of the problems with managing and writing for multiple blogs in advance of the current date is that I can never really remember what I have written in advance of today, what needs more written and what I’m good with. There are some neat plugins for managing a single blog. For instance, I currently [...]]]></description>
			<content:encoded><![CDATA[<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="Calendario" border="0" alt="Calendario" align="right" src="http://tech.minthegap.com/wp-content/uploads/2011/05/Calendario.jpg" width="244" height="184" /></p>
<p>One of the problems with managing and writing for multiple blogs in advance of the current date is that I can never really remember what I have written in advance of today, what needs more written and what I’m good with.</p>
<p>There are some neat plugins for managing a single blog.</p>
<p><span id="more-67"></span>
<p>For instance, I currently use <a href="http://wordpress.org/extend/plugins/future-posts-calendar/">Future Posts Calendar</a>, which works good for showing which dates are covered on a single blog.&#160; I’m looking at implementing <a href="http://wordpress.org/extend/plugins/editorial-calendar/">Editorial Calendar</a> which give me more power as far as moving posts around.&#160; But neither of these solve my main problem.&#160; And none of the plugins on the <a href="http://chasesagum.com/7-wordpress-calendar-plugins">7 WordPress Calendar Plugins</a> page seemed like it would fit.</p>
<p>So, I’ve come up with a solution that should work.</p>
<p>I’m going to take the <a href="http://www.xml-rpc.net/">XML-RPC.NET</a> solution and use it to <a href="http://www.dotnetcurry.com/ShowArticle.aspx?ID=419">get all the posts from my blogs</a> and then turn around and use <a href="http://www.udel.edu/CIS/software/dist/google/calendar/java.client/gdata/doc/client-cs.html">Google’s calendar API</a> to put it into Google Calendar.</p>
<p>This means that I’ll my post schedule readily available on my gTablet or anywhere I want—I’ll see every post, when it’s been published or will be published, etc.</p>
<p>Eventually, I could see this thing allowing me to move post dates/times around via Google Calendar—if it gets interesting enough.</p>
<p>What do you think of my plan?</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.minthegap.com/2011/05/wordpress-calendar-for-multiple-blogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who&#8217;s Defriended You?  2 Ways to Find Out!</title>
		<link>http://tech.minthegap.com/2011/01/whos-defriended-you-2-ways-to-find-out/</link>
		<comments>http://tech.minthegap.com/2011/01/whos-defriended-you-2-ways-to-find-out/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 14:24:18 +0000</pubDate>
		<dc:creator>MInTheGap</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://tech.minthegap.com/2011/01/whos-defriended-you-2-ways-to-find-out/</guid>
		<description><![CDATA[Every time you get a friend request—someone adds you to Facebook, you get a notification. Now, wouldn’t it be nice to know when someone unfriends you? One way is to follow the instructions at this post: Catch who removed you from Facebook…! But for those of you that would prefer not to run a script, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tech.minthegap.com/wp-content/uploads/2011/01/Sitting-Pretty.jpg" rel="lightbox[58]"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="Sitting Pretty" border="0" alt="Sitting Pretty" align="right" src="http://tech.minthegap.com/wp-content/uploads/2011/01/Sitting-Pretty_thumb.jpg" width="229" height="244" /></a></p>
<p>Every time you get a friend request—someone adds you to Facebook, you get a notification.</p>
<p>Now, wouldn’t it be nice to know when someone unfriends you?</p>
<p>One way is to follow the instructions at this post: <a href="http://blog.facilelogin.com/2011/01/catch-who-removed-you-from-facebook.html">Catch who removed you from Facebook…!</a></p>
<p>But for those of you that would prefer not to run a script, you can try a <a href="http://userscripts.org/scripts/show/58852">Grease Monkey Script</a> and you should be good to go!</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.minthegap.com/2011/01/whos-defriended-you-2-ways-to-find-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Teaching Programming with Small Basic</title>
		<link>http://tech.minthegap.com/2011/01/teaching-programming-with-small-basic/</link>
		<comments>http://tech.minthegap.com/2011/01/teaching-programming-with-small-basic/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 14:00:11 +0000</pubDate>
		<dc:creator>MInTheGap</dc:creator>
				<category><![CDATA[Kids]]></category>
		<category><![CDATA[Small Basic]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[turtle]]></category>

		<guid isPermaLink="false">http://tech.minthegap.com/2011/01/teaching-programming-with-small-basic/</guid>
		<description><![CDATA[When I was 8, my dad tried to teach me what he did.&#160; He was a â€œComputer Programmerâ€ and did a lot of work in BASIC. Needless to say, I didnâ€™t grasp a lot, and I really didnâ€™t understand all the GOTOs and line numbers, but I was able to take a program that he [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/beginner/ff384126.aspx"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="ff384126.smallbasicscreenshot(en-us)" border="0" alt="ff384126.smallbasicscreenshot(en-us)" align="right" src="http://tech.minthegap.com/wp-content/uploads/2011/01/ff384126.smallbasicscreenshoten-us.jpg" width="304" height="220" /></a></p>
<p>When I was 8, my dad tried to teach me what he did.&#160; He was a â€œComputer Programmerâ€ and did a lot of work in BASIC.</p>
<p>Needless to say, I didnâ€™t grasp a lot, and I really didnâ€™t understand all the GOTOs and line numbers, but I was able to take a program that he made and modify it, and a few short years later I built the voting program for my public high schoolâ€™s Student Government Election.</p>
<p>
<hr />So, as my kids are nearing the 8 year old range, I have started to look around to see if thereâ€™s a way that I can introduce them to what I do that would be a little friendlier than throwing them into BASIC, and I found a neat tool from Microsoft.</p>
<p>Called â€œSmall Basicâ€, Microsoft has created a friendly environment that kids can use basic instructions to make programs and games.&#160; It uses the VB style coding and the .NET framework as a basis, and gives a panel that tells all about what commands you can use.</p>
<p>What I also like, as a dad, is that theyâ€™ve even include a curriculum with power point slidesâ€”6 Lessons, most of which are broken up into subparts.</p>
<p>I would see this as a great introduction to programming for kids and teens as well.&#160; I think Iâ€™m going to try this with my kidsâ€”at least the oldestâ€”and Iâ€™ll let you know my experience with it.</p>
<p>Want to try it?&#160; Click on the image above to go to the Small Basic site.&#160; Itâ€™s a free download, and away you go!</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.minthegap.com/2011/01/teaching-programming-with-small-basic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebParts and jQuery</title>
		<link>http://tech.minthegap.com/2010/09/webparts-and-jquery/</link>
		<comments>http://tech.minthegap.com/2010/09/webparts-and-jquery/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 18:31:57 +0000</pubDate>
		<dc:creator>MInTheGap</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[webparts]]></category>

		<guid isPermaLink="false">http://tech.minthegap.com/2010/09/webparts-and-jquery/</guid>
		<description><![CDATA[So, after quite a bit of fiddling with code, Iâ€™ve managed to implement the code that lets me use jQuery to move WebParts around. There were two different hurdles I had to overcome to get this done.&#160; The first was a weird behavior I found with MasterPages within my project, and the second was the [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; display: inline; border-top: 0px; border-right: 0px" title="Laptop user 1" border="0" alt="Laptop user 1" align="right" src="http://tech.minthegap.com/wp-content/uploads/2010/09/Laptopuser11.jpg" width="244" height="184" /> </p>
<p>So, after quite a bit of fiddling with code, Iâ€™ve managed to implement the <a href="http://weblogs.asp.net/uruit/archive/2009/08/19/extending-asp-net-webparts-cross-browser-drag-and-drop-functionality-using-jquery.aspx">code that lets me use jQuery to move WebParts around</a>.</p>
<p>There were two different hurdles I had to overcome to get this done.&#160; The first was a weird behavior I found with MasterPages within my project, and the second was the fact that I didnâ€™t know where this code was supposed to come back to on the server.</p>
<p> <span id="more-48"></span><br />
<h3>MasterPages</h3>
<p>I donâ€™t know if this has ever happened to you, but part of the beauty of MasterPages is that you can define things at different levels depending on when things are going to change.&#160; If thereâ€™s a heading or a menu that will be on all your pages, but if itâ€™s only on a specific page, then you donâ€™t have to put it on the top level.&#160; Itâ€™s great for organizing.</p>
<p>My problem was that I had put the jQuery Javascript includes in the aspx Design page and it was not showing up in the browser.&#160; Well, it kinda showed up.&#160; I could get the first one to show up, but not any of the following lines.</p>
<p>And if I did it in the MasterPage, then any of the lines I put in the Pageâ€™s Header didnâ€™t show up.&#160; It was really frustrating.</p>
<p>Eventually, I copied what I had going in a different pageâ€”using</p>
<p>
<pre class="brush: csharp; title: ; notranslate">Page.Header.AddScript(/* script here */, false);</pre>
</p>
<p>and that seemed to work just fine.&#160; As always order is important (especially when dealing with jQuery, as it has to be loaded first before you can call any of itâ€™s functions).</p>
<h3>jQuery WebParts on the Move</h3>
<p>The last problem I had to deal with is intercepting the WebPart drop message.&#160; I could see that the code was firing a PostBack event back to the server, but I could not find where that event should have been handled.&#160; Itâ€™s then that I stumbled upon this tutorial on <a href="http://aspalliance.com/895_Understanding_the_JavaScript___doPostBack_Function.2">Understanding the __doPostBack Function</a>.&#160; How did that help, well I was then able to use a couple of functions to find and intercept the source of the PostBack and move the WebPart accordingly.</p>
<p>Simply get the arguments, parse them out, and then move the WebPart to whatever WebPartZone and index thatâ€™s specified.</p>
<p>Now, I just have to figure out whether they look right, how the performance is from the database with actual charts, and make sure the CSS is right and away I go!</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.minthegap.com/2010/09/webparts-and-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Do You Mean You Can&#8217;t Drag Web Parts in Firefox?</title>
		<link>http://tech.minthegap.com/2010/09/what-do-you-mean-you-cant-drag-web-parts-in-firefox/</link>
		<comments>http://tech.minthegap.com/2010/09/what-do-you-mean-you-cant-drag-web-parts-in-firefox/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 13:13:17 +0000</pubDate>
		<dc:creator>MInTheGap</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[webparts]]></category>

		<guid isPermaLink="false">http://tech.minthegap.com/2010/09/what-do-you-mean-you-cant-drag-web-parts-in-firefox/</guid>
		<description><![CDATA[My current task at work has me creating a series of pie charts that we can turn around and use as a dashboard to show the current KPIs (Key Performance Indicators) to our customers.&#160; Naturally, since we are using the ASP.NET framework for the UI portion, when I think of dashboards with multiple, configurable user [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; display: inline; border-top: 0px; border-right: 0px" title="Laptop user 1" border="0" alt="Laptop user 1" align="right" src="http://tech.minthegap.com/wp-content/uploads/2010/09/Laptopuser1.jpg" width="244" height="184" /> </p>
<p>My current task at work has me creating a series of pie charts that we can turn around and use as a dashboard to show the current KPIs (Key Performance Indicators) to our customers.&#160; Naturally, since we are using the ASP.NET framework for the UI portion, when I think of dashboards with multiple, configurable user controls, I think WebParts.</p>
<p> <span id="more-46"></span><br />
<h3>What are WebParts?</h3>
<p>Webparts are Controls or User Controls that have the same type of interface on them so that they can be moved around a page, minimized, closed, etc.&#160; Itâ€™s basically mimicking what you can do on the desktop in a webpage.</p>
<p>If youâ€™ve ever used Yahoo or Googleâ€™s personalized pages that let you place components around the screen youâ€™ve used WebParts, though you probably didnâ€™t know it.&#160; <a href="http://www.pageflakes.com" class="broken_link">Pageflakes</a> is a site that uses ASP.NET and WebParts.</p>
<h3>Sounds Great, Whatâ€™s the Problem?</h3>
<p>So I did the work to create the stored procedures to produce the data, wrangled with our Web Services tier to pass the personalizations along to the UI tier, and got the UI to display the charts.</p>
<p>Only each and every time I tried to drag them not only would they not budge, but they wouldnâ€™t show any sign of even wanting to move.</p>
<p>Why?!</p>
<p>So I created a Windows XP Virtual Machine, loaded up the software to create a very simple webpage with WebParts, and started following an online tutorial.&#160; I put together all the WebPartZones<sup><a href="http://tech.minthegap.com/2010/09/what-do-you-mean-you-cant-drag-web-parts-in-firefox/#footnote_0_46" id="identifier_0_46" class="footnote-link footnote-identifier-link" title="These zones dictate where the WebParts may go.">1</a></sup> and put in all the controls, but still no dragging.</p>
<p>Out of curiosity, I fired up Internet Explorer, and low and behold, the WebParts displayed a cursor to move them when in â€œEditâ€ mode and they moved (albeit a tad clunky)!</p>
<p>So now I have to find something to help me to do this in Firefox.</p>
<p>Thatâ€™s where Google comes inâ€¦</p>
<p>Google so helpfully showed me to this article:</p>
<h4><b><b><a href="http://weblogs.asp.net/uruit/archive/2009/08/19/extending-asp-net-webparts-cross-browser-drag-and-drop-functionality-using-jquery.aspx">Extending ASP.NET Webparts: Cross-browser Drag and Drop functionality using JQuery</a></b></b></h4>
<p>Iâ€™ll let you know how it works out.</p>
<ol class="footnotes"><li id="footnote_0_46" class="footnote">These zones dictate where the WebParts may go.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://tech.minthegap.com/2010/09/what-do-you-mean-you-cant-drag-web-parts-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Value Does Not Fall Within The Expected Range</title>
		<link>http://tech.minthegap.com/2010/02/value-does-not-fall-within-the-expected-range/</link>
		<comments>http://tech.minthegap.com/2010/02/value-does-not-fall-within-the-expected-range/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 14:16:57 +0000</pubDate>
		<dc:creator>MInTheGap</dc:creator>
				<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[error messages]]></category>
		<category><![CDATA[exceptions]]></category>

		<guid isPermaLink="false">http://tech.minthegap.com/2010/02/value-does-not-fall-within-the-expected-range/</guid>
		<description><![CDATA[Cryptic error messagesâ€”they are the bane of my existence.&#160; I donâ€™t know how much of my programming time has been taken up trying to trace down the meaning of an error message. Now, I canâ€™t say that Iâ€™m perfect.&#160; The first project I worked on coming out of college had â€œInvalid Keyâ€ for just about [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; display: inline; border-top: 0px; border-right: 0px" title="PA" border="0" alt="PA" align="right" src="http://tech.minthegap.com/wp-content/uploads/2010/02/PA.jpg" width="184" height="244" /> </p>
<p>Cryptic error messagesâ€”they are the bane of my existence.&#160; I donâ€™t know how much of my programming time has been taken up trying to trace down the meaning of an error message.</p>
<p>Now, I canâ€™t say that Iâ€™m perfect.&#160; The first project I worked on coming out of college had â€œInvalid Keyâ€ for just about every error messageâ€”without so much as a clue as to why the key pressed on the point of sale system was invalid.</p>
<p>Microsoft, however, has no excuse.&#160; I mean, they have this whole complex exception system built into their development environments, but all they can tell me is â€œValue does not fall within the expected range,â€ and Iâ€™m left wondering:</p>
<ul>
<li>What is the value?</li>
<li>What is the expected range?</li>
<li>What control threw the exception?</li>
<li>How do I fix it if I canâ€™t even see it?</li>
</ul>
<p> <span id="more-42"></span>
<p>That last partâ€™s the kicker, you see, because the exception was thrown in the designer, which means I canâ€™t see any of the controls on the screen or interrogate them.</p>
<p>I tried to comment out all the initialization code in the constructorâ€”to no avail.&#160; I tried using Yahoo to search for articles on the topic.&#160; Even when saying â€œdesignerâ€ I was getting the generic argument exception instead of help on what to do.</p>
<p>When I finally included part of the unhelpful stack trace, I found a forum that had all kinds of unhelpful thingsâ€”except, <strong>restart the IDE.</strong></p>
<p>And thatâ€™s what fixed it.&#160; Half an hour later and the solution was to restart the IDE.&#160; Ugh.</p>
<p>Hopefully, this should serve as a good reminder to return better error messages than the ones I getâ€¦</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.minthegap.com/2010/02/value-does-not-fall-within-the-expected-range/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Word Automation Deployment</title>
		<link>http://tech.minthegap.com/2009/10/word-automation-deployment/</link>
		<comments>http://tech.minthegap.com/2009/10/word-automation-deployment/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 15:34:25 +0000</pubDate>
		<dc:creator>MInTheGap</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Microsoft Word]]></category>

		<guid isPermaLink="false">http://tech.minthegap.com/2009/10/word-automation-deployment/</guid>
		<description><![CDATA[Itâ€™s always tricky to get applications that youâ€™ve written and built on your own pc to run on the target environment.Â  One of the big reasons is that during development any problem that you encounter you overcome, but that doesnâ€™t mean the target solution will have the same environment, the same tools installed or have [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tech.minthegap.com/wp-content/uploads/2009/10/LateNightPortrait.jpg" rel="lightbox[33]"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; display: inline; border-top: 0px; border-right: 0px" title="Late Night Portrait" src="http://tech.minthegap.com/wp-content/uploads/2009/10/LateNightPortrait_thumb.jpg" border="0" alt="Late Night Portrait" width="244" height="184" align="right" /></a></p>
<p>Itâ€™s always tricky to get applications that youâ€™ve written and built on your own pc to run on the target environment.Â  One of the big reasons is that during development any problem that you encounter you overcome, but that doesnâ€™t mean the target solution will have the same environment, the same tools installed or have some kind of resource contention you werenâ€™t planning for.</p>
<p><span id="more-33"></span></p>
<p>My attempt to deploy a Word Automation Service that I built was no different.Â  The first thing that I noticed when I went to the target box was that I didnâ€™t have any applications competing for using Word.Â  Since I was replacing an application that had many different consumers of Wordâ€”and I was only replacing one of themâ€”I noticed that another application was opening and closing Word while I was trying to use it.</p>
<h3>Semaphores</h3>
<p>In Computer Science class in college there was the illustration of two trains that had to share one track that went through a tunnel.Â  My current job has an even more pertinent analogy.Â  We have three keys to the restroom.Â  If all the keys are gone, youâ€™re going to have to hold it!</p>
<p>In any case, my solution was to implement a text file semaphore.Â  I have each of the two applications check the file before proceeding to execute.Â  After theyâ€™ve completed executing, they leave a message in the file for the other person to use Word.Â  If the file doesnâ€™t exist, the new service creates the file and gives the old routine control.</p>
<p>Itâ€™s clunky, and hopefully the need for semaphores will go away, but for now, it gets around a sticky problem.</p>
<h3>Word Versions</h3>
<p>The next problem I ran into was that I was running Word 2007 locally and the deployment box is using Word 2003.Â  I didnâ€™t think itâ€™d be a problem, but with the debugging flag on<sup><a href="http://tech.minthegap.com/2009/10/word-automation-deployment/#footnote_0_33" id="identifier_0_33" class="footnote-link footnote-identifier-link" title="I&acirc;&euro;&trade;m using the Event Viewer to track what&acirc;&euro;&trade;s going on in the service and I have different levels of logging that you can enable with a configuration file.&Acirc;&nbsp; The idea is that if I&acirc;&euro;&trade;m troubleshooting, I can be pretty specific about what is going on.&Acirc;&nbsp; If I&acirc;&euro;&trade;m running normally, I can just show errors if I want to.">1</a></sup> I noticed that I was getting the error â€œAttempted to read or write protected memory. This is often an indication that other memory is corrupt.â€ when the system tried to use Document.Open to open the document.</p>
<p>What I eventually found, after a lot of internet searching, was the following code:</p>
<pre class="brush: csharp; title: ; notranslate">
Microsoft.Office.Interop.Word.Application WordApp = null;
Microsoft.Office.Interop.Word.Document WordDoc = null;

try
{
   WordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
   //(&quot;Word instantiated, version is: &quot; + WordApp.Version);
}
catch (Exception e)
{
   //(&quot;Error instantiating Word instance: &quot; + e.Message);
}

WordApp.DisplayAlerts = Microsoft.Office.Interop.Word.WdAlertLevel.wdAlertsNone;

try
{
   WordDoc = WordApp.Documents.Open(ref strFile, ref objFalse, ref objTrue, ref objFalse, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing);
   //(&quot;Word document opened correctly.&quot;);
}
catch
{
   //(&quot;Error opening Word document in compiled version - trying office 2000.&quot;);
   try
   {
      WordDoc = WordApp.Documents.Open2000(ref strFile, ref objFalse, ref objTrue, ref objFalse, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing);
      //(&quot;Word document opened correctly using office 2000.&quot;);
   }
   catch
   {
      //(&quot;Error opening Word document in office 2000 - trying compatibility mode.&quot;);
      try
      {
         WordDoc = WordApp.Documents.OpenOld(ref strFile, ref objFalse, ref objTrue, ref objFalse, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing);
         //(&quot;Word document opened correctly using compatibility mode.&quot;);
      }
      catch (Exception e)
      {
          WordDoc = null;
          //(&quot;Error unable to open Word document in any mode: &quot; + e.Message);
      }
   }
}
</pre>
<p>Which I found at this site that was dealing with a <a href="http://www.bokebb.com/dev/english/1957/posts/195742854.shtml" class="broken_link">Problem with Word Automation</a>.Â  This code tries to open the file using both the latest Open command as well as the others, and this one worked great.</p>
<p>The only thing after this was making sure that I produced output like Customer Support wanted it, but now itâ€™s running fine!</p>
<ol class="footnotes"><li id="footnote_0_33" class="footnote">Iâ€™m using the Event Viewer to track whatâ€™s going on in the service and I have different levels of logging that you can enable with a configuration file.Â  The idea is that if Iâ€™m troubleshooting, I can be pretty specific about what is going on.Â  If Iâ€™m running normally, I can just show errors if I want to.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://tech.minthegap.com/2009/10/word-automation-deployment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How I Go About Creating Personas</title>
		<link>http://tech.minthegap.com/2009/10/how-i-go-about-creating-personas/</link>
		<comments>http://tech.minthegap.com/2009/10/how-i-go-about-creating-personas/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 14:00:00 +0000</pubDate>
		<dc:creator>MInTheGap</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Personas]]></category>

		<guid isPermaLink="false">http://tech.minthegap.com/2009/10/how-i-go-about-creating-personas/</guid>
		<description><![CDATA[Iâ€™m a novice at personas.&#160; I mean, Iâ€™ve written some stories beforeâ€”novels in High School that Iâ€™ve posted on a fiction siteâ€”but I donâ€™t know that Iâ€™ve ever been really good with biographies. Most of the time my biography consists of what my characters have done in my storiesâ€”and I know that they should have [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; display: inline; border-top: 0px; border-right: 0px" title="Red Lady" border="0" alt="Red Lady" align="right" src="http://tech.minthegap.com/wp-content/uploads/2009/10/RedLady1.jpg" width="244" height="193" /> </p>
<p>Iâ€™m a novice at personas.&#160; I mean, Iâ€™ve written some stories beforeâ€”novels in High School that Iâ€™ve posted on a <a href="http://fiction.minthegap.com">fiction site</a>â€”but I donâ€™t know that Iâ€™ve ever been really good with biographies.</p>
<p>Most of the time my biography consists of what my characters have done in my storiesâ€”and I know that they should have a good back story, but like any programmer that loves jumping into code rather than spending all his time trying to do the design work<sup><a href="http://tech.minthegap.com/2009/10/how-i-go-about-creating-personas/#footnote_0_30" id="identifier_0_30" class="footnote-link footnote-identifier-link" title="I mean, I know that I should do it, it&acirc;&euro;&trade;s just the case that I love coding!">1</a></sup>, I need work in this area.</p>
<p> <span id="more-30"></span>
<p>So, with this latest project, I went about finding images first that I could use for characters.&#160; Having an account at <a href="http://xsc.hu">StockExchange</a> (a free stock photography site) I headed on over there to look through â€œportraits.â€&#160; There werenâ€™t many, but I found a few that would fit my need.</p>
<p>My next step was to write two or three paragraphs that described them and their job function.&#160; For my purposes Iâ€™m not sure just how much biography outside of their work lives I needed.&#160; I included a little, but perhaps Iâ€™m a bit naive when it comes to purpose.&#160; Iâ€™m sure Iâ€™ll learn.</p>
<p>After that, I scribbled a little out about what I thought they wanted from the system as a guide to thinking about how to do the design.</p>
<p>Iâ€™m struggling, a little, on how to differentiate the product I am analyzing and the product that I want in my head.&#160; </p>
<p>Perhaps Personas work better when youâ€™re in a group having a discussion?</p>
<p>Perhaps I need to start doing a design and see if I please my virtual people?</p>
<p>Except Karie isnâ€™t defined yet.&#160; Until sheâ€™s defined, I think I wonâ€™t have a complete picture.</p>
<p>Down the road I expect to use some of the characters from my fiction story (as they have an exhaustive background and cooler photos), but for now, Iâ€™ll stick with what I have.</p>
<ol class="footnotes"><li id="footnote_0_30" class="footnote">I mean, I know that I <em>should</em> do it, itâ€™s just the case that I love coding!</li></ol>]]></content:encoded>
			<wfw:commentRss>http://tech.minthegap.com/2009/10/how-i-go-about-creating-personas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

