<?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>Shaun Smith &#187; Banter</title>
	<atom:link href="http://shaun.boyblack.co.za/blog/category/banter/feed/" rel="self" type="application/rss+xml" />
	<link>http://shaun.boyblack.co.za/blog</link>
	<description>Flex, Ruby, Mongo - London, UK</description>
	<lastBuildDate>Sun, 05 Feb 2012 04:20:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Readme</title>
		<link>http://shaun.boyblack.co.za/blog/2012/02/04/readme/</link>
		<comments>http://shaun.boyblack.co.za/blog/2012/02/04/readme/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 17:04:25 +0000</pubDate>
		<dc:creator>shaun</dc:creator>
				<category><![CDATA[Banter]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Robotlegs]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[readme]]></category>

		<guid isPermaLink="false">http://shaun.boyblack.co.za/blog/?p=1069</guid>
		<description><![CDATA[Have I mentioned that I love GitHub? When you put a readme file into a folder that file is formatted and presented nicely through GitHub&#8217;s file browser. For example: https://github.com/visionmedia/uikit Scrolling down a little we can see a nicely formatted readme file. GitHub strongly recommends adding a readme file to the root of your repository, but what I didn&#8217;t realise until recently was that it works for any folder in your repo. GitHub already has the best online file browser &#8230; <a href="http://shaun.boyblack.co.za/blog/2012/02/04/readme/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Have I mentioned that I love <a href="https://github.com/">GitHub</a>?</p>
<p>When you put a readme file into a folder that file is formatted and presented nicely through GitHub&#8217;s file browser. For example:</p>
<p><a href="https://github.com/visionmedia/uikit">https://github.com/visionmedia/uikit</a></p>
<p>Scrolling down a little we can see a nicely formatted readme file.<span id="more-1069"></span></p>
<p>GitHub strongly recommends adding a readme file to the root of your repository, but what I didn&#8217;t realise until recently was that it works for any folder in your repo. GitHub already has the best online file browser out there, but this specific feature can turn your source tree into your documentation.</p>
<p>For <a href="https://github.com/robotlegs/robotlegs-framework">Robotlegs 2</a> I decided to try it out:</p>
<p><a href="https://github.com/darscan/robotlegs-framework/tree/version2/src/robotlegs/bender/core/async">Async</a><br />
<a href="https://github.com/darscan/robotlegs-framework/tree/version2/src/robotlegs/bender/core/messaging">MessageDispatcher</a><br />
<a href="https://github.com/darscan/robotlegs-framework/tree/version2/src/robotlegs/bender/extensions">Extensions</a></p>
<p>Almost every package in the entire repo has a readme file. The best way to learn about Robotlegs 2 is to browse the <a href="https://github.com/robotlegs/robotlegs-framework">source and readme files</a> on GitHub.</p>
<p><img class="alignnone size-full wp-image-1075" title="github-logo" src="http://shaun.boyblack.co.za/blog/wp-content/uploads/2012/02/github-logo.png" alt="" width="512" height="512" /></p>
]]></content:encoded>
			<wfw:commentRss>http://shaun.boyblack.co.za/blog/2012/02/04/readme/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RL Reloaded</title>
		<link>http://shaun.boyblack.co.za/blog/2012/01/23/rl-reloaded/</link>
		<comments>http://shaun.boyblack.co.za/blog/2012/01/23/rl-reloaded/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 12:03:13 +0000</pubDate>
		<dc:creator>shaun</dc:creator>
				<category><![CDATA[Banter]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Robotlegs]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://shaun.boyblack.co.za/blog/?p=1023</guid>
		<description><![CDATA[I&#8217;ve been worried for quite a long time. Robotlegs 1 is small and simple but a little difficult to extend. I want Robotlegs 2 to be flexible without becoming overly large or complex. Timing To extend any framework you need to be able to hook into that framework&#8217;s initialization process. That Damned Context The Robotlegs 1 context class was, to be frank, rubbish &#8211; it set defaults, configured dependencies and controlled initialization. Worse, to hook into the initialization process or &#8230; <a href="http://shaun.boyblack.co.za/blog/2012/01/23/rl-reloaded/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been worried for quite a long time. <a href="http://www.robotlegs.org/">Robotlegs 1</a> is small and simple but a little difficult to extend. I want <a href="https://github.com/robotlegs/robotlegs-framework">Robotlegs 2</a> to be flexible without becoming overly large or complex.</p>
<h2>Timing</h2>
<p>To extend any framework you need to be able to hook into that framework&#8217;s initialization process.</p>
<h2>That Damned Context</h2>
<p>The Robotlegs 1 context class was, to be frank, rubbish &#8211; it set defaults, configured dependencies and controlled initialization. Worse, to hook into the initialization process or change the defaults, users had to extend the class itself resulting in the proliferation of funny looking words like SignalDrivenCovariantlyMediatedModularShellContext.<span id="more-1023"></span></p>
<h2>How Could You Let That Happen?</h2>
<p>Extending the context was a silly idea &#8211; and I knew it at the time. It made me sad, deep down inside, but I knew that if I waited for a better solution to emerge the framework might never ship.</p>
<p>Also, my goals for Robotlegs 1 were:</p>
<p>1. Make it small<br />
2. Make it fast<br />
3. Release it</p>
<p>A ton of compromises were made to keep the number of classes down to an absolute minimum. That&#8217;s not how I usually write code. Besides&#8230;</p>
<h2>Small Only Goes So Far</h2>
<p>I always start by doing the simplest thing possible &#8211; it&#8217;s a good way to feel out a problem space. &#8220;<strong>What</strong> am I trying to do?&#8221;. The &#8220;<strong>how</strong>&#8221; doesn&#8217;t matter yet, but becomes important much later when I ask &#8220;How would I <strong>like</strong> to do this?&#8221;.</p>
<p>When writing actual code, however, I&#8217;m constantly faced with this annoying question: &#8220;Should I break this out?&#8221;. When doing the simplest thing possible I often decide against extraction: I&#8217;ve got a specific task to complete (like getting a test to pass) and I can refactor later if the idea proves itself to be worthwhile. Also, I know that extraction inevitably leads to a new set of design decisions. And I&#8217;ll have to start with a test &#8211; for something whose purpose I am only just discovering. And it ups the class count.</p>
<p>Keeping class count down for it&#8217;s own sake is almost always a bad idea. However, I don&#8217;t think Robotlegs 1 would have experienced the same adoption if it had had hundreds of classes instead of the quite digestible 15 presently in its belly. OK, 24 total if you add the interfaces.</p>
<p>When browsing open source libraries I get happy feelings from projects with a limited number of source files &#8211; it gives me a sense that if I really wanted to I could read through the entire codebase and understand it.</p>
<p>But there&#8217;s a point where that simplicity inverts. Profit becomes debt. Without good abstractions in place every participant in the system ends up doing too much. At that point the question becomes: &#8220;Do I need to introduce a new layer of abstraction?&#8221;.</p>
<h2>Now You Have Two Problems</h2>
<p>The introduction of a system wide abstraction layer fueled by a mid feature code extraction will do one of two things: it will strengthen the system or it will weaken it. A bad abstraction might solve the immediate design issues (like duplication) just fine but end up adding complexity and reducing quality overall.</p>
<h2>Extensions? Timing?</h2>
<p>So anyway, I want Robotlegs to be extensible in a sensible way. Users should be able to install custom extensions easily. Those extensions need a way to hook into the context initialization process:</p>
<p>Some extensions may need to be configured before others. Some may need to pause the initialization process and wait for a resource to become available. Some might directly depend on others and may need to wait for those extensions to be fully configured before self initializing. Some may only come to life after the entire context has been initialized.</p>
<p>It&#8217;s clear that the initialization process needs to be asynchronous. But without a good abstraction in place for dealing with asynchronous processing the context will be burdened with co-ordinating a complex series of events. Event soup is not delicious.</p>
<h2>Events, Signals, Tokens, Tasks, Promises, Futures, Callbacks</h2>
<p>There are a number of patterns for dealing with asynchronous processes. They have wildly different properties.</p>
<p>Some are low level, like the callback pattern. Some are high level, like the promise pattern. Some are guaranteed to be asynchronous, while others have the potential to be synchronous. Some are only good for observing. Some can be terminated, while others can be suspended and resumed. Some can be composed and chained. Some necessitate the instantiation of throw-away objects and put stress on the garbage collector. Some put stress on the stack.</p>
<h2>Take Your Pick</h2>
<p>I wanted something fairly low level that enabled asynchronous processing without adding unnecessary overhead in the cases where things could be synchronous (or skipped entirely).</p>
<p>I tried a number of things. For the most part: floppy, verbose and annoying implementations that moved the core problems around in less-than-useful ways.</p>
<h2>Dispatch</h2>
<p>Slowly it dawned on me. In this case all I wanted was an asynchronous message dispatcher. With a well defined set of callback conventions I could write something resembling an Event Dispatcher but without the overhead of creating throw-away objects (events) and with the ability to suspend and resume the dispatch when desired:</p>
<p><a title="Async Conventions" href="https://github.com/robotlegs/robotlegs-framework/blob/version2/src/robotlegs/bender/core/async/readme.md">Some Async Conventions</a></p>
<p><a href="https://github.com/robotlegs/robotlegs-framework/blob/version2/src/robotlegs/bender/core/messaging/readme.md">The Message Dispatcher</a></p>
<h2>Initialization, Extension, Please Continue</h2>
<p>Very well. Suppose that context initialization comprises 3 steps: preInitialize, selfInitialize and postInitialize. When told to initialize the context moves through those steps in sequence. Anyone can listen in and halt the process as required at any point. What we end up with is in essence just a simple state machine where the observers have the potential to be guards.</p>
<h2>The End</h2>
<p>Well, that&#8217;s where the re-write started anyway.</p>
<p><a href="https://github.com/robotlegs/robotlegs-framework/tree/version2/src">Robotlegs 2</a></p>
<p><img class="alignnone size-full wp-image-1083" title="Robotlegs Logo" src="http://shaun.boyblack.co.za/blog/wp-content/uploads/2012/01/RobotlegsDrop512.png" alt="" width="512" height="512" /></p>
<p>p.s. I dropped a bunch of stuff from the version2 branch. I&#8217;ll be going back to pull out any functionality that might have been lost shortly. If you come across anything that&#8217;s missing feel free to adapt it to the new codebase and send a pull request. Or drop an issue on the tracker. For quick reference, here&#8217;s the old version2 branch: <a href="https://github.com/robotlegs/robotlegs-framework/tree/version2-old">version2-old</a></p>
]]></content:encoded>
			<wfw:commentRss>http://shaun.boyblack.co.za/blog/2012/01/23/rl-reloaded/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Unit Testing: My problem with assertThat()</title>
		<link>http://shaun.boyblack.co.za/blog/2012/01/12/unit-testing-my-problem-with-assertthat/</link>
		<comments>http://shaun.boyblack.co.za/blog/2012/01/12/unit-testing-my-problem-with-assertthat/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 02:35:00 +0000</pubDate>
		<dc:creator>shaun</dc:creator>
				<category><![CDATA[Banter]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[unit-testing]]></category>

		<guid isPermaLink="false">http://shaun.boyblack.co.za/blog/?p=1017</guid>
		<description><![CDATA[I write &#8220;ass&#8221; a lot while I&#8217;m coding.]]></description>
			<content:encoded><![CDATA[<p>I write &#8220;ass&#8221; a lot while I&#8217;m coding.</p>
<p><img class="size-full wp-image-1018 alignleft" title="ass" src="http://shaun.boyblack.co.za/blog/wp-content/uploads/2012/01/ass.png" alt="" width="531" height="421" /></p>
]]></content:encoded>
			<wfw:commentRss>http://shaun.boyblack.co.za/blog/2012/01/12/unit-testing-my-problem-with-assertthat/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Commit Messages</title>
		<link>http://shaun.boyblack.co.za/blog/2011/11/09/commit-messages/</link>
		<comments>http://shaun.boyblack.co.za/blog/2011/11/09/commit-messages/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 18:29:56 +0000</pubDate>
		<dc:creator>shaun</dc:creator>
				<category><![CDATA[Banter]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://shaun.boyblack.co.za/blog/?p=1009</guid>
		<description><![CDATA[When reviewing a commit I&#8217;m not interested in what you did. A commit is a codebase transformation. I&#8217;m interested in what will happen to my codebase when I apply your commit. Bad &#8220;I did this&#8221; form: I had a cup of coffee, went for a walk, and changed some code. &#160; Better &#8220;This commit does this&#8221; form: Adds unmap() to the command map API. A commit message should describe the commit, not the process you went through to create it &#8230; <a href="http://shaun.boyblack.co.za/blog/2011/11/09/commit-messages/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When reviewing a commit I&#8217;m not interested in what you did. A commit is a codebase transformation. I&#8217;m interested in what will happen to my codebase when I apply your commit.</p>
<h4>Bad &#8220;I did this&#8221; form:</h4>
<pre>I had a cup of coffee, went for a walk, and changed some code.</pre>
<p>&nbsp;</p>
<h4>Better &#8220;This commit does this&#8221; form:</h4>
<pre>Adds unmap() to the command map API.</pre>
<p>A commit message should describe the commit, not the process you went through to create it &#8211; it is not a diary.</p>
]]></content:encoded>
			<wfw:commentRss>http://shaun.boyblack.co.za/blog/2011/11/09/commit-messages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unit Testing: Why I prefer assertThat()</title>
		<link>http://shaun.boyblack.co.za/blog/2011/11/08/unit-testing-why-i-prefer-assertthat/</link>
		<comments>http://shaun.boyblack.co.za/blog/2011/11/08/unit-testing-why-i-prefer-assertthat/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 17:57:41 +0000</pubDate>
		<dc:creator>shaun</dc:creator>
				<category><![CDATA[Banter]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[unit-testing]]></category>

		<guid isPermaLink="false">http://shaun.boyblack.co.za/blog/?p=1003</guid>
		<description><![CDATA[Consider: [Test] public function null_criteria_should_not_match():void { assertFalse("passing null should return false", instance.match(null)); } When reading the test above I have to do a lot of scanning. First I see the string message in the middle because it jumps out. The message is redundant as it&#8217;s included in the test name. If I change the test I&#8217;ll need to change both the method name and the string description. I can see that the string message would be useful for a test &#8230; <a href="http://shaun.boyblack.co.za/blog/2011/11/08/unit-testing-why-i-prefer-assertthat/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Consider:</p>
<pre>[Test]
public function null_criteria_should_not_match():void
{
  assertFalse("passing null should return false", instance.match(null));
}</pre>
<p>When reading the test above I have to do a lot of scanning.<span id="more-1003"></span></p>
<p>First I see the string message in the middle because it jumps out. The message is redundant as it&#8217;s included in the test name. If I change the test I&#8217;ll need to change both the method name and the string description. I can see that the string message would be useful for a test with multiple asserts, but that&#8217;s generally not a good idea.</p>
<p>After reading the string I look to the right to see what is being tested and mentally try to evaluate it.</p>
<p>Then I look to the left to see what the expectation is, possibly flipping the evaluation I just did to match the expectation.</p>
<p>It&#8217;s disconnected, and it&#8217;s hard work.</p>
<p>Consider this instead:</p>
<pre>[Test]
public function null_criteria_should_not_match():void
{
  assertThat(matcher.match(null), isFalse());
}</pre>
<p>Now I just read normally: top-to-bottom, left-to-right. I read the test name, look at what is being evaluated and see what is expected.</p>
]]></content:encoded>
			<wfw:commentRss>http://shaun.boyblack.co.za/blog/2011/11/08/unit-testing-why-i-prefer-assertthat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Too Much Of A Good Thing</title>
		<link>http://shaun.boyblack.co.za/blog/2011/07/31/too-much-of-a-good-thing/</link>
		<comments>http://shaun.boyblack.co.za/blog/2011/07/31/too-much-of-a-good-thing/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 13:38:28 +0000</pubDate>
		<dc:creator>shaun</dc:creator>
				<category><![CDATA[Banter]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Robotlegs]]></category>
		<category><![CDATA[dependency injection]]></category>
		<category><![CDATA[interfaces]]></category>

		<guid isPermaLink="false">http://shaun.boyblack.co.za/blog/?p=981</guid>
		<description><![CDATA[As an enthusiastic programmer I tend to get overly excited when I discover a new technique &#8211; nails, nails everywhere for my shiny new hammer! It&#8217;s not a bad thing. I&#8217;ll abuse my newfound technique until I fully understand where it is and isn&#8217;t appropriate. Sometimes this takes a while.  Injection Everywhere Automated Dependency Injection is a handy way to wire the component parts of a system together. But systems are comprised of components at varying levels of abstraction. Some &#8230; <a href="http://shaun.boyblack.co.za/blog/2011/07/31/too-much-of-a-good-thing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As an enthusiastic programmer I tend to get overly excited when I discover a new technique &#8211; nails, nails everywhere for my shiny new hammer! It&#8217;s not a bad thing. I&#8217;ll abuse my newfound technique until I fully understand where it is and isn&#8217;t appropriate. Sometimes this takes a while. <span id="more-981"></span></p>
<h3>Injection Everywhere</h3>
<p>Automated Dependency Injection is a handy way to wire the component parts of a system together. But systems are comprised of components at varying levels of abstraction. Some are high-level, domain specific abstractions, whilst others are low-level implementation details.</p>
<p>If every object in a system is given the same level of importance, thrown into a DI container, and made available to every other object, the layers of abstraction become very hard to see. The container becomes a mixed bag of configuration details, value objects, sub-systems and goodness-knows-what-else.</p>
<p>Does a URL (a very specific, low-level configuration detail) really deserve to be sitting in a flat container right alongside a high-level, domain specific model? Certainly not!</p>
<p>It can be difficult to determine what is and what isn&#8217;t appropriate for automated Dependency Injection. It depends on the system you are building, and is something that comes with time and experience. I&#8217;m certainly still struggling with it on a daily basis.</p>
<p>Here&#8217;s a related post on the matter:</p>
<p><a href="http://www.higherorderlogic.com/blog/2011/07/30/is-dependency-injection-like-facebook/">http://www.higherorderlogic.com/blog/2011/07/30/is-dependency-injection-like-facebook/</a></p>
<h3>Interfaces Everywhere</h3>
<p>Program to interfaces, not implementations. Interfaces decouple us from implementations, they are good, but, as always, there are some subtleties worth considering.</p>
<p>Many languages support explicit interfaces: contracts with absolutely no implementation details. But every object also has an implicit interface &#8211; the public methods and properties exposed by that object.</p>
<p>Creating an explicit interface for an object that will only ever have a single implementation is a violation of the DRY principle as the explicit interface duplicates the implicit one.</p>
<p>This happens most often when the interface is large and acts as a &#8220;stand-in&#8221; describing a class rather than a piece of behaviour. Sure, you *could* swap out the implementation at some point, but honestly, so much of the implementation has already leaked out into the interface that there is very little point in doing so.</p>
<p>Program to interfaces, but remember that sometimes a small implicit interface is better than a large explicit one.</p>
<p>Another related post:</p>
<p><a href="http://lostechies.com/derickbailey/2008/10/20/dependency-inversion-abstraction-does-not-mean-interface/">http://lostechies.com/derickbailey/2008/10/20/dependency-inversion-abstraction-does-not-mean-interface/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://shaun.boyblack.co.za/blog/2011/07/31/too-much-of-a-good-thing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 DI Metadata Tags</title>
		<link>http://shaun.boyblack.co.za/blog/2010/09/08/as3-di-metadata-tags/</link>
		<comments>http://shaun.boyblack.co.za/blog/2010/09/08/as3-di-metadata-tags/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 17:56:48 +0000</pubDate>
		<dc:creator>shaun</dc:creator>
				<category><![CDATA[Banter]]></category>
		<category><![CDATA[Robotlegs]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[dependency injection]]></category>
		<category><![CDATA[metadata]]></category>

		<guid isPermaLink="false">http://shaun.boyblack.co.za/blog/?p=964</guid>
		<description><![CDATA[Spring Actionscript, Dawn, SmartyPants-IOC, Swiz, Parsley and SwiftSuspenders (used by Robotlegs) perform Dependency Injection. Moreover they can all perform automatic DI by parsing class metadata. It would be grand if the common DI related metadata tags could be standardised. That way we really could write code that is decoupled from any particular framework. I&#8217;ve started a little document over at GitHub: http://github.com/darscan/AS3-DI-Metadata I don&#8217;t know the libraries well enough to fill in all the details, so if you could fork the &#8230; <a href="http://shaun.boyblack.co.za/blog/2010/09/08/as3-di-metadata-tags/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.springactionscript.org/">Spring Actionscript</a>, <a href="http://github.com/sammyt/dawn">Dawn</a>, <a href="http://smartypants.expantra.net/">SmartyPants-IOC</a>, <a href="http://swizframework.org/">Swiz</a>, <a href="http://www.spicefactory.org/parsley/">Parsley</a> and <a href="http://github.com/tschneidereit/SwiftSuspenders">SwiftSuspenders</a> (used by <a href="http://www.robotlegs.org/">Robotlegs</a>) perform Dependency Injection.</p>
<p>Moreover they can all perform automatic DI by parsing class metadata. It would be grand if the common DI related metadata tags could be standardised. That way we really could write code that is decoupled from any particular framework.</p>
<p>I&#8217;ve started a little document over at GitHub:</p>
<p><a href="http://github.com/darscan/AS3-DI-Metadata">http://github.com/darscan/AS3-DI-Metadata</a></p>
<p>I don&#8217;t know the libraries well enough to fill in all the details, so if you could fork the repo and edit the doc that would be great! Also, the format/layout could be better, so if you have any ideas on that front.. edit away.</p>
]]></content:encoded>
			<wfw:commentRss>http://shaun.boyblack.co.za/blog/2010/09/08/as3-di-metadata-tags/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Why Ruby Is Fun</title>
		<link>http://shaun.boyblack.co.za/blog/2010/08/24/why-ruby-is-fun/</link>
		<comments>http://shaun.boyblack.co.za/blog/2010/08/24/why-ruby-is-fun/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 01:14:55 +0000</pubDate>
		<dc:creator>shaun</dc:creator>
				<category><![CDATA[Banter]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://shaun.boyblack.co.za/blog/?p=953</guid>
		<description><![CDATA[Some little things I enjoy about Ruby:]]></description>
			<content:encoded><![CDATA[<p>Some little things I enjoy about <a href="http://www.ruby-lang.org/en/">Ruby</a>:<span id="more-953"></span></p>
<p><script src="http://gist.github.com/546533.js"> </script></p>
]]></content:encoded>
			<wfw:commentRss>http://shaun.boyblack.co.za/blog/2010/08/24/why-ruby-is-fun/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linking to your GitHub code</title>
		<link>http://shaun.boyblack.co.za/blog/2010/08/19/linking-to-your-github-code/</link>
		<comments>http://shaun.boyblack.co.za/blog/2010/08/19/linking-to-your-github-code/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 22:33:17 +0000</pubDate>
		<dc:creator>shaun</dc:creator>
				<category><![CDATA[Banter]]></category>
		<category><![CDATA[Robotlegs]]></category>
		<category><![CDATA[crybaby]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>

		<guid isPermaLink="false">http://shaun.boyblack.co.za/blog/?p=931</guid>
		<description><![CDATA[It&#8217;s pretty easy to link directly to a line of code in your GitHub repo: robotlegs/robotlegs-framework/blob/master/src/org/robotlegs/core/IContextProvider.as#L16 Don&#8217;t do that you naughty sausage! Your codebase will evolve (if all goes well), and line 16 will be replaced by a newer, shinier string of characters. Or, in this case, it&#8217;ll point to something that no longer exists. This, on the other hand, is more likely to stick around to haunt its author (me): robotlegs/robotlegs-framework/blob/v1.1.2/src/org/robotlegs/core/IContextProvider.as#L16 Select a tag before you link to your &#8230; <a href="http://shaun.boyblack.co.za/blog/2010/08/19/linking-to-your-github-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s pretty easy to link directly to a line of code in your <a title="GitHub" href="http://github.com/">GitHub</a> repo:</p>
<p><a href="http://github.com/robotlegs/robotlegs-framework/blob/master/src/org/robotlegs/core/IContextProvider.as#L16">robotlegs/robotlegs-framework/blob/<strong>master</strong>/src/org/robotlegs/core/IContextProvider.as#L16</a></p>
<p><strong>Don&#8217;t do that you naughty sausage!</strong> Your codebase will evolve (if all goes well), and line 16 will be replaced by a newer, shinier string of characters. Or, in this case, it&#8217;ll point to something that no longer exists.</p>
<p>This, on the other hand, is more likely to stick around to haunt its author (me):</p>
<p><a href="http://github.com/robotlegs/robotlegs-framework/blob/v1.1.2/src/org/robotlegs/core/IContextProvider.as#L16">robotlegs/robotlegs-framework/blob/<strong>v1.1.2</strong>/src/org/robotlegs/core/IContextProvider.as#L16</a></p>
<p>Select a tag before you link to your fancy code (&#8220;Switch Tags&#8221; under <a title="GitHub" href="http://github.com/">GitHub</a>&#8216;s &#8220;Source&#8221; menu).</p>
<p><img class="alignnone size-full wp-image-941" title="GitHub_Tags_435" src="http://shaun.boyblack.co.za/blog/wp-content/uploads/2010/08/GitHub_Tags_435.png" alt="" width="435" height="250" /></p>
]]></content:encoded>
			<wfw:commentRss>http://shaun.boyblack.co.za/blog/2010/08/19/linking-to-your-github-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clean Code</title>
		<link>http://shaun.boyblack.co.za/blog/2010/08/02/clean-code/</link>
		<comments>http://shaun.boyblack.co.za/blog/2010/08/02/clean-code/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 16:06:42 +0000</pubDate>
		<dc:creator>shaun</dc:creator>
				<category><![CDATA[Banter]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Inspiration]]></category>

		<guid isPermaLink="false">http://shaun.boyblack.co.za/blog/?p=911</guid>
		<description><![CDATA[I recently purchased @unclebobmartin&#8216;s awesome book: Clean Code. What a book! I&#8217;m going to echo a sentiment that often ripples through the Twittersphere: If you are a programmer and you haven&#8217;t read Clean Code you are doing your fellow programmers (and yourself) a great disservice. Seriously. For fun I decided to dig up the worst code I have ever written &#8211; quite a challenge considering how much terrible code I have produced in my life! Have a look at this &#8230; <a href="http://shaun.boyblack.co.za/blog/2010/08/02/clean-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently purchased <a title="Uncle Bob on Twitter" href="http://twitter.com/unclebobmartin">@unclebobmartin</a>&#8216;s awesome book: <a title="Clean Code on Amazon" href="http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882">Clean Code</a>. What a book! I&#8217;m going to echo a sentiment that often ripples through the Twittersphere: If you are a programmer and you haven&#8217;t read Clean Code you are doing your fellow programmers (and yourself) a great disservice. Seriously.<br />
<span id="more-911"></span><br />
For fun I decided to dig up the worst code I have ever written &#8211; quite a challenge considering how much terrible code I have produced in my life! Have a look at this beauty:</p>
<p><script src="http://gist.github.com/504823.js"></script></p>
<p>Stupid names, useless comments, multiple levels of abstraction, poor error handling, super deep nesting, etc etc etc. It pretty much breaks every rule in the book. <strong>But the best bit has to be this</strong>:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$rows_to_populate</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$foreign_table</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$foreign_id</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$module_name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$db_row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$field_name</span><span style="color: #339933;">;</span></div></div>
<p>Yes, that&#8217;s right, <strong>a five dimensional array!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://shaun.boyblack.co.za/blog/2010/08/02/clean-code/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

