<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Midwest Developer Insights &#187; Development</title>
	<atom:link href="http://blog.yeahstu.com/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.yeahstu.com</link>
	<description>What I Like and What I&#039;ve Learned</description>
	<lastBuildDate>Thu, 26 Aug 2010 00:12:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.yeahstu.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/0338f55ca58478a8e600c28652e6b57b?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Midwest Developer Insights &#187; Development</title>
		<link>http://blog.yeahstu.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.yeahstu.com/osd.xml" title="Midwest Developer Insights" />
	<atom:link rel='hub' href='http://blog.yeahstu.com/?pushpress=hub'/>
		<item>
		<title>I Heart Karnaugh Maps</title>
		<link>http://blog.yeahstu.com/2010/06/11/i-heart-karnaugh-maps/</link>
		<comments>http://blog.yeahstu.com/2010/06/11/i-heart-karnaugh-maps/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 05:30:36 +0000</pubDate>
		<dc:creator>Stu</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[Karnaugh Maps]]></category>
		<category><![CDATA[technologies]]></category>

		<guid isPermaLink="false">http://blog.yeahstu.com/?p=156</guid>
		<description><![CDATA[Have you ever found yourself writing a long Boolean condition in your code like the line below? if ((policy.Type == PolicyType.AutoInsurance &#38;&#38; policy.PolicyHolder.PriorAccidents == 0) &#124;&#124; (policyPaidInFull &#38;&#38; policy.Type == PolicyType.AutoInsurance &#124;&#124; policy.IsPremium) &#124;&#124; (policy.Type == PolicyType.AutoInsurance &#38;&#38; policy.PolicyHolder.PriorAccidents == 0 &#38;&#38; policy.IsPremium))   Perhaps that line of code above is the first and easiest [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.yeahstu.com&amp;blog=10180494&amp;post=156&amp;subd=yeahstu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Have you ever found yourself writing a long Boolean condition in your code like the line below?
</p>
<p><span style="font-family:Courier New;font-size:10pt;"><br />
			<span style="color:blue;">if</span> ((policy.Type == PolicyType.AutoInsurance &amp;&amp; policy.PolicyHolder.PriorAccidents == 0) || (policyPaidInFull &amp;&amp; policy.Type == PolicyType.AutoInsurance || policy.IsPremium) || (policy.Type == PolicyType.AutoInsurance &amp;&amp; policy.PolicyHolder.PriorAccidents == 0 &amp;&amp; policy.IsPremium))<br />
</span></p>
<p>
 </p>
<p><img style="width:200px;" align="left" src="http://yeahstu.files.wordpress.com/2010/07/3208192296_94cda99d3d.jpg" alt="I Heart Karnaugh Maps" />Perhaps that line of code above is the first and easiest way you thought about all the conditions that have to occur in your application&#8217;s business logic. You write that line of code, test it in many different scenarios and it works so you think you have done a good job. Well, there are ways to improve upon that line of code by removing logically equivalent Boolean expressions, not to mention some style improvements that might make it more understandable.
</p>
<p>We owe gratitude to our dear friends the Electrical Engineers for developing a clever tool, named Karnaugh Maps, to help with this dilemma, usually for cases of no more than 6 variable conditions. Karnaugh Maps (pronounced &#8220;car-no&#8221; and often simply called &#8220;K-Maps&#8221;) are a system for reducing Boolean expressions into a more simplistic form. They originated from the need to reduce electrical wiring gates, or <a href="http://en.wikipedia.org/wiki/Circuit_minimization">circuit minimization</a>, but they are still useful for the high-level software developer.
</p>
<p>
 </p>
<h2>Benefits of reduced Boolean expressions<br />
</h2>
<ol>
<li>Increased program performance
</li>
<li>Increased readability of code
</li>
<li>Less code results in easier to change code
</li>
</ol>
<h2>Reducing our example expression<br />
</h2>
<p>The 1<sup>st</sup> step is to let letters represent each of the conditions in our expression. In our case:
</p>
<ul style="margin-left:72pt;">
<li>a :     <span style="font-family:Courier New;font-size:10pt;">policy.Type == PolicyType.AutoInsurance</span>
		</li>
<li>b :      <span style="font-family:Courier New;font-size:10pt;">policyPaidInFull</span>
		</li>
<li>c :     <span style="font-family:Courier New;font-size:10pt;">policy.PolicyHolder.PriorAccidents == 0</span>
		</li>
<li>d :     <span style="font-family:Courier New;font-size:10pt;">policy.IsPremium</span>
		</li>
</ul>
<p>Then, draw a graphical square like the one pictured below. This represents each possible combination of our Boolean conditions. The boxes are blank because we have not yet entered what Boolean results we want in our resultant expression.
</p>
<p><img src="http://yeahstu.files.wordpress.com/2010/06/061010_1930_iheartkarna2.jpg" style="width:120px;" alt="Blank Karnaugh Map" />
	</p>
<p>Let&#8217;s take the first, simplified condition in parentheses, <span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">if</span> (a &amp;&amp; c)</span>, and put it into the map. The result would look like the below image, because we only need to fill in the boxes where <span style="font-family:Courier New;font-size:10pt;">a</span> and <span style="font-family:Courier New;font-size:10pt;">c</span> are both 1.
</p>
<p><img src="http://yeahstu.files.wordpress.com/2010/06/061010_1930_iheartkarna3.jpg" alt="Sample Karnaugh Map" style="width:120px;" />
	</p>
<p>Following this example, we can use the entire Boolean expression to fill out the whole map. The completed Karnaugh Map is pictured below.
</p>
<p><img src="http://yeahstu.files.wordpress.com/2010/06/061010_1930_iheartkarna4.jpg" alt="Completed Karnaugh Map" style="width:120px;" />
	</p>
<p>Now circle any square or straight line of boxes since they correspond to an expression that differs by only two bits.
</p>
<p><img src="http://yeahstu.files.wordpress.com/2010/06/061010_1930_iheartkarna5.jpg" alt="Circled Karnaugh Map" style="width:120px;" />
	</p>
<p>Because of the way we have arranged our variables around the outside of the map, we can eliminate variables based on boxes filled with 1s being adjacent to each other. In our example, the vertical &#8220;circle&#8221; exhibits a scenario where the expression should always be true as long as both the <span style="font-family:Courier New;font-size:10pt;">a</span> bit and the <span style="font-family:Courier New;font-size:10pt;">b</span> bit are 1, hence the condition <span style="font-family:Courier New;font-size:10pt;">( a &amp;&amp; b )</span>. Likewise, the square &#8220;circle&#8221; exhibits true cases whenever the <span style="font-family:Courier New;font-size:10pt;">c</span> bit is 1 and the <span style="font-family:Courier New;font-size:10pt;">a</span> bit is 1. Because the <span style="font-family:Courier New;font-size:10pt;">b</span> bit and <span style="font-family:Courier New;font-size:10pt;">d</span> bit are true no matter if their values are 0 or 1, they can be deleted from the resulting simplified expression, which would be <span style="font-family:Courier New;font-size:10pt;">|| ( a &amp;&amp; c )</span>. We use a similar rule to find the final <span style="font-family:Courier New;font-size:10pt;">d</span> condition.</p>
<p>In one sentence, this rule can be summarized as &#8220;the circled boxes can be grouped together and the two variables that differ can be discarded.&#8221;
</p>
<p>The resulting Boolean expression is:
</p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">if</span> ( ( a &amp;&amp; b ) || ( d ) || ( a &amp;&amp; c ) )<br />
</span></p>
<p>which, using Boolean algebra, can be further reduced to:
</p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">if</span> ( ( a &amp;&amp; ( b || c ) ) || ( d ) )<br />
</span></p>
<p>We were not able to completely remove any variables, but we did simplify the expression quite a bit. The original Boolean conditions can be substituted for our letter variables, and we can rewrite the original expression as below:
</p>
<p><span style="font-family:Courier New;font-size:10pt;"><br />
			<span style="color:blue;">bool</span> policyIsAuto = ( PolicyType.AutoInsurance == policy.Type );<br />
			<span style="color:blue;">bool</span> zeroPriorAccidents = ( 0 == policy.PolicyHolder.PriorAccidents );<br />
			<span style="color:blue;">if</span> ( policyIsAuto &amp;&amp; ( policyPaidInFull || zeroPriorAccidents ) || policy.IsPremium )</span>
	</p>
<p>Seems easy, right? It is. And I am sorry if my steps went too fast for you. My intention is not to teach how to use Karnaugh Maps for all circumstances but instead to show you how easy and useful it is to simplify your Boolean logic.
</p>
<p>For help with different scenarios, find the book <em>Bebop to the Boolean Boogie – an Unconventional Guide to Electronics </em>at your local library, check out this <a href="http://en.wikipedia.org/wiki/Karnaugh_map">Wikipedia link</a>, or you can even <a href="http://k-map.sourceforge.net/">download software</a> to perform the rules for you.
</p>
<h2>Happy Karnaugh Mapping!<br />
</h2>
<p>In the mean time, I hope I was able to show you how fun and easy using a system like this can be. Feel free to post questions in the comments.
</p>
<p>
 </p>
<p><span style="font-size:small;">- Karnaugh Map Images taken from <em>Bebop to the Boolean Boogie – an Unconventional Guide to Electronics</em><br />
		</span></p>
<p><span style="font-size:small;">- Digital Logic image created by <a href="http://www.flickr.com/photos/gc_photography/3208192296/">Garrett Crawford</a><br />
		</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yeahstu.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yeahstu.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yeahstu.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yeahstu.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yeahstu.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yeahstu.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yeahstu.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yeahstu.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yeahstu.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yeahstu.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yeahstu.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yeahstu.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yeahstu.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yeahstu.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.yeahstu.com&amp;blog=10180494&amp;post=156&amp;subd=yeahstu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.yeahstu.com/2010/06/11/i-heart-karnaugh-maps/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2eb31b18606f0405b1e28dbda6c974fc?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">Stu</media:title>
		</media:content>

		<media:content url="http://yeahstu.files.wordpress.com/2010/07/3208192296_94cda99d3d.jpg" medium="image">
			<media:title type="html">I Heart Karnaugh Maps</media:title>
		</media:content>

		<media:content url="http://yeahstu.files.wordpress.com/2010/06/061010_1930_iheartkarna2.jpg" medium="image">
			<media:title type="html">Blank Karnaugh Map</media:title>
		</media:content>

		<media:content url="http://yeahstu.files.wordpress.com/2010/06/061010_1930_iheartkarna3.jpg" medium="image">
			<media:title type="html">Sample Karnaugh Map</media:title>
		</media:content>

		<media:content url="http://yeahstu.files.wordpress.com/2010/06/061010_1930_iheartkarna4.jpg" medium="image">
			<media:title type="html">Completed Karnaugh Map</media:title>
		</media:content>

		<media:content url="http://yeahstu.files.wordpress.com/2010/06/061010_1930_iheartkarna5.jpg" medium="image">
			<media:title type="html">Circled Karnaugh Map</media:title>
		</media:content>
	</item>
		<item>
		<title>Which Platform is the Best for My Mobile App?</title>
		<link>http://blog.yeahstu.com/2010/04/28/which-platform-is-the-best-for-my-mobile-app/</link>
		<comments>http://blog.yeahstu.com/2010/04/28/which-platform-is-the-best-for-my-mobile-app/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 17:12:29 +0000</pubDate>
		<dc:creator>Stu</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[emergent technologies]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://blog.yeahstu.com/?p=135</guid>
		<description><![CDATA[I am currently sitting at the Cincinnati Microsoft office attending the CINNUG Mobile Development FireStarter. This free training session covers how to create mobile applications for Android, iPhone, and Windows Mobile phones. I do not have any immediate plans to create a mobile application soon, so what am I hoping to get out of this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.yeahstu.com&amp;blog=10180494&amp;post=135&amp;subd=yeahstu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am currently sitting at the Cincinnati Microsoft office attending the <a href="http://cinnug.org/files/folders/mfs2010/default.aspx">CINNUG Mobile Development FireStarter</a>. This free training session covers how to create mobile applications for Android, iPhone, and Windows Mobile phones. I do not have any immediate plans to create a mobile application soon, so what am I hoping to get out of this session?
</p>
<h2>3 Highlights I Want to Learn Today about Mobile App Platforms:<br />
</h2>
<ul>
<li>Pros &amp; Cons of different platforms
</li>
<li>Enough knowledge to be able to manage an outsourced app developer
</li>
<li>Insight as to which platform is emerging as the leader
</li>
</ul>
<p>Throughout my career, I have been heavily focused on Microsoft development technologies. Often times recently, I have wondered if I should branch out to other languages and platforms. I have not yet done this, but if I were to move into mobile development (something I have limited experience with so far), it would be an ideal time to jump on the best platform as opposed to using Microsoft without questioning the decision. Therefore, I am happy to take advantage of this training session and glad that the format will discuss 3 different platforms.
</p>
<h2>What Did I Learn?<br />
</h2>
<p>The training is over and I have formed some conclusions while generating even more questions.  Below are summaries of what I learned.
</p>
<h3>Pros &amp; Cons of Different Platforms<br />
</h3>
<p>If I want to sell a mobile application then I need to make a good decision for which platform to build it. Each platform has its own benefits so it is possible that each platform could be best for certain types of applications. Below are the high-level Pros and Cons for each platform:
</p>
<h4 style="margin-top:32px;">Android<br />
</h4>
<div style="float:right;font-size:smaller;">
    <img src="http://yeahstu.files.wordpress.com/2010/04/042610_1712_whichplatfo1.jpg" alt="Android Nexus One" style="width:160px;" /><br />
    <br />
    Photo by <a href="http://www.flickr.com/photos/spierisf/4289032965/">Spieri_SF</a>
</div>
<h5>    Pro<br />
</h5>
<p>    Quickly gaining popularity
</p>
<p>    Open source    
</p>
<h5>    Con<br />
</h5>
<p>    Uses Java
</p>
<p>    Somewhat limited for game development</p>
<h4 style="margin-top:32px;">iPhone<br />
</h4>
<div style="float:right;font-size:smaller;">
    <img src="http://yeahstu.files.wordpress.com/2010/04/042610_1712_whichplatfo2.jpg" alt="iPhone Image" style="width:160px;" /><br />
    <br />
    Photo by <a href="http://www.flickr.com/photos/williamhook/2830322349/">William Hook</a>
</div>
<h5>    Pro<br />
</h5>
<p>&nbsp;&nbsp;&nbsp;&nbsp;Most Popular</p>
<p>    Same OS for iPhone, iPod Touch &amp; iPad
</p>
<h5>    Con<br />
</h5>
<p>    Development requires a Mac
</p>
<p>    Uses Objective C
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;Only distributable through the app store
</p>
<h4 style="margin-top:32px;">Windows Mobile/Windows Phone<br />
</h4>
<div style="float:right;font-size:smaller;">
    <img src="http://yeahstu.files.wordpress.com/2010/04/042610_1712_whichplatfo3.jpg" alt="iPhone Image" style="width:160px;" /><br />
    <br />
    Photo by <a href="http://www.flickr.com/photos/8011986@N02/2387269348/">Brooks Elliott</a>
</div>
<h5>    Pro<br />
</h5>
<p>    Familiar tools and language
</p>
<p>    Mature – platform has existed for a while
</p>
<h5>    Con<br />
</h5>
<p>    No physical devices for new platform version (7)
</p>
<p>    Adoption is a downward trend
</p>
<p>
 </p>
<h3>Enough Knowledge to Be Able to Manage an Outsourced App Developer<br />
</h3>
<p>Realistically, I am not going to drop all my plans or projects to dive in and write an iPhone application. I have enough wisdom to know that would probably be a waste of time unless I really want to learn iPhone development or if I had a great idea for an app for which I knew there was a market. Therefore, I don&#8217;t need to know at this time <em>how</em> to develop a mobile application.  I just need to understand the highlights.
</p>
<p>I am trying to prepare for the moment when I have that great idea for a mobile application.  When that happens, I don&#8217;t want to be clueless about the next steps involved. I want to have a good idea for limitations of current platforms, which technologies are emerging, and how to move forward getting the thing developed.
</p>
<p>Ideally, I will someday &#8220;own&#8221; a mobile application. When the time comes, my plan is to hire someone to build it, but I do not want to be ignorant to what is involved. By seeing these demos, I have been introduced to developing mobile applications. If I want to learn the details, I know where to start. If I want to hire someone else to develop a mobile app, I can now intelligently discuss the project and properly vet the person&#8217;s credentials.
</p>
<p>
 </p>
<h3>Insight as to Which Platform is Emerging as the Leader<br />
</h3>
<p>Perhaps the most important aspect to deciding which platform to develop for is how popular it is. Simply put, the bigger the market that my application can reach, the more sales leads that can be generated. So which platform will the most users be running when my application is finished and ready to be sold?
</p>
<p>At the time of this writing, the iPhone is the most popular of these 3 devices.  2<sup>nd</sup> is Windows Mobile, with Android placing 3<sup>rd</sup>.
</p>
<p>Most importantly, iPhone users consume the most network bandwidth out of all smart phone users. I believe this is a testament to the high user engagement with iPhones and consider this a forecast of its future growth. Some industry experts have opined that Google&#8217;s Android platform will emerge as the leader given its &#8220;open&#8221; paradigm is more beneficial to developers. Still Microsoft&#8217;s upcoming release of Windows 7 Phones may tip the market share into their favor.
</p>
<p>I am by no means an expert, but my bet would be that the iPhone will be the dominant smart phone platform for the next few years. The barrier to entry for users is low and it already has a head start influencing the industry. Everyone that has an iPhone loves it and everyone who doesn&#8217;t have one wants one. I don&#8217;t know a single person who is excited for any Windows Phone news and only a few who are aware of Android&#8217;s developments.
</p>
<p>If Apple ever allows the iPhone to be used with wireless networks in addition to AT&amp;T, such as Verizon, look out! They will have removed the biggest barrier left to everyone wanting one.
</p>
<p>Which mobile platform do you see emerging? Which platform would you recommend? Your opinion is probably more informed than mine.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yeahstu.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yeahstu.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yeahstu.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yeahstu.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yeahstu.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yeahstu.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yeahstu.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yeahstu.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yeahstu.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yeahstu.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yeahstu.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yeahstu.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yeahstu.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yeahstu.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.yeahstu.com&amp;blog=10180494&amp;post=135&amp;subd=yeahstu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.yeahstu.com/2010/04/28/which-platform-is-the-best-for-my-mobile-app/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2eb31b18606f0405b1e28dbda6c974fc?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">Stu</media:title>
		</media:content>

		<media:content url="http://yeahstu.files.wordpress.com/2010/04/042610_1712_whichplatfo1.jpg" medium="image">
			<media:title type="html">Android Nexus One</media:title>
		</media:content>

		<media:content url="http://yeahstu.files.wordpress.com/2010/04/042610_1712_whichplatfo2.jpg" medium="image">
			<media:title type="html">iPhone Image</media:title>
		</media:content>

		<media:content url="http://yeahstu.files.wordpress.com/2010/04/042610_1712_whichplatfo3.jpg" medium="image">
			<media:title type="html">iPhone Image</media:title>
		</media:content>
	</item>
		<item>
		<title>My First Experience with Microsoft Windows Azure</title>
		<link>http://blog.yeahstu.com/2009/12/13/my-first-experience-with-microsoft-windows-azure/</link>
		<comments>http://blog.yeahstu.com/2009/12/13/my-first-experience-with-microsoft-windows-azure/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 08:42:04 +0000</pubDate>
		<dc:creator>Stu</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Azure]]></category>

		<guid isPermaLink="false">http://blog.yeahstu.com/?p=37</guid>
		<description><![CDATA[Configuring a Development Environment with Microsoft Windows Azure Blob Storage requires using a pre-determined Microsoft Shared Key and running it in its own solution...<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.yeahstu.com&amp;blog=10180494&amp;post=37&amp;subd=yeahstu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This week I received my Microsoft Windows Azure invitation token, so I began integrating it into a project of mine.  I wanted to use just the Blob Storage to upload and download large media files to the cloud.</p>
<p>At first, I was trying to follow <a id="glbx" title="this link" href="http://blogs.msdn.com/jnak/archive/2008/10/29/walkthrough-simple-blob-storage-sample.aspx">this link</a> as much as possible to get up and running.  The walk-through seemed simple and helped me to quickly understand how to use Blob Storage.  However, once I created the new Azure service in my existing solution I was quickly led to make decisions that influenced the web project I had already created:</p>
<ol>
<li>In order to get the Azure processes to run in the background while my web application ran, I had to set the Cloud Service project as the startup project. <a href="http://yeahstu.files.wordpress.com/2009/12/setasstartupproject.jpg"><img class="aligncenter size-medium wp-image-36" title="SetAsStartupProject" src="http://yeahstu.files.wordpress.com/2009/12/setasstartupproject.jpg?" alt="Set As Startup Project" /></a></li>
<li>A Cloud Service project cannot just run by itselt, it requires a web role.  The simplest thing to do seemed to be to set this to my pre-existing web project.</li>
<li>This all worked well at first.  My web project recognized my local azure service and worked normally.  However, once I tried to upload files to my local Blob Storage I received errors.  It behaved as if there was an issue with the Trust Level that the web role runs under.</li>
</ol>
<p>Since Azure is still in CTP (meaning free) and I have a brand new account (meaning no pre-existing files have been uploaded), my solution was to test my web upload with a deployed, in &#8220;production&#8221;, Blob Storage service.  I updated my web.config file and fairly quickly was able to upload and download files from blob storage.  I was somewhat impressed with how easy it was to do.</p>
<p>Unfortunately, this created a whole new set of concerns.  Since I am forced to use my production account for Blob Storage, how can I test in my local environment going forward?  Once Azure is launched (reportedly on 02/01/2010), any testing I do will begin to incur significant costs and it will also interfere with production data.</p>
<p>After some deep thinking, some more research and stumbling across <a id="pqtj" title="this MSDN link" href="http://msdn.microsoft.com/en-us/library/dd320275.aspx">this MSDN link</a>, I believe I backed my way into the solution that Microsoft imagined in the first place.</p>
<p>Microsoft has allocated a specific development shared key for local blob storage.  Therefore, one only has to use these standard configuration settings in the local Blob Storage service (ServiceConfiguration.cscfg file).</p>
<div style="padding-bottom:12px;">
<div>&lt;ConfigurationSettings&gt;</div>
<div>&lt;Setting name=&#8221;AccountName&#8221; value=&#8221;devstoreaccount1&#8243; /&gt;</div>
<div>&lt;Setting name=&#8221;AccountSharedKey&#8221; value=&#8221;Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==&#8221; /&gt;</div>
<div>&lt;Setting name=&#8221;BlobStorageEndpoint&#8221; value=&#8221;http://127.0.0.1:10000/&#8221; /&gt;</div>
<div>&lt;/ConfigurationSettings&gt;</div>
</div>
<p>The piece of the puzzle that I was missing is that this Blob Storage service must run from outside my main solution.  Therefore, I put the Blob Storage service project in its own solution and attached it to a dummy web role.  When I run it, it starts the development Azure services and runs in the background.</p>
<p>Attaching to the Blob Storage service from my web project is easy.  I just make sure that I have the below configuration set in my web.config file.</p>
<div style="padding-bottom:12px;">
<div>&lt;configuration&gt;</div>
<div>&lt;appSettings&gt;</div>
<div>&lt;add key = &#8220;AccountName&#8221; value=&#8221;devstoreaccount1&#8243;/&gt;</div>
<div>&lt;add key = &#8220;AccountSharedKey&#8221; value=&#8221;Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==&#8221;/&gt;</div>
<div>&lt;add key=&#8221;BlobStorageEndpoint&#8221; value=&#8221;<a href="http://127.0.0.1:10000"></a>http://127.0.0.1:10000&#8243;/&gt;</div>
<div>&lt;/appSettings&gt;</div>
<div>&lt;configuration&gt;</div>
</div>
<p>Now I can test uploads and downloads on my local machine.</p>
<p><strong>Special Note</strong>:  The Windows Azure development environment uses a different URI format to access files.  In production, files stored in public containers can be accessed via this format:</p>
<blockquote><p>http://&lt;account-name&gt;.blob.core.windows.net/&lt;resource-path&gt;</p></blockquote>
<p>However, in the development environment, a different format is used:</p>
<blockquote><p>http://&lt;local-machine-address&gt;:&lt;port&gt;/&lt;account-name&gt;/&lt;resource-path&gt;</p></blockquote>
<p>See <a href="http://msdn.microsoft.com/en-us/library/dd179425.aspx">this MSDN Article</a> for more information.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yeahstu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yeahstu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yeahstu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yeahstu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yeahstu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yeahstu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yeahstu.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.yeahstu.com&amp;blog=10180494&amp;post=37&amp;subd=yeahstu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.yeahstu.com/2009/12/13/my-first-experience-with-microsoft-windows-azure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2eb31b18606f0405b1e28dbda6c974fc?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">Stu</media:title>
		</media:content>

		<media:content url="http://yeahstu.files.wordpress.com/2009/12/setasstartupproject.jpg?" medium="image">
			<media:title type="html">SetAsStartupProject</media:title>
		</media:content>
	</item>
	</channel>
</rss>