<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Factor Mystic &#187; programming</title>
	<atom:link href="http://factormystic.net/blog/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://factormystic.net/blog</link>
	<description></description>
	<lastBuildDate>Mon, 05 Jul 2010 18:27:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Aero.Wizard and Aero.Controls code pack released</title>
		<link>http://factormystic.net/blog/aero-wizard-and-aero-controls-code-pack-released</link>
		<comments>http://factormystic.net/blog/aero-wizard-and-aero-controls-code-pack-released#comments</comments>
		<pubDate>Fri, 20 Nov 2009 19:52:05 +0000</pubDate>
		<dc:creator>Factor Mystic</dc:creator>
				<category><![CDATA[aero.controls]]></category>
		<category><![CDATA[aero.wizard]]></category>
		<category><![CDATA[default-programs-editor]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[dpe-cross-site]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://factormystic.net/blog/?p=185</guid>
		<description><![CDATA[I'm pleased to announce the first stage of my roadmap to fully open Default Programs Editor with the release of Aero.Wizard and Aero.Controls. What are Aero.Wizard and Aero.Controls? Aero.Wizard is an WinForms implementation of an Aero Wizard Dialog. Aero.Controls is a package of a half dozen WinForms controls, intended for use with an Aero Wizard [...]]]></description>
			<content:encoded><![CDATA[<p>I'm pleased to announce the first stage of my roadmap to fully open <a href="http://defaultprogramseditor.com">Default Programs Editor</a> with the release of Aero.Wizard and Aero.Controls.</p>
<h3>What are Aero.Wizard and Aero.Controls?</h3>
<p>Aero.Wizard is an WinForms implementation of an Aero Wizard Dialog. Aero.Controls is a package of a half dozen WinForms controls, intended for use with an Aero Wizard Dialog. These are some of the components I wrote for the creation of Default Programs Editor 2.0 with the revised user interface, and I'm now freely releasing them to the public.</p>
<h3>Aero.Wizard:</h3>
<div class="wp-caption alignnone" style="width: 810px"><img title="Aero Wizard Info Screenshot" src="http://factormystic.net/utils/aero.wizard/wizard.png" alt="Aero Wizard Info Screenshot" width="800" height="530" /><p class="wp-caption-text">Aero.Wizard Info Screenshot</p></div>
<p>Aero.Wizard Features:</p>
<ul>
<li>History/Navigation handled automatically</li>
<li>Page contents are children of separate container controls, which can be created in design time like a regular Windows form</li>
<li>Glass title area degrades gracefully when running a theme without glass, or on XP</li>
<li>Blank Wizard Page template included</li>
<li>Use with Aero.Controls pack to make Windows UX Guidelines compatible user interfaces</li>
</ul>
<h3>Aero.Controls:</h3>
<div class="wp-caption alignnone" style="width: 271px"><img title="Aero.Controls Info Screenshot" src="http://factormystic.net/utils/aero.controls/example.png" alt="Aero.Controls Info Screenshot" width="261" height="301" /><p class="wp-caption-text">Aero.Controls Info Screenshot</p></div>
<p>Aero.Controls Includes:</p>
<ul>
<li><a title="Main Instructions Label on MSDN" href="http://msdn.microsoft.com/en-us/library/aa974176.aspx#mainInstructions">Main Instructions Label</a></li>
<li><a title="Command Link Button on MSDN" href=" http://msdn.microsoft.com/en-us/library/aa511455.aspx">Command Link button</a></li>
<li><a title="Instant Search Box on MSDN" href="http://msdn.microsoft.com/en-us/library/aa511489.aspx">Instant Search Box</a></li>
<li><a title="UAC Shield Button on MSDN" href="http://msdn.microsoft.com/en-us/library/aa511445.aspx">UAC Shield Button</a></li>
<li>Split Button</li>
<li>Listview with Mixed State checkbox</li>
<li><a title="Aero Link Label on MSDN" href="http://msdn.microsoft.com/en-us/library/aa511483.aspx">Aero Link Label</a></li>
</ul>
<p><span style="font-weight: normal;">Both of these projects strive to adhere to the <a href="http://msdn.microsoft.com/en-us/library/aa511258.aspx">Windows User Experience Guidelines</a>, freely available documentation from Microsoft which provided the basis for the DPE 2.0 restructuring. </span></p>
<h3>Licensing</h3>
<p>I debated for some time on this issue, trying to figure out a permissive license where I could retain some amount of ownership without being overbearing. I settled on BSD, which in my opinion is very permissive and seems to be low-friction for other developers to use this code in their projects.</p>
<h3>Downloading</h3>
<p>Both projects are hosted on Bitbucket (Mercurial) and you can either clone the repositories, or download the latest revision as a zip file. I encourage anyone to contribute bug fixes or report issues on each project's public issue ticketing system.</p>
<p><a title="Aero.Wizard download on bitbucket" href="http://bitbucket.org/factormystic/aero.wizard/wiki/Home">Aero.Wizard on Bitbucket</a></p>
<p><a title="Aero.Controls download on Bitbucket" href="http://bitbucket.org/factormystic/aero.controls/wiki/Home">Aero.Controls on Bitbucket</a></p>
<h3>What's next?</h3>
<p>With the release of this code pack, my plan for fully releasing <a href="http://defaultprogramseditor.com">Default Programs Editor</a> is underway. It is now possible to fully replicate the UI with this release. The next step is for me to continue refining and documenting the base file association library the project is built on, then release that as well as the UI logic for the program itself. Be looking for that in the next few months.</p>
]]></content:encoded>
			<wfw:commentRss>http://factormystic.net/blog/aero-wizard-and-aero-controls-code-pack-released/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>I have fallen in love&#8230;</title>
		<link>http://factormystic.net/blog/i-have-fallen-in-love</link>
		<comments>http://factormystic.net/blog/i-have-fallen-in-love#comments</comments>
		<pubDate>Fri, 14 Aug 2009 22:12:17 +0000</pubDate>
		<dc:creator>Factor Mystic</dc:creator>
				<category><![CDATA[mercurial]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://factormystic.net/blog/?p=129</guid>
		<description><![CDATA[...with source control! Previously in my programming experience, I "branched" the code by making a copy of the directory. And my loss paranoia nearing the 2.0 release of Default Programs Editor was so great that I zipped up the Solution folder every day and uploaded it to Dropbox (referral link = symmetric space bonus!). Needless [...]]]></description>
			<content:encoded><![CDATA[<p>...with source control!</p>
<div id="attachment_130" class="wp-caption alignnone" style="width: 310px"><img class="size-full wp-image-130" title="Mercurial Love" src="http://factormystic.net/blog/wp-content/uploads/2009/08/mercurial_love_ms12221.jpg" alt="This music artist loves source control so much she sang songs about it" width="300" height="299" /><p class="wp-caption-text">This music artist loves source control so much she sang songs about it</p></div>
<p>Previously in my programming experience, I "branched" the code by making a copy of the directory. And my loss paranoia nearing the 2.0 release of Default Programs Editor was so great that I zipped up the Solution folder every day and uploaded it to Dropbox (<a title="Dropbox" href="https://www.getdropbox.com/referrals/NTE1NTg0MTA5">referral link = symmetric space bonus!</a>). Needless to say, this is pretty ridiculous. I had tried to set up svn on my webhost, but since it's a shared account, that wasn't going to be possible for a public repository. After awhile, I gave up on it. But then came BitBucket. I first discovered BitBucket when I contributed a bit of code to <a href="http://bitbucket.org/Scaevolus/skybot/">SkyBot</a>, and I've totally fallen in love. A free account gets you 150MB of public repositories and 1 private repository... there's no reason not to sign up!</p>
<div id="attachment_131" class="wp-caption alignnone" style="width: 210px"><img class="size-full wp-image-131" title="Mercurial Logo" src="http://factormystic.net/blog/wp-content/uploads/2009/08/logo-droplets-2001.png" alt="Mercurial Logo" width="200" height="240" /><p class="wp-caption-text">Mercurial Logo</p></div>
<p>So now I'm in the process of moving my projects into source control. Everything new I'm writing gets a repository straight away. So far this has only been a couple of quick utilities (<a href="http://bitbucket.org/factormystic/background/">background</a> and <a href="http://bitbucket.org/factormystic/desktop-peek-tweak/wiki/Home">Desktop Peak Tweak</a>), but my current in-progress project is SimpleSnap, a better screenshot program (it's my private repo). Once that reaches an acceptable place, I'll make that public as well. I'm looking forward to publicly moving everything I've release to BitBucket, including <a href="http://defaultprogramseditor.com">Default Programs Editor</a>, the file association library I created along with it, and the Aero styled WinForms controls I wrote to build the new interface. However before that happens, I'm going to have to spend some time documenting my public methods with a little more than code comments to better facilitate a knowledge transfer from me to whoever wants to look at or use my code in the future. But it's coming, I promise!</p>
<p><a href="http://bitbucket.org/factormystic/">Follow me on BitBucket!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://factormystic.net/blog/i-have-fallen-in-love/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Quick Lesson In Overengineering</title>
		<link>http://factormystic.net/blog/a-quick-lesson-in-overengineering</link>
		<comments>http://factormystic.net/blog/a-quick-lesson-in-overengineering#comments</comments>
		<pubDate>Tue, 06 Jan 2009 05:58:20 +0000</pubDate>
		<dc:creator>Factor Mystic</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://factormystic.net/blog/?p=55</guid>
		<description><![CDATA[I was tapping out a quick for-fun project where I wanted to iterate through all the letters in the alphabet. //other logic foreach(char letter in //hmm... I didn't really want to manually initialize an array new char[]{"A", "B", "C" and I recalled how other languages have shortcuts for building lists, like ["A".."Z"]. It's called "List [...]]]></description>
			<content:encoded><![CDATA[<p>I was tapping out a quick for-fun project where I wanted to iterate through all the letters in the alphabet.</p>
<pre class="brush: csharp">
//other logic
foreach(char letter in //hmm...
</pre>
<p>I didn't really want to manually initialize an array <code>new char[]{"A", "B", "C"</code> and I recalled how other languages have shortcuts for building lists, like <code>["A".."Z"]</code>. It's called "List Comprehension" and it's available in a lot of <a href="http://dutherenverseauborddelatable.wordpress.com/downloads/comprehension-for-ocaml/">cool languages</a>.</p>
<p>So I began to think about how to accomplish this in C#. The <code>..</code> syntax obviously didn't work. <a href="http://www.google.com/search?q=c%23+list+comprehension">Googling the topic</a> brought me to <a href="http://en.wikipedia.org/wiki/List_comprehension">Wikipedia</a>, which lists a couple of examples using <code>Enumerable.Range</code>.</p>
<p>"Okay," I mused, "I can build on that easily!" <code>Enumerable.Range(65, 26)</code> will be the starting point since "A" is ASCII 65, and there are 26 letters in the alphabet. If I can just convert each one of these to a <code>char</code>, I'm golden. The function I found was <code>ConvertAll</code>, but that's a LINQ extension method for the <code>List&lt;T&gt;</code> type. No problem, all I need is <code>Enumerable.Range(65, 26).ToList().ConvertAll</code>. It's simple to convert an <code>int</code> to its <code>char</code> by casting, so my implementation of List Comprehension in C# for the alphabet was</p>
<pre class="brush: csharp">
Enumerable.Range(65, 26).ToList().ConvertAll(delegate(int value) { return (char)value; })
</pre>
<p> </p>
<p>Check it out, it works great, what a clever programmer I am!</p>
<pre class="brush: csharp">
foreach(char letter in Enumerable.Range(65, 26).ToList().ConvertAll(delegate(int value) { return (char)value; }))
{
//breakpoint here to confirm
}
</pre>
<p> </p>
<p>And now, the moral of the story: In C#, the <code>String</code> class implements <code>IEnumerable&lt;char&gt;</code>. Which means that all I needed to do was write:</p>
<pre class="brush: csharp">
foreach(char letter in &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;)
{
//how about that
}
</pre>
<p>It's so much simpler, shorter, and it's instantly understandable. Learn from me, don't be an overengineer!</p>
<p> </p>
<p>P.S. I could have saved myself the embarassment if I had remembered that <a href="https://stackoverflow.fogbugz.com/default.asp?W29014">the only reasonable numbers you should see in source code are 0, 1, and 2</a>.</p>
<p> </p>
<p>Special thanks to the #cobol crew for showing me the error of my ways.</p>
]]></content:encoded>
			<wfw:commentRss>http://factormystic.net/blog/a-quick-lesson-in-overengineering/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching using disk

Served from: factormystic.net @ 2010-09-08 18:47:45 -->