<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.11.81 (http://www.squarespace.com/) on Tue, 14 Feb 2012 12:25:57 GMT--><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Rob Kitson's Blog</title><link>http://robkitson.net/blog/</link><description></description><lastBuildDate>Mon, 12 Dec 2011 20:56:45 +0000</lastBuildDate><copyright></copyright><language>en-US</language><generator>Squarespace Site Server v5.11.81 (http://www.squarespace.com/)</generator><item><title>Thank you Steve</title><dc:creator>Rob Kitson</dc:creator><pubDate>Thu, 06 Oct 2011 06:44:00 +0000</pubDate><link>http://robkitson.net/blog/2011/10/5/thank-you-steve.html</link><guid isPermaLink="false">443153:4945022:13110522</guid><description><![CDATA[<p>As someone who has experienced very little death, the loss of Steve Jobs has had quite an unexpected impact on me. Part of me knew it was coming, while another part had convinced myself it was a couple years off. Quite frankly, I'm not sure how to deal with it and there will be some crying involved at some point.</p>

<p>My career started in the late 90's and I worked exclusively on Windows.  The average Mac users that I knew annoyed me. They were always complaining about incompatibility and they typically knew less about computers, in general, than Windows users.  As it turned out THAT was kind of the idea. Steve didn't want the average user to know about the specs of their machine, he just wanted them to have the best experience possible. It wasn't about specs, it was about experience.</p>

<p>I didn't fully grasp that until October 2008, when I gave my wife an iPhone 3G for her birthday. I had the AT&amp;T Tilt at the time and was pretty damn excited about the prospects of writing apps for the windows mobile platform. One problem though, I couldn't take my hands off her iPhone (literally) and it actually sparked a few arguments (sorry babe). I quickly made the decision to switch to the iPhone and have never been happier or more confident in a decision.</p>

<p>That iPhone purchase led me to other iPhones, my first MacBook, a MacMini, a couple Apple TVs, and an iMac. I couldn't be happier with ANY of those purchases. I didn't feel that any one of them was overpriced; in-fact, I priced out my iMac against the same computer (if assembled from mid-range parts at a very reasonable online retailer) and my iMac ended up being cheaper, after OS/software licensing fees.</p>

<p>Steve Jobs changed my life in the 80’s, but it took 20+ years for me to find out. He had a vision, he sold it, and he delivered. I will be forever grateful for the influence he had on the industry, the world, and eventually me.</p>

<p>I am deeply saddened by the loss of this truly remarkable man. I was not ready to see him go. My deepest condolences go out to his family and loved ones.</p>

<p>Thank you Mr. Jobs.</p>
]]></description><wfw:commentRss>http://robkitson.net/blog/rss-comments-entry-13110522.xml</wfw:commentRss></item><item><title>My Error/Exception Handling Philosophy</title><dc:creator>Rob Kitson</dc:creator><pubDate>Sun, 02 Oct 2011 21:35:09 +0000</pubDate><link>http://robkitson.net/blog/2011/10/2/my-errorexception-handling-philosophy.html</link><guid isPermaLink="false">443153:4945022:13055184</guid><description><![CDATA[<p>Exceptions should be exceptional. They should signal a major problem within the application, or one of it's dependencies.  They should be handled in the scope that is as close to the source of the error/exception as possible and only passed on when truly un-handleable. A system that throws a lot of exceptions, when functioning correctly, will make it very difficult to spot actual problems when they arise.  </p>

