<?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>distributedlife &#187; tips</title>
	<atom:link href="http://distributedlife.com/blog/category/tips/feed" rel="self" type="application/rss+xml" />
	<link>http://distributedlife.com/blog</link>
	<description>passionate about everything</description>
	<lastBuildDate>Sun, 31 Jul 2011 03:32:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Relevance of Testing</title>
		<link>http://distributedlife.com/blog/2008/11/the-relevance-of-testing.html</link>
		<comments>http://distributedlife.com/blog/2008/11/the-relevance-of-testing.html#comments</comments>
		<pubDate>Mon, 24 Nov 2008 13:55:02 +0000</pubDate>
		<dc:creator>Ryan Boucher</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://distributedlife.com/blog/?p=179</guid>
		<description><![CDATA[I like to look in the back of software development books for the word “testing” or even “unit testing” in the index. If it doesn’t have an entry, I question its relevance in the world of software development. If it does have an entry I am often surprised if the location is before the last [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0cm 0cm 10pt;"><span style="font-size: small; font-family: Calibri;">I like to look in the back of software development books for the word “testing” or even “unit testing” in the index. If it doesn’t have an entry, I question its relevance in the world of software development. If it does have an entry I am often surprised if the location is before the last 10% of the book. </span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt;"><span style="font-size: small; font-family: Calibri;">Obviously a book about testing is going to have a few more entries.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://distributedlife.com/blog/2008/11/the-relevance-of-testing.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes on Travel – Afternoon Driving</title>
		<link>http://distributedlife.com/blog/2008/11/notes-on-travel-%e2%80%93-afternoon-driving.html</link>
		<comments>http://distributedlife.com/blog/2008/11/notes-on-travel-%e2%80%93-afternoon-driving.html#comments</comments>
		<pubDate>Thu, 20 Nov 2008 13:55:03 +0000</pubDate>
		<dc:creator>Ryan Boucher</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[fatigue]]></category>
		<category><![CDATA[shadows]]></category>
		<category><![CDATA[tired]]></category>
		<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://distributedlife.com/blog/?p=177</guid>
		<description><![CDATA[An effect I experienced when I drove to the coast was in the late afternoon when the shadows of the trees partially covered the road they created this zebra stripe of shadow and light. After 10-15 minutes of driving in the constant flicker from light to shadow I started to get very tired. Now, I’ve [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: ">An effect I experienced when I drove to the coast was in the late afternoon when the shadows of the trees partially covered the road they created this zebra stripe of shadow and light. After 10-15 minutes of driving in the constant flicker from light to shadow I started to get very tired. Now, I’ve driven 14-15 hour days on plenty of occasions but I’ve never experienced this before and we had only been driving for just over two hours and that includes breaks.</span></p>
<p class="MsoNormal" style="margin-bottom: 10pt;"><span style="font-family: ">Having never heard or experienced the effect before I wonder how many accidents are caused by driving in the late afternoon when the shadows are long. </span></p>
<p class="MsoNormal" style="margin-bottom: 10pt;"><span style="font-family: "><br />
</span></p>
<p class="MsoNormal" style="margin-bottom: 10pt;">
]]></content:encoded>
			<wfw:commentRss>http://distributedlife.com/blog/2008/11/notes-on-travel-%e2%80%93-afternoon-driving.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes on Travel – Late Checkouts</title>
		<link>http://distributedlife.com/blog/2008/11/notes-on-travel-%e2%80%93-late-checkouts.html</link>
		<comments>http://distributedlife.com/blog/2008/11/notes-on-travel-%e2%80%93-late-checkouts.html#comments</comments>
		<pubDate>Wed, 19 Nov 2008 13:55:03 +0000</pubDate>
		<dc:creator>Ryan Boucher</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[checkin]]></category>
		<category><![CDATA[late]]></category>
		<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://distributedlife.com/blog/?p=175</guid>
		<description><![CDATA[If you can’t organise a later checkout and you don’t want to leave your bags somewhere for the day, book one room for an extra day and use that to sleep in and collect your wits, sober up, pack, etc. It makes the final day so much easier when you know you don’t have to [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin-bottom: 10pt;"><span style="font-family: ">If you can’t organise a later checkout and you don’t want to leave your bags somewhere for the day, book one room for an extra day and use that to sleep in and collect your wits, sober up, pack, etc. It makes the final day so much easier when you know you don’t have to rush.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://distributedlife.com/blog/2008/11/notes-on-travel-%e2%80%93-late-checkouts.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP Unit Testing Gotchas</title>
		<link>http://distributedlife.com/blog/2008/10/cakephp-unit-testing-gotchas.html</link>
		<comments>http://distributedlife.com/blog/2008/10/cakephp-unit-testing-gotchas.html#comments</comments>
		<pubDate>Thu, 16 Oct 2008 13:55:41 +0000</pubDate>
		<dc:creator>Ryan Boucher</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://distributedlife.com/blog/?p=158</guid>
		<description><![CDATA[CakePHP has caused me some grief in the past week. Seemingly simple unit testing tasks were made much harder than they should have been. This post is for anyone else who encounters these problems.
The first relates to the testAction method used to test controllers. When putting a querystring in the url doesn&#8217;t cause it to [...]]]></description>
			<content:encoded><![CDATA[<p>CakePHP has caused me some grief in the past week. Seemingly simple unit testing tasks were made much harder than they should have been. This post is for anyone else who encounters these problems.<br />
The first relates to the testAction method used to test controllers. When putting a querystring in the url doesn&#8217;t cause it to be automatically parsed and split like it normally is when the controller is directly invoked.</p>
<p>For example:</p>
<pre class="chili"><code class="c++""""""""""""""">
$this-&gt;testAction(&#039;/testing/post?company=utCompany&#039;, array(&#039;return&#039; =&gt; &#039;vars&#039;)) ;
</code></pre>
<p>will result in:</p>
<pre class="chili"><code class="c++""""""""""""""">
[url] =&gt; /testing/post?company=utCompany
</code></pre>
<p>While invoking the url directly via the web browser results in:</p>
<pre class="chili"><code class="php""""""""""""""""""""">
[url] =&gt; Array
(
[url] =&gt; testing/post
[company] =&gt; utCompany
)
</code></pre>
<p>The solution I found is a bit of a hack. There is meant to be a fix in the pipeline but it’s not in my build and I am not ready to update to RC3 (and I’m not even sure if the fix is in RC3). Either way there is no guarantee this feature will work beyond RC2</p>
<p>If the second testAction parameter includes a named array called &#8216;url&#8217; then the values will be placed in the $this-&gt;params object in the controller. This gives us the same net result as when the controller is directly invoked. This is not documented in the CakePHP manual.</p>
<pre class="chili"><code class="php""""""""""""""""">
$data = array (&#039;company&#039; =&gt; &#039;utCompany&#039;) ;

$result = $this-&gt;testAction(&#039;/testing/post&#039;, array
(
&#039;return&#039; =&gt; &#039;vars&#039;,
&#039;method&#039; =&gt; &#039;get&#039;,
&#039;url&#039; =&gt; $data
)) ;
</code></pre>
<p>I originally asked this question on <a href="http://stackoverflow.com/questions/200925/how-to-pass-querystring-to-testaction-in-cakephp-12">StackOverflow</a> but had to answer it myself. Still I got four achievements out of that one question. Not a bad return on my investment.</p>
<p>The second problem relates to caching. It is summed up in this post by Wil Clouser called <a href="http://micropipes.com/blog/2008/01/07/cakephps-cache-that-wouldnt-quit/">The Cache that wouldn’t quit</a>. My problem was that I was taking a snapshot of my table before my query ran so I could validate the results. The query had only run just beforehand so CakePHP went to the cache and got my previously unchanged dataset. This one drove me spare. I always forget the cache when I test because my policy is that <strong>unless I am testing the cache, the cache is turned off.</strong></p>
<p>The solution is fairly simple. The query command (of which I use a lot rather than CakePHP’s “automagic”) accepts a second parameter called “false”. When supplied it turns caching off.</p>
<p>This still leaves you with a problem because you want to call methods in your model. Your model can’t default to no-cache otherwise your prod code wouldn’t have any caching. The easiest solution I came up with is the following.</p>
<p>All of your model code inherits from AppModel. Update AppModel with the following property.</p>
<pre class="chili"><code class="php""""""""""""""""">
class AppModel extends Model
{
var $useCache = &#039;true&#039; ;
}
</code></pre>
<p>Then in your test model override the attribute with a value of false.</p>
<pre class="chili"><code class="php""""""""""""""""">
class UserTest extends User
{
var $name = &#039;UserTest&#039;;
var $useTable = &#039;users&#039; ;
var $useDbConfig = &#039;test&#039;;
var $useCache = &#039;false&#039; ;
}
</code></pre>
<p>In between those two snippets is your User model. User inherits from AppModel but has no need to manage caching. When you write a method on your model you will need to add one more chunk of code.</p>
<pre class="chili"><code class="php""""""""""""""""">
$result = parent::query
(
&#039;SELECT
users.id
FROM
users
WHERE
users.name = \&#039;&#039; . $name . &#039;\&#039;
AND
users.suspended = 0&#039;,
$this-&gt;useCache
) ;
</code></pre>
<p>Note that $this-&gt;useCache is used as the second parameter. This then gives you the ability to ensure caching is turned off while your test your model.<br />
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>EN-AU</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val="&#45;-" /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="9" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="20" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]></p>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin-top:0cm;
	mso-para-margin-right:0cm;
	mso-para-margin-bottom:10.0pt;
	mso-para-margin-left:0cm;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;}
</style>
<p><![endif]--></p>
<div style="border: 1pt solid windowtext; padding: 1pt 4pt; background: #e5b8b7 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<p class="MsoNormal" style="border: medium none; padding: 0cm; background: #e5b8b7 none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><strong>Note:</strong> Apologies for the crap code highlighting. It isn’t working well. It is better than what it was before, which was self-hiding code&#8230;</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://distributedlife.com/blog/2008/10/cakephp-unit-testing-gotchas.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Psychics</title>
		<link>http://distributedlife.com/blog/2008/08/psychics.html</link>
		<comments>http://distributedlife.com/blog/2008/08/psychics.html#comments</comments>
		<pubDate>Fri, 22 Aug 2008 16:58:06 +0000</pubDate>
		<dc:creator>Ryan Boucher</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://distributedlife.com/blog/?p=123</guid>
		<description><![CDATA[Psychics are a special property that can exist on any object in any programming language. To mark an object as psychic, simply include a relationship to another object within your framework, API or system. The compiler/interpreter will ensure that any documentation that is generated from the source code or is written by hand, if you [...]]]></description>
			<content:encoded><![CDATA[<p>Psychics are a special property that can exist on any object in any programming language. To mark an object as psychic, simply include a relationship to another object within your framework, API or system. The compiler/interpreter will ensure that any documentation that is generated from the source code or is written by hand, if you ever wrote documentation, is removed. This is to ensure that anyone attempting to use your code won&#8217;t be able to work why your framework doesn&#8217;t work in certain scenarios.</p>
<p>A free tip to anyone writing source code anywhere for any reason. If you make a dependency on another object and then silently fallback to reduced functionality when that object is not supplied, write it down. Don&#8217;t stop there, formally document in comic sans so that everyone notices the glaring type and takes note. If you really feel like helping people who licence your codebase, document the dependency in the dependant object. The following text is often sufficient:</p>
<blockquote><p><em>Feature X on this object is not available unless Object Y exists and is correctly configured.</em></p></blockquote>
<p><strong>Note: </strong>For all those that ask, this is how I like to spend my Friday nights.</p>
]]></content:encoded>
			<wfw:commentRss>http://distributedlife.com/blog/2008/08/psychics.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wading through large documents</title>
		<link>http://distributedlife.com/blog/2008/07/wading-through-large-documents.html</link>
		<comments>http://distributedlife.com/blog/2008/07/wading-through-large-documents.html#comments</comments>
		<pubDate>Sat, 19 Jul 2008 07:46:30 +0000</pubDate>
		<dc:creator>Ryan Boucher</dc:creator>
				<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://distributedlife.com/blog/?p=98</guid>
		<description><![CDATA[On the current project we have an unwieldy 280 page user interface specification that is up to version 3.0 and managed to double in size within a two week period. This can be a bit of a pain to manage if the revision history isn&#8217;t tip top and it certainly doesn&#8217;t help the environment if [...]]]></description>
			<content:encoded><![CDATA[<p>On the current project we have an unwieldy 280 page user interface specification that is up to version 3.0 and managed to double in size within a two week period. This can be a bit of a pain to manage if the revision history isn&#8217;t tip top and it certainly doesn&#8217;t help the environment if you print it out.</p>
<p>My suggestion is to make your own copy of the document and then delete pages once you have finished with them. It gives you an accurate way of visualising your progress as well as helping to ensure you don&#8217;t miss anything.</p>
<p><strong>Note: </strong>I&#8217;m sure my university lecturers would have done the same when I co-authored a 710 page design document. Actually, based on the scathing comments that were written on it I&#8217;m sure they wished they asked for it electronically rather than printed, one-up, single sided. Take that mother nature!</p>
<p><strong>2nd Note:</strong> Co-authored is a strong term, we did use a script to generate large swathes of the document.</p>
]]></content:encoded>
			<wfw:commentRss>http://distributedlife.com/blog/2008/07/wading-through-large-documents.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>from the trenches&#8230;</title>
		<link>http://distributedlife.com/blog/2008/07/from-the-trenches.html</link>
		<comments>http://distributedlife.com/blog/2008/07/from-the-trenches.html#comments</comments>
		<pubDate>Tue, 08 Jul 2008 12:23:59 +0000</pubDate>
		<dc:creator>Ryan Boucher</dc:creator>
				<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://distributedlife.com/blog/?p=92</guid>
		<description><![CDATA[What is the time to spec on that?
The turnaround time on a change request during the development and testing phases of the software development life cycle. Also an indication that your business analysis processes are taking too long.
]]></description>
			<content:encoded><![CDATA[<blockquote><p>What is the time to spec on that?</p></blockquote>
<p>The turnaround time on a change request during the development and testing phases of the software development life cycle. Also an indication that your business analysis processes are taking too long.</p>
]]></content:encoded>
			<wfw:commentRss>http://distributedlife.com/blog/2008/07/from-the-trenches.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Telephone Etiquette</title>
		<link>http://distributedlife.com/blog/2008/06/telephone-etiquette.html</link>
		<comments>http://distributedlife.com/blog/2008/06/telephone-etiquette.html#comments</comments>
		<pubDate>Mon, 23 Jun 2008 12:11:32 +0000</pubDate>
		<dc:creator>Ryan Boucher</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://distributedlife.com/blog/?p=81</guid>
		<description><![CDATA[Next time you are at work and you need to call someone’s desk phone, check to make sure that they are not currently in a meeting. This can be easily done if you use any Microsoft exchange like system within your organisation.
If your organisation doesn’t share calendars, open up outlook and create a new meeting [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Next time you are at work and you need to call someone’s desk phone, check to make sure that they are not currently in a meeting. This can be easily done if you use any Microsoft exchange like system within your organisation.</p>
<p style="text-align: justify;">If your organisation doesn’t share calendars, open up outlook and create a new meeting request. Go to the scheduling tab and add the person you want to call. You can’t see the specifics of their meetings but you can see when they are busy. <strong>When they are busy, do not call them</strong>. Chances are they are having a team meeting with the thirty other people in the room. Just like they do every Monday and have done for the past eighteen months.</p>
<p style="text-align: justify;">Once you have determined whether you can call, close the meeting request.</p>
<p style="text-align: justify;">Furthermore, try and obey the three ring rule. If I don’t answer in three rings, I am not going to answer. Don&#8217;t let it ring out. Send an email.</p>
]]></content:encoded>
			<wfw:commentRss>http://distributedlife.com/blog/2008/06/telephone-etiquette.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No that hasn&#8217;t changed</title>
		<link>http://distributedlife.com/blog/2008/06/no-that-hasnt-changed.html</link>
		<comments>http://distributedlife.com/blog/2008/06/no-that-hasnt-changed.html#comments</comments>
		<pubDate>Sat, 14 Jun 2008 13:55:00 +0000</pubDate>
		<dc:creator>Ryan Boucher</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://distributedlife.com/blog/?p=43</guid>
		<description><![CDATA[If you ever find yourself in a situation where existing functionality has stopped working due to development of new functionality. Rather than saying that you haven&#8217;t changed the old code. Do a diff on the previous check-in and move on.
]]></description>
			<content:encoded><![CDATA[<p>If you ever find yourself in a situation where existing functionality has stopped working due to development of new functionality. Rather than saying that you haven&#8217;t changed the old code. Do a diff on the previous check-in and move on.</p>
]]></content:encoded>
			<wfw:commentRss>http://distributedlife.com/blog/2008/06/no-that-hasnt-changed.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leveraging MSVC&#8217;s output window</title>
		<link>http://distributedlife.com/blog/2008/05/leveraging-msvcs-output-window.html</link>
		<comments>http://distributedlife.com/blog/2008/05/leveraging-msvcs-output-window.html#comments</comments>
		<pubDate>Mon, 26 May 2008 10:29:00 +0000</pubDate>
		<dc:creator>Ryan Boucher</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://distributedlife.com/blog/2008/05/leveraging-msvcs-output-window.html</guid>
		<description><![CDATA[If you use scripts to identify parts of your code that may not meet standards, you can simplify the job of the developer by making use of Visual Studio&#8217;s Output Window. Any output from a script that appears on a seperate line in the output window with the following format is clickable.
$filepath($line) : $message
When you [...]]]></description>
			<content:encoded><![CDATA[<p>If you use scripts to identify parts of your code that may not meet standards, you can simplify the job of the developer by making use of Visual Studio&#8217;s Output Window. Any output from a script that appears on a seperate line in the output window with the following format is clickable.</p>
<div style="text-align: center;"><span style="font-style: italic;">$filepath($line) : $message</span></div>
<p>When you click on it, the user is taken to the specified file and line and the message will be displayed in the status bar. This is how it works when you let Visual Studio perform builds for you.</p>
<p>So now that you know how to format user messages in the output window, you need to be able to run your script to that output is sent to the output window.</p>
<p>This is pretty easy to do&#8230; in Visual Studio, go to: Tools > External Tools and setup you&#8217;re tool a bit like mine. My example is a perl script that looks for <span style="font-style: italic;">//TODO </span>comments in code and writes the information to the standard output.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_aKoVGszkhDs/SDqzSgmmc_I/AAAAAAAAAEE/Gq0A2BxAwsY/s1600-h/example.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_aKoVGszkhDs/SDqzSgmmc_I/AAAAAAAAAEE/Gq0A2BxAwsY/s400/example.jpg" alt="" id="BLOGGER_PHOTO_ID_5204669449950884850" border="0" /></a><br />The &#8220;Use Output Window&#8221; is the kicker here. Otherwise it&#8217;ll run in a separate console window and be less useful to you. When you write your scripts, you should dump the output to the standard output. That is what gets piped into the output window.</p>
<p>With this in mind you can start writing scripts to useful feedback to developer like:
<ul>
<li>not consting parameters</li>
<li>identifying classes / methods without unit tests</li>
<li>poor coding standards / formatting</li>
<li>implementing <a href="http://msdn.microsoft.com/en-us/library/bb429476%28vs.80%29.aspx">FxCop </a>like functionality (for non C# languages)</li>
</ul>
<p>Basically anything you can identify in a script. I use it for enforcing coding standards, allowing other developers to mark areas for me that could be performance tuned.</p>
<p>It is also useful for doing ASCII to Unicode conversions. Conversions like so are non-trivial and carte-blanche find and replace methods generally don&#8217;t work. You can write a script to identify potential areas for change and then tackle them one at a time.</p>
<p>Happy Scripting!</p>
<p><span style="font-weight: bold;">note: </span>I don&#8217;t know how to get it to show up in the Error List window (not that I&#8217;ve looked recently) but if anyone knows, send me a link. That would be super.</p>
]]></content:encoded>
			<wfw:commentRss>http://distributedlife.com/blog/2008/05/leveraging-msvcs-output-window.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

