<?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>Greg's two cents on Computing</title>
	<atom:link href="http://gcorbin.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gcorbin.wordpress.com</link>
	<description>Just some thought's on software development and engineering</description>
	<lastBuildDate>Sun, 25 Sep 2011 09:18:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gcorbin.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Greg's two cents on Computing</title>
		<link>http://gcorbin.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gcorbin.wordpress.com/osd.xml" title="Greg&#039;s two cents on Computing" />
	<atom:link rel='hub' href='http://gcorbin.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Having fun with Pinvoke</title>
		<link>http://gcorbin.wordpress.com/2009/04/30/having-fun-with-pinvoke/</link>
		<comments>http://gcorbin.wordpress.com/2009/04/30/having-fun-with-pinvoke/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 12:49:19 +0000</pubDate>
		<dc:creator>gcorbin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Pinvoke]]></category>
		<category><![CDATA[Windows API]]></category>

		<guid isPermaLink="false">http://gcorbin.wordpress.com/?p=70</guid>
		<description><![CDATA[The .Net libraries have many built-in objects that can be used to create most types of programs for windows. In most cases, the typical developer would not need anything more. However, there are a few cases in which a direct call to a COM object is needed. The ability to call objects that are not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=70&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The .Net libraries have many built-in objects that can be used to create most types of programs for windows. In most cases, the typical developer would not need anything more. However, there are a few cases in which a direct call to a COM object is needed. The ability to call objects that are not .Net from within .Net is called Interoperability. InterOp calls are often used in cases where a .Net program needs to communicate with older software that is based on COM. It can also be used to make direct calls to the windows Kernel. In these cases, a common term among .Net developers is the Pinvoke. Using a Pinvoke is very similar to calling a Windows API from VB6. You need to copy the declaration and import the library and then you can use it. The compiler sees code that uses Pinvoke as being unsafe code. This means that you will need to set the project properties for your code to allow compile unsafe code. The declarations and constants used for these calls can all be found at <a href="http://www.pinvoke.net/" target="_blank">http://www.pinvoke.net/</a>. Some sample .Net code that uses a Pinvoke can be seen below. This code is using the Windows Kernel to create a file.</p>
<p> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;color:blue;font-size:10pt;">using</span><span style="font-family:&quot;font-size:10pt;"> System;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;color:blue;font-size:10pt;">using</span><span style="font-family:&quot;font-size:10pt;"> System.Collections.Generic;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;color:blue;font-size:10pt;">using</span><span style="font-family:&quot;font-size:10pt;"> System.Text;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;color:blue;font-size:10pt;">namespace</span><span style="font-family:&quot;font-size:10pt;"> CreateFilewithPinInvoke</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;">{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>    </span><span style="color:blue;">class</span> <span style="color:#2b91af;">FileReader</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>    </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span><span style="color:blue;">const</span> <span style="color:blue;">uint</span> GENERIC_READ = 0&#215;80000000;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span><span style="color:blue;">const</span> <span style="color:blue;">uint</span> FILE_ALL_ACCESS = 0&#215;80000000;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span><span style="color:blue;">const</span> <span style="color:blue;">uint</span> OPEN_EXISTING = 3;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span><span style="color:blue;">const</span> <span style="color:blue;">uint</span> OPEN_ALWAYS = 3;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span>System.<span style="color:#2b91af;">IntPtr</span> handle;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span>[System.Runtime.InteropServices.<span style="color:#2b91af;">DllImport</span>(<span style="color:#a31515;">"kernel32"</span>, SetLastError = <span style="color:blue;">true</span>)]</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span><span style="color:blue;">static</span> <span style="color:blue;">extern</span> <span style="color:blue;">unsafe</span> System.<span style="color:#2b91af;">IntPtr</span> CreateFile</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span>(</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">string</span> FileName,<span>          </span><span style="color:green;">// file name</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">uint</span> DesiredAccess,<span>       </span><span style="color:green;">// access mode</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">uint</span> ShareMode,<span>           </span><span style="color:green;">// share mode</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">uint</span> SecurityAttributes,<span>  </span><span style="color:green;">// Security Attributes</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">uint</span> CreationDisposition, <span style="color:green;">// how to create</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">uint</span> FlagsAndAttributes,<span>  </span><span style="color:green;">// file attributes</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">int</span> hTemplateFile<span>         </span><span style="color:green;">// handle to template file</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>    </span><span>    </span>);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span>[System.Runtime.InteropServices.<span style="color:#2b91af;">DllImport</span>(<span style="color:#a31515;">"kernel32"</span>, SetLastError = <span style="color:blue;">true</span>)]</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span><span style="color:blue;">static</span> <span style="color:blue;">extern</span> <span style="color:blue;">unsafe</span> <span style="color:blue;">bool</span> CloseHandle</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span>(</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span>System.<span style="color:#2b91af;">IntPtr</span> hObject <span style="color:green;">// handle to object</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span>);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span><span style="color:blue;">public</span> <span style="color:blue;">bool</span> Open(<span style="color:blue;">string</span> FileName)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:green;">// open the existing file for reading<span>       </span></span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span>handle = CreateFile(FileName,FILE_ALL_ACCESS,0,0, OPEN_ALWAYS,0,0);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">if</span> (handle != System.<span style="color:#2b91af;">IntPtr</span>.Zero)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>                </span><span style="color:blue;">return</span> <span style="color:blue;">true</span>;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">else</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>                </span><span style="color:blue;">return</span> <span style="color:blue;">false</span>;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span><span style="color:blue;">public</span> <span style="color:blue;">bool</span> Close()</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">return</span> CloseHandle(handle);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>    </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>    </span><span style="color:blue;">class</span> <span style="color:#2b91af;">Program</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>    </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span><span style="color:blue;">static</span> <span style="color:blue;">int</span> Main(<span style="color:blue;">string</span>[] args)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">if</span> (args.Length != 1)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>                </span>System.<span style="color:#2b91af;">Console</span>.WriteLine(<span style="color:#a31515;">&#8220;Usage : CreateFile.exe &lt;FileName&gt;&#8221;</span>);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>                </span><span style="color:blue;">return</span> 1;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>   </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:#2b91af;">FileReader</span> fr = <span style="color:blue;">new</span> <span style="color:#2b91af;">FileReader</span>();</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">if</span> (fr.Open(args[0]))</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>                </span>System.<span style="color:#2b91af;">Console</span>.WriteLine(<span style="color:#a31515;">&#8220;Created requested file&#8221;</span>);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>                </span><span style="color:blue;">return</span> 0;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span><span style="color:blue;">else</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>                </span>System.<span style="color:#2b91af;">Console</span>.WriteLine(<span style="color:#a31515;">&#8220;Failed to create file!&#8221;</span>);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>                </span><span style="color:blue;">return</span> 1;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>            </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>        </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;font-size:10pt;"><span>    </span>}</span></p>
<p><span style="font-family:&quot;font-size:10pt;">}</span></p>
<p>-Enjoy.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gcorbin.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gcorbin.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gcorbin.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gcorbin.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gcorbin.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gcorbin.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gcorbin.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gcorbin.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gcorbin.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gcorbin.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gcorbin.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gcorbin.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gcorbin.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gcorbin.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=70&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gcorbin.wordpress.com/2009/04/30/having-fun-with-pinvoke/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/34683c0775bab35a89e4eb0a7742a63d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gcorbin</media:title>
		</media:content>
	</item>
		<item>
		<title>Failing with software and how it can be fun.</title>
		<link>http://gcorbin.wordpress.com/2009/03/24/failing-with-software-and-how-it-can-be-fun/</link>
		<comments>http://gcorbin.wordpress.com/2009/03/24/failing-with-software-and-how-it-can-be-fun/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 13:38:11 +0000</pubDate>
		<dc:creator>gcorbin</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Failed Software projects]]></category>
		<category><![CDATA[Project Proposal]]></category>

		<guid isPermaLink="false">http://gcorbin.wordpress.com/?p=59</guid>
		<description><![CDATA[Several months ago I had the experience of pitching the design for an elegant marketing web site to a group of old school farmers. The need for such a tool was advertised in my local town newspaper. The group of local farmers coordinates a local farmers market that runs from spring to fall every year. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=59&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Several months ago I had the experience of pitching the design for an elegant marketing web site to a group of old school farmers. The need for such a tool was advertised in my local town newspaper. The group of local farmers coordinates a local farmers market that runs from spring to fall every year. They were given a small grant from the state government to help improve the farmers market. So, I decided to give it a shot. My first instincts were to determine what the requirements of the web site were to be. I emailed the individual that posted the need for the web site, looking for a meeting to discuss requirements. I was told all the information that I needed was posted in the request for the web site. See the notice below:</span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;">Carver Reporter &#8211; </span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;">Thanks to the Massachusetts Department of Agriculture, the town of Carver was awarded a grant of $4,000 to help promote the Farmers’ Market through an official Web site and accompanying brochures.</span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;">With the recent economic crisis in the state, further grant monies may not be available for upcoming seasons, and thus the Carver Agricultural Commission (AgCom) is looking to utilize this grant to the fullest extent. The grant monies must be used within a certain timeframe or they will be lost.</span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;">The grant parameters are specific in that $2,000 is allocated for Web site development and $2,000 for the brochure. The AgCom is looking for help from the community. Residents who have experience and creativity in either or both of these areas are encouraged to apply to the AgCom with design ideas and proposals.</span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;">“The Farmers’ Market has become a key economic and social component of the town. The brochure will help the town advertise next year’s market and may help with fundraising, getting new venders, etcetera,” Director of Planning and Community Development Jack Hunter said. “The Web page will allow online updates and interactive approaches to the market for next year, as well.”</span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;">Hunter said customers could access online farmers’ market coupons through the site, as well as notify them of upcoming specials and events such as the pony rides, hay rides or the Fall Harvest Festival. Web access has proven to be a valuable marketing tool for communities that have farmers’ markets.</span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;">AgCom members felt that keeping the work local for a local community market was important and hope to receive interest in developing the tools from several Carver residents.</span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 .5in;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;">The deadline for both proposals is Monday, Nov. 10. Interviews will be scheduled for the Nov. 17 AgCom meeting in Meeting Room 4 at the town hall.</span></span></p>
<p class="MsoNormal" style="margin:0 81pt 0 0;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;"> </span></span> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Wow, not really much to go on. I pulled the following points from the notice:</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<h1 style="margin:0;"><span style="font-size:10pt;"><em><span style="font-family:Times New Roman;">Functional Requirements</span></em></span></h1>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;">1. “The Web page will allow online updates and interactive approaches to the market for next year, as well.”</span></span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;">2. Customers could access online farmers’ market coupons through the site</span></span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoBodyText" style="margin:0;"><span style="font-size:x-small;font-family:Times New Roman;">3. Notify users of upcoming specials and events such as the pony rides, hayrides or the Fall Harvest Festival.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<h1 style="margin:0;"><span style="font-size:10pt;"><em><span style="font-family:Times New Roman;">Non-Functional Requirements</span></em></span></h1>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;"><span style="font-family:Times New Roman;">1. The web site should prove to be a valuable marketing tool for communities that have farmers’ markets.</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">My next step was to research other sites that were designed with farmers in mind. After I spent a few days researching this, I felt I was ready to draft a proposal. In my proposal, I outline the details on how the site could be laid out, what functionality it could provide, how people would find the site, how it would be maintained and updated, what technologies would be used and what documentation I would provide. The full proposal can be found <a title="Farmers Market Project Proposal" href="http://gcorbin.files.wordpress.com/2009/03/projectproposal.doc" target="_self">here</a>. Any way, I felt that I’d covered everything needed. The last step was just to pitch my proposal and hope for the best. I had no idea what other professionals would be applying for the same project so I did my best to cover everything I could. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">The day of the proposal came. I was asked to give my pitch in front of about 16 local farmers and others at the town hall. All was going well, until I started with my written proposal. It was then that I discovered that no one in that room had ever seen my proposal. I was thinking how could this be, I emailed it to the head of the market and asked him to forward it to all that would be interested. I later found that he never forwarded it because none of the local farmers in that room had regularly used email accounts. They all had ones that were setup by the town for them, but it was very unlikely that any of them knew how to check it. It was Ok, I had printed out several copies before the meeting and I could just hand them out. So, I continued to give pitch my proposal and I spoke about all the items in it and covered everything I could think of. I was extra careful to make sure I used as many laymen terms as possible, keeping my audience in mind. So after speaking for about 30 minutes, I final started to get some feedback in the form of questions. First question was what is a URL? Ok I said to myself, these are farmers and I missed that one, I should have used the term web site address. As more and more questions came in, It quickly became obvious that most of these farmers had no idea about what it took to build a web site never mind the reason it would take 2 months to do it. After all, its just words on computer screen, what’s the big deal? </span></p>
<p class="MsoNormal" style="margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Any way, once my painful proposal was complete, I was asked to sit in a waiting room while they listen to other proposals, just incase questions about my proposal came up. I learnt that there was only one other proposal they had to review. After that was complete we were both thanked for spending the time and sent on our way. Later I came to learn that the second candidate was an active member within the community and was well known and liked by all the local farmers. I should have guessed based on all the laughter I heard while waiting for the second proposal to complete. In any case, I never heard back from the committee. I did email them as a follow up, but still have yet to hear anything. So, whether I lost the project due to small town politics or failing to convey a technical topic to lay people, I’ll never know. After this experience, I can’t help to remember that old saying “It’s not what you know, it&#8217;s who you know!” In any case, I view it as a very positive experience. It helped me grow as a professional and learn some painful lessons of politics at very little cost.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">In case you were wondering, the web site that was proposed still has not been built. Last I heard, they decided to scrap the project and go with printing flyers instead. I guess we can add this one to that list of 95% of all projects that fail.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Enjoy.</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gcorbin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gcorbin.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gcorbin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gcorbin.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gcorbin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gcorbin.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gcorbin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gcorbin.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gcorbin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gcorbin.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gcorbin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gcorbin.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gcorbin.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gcorbin.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=59&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gcorbin.wordpress.com/2009/03/24/failing-with-software-and-how-it-can-be-fun/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/34683c0775bab35a89e4eb0a7742a63d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gcorbin</media:title>
		</media:content>
	</item>
		<item>
		<title>Data binding with generic dictionary objects</title>
		<link>http://gcorbin.wordpress.com/2009/01/30/data-binding-with-generic-dictionary-objects/</link>
		<comments>http://gcorbin.wordpress.com/2009/01/30/data-binding-with-generic-dictionary-objects/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 03:29:29 +0000</pubDate>
		<dc:creator>gcorbin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Databinding]]></category>
		<category><![CDATA[Dictionary]]></category>
		<category><![CDATA[Generics]]></category>

		<guid isPermaLink="false">http://gcorbin.wordpress.com/?p=56</guid>
		<description><![CDATA[This issue caused me some pain recently. So, after I spent some time to figure out how to do this, I figured it would be good to share it with the community. The problem is that I had to created my own class called Item. This class was meant to contain all properties and methods [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=56&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">This issue caused me some pain recently. So, after I spent some time to figure out how to do this, I figured it would be good to share it with the community. The problem is that I had to created my own class called Item. This class was meant to contain all properties and methods on an Item object. I then wanted to have a collection of Item objects, so I created a generic dictionary that contained the Item object as the Kvalue for the generic dictionary. The problem comes when you try to databind this collection to a control. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Many of the WinForm controls only support databinding to an IList. To make the generic dictionary work here, we need to use the BindingSource Object (BindingSource implements IList). The next trick is that the DisplayMember needs to be set to a string “Value” and the ValueMember set to a string “Key”. However, “Value” will attempt to display the Item object as a string, so to get around this, we need to override the ToString method of the Item object to display the property of that class. It’s easiest to understand this by seeing a sample. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">void</span> Form1_Load(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">EventArgs</span> e)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>  </span><span style="color:green;">//Create a Generic Dictionary.</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>  </span><span style="color:#2b91af;">Dictionary</span>&lt;<span style="color:blue;">int</span>,<span style="color:#2b91af;">Item</span>&gt; Items = <span style="color:blue;">new</span> <span style="color:#2b91af;">Dictionary</span>&lt;<span style="color:blue;">int</span>,<span style="color:#2b91af;">Item</span>&gt;();</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>  </span><span style="color:green;">//Load the dictionary</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>  </span>Items.Add(1, <span style="color:blue;">new</span> <span style="color:#2b91af;">Item</span>(<span style="color:#a31515;">&#8220;FirstItem&#8221;</span>, 1));</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>  </span>Items.Add(2, <span style="color:blue;">new</span> <span style="color:#2b91af;">Item</span>(<span style="color:#a31515;">&#8220;SecondItem&#8221;</span>, 2));</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>  </span>Items.Add(3, <span style="color:blue;">new</span> <span style="color:#2b91af;">Item</span>(<span style="color:#a31515;">&#8220;ThirdItem&#8221;</span>, 3));</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>  </span>Items.Add(4, <span style="color:blue;">new</span> <span style="color:#2b91af;">Item</span>(<span style="color:#a31515;">&#8220;FourthItem&#8221;</span>, 4));</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>  </span><span style="color:green;">//Bind the generic dictionary</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>  </span>comboBox1.DataSource = <span style="color:blue;">new</span> <span style="color:#2b91af;">BindingSource</span>(Items, <span style="color:blue;">null</span>);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>  </span><span style="color:green;">//For this to work, the Item.cs class needs to </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span style="color:green;">  //override the ToString() method.</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>  </span>comboBox1.DisplayMember = <span style="color:#a31515;">&#8220;Value&#8221;</span>;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>  </span>comboBox1.ValueMember = <span style="color:#a31515;">&#8220;Key&#8221;</span>;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;">}</span><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:&quot;">class</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:#2b91af;">Item</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>    </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span><span style="color:blue;">private</span> <span style="color:blue;">string</span> _itemName;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span><span style="color:blue;">private</span> <span style="color:blue;">int</span> _itemId;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span><span style="color:green;">//constructor</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span><span style="color:blue;">public</span> Item(<span style="color:blue;">string</span> strItemName, <span style="color:blue;">int</span> itemId)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>            </span><span style="color:blue;">this</span>._itemName = strItemName;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>            </span><span style="color:blue;">this</span>._itemId = itemId;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span><span style="color:blue;">public</span> <span style="color:blue;">string</span> ItemName</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>            </span><span style="color:blue;">get</span>{ <span style="color:blue;">return</span> _itemName; }</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span><span style="color:blue;">public</span> <span style="color:blue;">int</span> ItemId</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>            </span><span style="color:blue;">get</span>{ <span style="color:blue;">return</span> _itemId; }</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span><span style="color:green;">//Override ToString to the itemName property.</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span><span style="color:blue;">public</span> <span style="color:blue;">override</span> <span style="color:blue;">string</span> ToString()</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>            </span><span style="color:blue;">return</span> _itemName;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>    </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;">The compelte source code for this demo can be downloaded <a href="http://www.geocities.com/gcorbin587/downloads/SampleGenericsWithDataBinding.zip" target="_blank">here</a>.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;">Enjoy.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gcorbin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gcorbin.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gcorbin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gcorbin.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gcorbin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gcorbin.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gcorbin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gcorbin.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gcorbin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gcorbin.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gcorbin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gcorbin.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gcorbin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gcorbin.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=56&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gcorbin.wordpress.com/2009/01/30/data-binding-with-generic-dictionary-objects/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/34683c0775bab35a89e4eb0a7742a63d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gcorbin</media:title>
		</media:content>
	</item>
		<item>
		<title>The Monty Hall Paradox</title>
		<link>http://gcorbin.wordpress.com/2008/12/19/the-monty-hall-paradox/</link>
		<comments>http://gcorbin.wordpress.com/2008/12/19/the-monty-hall-paradox/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 22:12:25 +0000</pubDate>
		<dc:creator>gcorbin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Software Puzzles]]></category>

		<guid isPermaLink="false">http://gcorbin.wordpress.com/?p=51</guid>
		<description><![CDATA[Every now and then, I find myself missing the simplistic days of higher education. I miss the enjoyment of studying computational theory and all those fun brainteaser puzzles that such topics often bring to light. Recently, while reading one of my favorite blogs (blog.stackoverflow.com), I can across a posting / podcast that had references to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=51&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Every now and then, I find myself missing the simplistic days of higher education. I miss the enjoyment of studying computational theory and all those fun brainteaser puzzles that such topics often bring to light. Recently, while reading one of my favorite blogs (blog.stackoverflow.com), I can across a posting / podcast that had references to a few such puzzles.<span>  </span>Some of these puzzles I’ve already heard of, but there was one that I’ve never come across. It s called “The Monty Hall Paradox”. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">The puzzle is about an old game show where the host (Monty Hall), would give contestants a choice of 3 doors. One of the doors would have a new car and the other 2 would have a goat. The contestant would choose 1 door, then Monty would open 1 of the other 2 remaining door revealing a 1 of the goats. He would then give the contestant the option to keep their selected door or switch doors. So the question is would it be best to keep your original door or switch doors? </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">So, my first answer to this is that it doesn’t matter. 2 doors remaining should be a 50/50 chance. This is what most people give for an answer to this puzzle also. However, after studying it further it became apparent that the answer was not this simple. Several other people are posting the true answer is that its better to switch doors. The odds of getting the car by switch doors are 66%. So, instead of just reading more and more on the topic, I decide to write a simple program that I could use to test this out. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">I wrote the code in .NET (of course). It’s a small program 30 lines or less. I ran the code over 1 million iterations and to my surprise, the odds were 66.34% of getting car if the program swaps doors at the end. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Check out the <a title="MontyHallPuzzle" href="http://www.geocities.com/gcorbin587/downloads/MontyHallPuzzle.zip" target="_blank">code</a>. Check out addition puzzles and feel free to share.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">Find more on the monty hall puzzle <a href="http://www.codingthewheel.com/archives/21-and-the-monty-hall-paradox" target="_blank">here</a>.</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Enjoy.</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gcorbin.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gcorbin.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gcorbin.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gcorbin.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gcorbin.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gcorbin.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gcorbin.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gcorbin.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gcorbin.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gcorbin.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gcorbin.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gcorbin.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gcorbin.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gcorbin.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=51&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gcorbin.wordpress.com/2008/12/19/the-monty-hall-paradox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/34683c0775bab35a89e4eb0a7742a63d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gcorbin</media:title>
		</media:content>
	</item>
		<item>
		<title>How to deal with “Pointy Hair Managers”….</title>
		<link>http://gcorbin.wordpress.com/2008/11/30/pointy-hair-managers/</link>
		<comments>http://gcorbin.wordpress.com/2008/11/30/pointy-hair-managers/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 03:30:16 +0000</pubDate>
		<dc:creator>gcorbin</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[management]]></category>

		<guid isPermaLink="false">http://gcorbin.wordpress.com/?p=45</guid>
		<description><![CDATA[It’s the same old question that you hear time after time, why should we buy a control package when we have many capable developers on staff? It’s a question that is often posed by inexperienced management trying to save a few bucks. For such management, it’s often a rhetorical question because what they are really [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=45&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">It’s the same old question that you hear time after time, why should we buy a control package when we have many capable developers on staff? It’s a question that is often posed by inexperienced management trying to save a few bucks. For such management, it’s often a rhetorical question because what they are really trying to say is “no, it’s a waste of money!” As all us software engineers know, in reality buying control packs will save lots of money in the long run. So, the issue becomes how do you deal with such management? Unfortunately, there is no simple answer. I’ve found in my experience that demonstrating the savings by comparing the time needed for you to build a control vs. the cost of the control is often not enough to convince anyone. Only after you’ve done the coding, support, documentation, and enhancements that these managers see the light. Sometime, no matter how much you debate something, some people will not budge. Whether is sheer stubbornness or just plain stupidity it does not matter. This question really boils down to the age old question of “how do you give someone wisdom without them having to gained it through experience?” So my advice when dealing with “pointy haired managers” is to just run! If you have the patience to help them understand, then that’s great. It may benefit you in the long run, but most likely it will just ware you down. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">At the end of the day, just remember that they are the ones signing your paycheck. If that’s no longer enough of a reason to smile and just get along with them, then its time for a new job.</span></p>
<p class="MsoNormal" style="margin:0;"><span><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gcorbin.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gcorbin.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gcorbin.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gcorbin.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gcorbin.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gcorbin.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gcorbin.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gcorbin.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gcorbin.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gcorbin.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gcorbin.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gcorbin.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gcorbin.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gcorbin.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=45&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gcorbin.wordpress.com/2008/11/30/pointy-hair-managers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/34683c0775bab35a89e4eb0a7742a63d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gcorbin</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows Workflow Foundation (WF) and you&#8230;</title>
		<link>http://gcorbin.wordpress.com/2008/10/28/windows-workflow-foundation-wf-and-you/</link>
		<comments>http://gcorbin.wordpress.com/2008/10/28/windows-workflow-foundation-wf-and-you/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 15:52:23 +0000</pubDate>
		<dc:creator>gcorbin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WF]]></category>
		<category><![CDATA[Workflow foundation]]></category>

		<guid isPermaLink="false">http://gcorbin.wordpress.com/?p=39</guid>
		<description><![CDATA[I&#8217;ve recently spent some time playing around with Windows Workflow Foundation (WF). I wanted to see why all these magazines are praising it as a great new technology, after all workflow based technologies have been around for many decades now. It didn&#8217;t take to long for me to realize how cool WF really is. For [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=39&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">I&#8217;ve recently spent some time playing around with Windows Workflow Foundation (WF). </span></span><span style="font-size:small;"><span style="font-family:Times New Roman;">I wanted to see why all these magazines are praising it as a great new technology, after all workflow based technologies have been around for many decades now. It didn&#8217;t take to long for me to realize how cool WF really is. For beginners it has two workflow models that can be used. The first is the &#8220;Sequential Workflow&#8221; and the second is called the &#8220;State machine workflow&#8221;. Both of these models allow you to use the same set of tools to create them. The big difference when trying to determine which to use needs to be based on your line of business. One of the big deciding factors that I&#8217;ve found is based on the amount of time needed for the workflow to process. If the process is going to be a quick inline sequential thought, then &#8220;Sequential Workflow&#8221; is what you want. If the time to process the workflow is going to involve state changes and possibly long running decision points, then &#8220;state machine workflow&#8221; is for you.</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">In any case, when digging into workflow it exciting to notice the many tasks and controls that is available to developers. The greatest assets that I’ve found with this are the tools that Microsoft gives developers for creating and maintaining workflows. These tools are far better than anything else I&#8217;ve seen.</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">If you haven’t check into WF yet, I strongly recommend it. The best place I&#8217;ve found for a good intro to it is the DNR TV series on WF. It’s very helpful and informative.</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">You can find that at <a title="http://www.dnrtv.com" href="http://www.dnrtv.com">http://www.dnrtv.com</a></span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;">Look in the archives section.</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Enjoy.</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gcorbin.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gcorbin.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gcorbin.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gcorbin.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gcorbin.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gcorbin.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gcorbin.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gcorbin.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gcorbin.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gcorbin.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gcorbin.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gcorbin.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gcorbin.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gcorbin.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=39&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gcorbin.wordpress.com/2008/10/28/windows-workflow-foundation-wf-and-you/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/34683c0775bab35a89e4eb0a7742a63d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gcorbin</media:title>
		</media:content>
	</item>
		<item>
		<title>The advent of Silverlight 2.0</title>
		<link>http://gcorbin.wordpress.com/2008/07/30/the-advent-of-silverlight-20/</link>
		<comments>http://gcorbin.wordpress.com/2008/07/30/the-advent-of-silverlight-20/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 13:59:08 +0000</pubDate>
		<dc:creator>gcorbin</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://gcorbin.wordpress.com/?p=36</guid>
		<description><![CDATA[The time has finally come. Now a client-side framework that gives .NET developers the same power and flexibility as Flash has finally arrived. Silverlight 1.0 has introduced this technology to us, but it still required the developer to work with javascript and forced us to remain bound to its limitations. Silverlight 2.0 applications can be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=36&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">The time has finally come. Now a client-side framework that gives .NET developers the same power and flexibility as Flash has finally arrived. Silverlight 1.0 has introduced this technology to us, but it still required the developer to work with javascript and forced us to remain bound to its limitations. Silverlight 2.0 applications can be entirely written in any of the managed languages. Programming with Javascript is not needed. The framework will handle it for you. The client-side output for Silverlight is all based on the &lt;Object&gt; tag. This means that the source for the client application can appear to be as simple as an HTML file that has nothing but a reference to Silverlight and an &lt;Object&gt; tag. The way this works is that Silverlight 2.0 has introduced a new file type. This is called a ZAP (XAP) file. The zap file is nothing but a zip file with a different name. If you rename it zip, it will open with winzip and all the binary files will be presented. The binary files that are packaged in the zap file are a subset of the WPF framework and whatever assembly that you create for you Silverlight app. The feature set that is available to Silverlight 2.0 is amazing. Any type of Flash application can be built with Silverlight just as well. Goto </span><a href="http://silverlight.net/"><span style="font-size:small;font-family:Times New Roman;">http://silverlight.net</span></a><span style="font-size:small;font-family:Times New Roman;"> and see all the samples, you’ll be amazed.</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gcorbin.wordpress.com/36/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gcorbin.wordpress.com/36/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gcorbin.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gcorbin.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gcorbin.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gcorbin.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gcorbin.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gcorbin.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gcorbin.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gcorbin.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gcorbin.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gcorbin.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gcorbin.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gcorbin.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gcorbin.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gcorbin.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=36&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gcorbin.wordpress.com/2008/07/30/the-advent-of-silverlight-20/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/34683c0775bab35a89e4eb0a7742a63d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gcorbin</media:title>
		</media:content>
	</item>
		<item>
		<title>Tools on top of Tools&#8230;.</title>
		<link>http://gcorbin.wordpress.com/2008/06/30/tools-on-top-of-tools/</link>
		<comments>http://gcorbin.wordpress.com/2008/06/30/tools-on-top-of-tools/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 20:26:14 +0000</pubDate>
		<dc:creator>gcorbin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://gcorbin.wordpress.com/?p=35</guid>
		<description><![CDATA[It&#8217;s funny how we all invent various tools to simplify life, only to find that learning to manage and use a new tool only complicates things. I&#8217;ve recently spent a bit of time creating a new tool. The purpose of this tool is to simplify the task of tracking time and entering it into yet [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=35&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s funny how we all invent various tools to simplify life, only to find that learning to manage and use a new tool only complicates things. I&#8217;ve recently spent a bit of time creating a new tool. The purpose of this tool is to simplify the task of tracking time and entering it into yet another tool. Throughout the design and coding of this tool, I found that its almost impossible to create a tool that will make everyone happy. I guess the lesson learned is that sometimes its just better to deal with tool(evil) that you know then to deal with the tool(evil) that you dont.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gcorbin.wordpress.com/35/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gcorbin.wordpress.com/35/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gcorbin.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gcorbin.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gcorbin.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gcorbin.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gcorbin.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gcorbin.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gcorbin.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gcorbin.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gcorbin.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gcorbin.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gcorbin.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gcorbin.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gcorbin.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gcorbin.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=35&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gcorbin.wordpress.com/2008/06/30/tools-on-top-of-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/34683c0775bab35a89e4eb0a7742a63d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gcorbin</media:title>
		</media:content>
	</item>
		<item>
		<title>Going into the (Silver)Light.</title>
		<link>http://gcorbin.wordpress.com/2008/04/29/going-into-the-silverlight/</link>
		<comments>http://gcorbin.wordpress.com/2008/04/29/going-into-the-silverlight/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 14:07:54 +0000</pubDate>
		<dc:creator>gcorbin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Ink]]></category>

		<guid isPermaLink="false">http://gcorbin.wordpress.com/?p=34</guid>
		<description><![CDATA[By now everyone has seen Microsoft’s latest web technology, Silverlight. If you haven’t you got to go check it out. Many blogs I’ve seen have compared it to Macromedia Flash. But, I’ve got to tell you that it differences are just as great as its similarities to Flash. I’ve done work in Flash in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=34&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">By now everyone has seen Microsoft’s latest web technology, Silverlight. If you haven’t you got to go check it <a title="out" href="http://www.silverlight.net">out</a>. Many blogs I’ve seen have compared it to Macromedia Flash. But, I’ve got to tell you that it differences are just as great as its similarities to Flash. I’ve done work in Flash in the past and it is a great technology. But, Silverlight is in position to become new technology to dominate the client-side browser. There are a few reasons for this. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">First, the learning curve for Silverlight is much lower for developers that already understand how to use the .Net Framework. Even thou Silverlight 1.0 only supports javascript , the XAML syntax is exactly the same as if you were creating a desktop WPF application. Once Silverlight 2.0 is out, the learning curve will be even less as that version will support managed C#.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Second, the IDE for creating Silverlight applications is Visual Studio. This is the same development tool that many developers use for building other windows applications.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Third, the event model in Silverlight is the same as ASP.NET. Flash uses an event model that is based on a storyboard that repeats on a specified interval. Silverlight has the typical OnLoad, OnClick, etc. In addition, Silverlight does have a storyboard control that you can use if you need the events to all fire as in Flash.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">After doing a fare amount of research into Silverlight 1.0, I decided it give it a try. I wanted to see how well, if at all, it could integrate with my existing ASP.NET site. I found that it ties in very easily. For ease of use, I created an ASP.NET Server control that embeds all the client-side JS files and XAML files needed for my Silverlight application. Then all that I needed to do was to drop that server control on my ASP.NET page and set a few parameters. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">My Silverlight app is very simple. I decided to make use of the WPF Ink class to create a Silverlight Signature Control. You can check it a live demo and find the source code for it <a title="here" href="http://corbin.bounceme.net/Projects.aspx" target="_self">here</a>. One of the nice things about this control is that is demonstrates several things. With this sample you can see to following:</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<ul style="margin-top:0;" type="disc">
<li class="MsoNormal"><span style="font-size:small;font-family:Times New Roman;">Creating an ASP.Net Server control</span></li>
<li class="MsoNormal"><span style="font-size:small;font-family:Times New Roman;">Working with embedded JavaScript resources</span></li>
<li class="MsoNormal"><span style="font-size:small;font-family:Times New Roman;">Embedding XAML for use with Silverlight.</span></li>
<li class="MsoNormal"><span style="font-size:small;font-family:Times New Roman;">Creating a Silverlight application</span></li>
</ul>
<p class="MsoNormal" style="margin:0 0 0 0.25in;"><span style="font-size:small;font-family:Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Enjoy.</span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gcorbin.wordpress.com/34/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gcorbin.wordpress.com/34/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gcorbin.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gcorbin.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gcorbin.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gcorbin.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gcorbin.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gcorbin.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gcorbin.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gcorbin.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gcorbin.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gcorbin.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gcorbin.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gcorbin.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gcorbin.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gcorbin.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=34&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gcorbin.wordpress.com/2008/04/29/going-into-the-silverlight/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/34683c0775bab35a89e4eb0a7742a63d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gcorbin</media:title>
		</media:content>
	</item>
		<item>
		<title>Totally free asp.net web site in just 3 weeks</title>
		<link>http://gcorbin.wordpress.com/2008/03/31/totally-free-aspnet-web-site-in-just-3-weeks/</link>
		<comments>http://gcorbin.wordpress.com/2008/03/31/totally-free-aspnet-web-site-in-just-3-weeks/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 14:23:28 +0000</pubDate>
		<dc:creator>gcorbin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[build web your own site]]></category>

		<guid isPermaLink="false">http://gcorbin.wordpress.com/?p=33</guid>
		<description><![CDATA[For the past 12 years I’ve been working as a software engineer, mostly building software for web applications. I’ve had many people over the years ask me “What is the URL for my personal site?”. Unfortunately, my response was always the same. “I don’t have a personal site”. It did make me think, how can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=33&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="margin:0;" class="MsoNormal"><font face="Times New Roman">For the past 12 years I’ve been working as a software engineer, mostly building software for web applications. I’ve had many people over the years ask me “What is the URL for my personal site?”. Unfortunately, my response was always the same. “I don’t have a personal site”. It did make me think, how can I claim to be a decent software engineer and not have a web site of my own. So, my project over the last month was to build myself a personal web site. I started by thinking about what type of content, layout, and features I’d like to have. After I make that list, I started looking into designing a site map and flows for my features. Not too long after this did I realize that this was going to take me a bit of time. Then I discovered the Microsoft web site starter kits. I spent some time looking through the various templates until I finally found on that kind of fit what I wanted. So, I took the “Personal Site Starter Kit” as my base for my new site. I spent a few weeks modifying it to fit my needs and then added all the content. That’s it. There you have it. A fully functional completed web site in 3 weeks. </font></p>
<p><font face="Times New Roman"></font></p>
<p style="margin:0;" class="MsoNormal"><font face="Times New Roman">The next step was that I needed to host this site somewhere. So, the answer was to take an old desktop that I was no longer using and to install IIS and Visual Studio Express. This would be the system that would host my site. Since I only have Windows XP Professional and SQL Server Express running there, that means that the site will be limited to only 10 concurrent connections, but that’s fine its just a personal site and not a e-commerce system. </font></p>
<p><font face="Times New Roman"></font></p>
<p style="margin:0;" class="MsoNormal"><font face="Times New Roman">Now comes the issue of how to get it available on the Internet. The first this that I needed to do was to expose my web server outside of my firewall. There are a few ways to do this. You can move the entire server out site by placing it in the DMZ or open a port to the application that needs access through the firewall or you can do some port forwarding and filters on the firewall. I decided to just open port 80 through the firewall so that IIS can communicate with the world. This exposes the bare minimum needed, but it does have some limitations, but for my needs its fine. Another issue that we need to fix is with the DHCP server. We should only be opening port 80 to the web server. To do this, our web server is going to need to have a static IP address within the LAN. Changing this on my internal LAN is simple, the real problem here is with the external ISP. We could call them and ask to have a static IP on the WAN, but that would cost a lot extra. Fortunately, we can install a piece of freeware called No-IP that will solve this problem for us. This freeware runs as a service on the web server and keeps an eye on the servers IP address. When the ISP DNS server changes it, this software will update the domain name for our site with the new IP that our ISP assigned. Now were ready for Internet traffic. </font></p>
<p><font face="Times New Roman"></font></p>
<p style="margin:0;" class="MsoNormal"><font face="Times New Roman">Now comes the last piece. What name do I give this site? If I want to choose my own domain name, that will cost a bit to register it. However, there is a free solution to that also. There is a free site that allows you to create an account that will redirect all Internet traffic to your site. You get to choose the host name and you can choose from a list of domain names that they own. This site also integrates with the freeware that update the domain name for us when the ISP changes our IP.<span>  </span>So, for this last step, just create an account with no-ip.com and pick a host and domain name. That it!</font></p>
<p style="margin:0;" class="MsoNormal"><font face="Times New Roman">So, you too can build a site free fully featured asp.net site in just 3 weeks.<span>  </span>Enjoy.</font></p>
<p><font face="Times New Roman"></font></p>
<p style="margin:0;" class="MsoNormal"><font face="Times New Roman">Links for this entry:</font></p>
<p><font face="Times New Roman"></font></p>
<p style="margin:0;" class="MsoNormal"><a href="http://corbin.bounceme.net/"><font face="Times New Roman">http://corbin.bounceme.net</font></a><font face="Times New Roman"><span>    </span>(My personal site)</font></p>
<p style="margin:0;" class="MsoNormal"><a href="http://www.no-ip.com/"><font face="Times New Roman">http://www.no-ip.com</font></a><font face="Times New Roman"><span>  </span>(Freeware and domain account site)</font></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gcorbin.wordpress.com/33/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gcorbin.wordpress.com/33/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gcorbin.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gcorbin.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gcorbin.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gcorbin.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gcorbin.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gcorbin.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gcorbin.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gcorbin.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gcorbin.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gcorbin.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gcorbin.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gcorbin.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gcorbin.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gcorbin.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gcorbin.wordpress.com&amp;blog=645144&amp;post=33&amp;subd=gcorbin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gcorbin.wordpress.com/2008/03/31/totally-free-aspnet-web-site-in-just-3-weeks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/34683c0775bab35a89e4eb0a7742a63d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gcorbin</media:title>
		</media:content>
	</item>
	</channel>
</rss>
