<?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>Chris Missal&#039;s Blog</title>
	<atom:link href="http://lostechies.com/chrismissal/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/chrismissal</link>
	<description>Thoughts while working and playing as a Software Developer</description>
	<lastBuildDate>Thu, 21 Feb 2013 17:13:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Introducing Formo &#8211; Dynamic Configuration</title>
		<link>http://lostechies.com/chrismissal/2013/02/21/introducing-formo-dynamic-configuration/</link>
		<comments>http://lostechies.com/chrismissal/2013/02/21/introducing-formo-dynamic-configuration/#comments</comments>
		<pubDate>Thu, 21 Feb 2013 15:12:25 +0000</pubDate>
		<dc:creator>Chris Missal</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[dynamic]]></category>

		<guid isPermaLink="false">http://lostechies.com/chrismissal/?p=377</guid>
		<description><![CDATA[In the off-chance that I have to maintain your code in the future, I feel I should gamble and share this project with you. I created it, I use it, and I like it. Something bothers me about seeing strings&#160;&#8230; <a href="http://lostechies.com/chrismissal/2013/02/21/introducing-formo-dynamic-configuration/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the off-chance that I have to maintain your code in the future, I feel I should gamble and share this project with you. I created it, I use it, and I like it.</p>
<p>Something bothers me about seeing strings inside square brackets. It has always felt dirty and error-prone. Since C# is now being sucked into the universe of dynamic, I thought that was a good opportunity to use dynamic to avoid these strings. By no means does <a href="https://github.com/ChrisMissal/Formo">Formo</a> fix all these issues, but it helps in a couple ways and makes me feel better when I need to reference configuration.</p>
<p>Given a configuration file:</p>
<p><script src="https://gist.github.com/5001941.js?file=app.config"></script><noscript>
<pre><code class="language- ">&lt;appSettings&gt;
    &lt;add key=&quot;RetryAttempts&quot; value=&quot;5&quot; /&gt;
    &lt;add key=&quot;ApplicationBuildDate&quot; value=&quot;11/4/1999 6:23 AM&quot; /&gt;
&lt;/appSettings&gt;</code></pre>
<p></noscript></p>
<p>Formo can be used to:</p>
<p><script src="https://gist.github.com/5001941.js?file=Formo.cs"></script><noscript>
<pre><code class="language-c# c#">dynamic config = new Configuration();

// returns 5 as a string (see app.config file)
var retryAttempts1 = config.RetryAttempts;

// returns 5 if found in config, else 10
var retryAttempts2 = config.RetryAttempts(10);

// returns 5 if it exists in config, else userInput if not null, else 10
var retryAttempts3 = config.RetryAttempts(userInput, 10);</code></pre>
<p></noscript></p>
<p>As well as:</p>
<p><script src="https://gist.github.com/5001941.js?file=FormoCast.cs"></script><noscript>
<pre><code class="language-c# c#">dynamic config = new Configuration();

// returns value as Strongly-Typed DateTime (config value: 11/4/1999 6:23AM)
var appBuildDate = config.ApplicationBuildDate&lt;DateTime&gt;();</code></pre>
<p></noscript></p>
<p><a href="https://github.com/ChrisMissal/Formo">Formo</a> is lightweight, free to use, and has no dependencies. Use it now with NuGet:</p>
<pre>Install-Package Formo</pre>
<p>This covers the majority of use-cases I&#8217;ve come across. If you have improvements to Formo, or just ideas in general, please submit them as issues on the <a title="Formo Suggestions/Issues/Defects" href="https://github.com/ChrisMissal/Formo/issues">GitHub issues page</a>.</p>
<p><del>Have an idea for a logo?! I&#8217;d love a <a href="https://github.com/ChrisMissal/Formo/pull/new/master">pull request</a>!</p>
<p></del></p>
<p>EDIT: Great logo from <a href="http://timgthomas.com/">Tim G. Thomas</a>: <a href="http://dribbble.com/shots/953675-Formo">http://dribbble.com/shots/953675-Formo</a>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/chrismissal/2013/02/21/introducing-formo-dynamic-configuration/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>A Timely Post &#8211; Introducing Palmer and TempusReader</title>
		<link>http://lostechies.com/chrismissal/2013/01/30/a-timely-post-introducing-palmer-and-tempusreader/</link>
		<comments>http://lostechies.com/chrismissal/2013/01/30/a-timely-post-introducing-palmer-and-tempusreader/#comments</comments>
		<pubDate>Wed, 30 Jan 2013 21:17:10 +0000</pubDate>
		<dc:creator>Chris Missal</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[DateTime]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[TimeSpan]]></category>

		<guid isPermaLink="false">http://lostechies.com/chrismissal/?p=365</guid>
		<description><![CDATA[I may have found the Peanut Butter to my Jelly. Maybe not, but I accidentally stumbled upon a project called Palmer. This library lets one define an amount of time to do some sort of activity. Maybe a call that&#160;&#8230; <a href="http://lostechies.com/chrismissal/2013/01/30/a-timely-post-introducing-palmer-and-tempusreader/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I may have found the Peanut Butter to my Jelly. Maybe not, but I accidentally stumbled upon a project called <a title="Palmer" href="https://github.com/MitchDenny/Palmer">Palmer</a>. This library lets one define an amount of time to do some sort of activity. Maybe a call that fails frequently, so you want to ping it many times before just giving up. I&#8217;m not using it in anything currently, but I&#8217;d like to some day.</p>
<p>I noticed that it uses some TimeSpans and I&#8217;ve been meaning to incorporate my pet project <a title="A small .NET library for reading plain English text and converting it to a TimeSpan" href="https://github.com/ChrisMissal/TempusReader">TempusReader</a> into something of use. I combined the two and they worked just great together! I set up a tiny example like this, just to get going with them:</p>
<p><script src="https://gist.github.com/4671170.js"></script><noscript>
<pre><code class="language-c# c#">class Program
{
    private static int attempts = 0;

    static void Main(string[] args)
    {
        Retry.On&lt;Exception&gt;().For(&quot;2.5 seconds&quot;.InTime()).With(context =&gt;
        {
            Program.SendRequest();
        });
    }

    public static string SendRequest()
    {
        attempts++;
        Console.WriteLine(&quot;attempt #{0}&quot;, attempts);
        Thread.Sleep(456);
        throw new Exception(&quot;Oh snap!&quot;);
    }
}
</code></pre>
<p></noscript></p>
<p>Obviously the example isn&#8217;t real world, but you get the point. The code is actually all <strong>Palmer</strong>, the only part that is <strong>TempusReader</strong> is the <em>.InTime()</em> extension method. Alternatively, I could have used other methods to specify the TimeSpan:</p>
<pre>new Time("1 hr, 5 mins and 8 seconds")
"50 milliseconds".InTime()</pre>
<p>This takes a string and converts it to a <em>TempusReader.Time</em> object, which can be implicitly cast to a <em>TimeSpan</em> for use in the <em>.For()</em> method.</p>
<p>Both these projects are on NuGet (<em>the current version of Palmer was giving me issues</em>):</p>
<blockquote><p>Install-Package <strong>Palmer</strong> -Version 0.1.4723.40614</p>
<p>Install-Package <strong>TempusReader</strong></p></blockquote>
<p>Visit the GitHub pages for both <a title="A simple portable library which allows .NET developers to express retry logic using a fluent-api." href="https://github.com/MitchDenny/Palmer">Palmer</a> and <a title="TempusReader on GitHub" href="https://github.com/ChrisMissal/TempusReader">TempusReader</a> to learn more about how to use them!
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/chrismissal/2013/01/30/a-timely-post-introducing-palmer-and-tempusreader/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Own Your Work</title>
		<link>http://lostechies.com/chrismissal/2012/12/14/own-your-work/</link>
		<comments>http://lostechies.com/chrismissal/2012/12/14/own-your-work/#comments</comments>
		<pubDate>Fri, 14 Dec 2012 13:50:30 +0000</pubDate>
		<dc:creator>Chris Missal</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[SOLID]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[collective code ownership]]></category>
		<category><![CDATA[continuous deployment]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://lostechies.com/chrismissal/?p=358</guid>
		<description><![CDATA[This post is mostly here to share a link. Jeremy Miller posted &#8216;&#8220;Code Complete&#8221; is a polite fiction, &#8220;Done, done, done&#8221; is the hard truth&#8216;. Before clicking through I thought I was going to disagree. After reading through, I agree&#160;&#8230; <a href="http://lostechies.com/chrismissal/2012/12/14/own-your-work/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This post is mostly here to share a link. <a href="https://twitter.com/jeremydmiller">Jeremy Miller</a> posted &#8216;<a title="“Code Complete” is a polite fiction, “Done, done, done” is the hard truth" href="http://jeremydmiller.com/2012/12/13/code-complete-is-a-polite-fiction-done-done-done-is-the-hard-truth/">&#8220;Code Complete&#8221; is a polite fiction, &#8220;Done, done, done&#8221; is the hard truth</a>&#8216;. Before clicking through I thought I was going to disagree. After reading through, I agree 100%.</p>
<p>Read it first, it&#8217;s not long&#8230;</p>
<p>Done? Now my take on this:</p>
<p><strong>Stop being lazy!</strong> I have been in places where the process has become one where you take the requirements from somebody else, do your best to deliver, and then throw it over the fence for QA, testing, or whoever. In my experience, this makes people less accountable for what gets pushed to production.</p>
<p><strong>Own your work</strong>. Some of the best quality I have ever provided was in an environment where I was the one in charge of understanding problem, coming up with the <del>best</del> appropriate solution, and watching it all the way to production and eventually, the user.</p>
<p>The key ingredients to this recipe for success:</p>
<ol>
<li><strong>Quality tests</strong> &#8211; sometimes TDD, sometimes test first, and sometimes test after.</li>
<li><strong>Refactor to your heart&#8217;s content</strong> &#8211; if you&#8217;re afraid to change code because it might break something, you have problems. Follow <a title="S.O.L.I.D." href="http://lostechies.com/chadmyers/2008/03/08/pablo-s-topic-of-the-month-march-solid-principles/">SOLID principles</a> as best as you responsibly can and you&#8217;ll have fewer problems here.</li>
<li><strong>Continuous integration</strong> &#8211; make sure everything is working all the time. It helps in the long run (and by long run, I mean tomorrow). Oh, and by CI, I mean CI done right.</li>
<li><strong>Collective code ownership</strong> &#8211; everybody owns this feature; it&#8217;s not just my own. a.k.a. No <a href="http://en.wikipedia.org/wiki/Information_silo">silos</a>. Also, your victories must be shared, but your failures are also not your own.</li>
<li><strong>Deploy early and often</strong> &#8211; The best time to deploy a feature is the moment it&#8217;s declared &#8220;Done&#8221; (or Done, done, done). The longer the span between this time and delivery, the more likely it is to fail.</li>
</ol>
<p>Your mileage may vary, but these have worked for me and I suggest you try them if you&#8217;re having trouble moving quality from concept to cash.
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/chrismissal/2012/12/14/own-your-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extending Objects in Underscore</title>
		<link>http://lostechies.com/chrismissal/2012/10/05/extending-objects-in-underscore/</link>
		<comments>http://lostechies.com/chrismissal/2012/10/05/extending-objects-in-underscore/#comments</comments>
		<pubDate>Fri, 05 Oct 2012 16:03:44 +0000</pubDate>
		<dc:creator>Chris Missal</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Underscore]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[javascript objects]]></category>
		<category><![CDATA[underscore]]></category>

		<guid isPermaLink="false">http://lostechies.com/chrismissal/?p=351</guid>
		<description><![CDATA[Underscore is a very nice library, it&#8217;s what Backbone JS is built on. What I&#8217;ve come to like about it is its ability to provide very helpful functions that let you more effectively work with sets of data. Below is&#160;&#8230; <a href="http://lostechies.com/chrismissal/2012/10/05/extending-objects-in-underscore/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Underscore is a very nice library, it&#8217;s what Backbone JS is built on. What I&#8217;ve come to like about it is its ability to provide very helpful functions that let you more effectively work with sets of data.</p>
<p>Below is the code we&#8217;ve seen before, only slightly modified because we&#8217;re using Underscore&#8217;s <em>extend</em> function now.</p>
<p><script src="https://gist.github.com/3797198.js?file=extending-objects-in-underscore-1.js"></script><noscript>
<pre><code class="language-javascript javascript">var start = {
    id: 123,
    count: 41,
    desc: 'this is information',
    title: 'Base Object',
    tag: 'uncategorized',
    values: [1,1,2,3,5,8,13]
};
var more = {
    name: 'Los Techies',
    tag: 'javascript'
};
var extra = {
    count: 42,
    title: null,
    desc: undefined,
    values: [1,3,6,10]
};

var extended = _.extend(start, more, extra);
console.log(JSON.stringify(extended));</code></pre>
<p></noscript></p>
<p>And the output:</p>
<p><script src="https://gist.github.com/3797198.js?file=extending-objects-in-underscore-2.js"></script><noscript>
<pre><code class="language-javascript javascript">{
    &quot;id&quot;: 123,
    &quot;count&quot;: 42,
    &quot;title&quot;: null,
    &quot;tag&quot;: &quot;javascript&quot;,
    &quot;values&quot;: [1,3,6,10],
    &quot;name&quot;: &quot;Los Techies&quot;
}</code></pre>
<p></noscript></p>
<p>This is the exact same output as our <a title="Extending Objects in Ext JS" href="http://lostechies.com/chrismissal/2012/10/02/extending-objects-in-ext-js/">Ext JS example</a>. Since there&#8217;s nothing new, I can&#8217;t go on about too many differences, but I can, however, bring up another related function in Underscore, <em>defaults</em>.</p>
<p>The <em>defaults</em> method is interesting in that it works very similarly, but turns our familiar objects into something new that the others haven&#8217;t yet done.</p>
<p><script src="https://gist.github.com/3797201.js?file=adding-defaults-to-objects-in-underscore-1.js"></script><noscript>
<pre><code class="language-javascript javascript">var start = {
    id: 123,
    count: 41,
    desc: 'this is information',
    title: 'Base Object',
    tag: 'uncategorized',
    values: [1,1,2,3,5,8,13]
};
var more = {
    name: 'Los Techies',
    tag: 'javascript'
};
var extra = {
    count: 42,
    title: null,
    desc: undefined,
    values: [1,3,6,10]
};

var extended = _.defaults(start, more, extra);
console.log(JSON.stringify(extended));</code></pre>
<p></noscript></p>
<p>And the output:</p>
<p><script src="https://gist.github.com/3797201.js?file=adding-defaults-to-objects-in-underscore-2.js"></script><noscript>
<pre><code class="language-javascript javascript">{
    &quot;id&quot;: 123,
    &quot;count&quot;: 41,
    &quot;desc&quot;: &quot;this is information&quot;,
    &quot;title&quot;: &quot;Base Object&quot;,
    &quot;tag&quot;: &quot;uncategorized&quot;,
    &quot;values&quot;: [1,1,2,3,5,8,13],
    &quot;name&quot;: &quot;Los Techies&quot;
}</code></pre>
<p></noscript></p>
<p>This one fills in missing properties and ignores any match applied after. Our <em>start </em>object was able to keep the <em>id</em> as <em>123</em>, the <em>count</em> at <em>41</em> and so on. The second argument, <em>more</em> set the <em>name</em> property because it didn&#8217;t exit in <em>start</em> and finally the properties on <em>extra</em> already existed, so it had no effect on the final output.</p>
<p>The <em>extend</em> and <em>defaults</em> functions work almost opposite from each other, but are great to have side-by-side when you need them.</p>
<p>For more information: <a href="http://underscorejs.org/#extend">extend</a> and <a href="http://underscorejs.org/#defaults">defaults</a>.</p>
<p>&nbsp;
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/chrismissal/2012/10/05/extending-objects-in-underscore/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Extending Objects in Dojo</title>
		<link>http://lostechies.com/chrismissal/2012/10/03/extending-objects-in-dojo/</link>
		<comments>http://lostechies.com/chrismissal/2012/10/03/extending-objects-in-dojo/#comments</comments>
		<pubDate>Wed, 03 Oct 2012 20:21:28 +0000</pubDate>
		<dc:creator>Chris Missal</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[javascript objects]]></category>

		<guid isPermaLink="false">http://lostechies.com/chrismissal/?p=346</guid>
		<description><![CDATA[Dojo works a bit differently than we saw with jQuery and ExtJS. They have the notion of extend as well as mixin. These both behave differently, not only from each other, but from the previous jQuery.extend and Ext.apply. These methods&#160;&#8230; <a href="http://lostechies.com/chrismissal/2012/10/03/extending-objects-in-dojo/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Dojo works a bit differently than we saw with <a title="Extending Objects in jQuery" href="http://lostechies.com/chrismissal/2012/09/27/extending-objects-in-jquery/">jQuery</a> and <a title="Extending Objects in Ext JS" href="http://lostechies.com/chrismissal/2012/10/02/extending-objects-in-ext-js/">ExtJS</a>. They have the notion of <em>extend</em> as well as <em>mixin</em>. These both behave differently, not only from each other, but from the previous jQuery.extend and Ext.apply. These methods in Dojo work right to left, different from our previous examples.</p>
<p>Let&#8217;s discuss <em>mixin</em>, this is more like what we previously saw with previous libraries&#8217; methods:</p>
<p><script src="https://gist.github.com/3797197.js?file=extending-objects-in-dojo-1.js"></script><noscript>
<pre><code class="language-javascript javascript">var start = {
    id: 123,
    count: 41,
    desc: 'this is information',
    title: 'Base Object',
    tag: 'uncategorized',
    values: [1,1,2,3,5,8,13]
};
var more = {
    name: 'Los Techies',
    tag: 'javascript'
};
var extra = {
    count: 42,
    title: null,
    desc: undefined,
    values: [1,3,6,10],
    dojo: true
};

var extended = dojo.mixin(extra, more, start);
console.log(JSON.stringify(extended));&acirc;</code></pre>
<p></noscript></p>
<p>And the output:</p>
<p><script src="https://gist.github.com/3797197.js?file=extending-objects-in-dojo-2.js"></script><noscript>
<pre><code class="language-javascript javascript">{
    &quot;count&quot;: 41,
    &quot;title&quot;: &quot;Base Object&quot;,
    &quot;desc&quot;: &quot;this is information&quot;,
    &quot;values&quot;: [1,1,2,3,5,8,13],
    &quot;dojo&quot;: true,
    &quot;name&quot;: &quot;Los Techies&quot;,
    &quot;tag&quot;: &quot;uncategorized&quot;,
    &quot;id&quot;: 123
}</code></pre>
<p></noscript></p>
<p>If you remember from the previous posts, we extended our <em>start</em>, <em>more</em>, and <em>extra</em> objects from left to right. Using a Dojo mixin, our arguments are passed to the function in the reverse order; this is by design. Everything in our output of the <em>extended</em> object remains as it was in our <em>start</em> object. The only difference is that <em>more</em> added the <em>name</em> property and <em>extra</em> added the <em>dojo</em> property. This works just like you&#8217;d expect a mixin function to work and just like our previous extend and apply from jQuery and Ext JS.</p>
<p>The dojo.extend function works on an object&#8217;s prototype and doesn&#8217;t follow the same patterns of this series of blog posts. For that reason, I&#8217;m going to skip it and let you do your own homework if you&#8217;re interested. ;)</p>
<p>For more information: <a href="http://dojotoolkit.org/reference-guide/1.8/dojo/mixin.html">dojo.mixin</a> (Yes I know this way to reference dojo is deprecated, but the old version worked better in my tiny example.)
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/chrismissal/2012/10/03/extending-objects-in-dojo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Extending Objects in Ext JS</title>
		<link>http://lostechies.com/chrismissal/2012/10/02/extending-objects-in-ext-js/</link>
		<comments>http://lostechies.com/chrismissal/2012/10/02/extending-objects-in-ext-js/#comments</comments>
		<pubDate>Tue, 02 Oct 2012 14:05:23 +0000</pubDate>
		<dc:creator>Chris Missal</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[ext js]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[javascript objects]]></category>

		<guid isPermaLink="false">http://lostechies.com/chrismissal/?p=338</guid>
		<description><![CDATA[Last time we explored JavaScript object extension we dove into the most popular JavaScript library in the known universe, jQuery. This time around we&#8217;ll be looking at Ext JS, a framework I&#8217;ve been using quite a bit lately. Ext JS&#160;&#8230; <a href="http://lostechies.com/chrismissal/2012/10/02/extending-objects-in-ext-js/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last time we explored <a title="Extending Objects with JavaScript" href="http://lostechies.com/chrismissal/2012/09/27/extending-objects-with-javascript/">JavaScript object extension</a> we dove into the most popular JavaScript library in the known universe, <a title="Extending Objects in jQuery" href="http://lostechies.com/chrismissal/2012/09/27/extending-objects-in-jquery/">jQuery</a>. This time around we&#8217;ll be looking at Ext JS, a framework I&#8217;ve been using quite a bit lately. Ext JS relies on this capability all over the place. Especially when you want to create your own customizable components.</p>
<p><script src="https://gist.github.com/3797195.js?file=extending-objects-in-ext-js-1.js"></script><noscript>
<pre><code class="language-javascript javascript">var start = {
    id: 123,
    count: 41,
    desc: 'this is information',
    title: 'Base Object',
    tag: 'uncategorized',
    values: [1,1,2,3,5,8,13]
};
var more = {
    name: 'Los Techies',
    tag: 'javascript'
};
var extra = {
    count: 42,
    title: null,
    desc: undefined,
    values: [1,3,6,10]
};

var extended = Ext.apply(start, more, extra);
console.log(JSON.stringify(extended));
</code></pre>
<p></noscript></p>
<p>And the output:</p>
<p><script src="https://gist.github.com/3797195.js?file=extending-objects-in-ext-js-2.js"></script><noscript>
<pre><code class="language-javascript javascript">{
    &quot;id&quot;: 123,
    &quot;count&quot;: 42,
    &quot;title&quot;: null,
    &quot;tag&quot;: &quot;javascript&quot;,
    &quot;values&quot;: [1,3,6,10],
    &quot;name&quot;: &quot;Los Techies&quot;
}</code></pre>
<p></noscript></p>
<p>You&#8217;re welcome to click back or open a new tab to compare this to the previous post, but this is different from the jQuery example. The single difference is that the <em>desc</em> property doesn&#8217;t exist in our extended object. Ext JS has decided that a property with a null value will overwrite a previous value (see <em>title</em>), but an <em>undefined</em> value will in effect erase the property.</p>
<p>For more information: <a href="http://docs.sencha.com/ext-js/4-1/source/Function.html#Function-method-apply">Function-method-apply</a>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/chrismissal/2012/10/02/extending-objects-in-ext-js/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Extending Objects in jQuery</title>
		<link>http://lostechies.com/chrismissal/2012/09/27/extending-objects-in-jquery/</link>
		<comments>http://lostechies.com/chrismissal/2012/09/27/extending-objects-in-jquery/#comments</comments>
		<pubDate>Fri, 28 Sep 2012 03:01:14 +0000</pubDate>
		<dc:creator>Chris Missal</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[javascript objects]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://lostechies.com/chrismissal/?p=327</guid>
		<description><![CDATA[Welcome to my journey of  extending objects in JavaScript frameworks; let&#8217;s explore jQuery! Extending an object in jQuery is simple, there are just a few rules you need to understand. Extension works from left to right and you&#8217;re allowed to&#160;&#8230; <a href="http://lostechies.com/chrismissal/2012/09/27/extending-objects-in-jquery/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Welcome to my journey of  <a title="Using various frameworks to extend JavaScript objects" href="http://lostechies.com/chrismissal/2012/09/27/extending-objects-with-javascript/">extending objects in JavaScript frameworks</a>; let&#8217;s explore jQuery! Extending an object in jQuery is simple, there are just a few rules you need to understand. Extension works from left to right and you&#8217;re allowed to pass as many objects to the function as you want. Whatever is passed to the $.extend argument last wins.</p>
<p><strong><span style="text-decoration: underline;">For instance:</span></strong></p>
<div><span style="text-decoration: underline;"><br />
</span></div>
<div><script src="https://gist.github.com/3797108.js?file=extending-objects-in-jquery-1.js"></script><noscript>
<pre><code class="language-javascript javascript">var start = {
    id: 123,
    count: 41,
    desc: 'this is information',
    title: 'Base Object',
    tag: 'uncategorized',
    values: [1,1,2,3,5,8,13]
};
var more = {
    name: 'Los Techies',
    tag: 'javascript'
};
var extra = {
    count: 42,
    title: null,
    desc: undefined,
    values: [1,3,6,10]
};

var extended = $.extend(start, more, extra);
console.log(JSON.stringify(extended));</code></pre>
<p></noscript></div>
<div><span style="text-decoration: underline;"><br />
</span></div>
<p><strong><span style="text-decoration: underline;">Output:</span></strong></p>
<div><span style="text-decoration: underline;"><br />
</span></div>
<div><script src="https://gist.github.com/3797108.js?file=extending-objects-in-jquery-2.js"></script><noscript>
<pre><code class="language-javascript javascript">{
    &quot;id&quot;: 123,
    &quot;count&quot;: 42,
    &quot;desc&quot;: &quot;this is information&quot;,
    &quot;title&quot;: null,
    &quot;tag&quot;: &quot;javascript&quot;,
    &quot;values&quot;: [1, 3, 6, 10],
    &quot;name&quot;: &quot;Los Techies&quot;
}</code></pre>
<p></noscript></div>
<div><span style="text-decoration: underline;"><br />
</span></div>
<p>Again, remember that the last one in wins. It is also worth noting that anything extended with an explicit `undefined` will keep its original value. If you want to override a value with a &#8220;falsy&#8221; value, use `null`, `false` or anything else that makes sense in your case.</p>
<p>Arrays are always overwritten by the last object passed in.  The objects inside them are at mercy of their parents. It doesn&#8217;t matter if they are values or objects, the last object passed in, gets the last call.</p>
<p>For more information: <a href="http://api.jquery.com/jQuery.extend/">http://api.jquery.com/jQuery.extend/</a>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/chrismissal/2012/09/27/extending-objects-in-jquery/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Extending Objects with JavaScript</title>
		<link>http://lostechies.com/chrismissal/2012/09/27/extending-objects-with-javascript/</link>
		<comments>http://lostechies.com/chrismissal/2012/09/27/extending-objects-with-javascript/#comments</comments>
		<pubDate>Fri, 28 Sep 2012 03:00:18 +0000</pubDate>
		<dc:creator>Chris Missal</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[javascript objects]]></category>

		<guid isPermaLink="false">http://lostechies.com/chrismissal/?p=333</guid>
		<description><![CDATA[I have been a fan of JavaScript for quite some time, but mostly as an outsider looking in. I feel like I understand many of the concepts and can be fairly dangerous, but recently I have made it a point&#160;&#8230; <a href="http://lostechies.com/chrismissal/2012/09/27/extending-objects-with-javascript/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been a fan of JavaScript for quite some time, but mostly as an outsider looking in. I feel like I understand many of the concepts and can be fairly dangerous, but recently I have made it a point to really learn this stuff inside and out.</p>
<p>It didn&#8217;t take long before I realized that object extension is very powerful in dynamic languages and JavaScript pretty damn good at this. Here are my notes on extending objects in JavaScript with various frameworks:</p>
<ol>
<li><a title="Extending Objects in jQuery" href="http://lostechies.com/chrismissal/2012/09/27/extending-objects-in-jquery/">Extending Objects in jQuery</a></li>
<li><a title="Extending Objects in Ext JS" href="http://lostechies.com/chrismissal/2012/10/02/extending-objects-in-ext-js/">Extending Objects in Ext JS</a></li>
<li><a title="Extending Objects in Dojo" href="http://lostechies.com/chrismissal/2012/10/03/extending-objects-in-dojo/">Extending Objects in Dojo</a></li>
<li><a title="Extending Objects in Underscore" href="http://lostechies.com/chrismissal/2012/10/05/extending-objects-in-underscore/">Extending Objects in Underscore</a></li>
</ol>
<p>I hope this series of posts is helpful to you too. If not, leave me some feedback and I can modify it to better, thanks!
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/chrismissal/2012/09/27/extending-objects-with-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Build Documentation from your Tests</title>
		<link>http://lostechies.com/chrismissal/2012/08/31/build-documentation-from-your-tests/</link>
		<comments>http://lostechies.com/chrismissal/2012/08/31/build-documentation-from-your-tests/#comments</comments>
		<pubDate>Fri, 31 Aug 2012 14:37:28 +0000</pubDate>
		<dc:creator>Chris Missal</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://lostechies.com/chrismissal/?p=280</guid>
		<description><![CDATA[A couple months ago I decided to toy around with some code ideas in my head. I had two goals: To be able to parse some plain English and make DateTime and Timespans objects. To try out Parsley (because I&#160;&#8230; <a href="http://lostechies.com/chrismissal/2012/08/31/build-documentation-from-your-tests/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A couple months ago I decided to toy around with some code ideas in my head. I had two goals:</p>
<ol>
<li>To be able to parse some plain English and make DateTime and Timespans objects.</li>
<li>To try out <a href="https://github.com/plioi/parsley">Parsley</a> (because I have a not-so-secret urge to write a language)</li>
</ol>
<p>After a quick spike a while back I had something I named <a href="https://github.com/ChrisMissal/TempusReader">TempusReader</a>, working code which I posted on Github. I don&#8217;t think something like Parsley was absolutely necessary for me to do what I wanted, but most importantly, I was able to acheive both of my goals.</p>
<p>While working on this code, I wanted to provide documentation on how to use it. In my experience, looking at tests is one good way to understand how something works. The odds of somebody looking in a test file are slim, but looking at the readme file are almost necessary when visiting a page on github.</p>
<p>I could just output some text to <a href="https://github.com/ChrisMissal/TempusReader/blob/master/README.md">my readme</a> files directly from my tests, right? This was actually a fun little task and potentially quite helpful. I&#8217;d like to explore this area more in the future, maybe a simple file to pull from Nuget, configure, then be off to the races. It&#8217;s pretty raw as it sits, but I thought I&#8217;d share the idea.</p>
<p>Here is the file that&#8217;s doing the work:</p>
<p><a href="https://github.com/ChrisMissal/TempusReader/blob/master/src/Tests/DocumentationBuilder.cs">https://github.com/ChrisMissal/TempusReader/blob/master/src/Tests/DocumentationBuilder.cs</a></p>
<p>&nbsp;
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/chrismissal/2012/08/31/build-documentation-from-your-tests/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using  CNAME With Azure</title>
		<link>http://lostechies.com/chrismissal/2012/08/14/using-cname-with-azure/</link>
		<comments>http://lostechies.com/chrismissal/2012/08/14/using-cname-with-azure/#comments</comments>
		<pubDate>Tue, 14 Aug 2012 14:48:31 +0000</pubDate>
		<dc:creator>Chris Missal</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[cname]]></category>

		<guid isPermaLink="false">http://lostechies.com/chrismissal/?p=259</guid>
		<description><![CDATA[It was really hard to find and asking Google for the answer was tricky so I&#8217;m going to let you know: If you&#8217;re wanting to use a CNAME with a site that&#8217;s hosted on Microsoft Azure, you must be in&#160;&#8230; <a href="http://lostechies.com/chrismissal/2012/08/14/using-cname-with-azure/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It was really hard to find and asking Google for the answer was tricky so I&#8217;m going to let you know: If you&#8217;re wanting to use a <strong>CNAME</strong> with a site that&#8217;s hosted on <strong>Microsoft Azure</strong>, you must be in <strong>Reserved Mode</strong>.</p>
<p>You can find more information here: <a href="http://www.windowsazure.com/en-us/develop/net/common-tasks/custom-dns-web-site/">Configuring a Custom Domain Name for a Windows Azure Web Site</a>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/chrismissal/2012/08/14/using-cname-with-azure/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