<p>Errors/exceptions should be descriptive and specific.The more (relevant) information you can give me about what's going sideways, the better.  I think custom exception classes play a critical role in providing this information. You can load them up with data that's relevant to the error and they can bubble up with that information until they are caught and at that point the the data they're holding can provide hints as to how to fix the problem.  If you use the standard errors/exceptions, just changing the message of the exception, you will find yourself doing a lot of string comparison/manipulation in a catch block in order to figure out what the error is, and wether you can handle it.</p>
]]></description><wfw:commentRss>http://robkitson.net/blog/rss-comments-entry-13055184.xml</wfw:commentRss></item><item><title>My Testing Philosophy</title><category>tdd</category><category>testing</category><dc:creator>Rob Kitson</dc:creator><pubDate>Sun, 02 Oct 2011 21:28:51 +0000</pubDate><link>http://robkitson.net/blog/2011/10/2/my-testing-philosophy.html</link><guid isPermaLink="false">443153:4945022:13055170</guid><description><![CDATA[<p>Whenever possible I write my tests first. I try to keep my tests small and focused on a particular behavior of the SUT (System Under Test, a.k.a. the class I'm currently testing). I tend towards unit tests that exercise my SUTs in isolation, using mock objects to control the interactions it may have with it's dependencies but also wrapping those interactions in helper methods within the SUT to avoid creating tests that have too much knowledge about the implementation of the method being tested.</p>

<p>Integration tests are crucial to ensuring that the system is working from end-to-end, but should be used sparingly due to the fact that they typically are: long-running, more difficult to setup, more brittle, and quick to increase in number and complexity.  My typical integration test suite includes 1 happy-path test and 1 sad-path test (the most critical), while every 'contract' between classes will have tests for the interesting pre/post conditions.</p>

<p>On occasion, I'll write a throw-away test fixture who's sole purpose is exploratory testing of a new 3rd party library/module that I want to get familiar with before adding it to my project.</p>
]]></description><wfw:commentRss>http://robkitson.net/blog/rss-comments-entry-13055170.xml</wfw:commentRss></item><item><title>Better living through favicons</title><dc:creator>Rob Kitson</dc:creator><pubDate>Wed, 30 Mar 2011 01:38:48 +0000</pubDate><link>http://robkitson.net/blog/2011/3/29/better-living-through-favicons.html</link><guid isPermaLink="false">443153:4945022:10991000</guid><description><![CDATA[<p>I use tabs, lots of them, and usually in more than one browser window. &nbsp;Recently I've found myself hunting for the specific tab that has the site I'm developing/testing locally, testing in a staging environment, or verifying in the production environment, and I&rsquo;ve gradually been getting more annoyed with the friction.<span>&nbsp;</span></p>
<p>Last night I had an epiphany: What if I provided a different favicon for each environment instead of the same one for each? A little research and I discovered that I didn&rsquo;t have to have a file name favicon.ico, I could name it whatever I wanted AND you can use file formats other than .ico.</p>
<div></div>
<div id="_mcePaste"></div>
<div id="_mcePaste"></div>
<div id="_mcePaste"></div>
<div id="_mcePaste">I grabbed the actual favicon.ico and converted it to a .png. &nbsp;Then I made 2 distinctly different versions for my &lsquo;development&rsquo; and &lsquo;staging&rsquo; environments and saved with a naming schema that will allow me to quickly figure out which one to use.</div>
<div></div>
<div></div>
<div>These are the 3 I'll be using on one of my current projects:</div>
<div><span class="full-image-float-left ssNonEditable"><img src="http://robkitson.net/storage/favicon.png?__SQUARESPACE_CACHEVERSION=1301450509558" alt="" />&nbsp;favicon.png</span></div>
<div><span class="full-image-inline ssNonEditable"><span class="full-image-float-left ssNonEditable"><img src="http://robkitson.net/storage/favicon-staging.png?__SQUARESPACE_CACHEVERSION=1301450823240" alt="" />&nbsp;favicon-staging.png</span></span></div>
<div><span class="full-image-inline ssNonEditable"><span class="full-image-inline ssNonEditable"><span class="full-image-inline ssNonEditable"><img src="http://robkitson.net/storage/favicon-development.png?__SQUARESPACE_CACHEVERSION=1301450864983" alt="" />&nbsp;favicon-development.png</span><br /></span></span></div>
<div><span class="full-image-inline ssNonEditable"><span class="full-image-inline ssNonEditable"><span class="full-image-inline ssNonEditable">&nbsp;</span></span></span>&nbsp;</div>
<div>Next, I added this:</div>
<div style="font-size: 80%;">&lt;link rel="icon" href="http://robkitson.net/favicon&lt;%= ("-" + RAILS_ENV) unless RAILS_ENV == "production" %&gt;.png" type="image/png"&gt;</div>
<div id="_mcePaste">to the HEAD block in the /views/layouts/application.rb file. &nbsp;So now, when the site is loaded from production it uses favicon.png, but favicon-development.png and favicon-staging.png for the development and staging environments, respectively.</div>
</div>

