<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.2" -->
<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/"
	>

<channel>
	<title>Pet Theory</title>
	<link>http://pet-theory.com/blog</link>
	<description></description>
	<pubDate>Wed, 06 Aug 2008 22:57:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>
	<language>en</language>
			<item>
		<title>You already know what unit testing is.</title>
		<link>http://pet-theory.com/blog/2008/08/06/you-already-know-what-unit-testing-is/</link>
		<comments>http://pet-theory.com/blog/2008/08/06/you-already-know-what-unit-testing-is/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 21:25:04 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://pet-theory.com/blog/2008/08/06/you-already-know-what-unit-testing-is/</guid>
		<description><![CDATA[Today I learned how to use rspec, the Rails plugin. It was my first experience with unit testing, and it seemed eerily familiar.
You know when you write a class and then instantiate it and throw a couple of curveballs at it just to make sure it works? And then you write a related class, and [...]]]></description>
			<content:encoded><![CDATA[<p>Today I learned how to use <a href="http://rspec.info/">rspec</a>, the Rails plugin. It was my first experience with unit testing, and it seemed eerily familiar.</p>
<p>You know when you write a class and then instantiate it and throw a couple of curveballs at it just to make sure it works? And then you write a related class, and throw both of them in the air for a few compiles? </p>
<p>That&#8217;s it. That&#8217;s what unit tests do. I had read a few tutorials on it, but their simple data class examples weren&#8217;t vivid enough to help me make this connection to my own practice.</p>
<p>It&#8217;s turning my stomach a little to realize how much time I&#8217;ve wasted. Informal unit testing is hugely inefficient. With informal unit testing, your little experiments are pretty much tossed into a big dark ditch. With formal unit testing, you can always run them again, which is priceless when you make a modification and need to make sure nothing has been broken. I get that now. Amen.</p>
]]></content:encoded>
			<wfw:commentRss>http://pet-theory.com/blog/2008/08/06/you-already-know-what-unit-testing-is/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OOP Old Hand, Table-Design Newbie</title>
		<link>http://pet-theory.com/blog/2008/07/23/oop-old-hand-table-design-newbie/</link>
		<comments>http://pet-theory.com/blog/2008/07/23/oop-old-hand-table-design-newbie/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 02:55:53 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://pet-theory.com/blog/2008/07/23/oop-old-hand-table-design-newbie/</guid>
		<description><![CDATA[There are tons of posts out there from back-end wizards who have seen the light when it comes to object orientation. This post has a few quick pointers for those going in the opposite direction, front-enders like myself who are OOP-fluent but just starting to lift the lid on the back-end and peer into the [...]]]></description>
			<content:encoded><![CDATA[<p>There are tons of posts out there from back-end wizards who have seen the light when it comes to object orientation. This post has a few quick pointers for those going in the opposite direction, front-enders like myself who are OOP-fluent but just starting to lift the lid on the back-end and peer into the darkness that is the business and database layers. </p>
<p><em>1. 70% of your instincts still apply.</em>  Designing a package of classes and a set of tables is a similar process. First you achieve a sense of how your specific domain (virtual worlds for 11-year-olds, shoe stores, mortgages, etc) works. Then you carve that domain into the most logically coherent parts. In both cases, the optimal division is the one easiest to maintain. For the OOPer, that means application-wide changes can be made in one place. For the database designer, that means data is not duplicated anywhere (data is &#8220;normalized&#8221;). It also means that the basic units of the system, whether classes or tables, can be combined and recombined for combinatorial limberness.</p>
<p> <a href="http://pet-theory.com/blog/2008/07/23/oop-old-hand-table-design-newbie/#more-162" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pet-theory.com/blog/2008/07/23/oop-old-hand-table-design-newbie/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Faster development with AS3?</title>
		<link>http://pet-theory.com/blog/2007/10/16/faster-development-with-as3/</link>
		<comments>http://pet-theory.com/blog/2007/10/16/faster-development-with-as3/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 17:04:14 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[workflow]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[office]]></category>

		<guid isPermaLink="false">http://pet-theory.com/blog/2007/10/16/faster-development-with-as3/</guid>
		<description><![CDATA[I was talking with my boss tonite about a big project coming up. He was explaining that a client was thinking of building a new site in AS2. I was dismayed. After developing with AS3 for a while, I was doing some AS2 work and hating it.  After AS1, AS2 was a godsend, but [...]]]></description>
			<content:encoded><![CDATA[<p>I was talking with my boss tonite about a big project coming up. He was explaining that a client was thinking of building a new site in AS2. I was dismayed. After developing with AS3 for a while, I was doing some AS2 work and hating it.  After AS1, AS2 was a godsend, but after AS3, AS2 is a huge pain in the ass.</p>
<p>He patiently explained to me that my personal likings were not the only factors to consider.  There was a lot of AS2 code that could be re-used. AS3 developers were rare and expensive, and training takes time. Etc.</p>
<p>In truth, weighing all these factors is above my pay grade. He is probably right in this case.  But, of course, that&#8217;s not what I said. Instead, I threw out that AS3 development is just faster. </p>
<p> <a href="http://pet-theory.com/blog/2007/10/16/faster-development-with-as3/#more-159" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pet-theory.com/blog/2007/10/16/faster-development-with-as3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Designing Pet 9: Transition Animations 99% Useless</title>
		<link>http://pet-theory.com/blog/2007/10/04/designing-pet-9-transition-animations-99-useless/</link>
		<comments>http://pet-theory.com/blog/2007/10/04/designing-pet-9-transition-animations-99-useless/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 18:14:04 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[speed]]></category>

		<category><![CDATA[interface]]></category>

		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://pet-theory.com/blog/2007/10/04/designing-pet-9-transition-animations-99-useless/</guid>
		<description><![CDATA[In my last post, I reviewed the code architecture of my playground site. In this post, I&#8217;ll explain its design.
I fear that the site will have all the charm of exposed pipe for the average Flash designer.  My fear is based partly on my primitive graphic-design skills, but mostly on the unusual nature of [...]]]></description>
			<content:encoded><![CDATA[<p>In my last post, I reviewed the <a href="http://pet-theory.com/blog/2007/05/19/building-pet-8-structure-for-an-html-like-all-flash-site/">code architecture</a> of my <a href="http://pet-theory.com/">playground site</a>. In this post, I&#8217;ll explain its design.</p>
<p>I fear that the site will have all the charm of exposed pipe for the average Flash designer.  My fear is based partly on my primitive graphic-design skills, but mostly on the unusual nature of the interface.</p>
<p>Here is the interface:</p>
<p><a href='http://pet-theory.com/blog/wp-content/uploads/2007/08/site.jpg' title='site'><img src='http://pet-theory.com/blog/wp-content/uploads/2007/08/site.jpg' alt='site' /></a></p>
<p> <a href="http://pet-theory.com/blog/2007/10/04/designing-pet-9-transition-animations-99-useless/#more-130" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pet-theory.com/blog/2007/10/04/designing-pet-9-transition-animations-99-useless/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Joy of Programming</title>
		<link>http://pet-theory.com/blog/2007/10/03/the-joy-of-programming/</link>
		<comments>http://pet-theory.com/blog/2007/10/03/the-joy-of-programming/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 17:37:37 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[culture]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://pet-theory.com/blog/2007/10/03/the-joy-of-programming/</guid>
		<description><![CDATA[I was 35 when I started to program. And immediately I loved it. It was as if a part of my brain that had been locked away could suddenly cavort in the broad daylight of ongoing life. 
Having developed other skills and burnt though other passions, I was self-conscious about the joys of programming; I [...]]]></description>
			<content:encoded><![CDATA[<p>I was 35 when I started to program. And immediately I loved it. It was as if a part of my brain that had been locked away could suddenly cavort in the broad daylight of ongoing life. </p>
<p>Having developed other skills and burnt though other passions, I was self-conscious about the joys of programming; I wanted to know what this new thing was, and why it thrilled me. </p>
<p>Some joys were not specific to programming per se but would attend the learning of any skill.  Obviously, it&#8217;s cool to know how to do stuff.  I remember vividly the stultification of my three brothers (an accountant, a lawyer, an engineer) when they started their careers, and even more vividly how they slowly got pulled into the details and the drama of their craft. As <em>Moby Dick</em> proved with whole chapters on subjects like stripping of whale carcasses, almost anything can be made intriguing. In the future, maybe bird-watching, souffle and design patterns will each have a cable channel devoted to them.</p>
<p> <a href="http://pet-theory.com/blog/2007/10/03/the-joy-of-programming/#more-129" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pet-theory.com/blog/2007/10/03/the-joy-of-programming/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building Pet 8: Structure for an HTML-Like All-Flash Site</title>
		<link>http://pet-theory.com/blog/2007/05/19/building-pet-8-structure-for-an-html-like-all-flash-site/</link>
		<comments>http://pet-theory.com/blog/2007/05/19/building-pet-8-structure-for-an-html-like-all-flash-site/#comments</comments>
		<pubDate>Sat, 19 May 2007 23:12:44 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[patterns]]></category>

		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://pet-theory.com/blog/2007/05/19/building-pet-8-structure-for-an-html-like-all-flash-site/</guid>
		<description><![CDATA[In the first post of this series, I explained why I wanted features like long-term flexibility, deep linking, history, and background loading for my new, all-Flash playground site, pet-theory.com. I also explained why I used design patterns to meet these requirements.
In subsequent posts, I explained how it was done, focusing on one design pattern per [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://pet-theory.com/blog/2007/05/07/building-pet-1-the-need-for-patterns/">first post</a> of this series, I explained why I wanted features like long-term flexibility, deep linking, history, and background loading for my new, all-Flash playground site, <a href="http://www.pet-theory.com">pet-theory.com</a>. I also explained why I used design patterns to meet these requirements.</p>
<p>In subsequent posts, I explained how it was done, focusing on one design pattern per post: <a href="http://pet-theory.com/blog/2007/05/07/building-pet-2-the-strategy-pattern-for-navigation/">Strategy for navigation</a>, <a href="http://pet-theory.com/blog/2007/05/08/building-pet-3-the-mediator-pattern-for-app-files/">Mediator for application files</a>, <a href="http://pet-theory.com/blog/2007/05/08/building-pet-4-interfaces-for-loading/">Interface for loading</a>, <a href="http://pet-theory.com/blog/2007/05/09/building-pet-5-the-state-pattern-for-loading-swf-modules/">State for loading swfs</a>, <a href="http://pet-theory.com/blog/2007/05/10/building-pet-6-the-composite-pattern-for-a-background-loading-queue/">Composite for a background loading queue</a>, and <a href="http://pet-theory.com/blog/2007/05/10/building-pet-7-the-command-pattern-for-history/">Command for history</a>. </p>
<p>In this post, I&#8217;ll summarize the entire process. I&#8217;ll start by identifying the fundamental problem bedeviling all-Flash sites, and end by suggesting that my solution to this problem can be the basis of a flexible, lightweight, comprehensive framework.</p>
<p> <a href="http://pet-theory.com/blog/2007/05/19/building-pet-8-structure-for-an-html-like-all-flash-site/#more-109" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pet-theory.com/blog/2007/05/19/building-pet-8-structure-for-an-html-like-all-flash-site/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building Pet 7: The Command Pattern for History</title>
		<link>http://pet-theory.com/blog/2007/05/10/building-pet-7-the-command-pattern-for-history/</link>
		<comments>http://pet-theory.com/blog/2007/05/10/building-pet-7-the-command-pattern-for-history/#comments</comments>
		<pubDate>Thu, 10 May 2007 22:37:16 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[patterns]]></category>

		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://pet-theory.com/blog/?p=75</guid>
		<description><![CDATA[When they implement history at all, all-Flash sites tend to offer history-like gestures like a Back/Home/Before arrow in lieu of the actual, click-by-click back- and forward-tracking of a browser. 
This degradation of a useful and universally expected feature usually makes navigating these sites awkward, often painful.
So I decided (after preliminary reflections recorded in this post) [...]]]></description>
			<content:encoded><![CDATA[<p>When they implement history at all, all-Flash sites tend to offer history-like gestures like a Back/Home/Before arrow in lieu of the actual, click-by-click back- and forward-tracking of a browser. </p>
<p>This degradation of a useful and universally expected feature usually makes navigating these sites awkward, often painful.</p>
<p>So I decided (after preliminary reflections recorded in <a href="http://pet-theory.com/blog/?p=50">this post</a>) that my playground site should be equipped with a full-fledged history. </p>
<p>This decision committed me to a systematic approach to navigation, because I suspected that the more systematic the navigation, the more manageable the history&#8230;and this suspicion proved justified. Once I had set up a navigation system in which every navigation was handled by the same piece of code and used the same syntax, adding history was trivial.</p>
<p> <a href="http://pet-theory.com/blog/2007/05/10/building-pet-7-the-command-pattern-for-history/#more-75" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pet-theory.com/blog/2007/05/10/building-pet-7-the-command-pattern-for-history/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building Pet 6: The Composite Pattern for a Background Loading Queue</title>
		<link>http://pet-theory.com/blog/2007/05/10/building-pet-6-the-composite-pattern-for-a-background-loading-queue/</link>
		<comments>http://pet-theory.com/blog/2007/05/10/building-pet-6-the-composite-pattern-for-a-background-loading-queue/#comments</comments>
		<pubDate>Thu, 10 May 2007 22:21:23 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[patterns]]></category>

		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://pet-theory.com/blog/?p=73</guid>
		<description><![CDATA[The basic operation of the composite pattern is easily grasped. Composite is another wrapper pattern that involves one object rerouting method calls to another object with the same interface. 
Graphed, it looks nearly identical to the state pattern. Remember that with state, a wrapping object relays method calls to any one of a number of [...]]]></description>
			<content:encoded><![CDATA[<p>The basic operation of the composite pattern is easily grasped. Composite is another wrapper pattern that involves one object rerouting method calls to another object with the same interface. </p>
<p>Graphed, it looks nearly identical to the state pattern. Remember that with state, a wrapping object relays method calls to any one of a number of objects with the same interfaces, depending on its &#8220;state.&#8221;</p>
<p><a href='http://pet-theory.com/blog/wp-content/uploads/2007/05/stateversuecomposite.jpg' title='stateversuecomposite.jpg'><img src='http://pet-theory.com/blog/wp-content/uploads/2007/05/stateversuecomposite.jpg' alt='stateversuecomposite.jpg' /></a></p>
<p>With composite, rather than relaying the calls to one internal object, the wrapping object relays the calls to ALL of them. </p>
<p><a href='http://pet-theory.com/blog/wp-content/uploads/2007/05/composite.jpg' title='composite.jpg'><img src='http://pet-theory.com/blog/wp-content/uploads/2007/05/composite.jpg' alt='composite.jpg' /></a></p>
<p> <a href="http://pet-theory.com/blog/2007/05/10/building-pet-6-the-composite-pattern-for-a-background-loading-queue/#more-73" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pet-theory.com/blog/2007/05/10/building-pet-6-the-composite-pattern-for-a-background-loading-queue/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building Pet 5: The State Pattern for Loading SWF Modules</title>
		<link>http://pet-theory.com/blog/2007/05/09/building-pet-5-the-state-pattern-for-loading-swf-modules/</link>
		<comments>http://pet-theory.com/blog/2007/05/09/building-pet-5-the-state-pattern-for-loading-swf-modules/#comments</comments>
		<pubDate>Wed, 09 May 2007 20:40:41 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[patterns]]></category>

		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://pet-theory.com/blog/?p=72</guid>
		<description><![CDATA[In a tree of modules, some modules will need to load assets when selected&#8230;and some will themselves need to be loaded.
]]></description>
			<content:encoded><![CDATA[<p>In a tree of modules, some modules will need to load assets when selected&#8230;and some will themselves need to be loaded.</p>
<p> <a href="http://pet-theory.com/blog/2007/05/09/building-pet-5-the-state-pattern-for-loading-swf-modules/#more-72" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pet-theory.com/blog/2007/05/09/building-pet-5-the-state-pattern-for-loading-swf-modules/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building Pet 4: Interfaces for Loading</title>
		<link>http://pet-theory.com/blog/2007/05/08/building-pet-4-interfaces/</link>
		<comments>http://pet-theory.com/blog/2007/05/08/building-pet-4-interfaces/#comments</comments>
		<pubDate>Tue, 08 May 2007 17:48:23 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[patterns]]></category>

		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://pet-theory.com/blog/?p=71</guid>
		<description><![CDATA[I was acquainted with interfaces before I read Head First Design Patterns, but their full glory was hidden from me.
]]></description>
			<content:encoded><![CDATA[<p>I was acquainted with interfaces before I read <emp>Head First Design Patterns</emp>, but their full glory was hidden from me.</p>
<p> <a href="http://pet-theory.com/blog/2007/05/08/building-pet-4-interfaces/#more-71" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pet-theory.com/blog/2007/05/08/building-pet-4-interfaces/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