<div>In hindsight it seems obvious, but this little hack reduced my tab hunting time drastically.</div>
<p>&nbsp;</p>]]></description><wfw:commentRss>http://robkitson.net/blog/rss-comments-entry-10991000.xml</wfw:commentRss></item><item><title>localhost:3000 friction</title><category>friction</category><dc:creator>Rob Kitson</dc:creator><pubDate>Wed, 30 Mar 2011 01:05:36 +0000</pubDate><link>http://robkitson.net/blog/2011/3/29/localhost3000-friction.html</link><guid isPermaLink="false">443153:4945022:10990755</guid><description><![CDATA[<p>If you're like me, you probably have more than a few rails projects on your machine. And, if you're like me, you probably don't worry too much about setting the port when you spin up webrick to test your stuff.</p>
<div id="_mcePaste">Recently I've been increasingly annoyed by my browser trying to autocomplete my http:://localhost:3000/ urls to paths that are relevant to different projects. &nbsp;I think I've found a simple solution that's been working for me for the past few weeks. I edited my /etc/hosts file to include entries for project names that point to the localhost, like this:</div>
<blockquote>
<div>127.0.0.1<span style="white-space: pre;"> </span>new_project</div>
<div>127.0.0.1<span style="white-space: pre;"> </span>other_project</div>
<div>127.0.0.1 sandbox</div>
</blockquote>
<div>Now, when I'm working on 'other_project', the url is <em>http://other_project:3000/</em>&nbsp;and the browser doesn't try to autocomplete paths for <em>http://new_project:3000/</em> or <em>http://sandbox/. </em>Of course, I have to be cognizant of the fact that any of my hosts entries will contact the webrick instance that is currently running on the port I'm designating in my url, but that's a bit less annoying than getting my url schemes mixed up between projects.</div>
<div></div>
<p>&nbsp;</p>]]></description><wfw:commentRss>http://robkitson.net/blog/rss-comments-entry-10990755.xml</wfw:commentRss></item><item><title>My Podcastroll</title><dc:creator>Rob Kitson</dc:creator><pubDate>Wed, 02 Mar 2011 23:04:56 +0000</pubDate><link>http://robkitson.net/blog/2011/3/2/my-podcastroll.html</link><guid isPermaLink="false">443153:4945022:10655089</guid><description><![CDATA[<!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Helvetica; color: #0f3def} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Helvetica; min-height: 16.0px} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Helvetica} span.s1 {color: #000000} span.s2 {text-decoration: underline} span.s3 {text-decoration: underline ; color: #0f3def} -->
<p class="p1"><strong>5by5:&nbsp;<a href="http://5by5.tv/" target="_blank"><span class="s2">http://5by5.tv/</span></a></strong></p>
<p class="p1">
<ul>
<li>Back to Work:&nbsp;<span class="s2"><a href="http://5by5.tv/b2w" target="_blank">http://5by5.tv/b2w</a></span></li>
<li><span class="s2"><a href="http://5by5.tv/b2w" target="_blank"></a></span>Hypercritical:&nbsp;<span class="s2"><a href="http://5by5.tv/hypercritical" target="_blank">http://5by5.tv/hypercritical</a></span></li>
<li><span class="s2"><a href="http://5by5.tv/hypercritical" target="_blank"></a></span>The Talk Show:&nbsp;<span class="s2"><a href="http://5by5.tv/talkshow" target="_blank">http://5by5.tv/talkshow</a></span></li>
<li><span class="s2"><a href="http://5by5.tv/talkshow" target="_blank"></a></span>Build and Analyze:&nbsp;<span class="s2"><a href="http://5by5.tv/buildanalyze" target="_blank">http://5by5.tv/buildanalyze</a></span></li>
<li><span class="s2"><a href="http://5by5.tv/buildanalyze" target="_blank"></a></span>The Dev Show:&nbsp;<span class="s2"><a href="http://5by5.tv/devshow" target="_blank">http://5by5.tv/devshow</a></span></li>
<li><span class="s2"><a href="http://5by5.tv/devshow" target="_blank"></a></span>The Pipeline:&nbsp;<span class="s2"><a href="http://5by5.tv/pipeline" target="_blank">http://5by5.tv/pipeline</a></span></li>
<li><span class="s2"><a href="http://5by5.tv/pipeline" target="_blank"></a></span>Briefly Awesome:&nbsp;<span class="s2"><a href="http://5by5.tv/brieflyawesome" target="_blank">http://5by5.tv/brieflyawesome</a></span></li>
<li><span class="s2"><a href="http://5by5.tv/brieflyawesome" target="_blank"></a></span>On the Internet:&nbsp;<span class="s2"><a href="http://5by5.tv/ontheinternet" target="_blank">http://5by5.tv/ontheinternet</a></span></li>
</ul>
</p>
<p class="p1"><strong>TWiT Network:&nbsp;<span class="s2"><a href="http://twit.tv/" target="_blank">http://twit.tv/</a></span></strong></p>
<p class="p1">
<ul>
<li>this WEEK in TECH:&nbsp;<span class="s3"><a href="http://twit.tv/twit" target="_blank">http://twit.tv/twit</a></span></li>
<li><span class="s3"><a href="http://twit.tv/twit" target="_blank"></a></span>Mac Break Weekly:&nbsp;<span class="s3"><a href="http://twit.tv/mbw" target="_blank">http://twit.tv/mbw</a></span></li>
<li><span class="s3"><a href="http://twit.tv/mbw" target="_blank"></a></span>this WEEK in GOOGLE:&nbsp;<span class="s3"><a href="http://twit.tv/twig" target="_blank">http://twit.tv/twig</a></span></li>
<li>Tech News Today:&nbsp;<span class="s3"><a href="http://twit.tv/tnt" target="_blank">http://twit.tv/tnt</a></span></li>
</ul>
</p>
<p class="p1"><span class="s1"><strong>This Week In...:&nbsp;<span class="s2"><a href="http://thisweekin.com/" target="_blank">http://thisweekin.com/</a></span></strong></span></p>
<p class="p1">
<ul>
<li>This Week In StartUps:&nbsp;<span class="s2"><a href="http://thisweekin.com/thisweekin-startups/" target="_blank">http://thisweekin.com/thisweekin-startups/</a></span>&nbsp;</li>
</ul>
</p>
<p class="p3"><strong>Other sources:</strong></p>
<p class="p3">
<ul>
<li>The Ruby Show:&nbsp;<span class="s2"><a href="http://rubyshow.com/" target="_blank">http://rubyshow.com/</a></span></li>
<li><span class="s2"><a href="http://rubyshow.com/" target="_blank"></a></span>This Developer's Life:&nbsp;<span class="s2"><a href="http://thisdeveloperslife.com/" target="_blank">http://thisdeveloperslife.com/</a></span></li>
<li><span class="s2"><a href="http://thisdeveloperslife.com/" target="_blank"></a></span>Mac Power Users:&nbsp;<span class="s2"><a href="http://macpowerusers.com/" target="_blank">http://macpowerusers.com/</a></span></li>
<li><span class="s2"><a href="http://macpowerusers.com/" target="_blank"></a></span>Herding Code:&nbsp;<span class="s2"><a href="http://herdingcode.com/" target="_blank">http://herdingcode.com/</a></span></li>
<li><span class="s2"><a href="http://herdingcode.com/" target="_blank"></a></span>Hanselminutes:&nbsp;<span class="s2"><a href="http://hanselminutes.com/" target="_blank">http://hanselminutes.com/</a></span></li>
</ul>
</p>
<p class="p1">&nbsp;</p>
<p class="p1"><span class="s1"><span class="s2">It's a lot of listening, good thing I have a dog that likes to go on walks...</span></span></p>]]></description><wfw:commentRss>http://robkitson.net/blog/rss-comments-entry-10655089.xml</wfw:commentRss></item><item><title>StackOverflow exploiters considered harmful</title><dc:creator>Rob Kitson</dc:creator><pubDate>Sun, 09 Jan 2011 05:00:38 +0000</pubDate><link>http://robkitson.net/blog/2011/1/8/stackoverflow-exploiters-considered-harmful.html</link><guid isPermaLink="false">443153:4945022:9981598</guid><description><![CDATA[<p>As a developer, I've come to expect a certain number of search results from StackOverflow.com per query. But recently I've noticed that the google juice, which rightfully belongs to StackOverflow, has been picked up by a few 'competitors' who have figured out how to monetize the Creative Commons Data Dump, that SO provides on a fairly regular basis.  They've leveraged the dump to populate pages with relevant data without keeping it current, and sometimes not even providing a link back to the actual SO question (making it even more stale).</p>
<p>If I were Jeff and Joel, I'd be pissed.  And though I understand that they want to be a community player; I think that taking a step back, they'd see that allowing these sites to use the data dump this way is clearly not in the best interest of the community.</p>
<p>That being said, recently Joel posted a link to a chrome extension which (upon loading a site which is shamelessly using the data dump) will redirect you to the appropriate StackOverflow page. Here's the link https://chrome.google.com/webstore/detail/gledhololmniapejefjfocffkhoamlll# and it worked like a charm for me. Hopefully it continues to do so.</p>]]></description><wfw:commentRss>http://robkitson.net/blog/rss-comments-entry-9981598.xml</wfw:commentRss></item><item><title>Unknown alias name: 'default'</title><category>rvm</category><dc:creator>Rob Kitson</dc:creator><pubDate>Thu, 09 Dec 2010 20:27:36 +0000</pubDate><link>http://robkitson.net/blog/2010/12/9/unknown-alias-name-default.html</link><guid isPermaLink="false">443153:4945022:9687709</guid><description><![CDATA[<p>I just upgraded <a href="http://rvm.beginrescueend.com/">RVM</a> to 1.0.13 and suddenly started getting the following error message in my terminal &nbsp;every time I executed a command.</p>
<blockquote>
<p><em>Unknown alias name: 'default'</em></p>
</blockquote>
<p>Turns out, RVM wants you to set your default version of ruby. Running the following command appears to have fixed the problem for me.</p>
<blockquote>
<p>rvm use ruby-1.9.2 --default</p>
</blockquote>]]></description><wfw:commentRss>http://robkitson.net/blog/rss-comments-entry-9687709.xml</wfw:commentRss></item><item><title>Not as lazy as I thought...</title><category>Lazy Load</category><category>NHibernate</category><dc:creator>Rob Kitson</dc:creator><pubDate>Sun, 28 Feb 2010 07:50:59 +0000</pubDate><link>http://robkitson.net/blog/2010/2/27/not-as-lazy-as-i-thought.html</link><guid isPermaLink="false">443153:4945022:6862050</guid><description><![CDATA[<p>I just ran into an unexpected lazy loading issue using NHibernate, so I thought I'd document it here.</p>
<p>Essentially, the domain has a Parent class (called Parent) which has a collection of Child classes (a property named Children which is an IList). The NHibernate mapping is setup as a lazy-loaded collection, which is very performant when the collection of children is small, which you'd typically find when doing unit testing or integration testing. The bottleneck starts showing up as soon as parent.Children.Add(newChild) is called and the number of children is sufficiently large enough to cause a delay while lazily loading the children.</p>
<p>The simple fix is to setup a bi-directional association between the objects and make sure the cascade goes in both directions. &nbsp;Once that's done, change 'parent.Children.Add(child);' to 'child.Parent = parent;' and flush the changes to the DB. Now, this change will not help very much if you are going to do queries against the Child collection before persisting the changes to the database (since the child won't be in the collection until a query is done to pull the collection out), but it will keep you from pulling all the Children from the database and into memory in order to simply add a new item to the collection. The next time the parent is loaded and the 'Children' property is referenced it will lazily load all the children, including the new record.</p>
<p>To sum it up: If you have a collection that's lazily loaded, and the 'Child' has a reference to the 'Parent', you're better of setting the 'Parent' of the 'Child' than adding the 'Child' to a collection in the 'Parent' since NHibernate is going to load the other 'Child' objects of the 'Parent' before it performs the Add().</p>]]></description><wfw:commentRss>http://robkitson.net/blog/rss-comments-entry-6862050.xml</wfw:commentRss></item><item><title>Learning the conventions</title><category>Conventions</category><category>Ruby on Rails</category><dc:creator>Rob Kitson</dc:creator><pubDate>Fri, 26 Feb 2010 05:22:00 +0000</pubDate><link>http://robkitson.net/blog/2010/2/25/learning-the-conventions.html</link><guid isPermaLink="false">443153:4945022:6848174</guid><description><![CDATA[<p>In effort to sharpen the saw a bit I started playing around with Ruby on Rails last week. &nbsp;I quickly realized a couple things about Convention over Configuration:</p>
<ol>
<li>How much busy work is avoided by using Conventions, which is probably why certain projects in the .Net and .Net OSS communities are rushing to add Conventions.</li>
<li>One should probably know what the Conventions are before diving into a project that uses them.</li>
</ol>
<p>So I did a quick google to get a list of the Conventions and found <a href="http://itsignals.cascadia.com.au/?p=7">this post on Ruby on Rails Naming Conventions</a>.</p>
<p>Here's the summary of the post, just in case it ever get's taken down.</p>
<blockquote>
<p><span style="font-family: Verdana; font-size: x-small;"><em>Model Naming Convention</em></span></p>
<p><span style="font-family: Verdana; font-size: x-small;">Table: orders<br />Class: Order<br />File: /app/models/order.rb<br />Primary Key: id<br />Foreign Key: customer_id<br />Link Tables: items_orders</span></p>
<p><span style="font-family: Verdana; font-size: x-small;"><em>Controller Naming Convention</em></span></p>
<p><span style="font-family: Verdana; font-size: x-small;">Class: OrdersController<br />File: /app/controllers/orders_controller.rb<br />Layout: /app/layouts/orders.html.erb</span></p>
<p><span style="font-family: Verdana; font-size: x-small;"><em>View Naming Convention</em></span></p>
<p><span style="font-family: Verdana; font-size: x-small;">Helper: /app/helpers/orders_helper.rb<br />Helper Module: OrdersHelper<br />Views: /app/views/orders/&hellip; (list.html.erb for example)</span></p>
<p><span style="font-family: Verdana; font-size: x-small;"><em>Tests Naming Convention</em></span></p>
<p><span style="font-family: Verdana; font-size: x-small;">Unit: /test/unit/order_test.rb<br />Functional: /test/functional/orders_controller_test.rb<br />Fixtures: /test/fixtures/orders.yml</span></p>
</blockquote>
<p><span style="font-family: Verdana; font-size: x-small;"><br /></span></p>
<blockquote>
<p><span style="font-family: Verdana; font-size: x-small;"><br /></span></p>
</blockquote>]]></description><wfw:commentRss>http://robkitson.net/blog/rss-comments-entry-6848174.xml</wfw:commentRss></item></channel></rss>
