<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><!-- generator="wordpress/2.3.3" --><rss 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Panasonic Youth</title>
	<link>http://robsanheim.com</link>
	<description>rob sanheim writes about software, business, ruby, music, stuff and things</description>
	<pubDate>Thu, 31 Jul 2008 12:44:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<geo:lat>43.121416</geo:lat><geo:long>-89.349688</geo:long><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/PanasonicYouth" type="application/rss+xml" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site, subject to copyright and fair use.</feedburner:browserFriendly><item>
		<title>Git Clone vs cp -R –&gt; WTF?</title>
		<link>http://feeds.feedburner.com/~r/PanasonicYouth/~3/351022572/</link>
		<comments>http://robsanheim.com/2008/07/30/git-clone-vs-cp-r-wtf/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 01:04:44 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
		
		<category><![CDATA[Git]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://robsanheim.com/2008/07/30/git-clone-vs-cp-r-wtf/</guid>
		<description>I knew git was fast, and I even knew it was faster than a lot of plain linux local file operations.  Still, this still blew me away:


rsanheim@ares:~/src/personal/oss $ du -hd 0 insoshi/
&amp;#160;26M&amp;#160; &amp;#160; insoshi/
rsanheim@ares:~/src/personal/oss $ time git clone insoshi/ /tmp/insoshi
Initialize /tmp/insoshi/.git
Initialized empty Git repository in /private/tmp/insoshi/.git/
Checking out files: 100% &amp;#40;2193/2193&amp;#41;, done.
real&amp;#160; &amp;#160; 0m3.826s
user&amp;#160; &amp;#160; [...]</description>
			<content:encoded><![CDATA[<p>I knew git was fast, and I even knew it was faster than a lot of plain linux local file operations.  Still, this still blew me away:</p>
<div class="syntax_hilite">
<div id="code-3">
<div class="code">rsanheim@ares:~/src/personal/oss $ du -hd <span style="color:#800000;">0</span> insoshi/<br />
&nbsp;26M&nbsp; &nbsp; insoshi/</p>
<p>rsanheim@ares:~/src/personal/oss $ time git clone insoshi/ /tmp/insoshi<br />
Initialize /tmp/insoshi/.<span style="">git</span><br />
Initialized empty Git repository in /private/tmp/insoshi/.<span style="">git</span>/<br />
Checking out files: <span style="color:#800000;">100</span>% <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">2193</span>/<span style="color:#800000;">2193</span><span style="color:#006600; font-weight:bold;">&#41;</span>, done.</p>
<p><span style="">real</span>&nbsp; &nbsp; 0m3.826s<br />
user&nbsp; &nbsp; 0m0.251s<br />
sys&nbsp;0m0.658s</p>
<p>rsanheim@ares:~/src/personal/oss $ time cp -R insoshi/ /tmp/insoshi_cp</p>
<p>real&nbsp; &nbsp; 0m9.065s<br />
user&nbsp; &nbsp; 0m0.114s<br />
sys&nbsp;0m1.442s</div>
</div>
</div>
<p>
Ok, so a 26 meg repo takes almost three times as long to copy via a recursive cp than a local git clone.  Thats a fairly small repo, lets try something bigger:</p>
<div class="syntax_hilite">
<div id="code-4">
<div class="code">rsanheim@ares:~/src/relevance $ du -hd <span style="color:#800000;">0</span> rails<br />
&nbsp;75M&nbsp; &nbsp; rails</p>
<p>rsanheim@ares:~/src/relevance $ time git clone rails /tmp/rails2<br />
Initialize /tmp/rails2/.<span style="">git</span><br />
Initialized empty Git repository in /private/tmp/rails2/.<span style="">git</span>/</p>
<p>real&nbsp; &nbsp; 0m2.321s<br />
user&nbsp; &nbsp; 0m0.151s<br />
sys&nbsp;0m0.465s</p>
<p>rsanheim@ares:~/src/relevance $ time cp -R rails/ /tmp/rails</p>
<p>real&nbsp; &nbsp; 0m7.133s<br />
user&nbsp; &nbsp; 0m0.067s<br />
sys&nbsp;0m1.505s</div>
</div>
</div>
<p></p>
<p>The rails repo at 75 megs is still ~ 3 times faster.</p>
<p>Obviously, this is not scientific at all, but the point is pretty clear.  Git is doing some magic that lets it move files around locally 2 to 3 times faster than a plain copy.  From looking at the man page, I would guess it has something to do with git using hardlinks for things in .git/objects when cloning locally.  My linux fu falls down a bit here -- what are the ramifications of using hard links versus doing a "real" copy?</p>
<p>(This also makes me want to try out <a href="http://eigenclass.org/hiki/gibak-backup-system-introduction">gitbak</a> even more...)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=xJ1JbJ"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=xJ1JbJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=ocN91J"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=ocN91J" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=q1isPj"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=q1isPj" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PanasonicYouth/~4/351022572" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robsanheim.com/2008/07/30/git-clone-vs-cp-r-wtf/feed/</wfw:commentRss>
		<feedburner:origLink>http://robsanheim.com/2008/07/30/git-clone-vs-cp-r-wtf/</feedburner:origLink></item>
		<item>
		<title>Quick: Find the Bug or Gotcha with named_scope</title>
		<link>http://feeds.feedburner.com/~r/PanasonicYouth/~3/343277855/</link>
		<comments>http://robsanheim.com/2008/07/23/quick-find-the-bug-or-gotcha-with-named_scope/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 06:42:47 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://robsanheim.com/2008/07/23/quick-find-the-bug-or-gotcha-with-named_scope/</guid>
		<description>Think fast!  Where's the bug?


named_scope :active, :conditions =&amp;#62; &amp;#91;"activated_at &amp;#60;= ?", DateTime.now.utc.to_s&amp;#40;:db&amp;#41;&amp;#93;



Looks fine, right?  Maybe you've hit this already, and you see it immediately.  
The symptoms are that the DateTime.now always seems to be a bit off - maybe you just restarted your server and its a only a few minutes off.
The [...]</description>
			<content:encoded><![CDATA[<p>Think fast!  Where's the bug?</p>
<div class="syntax_hilite">
<div id="ruby-7">
<div class="ruby">named_scope :active, :conditions =&gt; <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">"activated_at &lt;= ?"</span>, DateTime.<span style="color:#9900CC;">now</span>.<span style="color:#9900CC;">utc</span>.<span style="color:#9900CC;">to_s</span><span style="color:#006600; font-weight:bold;">&#40;</span>:db<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</div>
</div>
<p></p>
<p>Looks fine, right?  Maybe you've hit this already, and you see it immediately.  </p>
<p>The symptoms are that the DateTime.now always seems to be a bit off - maybe you just restarted your server and its a only a few minutes off.</p>
<p>The bug is that DateTime.now gets evaluated at the time the class is loaded, not when the finder is run.  What makes this easy to miss is that it will always work fine in tests and development, as everything is constantly getting reloaded there.</p>
<p>The fix, obvious once you've spent a combined time of over an hour trying to figure out what is going on:</p>
<div class="syntax_hilite">
<div id="ruby-8">
<div class="ruby">named_scope :active, <span style="color:#CC0066; font-weight:bold;">lambda</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> :conditions =&gt; <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">"activated_at &lt;= ?"</span>, DateTime.<span style="color:#9900CC;">now</span>.<span style="color:#9900CC;">utc</span>.<span style="color:#9900CC;">to_s</span><span style="color:#006600; font-weight:bold;">&#40;</span>:db<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</div>
</div>
<p></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=PP2ycJ"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=PP2ycJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=y8NjSJ"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=y8NjSJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=deE8Sj"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=deE8Sj" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PanasonicYouth/~4/343277855" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robsanheim.com/2008/07/23/quick-find-the-bug-or-gotcha-with-named_scope/feed/</wfw:commentRss>
		<feedburner:origLink>http://robsanheim.com/2008/07/23/quick-find-the-bug-or-gotcha-with-named_scope/</feedburner:origLink></item>
		<item>
		<title>Notes on testing Bj (Background Job)</title>
		<link>http://feeds.feedburner.com/~r/PanasonicYouth/~3/331498572/</link>
		<comments>http://robsanheim.com/2008/07/10/notes-on-testing-bj-background-job/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 07:24:39 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
		
		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://robsanheim.com/2008/07/10/notes-on-testing-bj-background-job/</guid>
		<description>Some thoughts and random notes on testing Bj within a Rails integration test (or spec).

You have to turn transactions off for the scope of the test, or suffer very confusing issues, since Bj itself wraps the job submittal within a transaction.  The way I did this was just overriding the use_transactional_fixtures method in the [...]</description>
			<content:encoded><![CDATA[<p>Some thoughts and random notes on testing <a href="http://codeforpeople.rubyforge.org/svn/bj/trunk/README">Bj</a> within a Rails integration test (or spec).</p>
<ul>
<li>You have to turn transactions off for the scope of the test, or suffer very confusing issues, since Bj itself wraps the job submittal within a transaction.  The way I did this was just overriding the use_transactional_fixtures method in the one specific spec.</p>
<div class="syntax_hilite">
<div id="ruby-11">
<div class="ruby">describe Foo<br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">use_transactional_fixtures</span><br />
&nbsp; &nbsp; <span style="color:#0000FF; font-weight:bold;">false</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span></div>
</div>
</div>
<p>
</li>
<li>Remember, bj = <strong>background</strong> job.  This may seem obvious, but whatever you submit to bj will be running in an entirely different process, so in our spec you need to wait for that job to complete before trying to assert things.  You can do something as simple as this:
<div class="syntax_hilite">
<div id="ruby-12">
<div class="ruby">MAX_TIME = <span style="color:#006666;">10</span>.<span style="color:#006666;">0</span><br />
&nbsp; &nbsp; seconds = <span style="color:#006666;">0</span>.<span style="color:#006666;">0</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">while</span><span style="color:#006600; font-weight:bold;">&#40;</span>job.<span style="color:#9900CC;">pending</span>?<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span><br />
&nbsp; &nbsp; &nbsp; job.<span style="color:#9900CC;">reload</span><br />
&nbsp; &nbsp; &nbsp; seconds += <span style="color:#006666;">0</span>.<span style="color:#006666;">5</span><br />
&nbsp; &nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">sleep</span> <span style="color:#006666;">0</span>.<span style="color:#006666;">5</span><br />
&nbsp; &nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">raise</span> <span style="color:#9966CC; font-weight:bold;">if</span> seconds&gt; MAX_TIME<br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#008000; font-style:italic;"># normal assertions here </span></div>
</div>
</div>
<p>
This gives your job up to 10 seconds to finish, and will timeout if it takes too long, which usually means something has gone wrong.
</li>
<li>You now have to watch multiple logs to figure out what is going on.  So tail your test.log and tail the bj log as well, and run the script in isolation to make sure you understand where exceptions and syntax errors will go.  I wasted some time scanning logs when I really need to check the job.stderr field that bj populates, so be sure to output that for common test failures.</li>
</ul>
<p>Overall, I've been pleased with bj, besides some open questions I've still been working out by perusing the source.  Check it out if you need a easy to use persistent job queue.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=MtqSwJ"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=MtqSwJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=yukWGJ"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=yukWGJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=cwQzij"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=cwQzij" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PanasonicYouth/~4/331498572" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robsanheim.com/2008/07/10/notes-on-testing-bj-background-job/feed/</wfw:commentRss>
		<feedburner:origLink>http://robsanheim.com/2008/07/10/notes-on-testing-bj-background-job/</feedburner:origLink></item>
		<item>
		<title>CapGun and LogBuddy updated to 0.0.5</title>
		<link>http://feeds.feedburner.com/~r/PanasonicYouth/~3/327853640/</link>
		<comments>http://robsanheim.com/2008/07/06/capgun-and-logbuddy-updated-to-005/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 05:35:27 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
		
		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://robsanheim.com/2008/07/06/capgun-and-logbuddy-updated-to-005/</guid>
		<description>Some long overdue releases of cap_gun and log_buddy - both have been updated to version 0.0.5.  Both are now available as gems on github.com/relevance as well as from rubyforge.
CapGun gives you super simple deployment notifications from Capistrano.  LogBuddy gives you a log helper through all objects, and can also log the name of [...]</description>
			<content:encoded><![CDATA[<p>Some long overdue releases of <a href="http://github.com/relevance/cap_gun">cap_gun</a> and <a href="http://github.com/relevance/logbuddy/tree/master">log_buddy</a> - both have been updated to version 0.0.5.  Both are now available as gems on github.com/relevance as well as from rubyforge.</p>
<p>CapGun gives you super simple deployment notifications from Capistrano.  LogBuddy gives you a log helper through all objects, and can also log the name of the thing passed in along with its value -- saving you on typing and making debugging quicker.</p>
<p>CapGun got a fix so it does not attempt to display the rails_env if its not defined - this should clean up any strangeness in notifications if you saw something like "my_app was deployed to ".</p>
<p>LogBuddy got some minor tweaks and improved specs.</p>
<p>Both libraries now use Echoe, since Hoe complains about readme.txt when I want to use readme.rdoc, dammit.  Both now only have a dev dependency on echoe to play nice with RubyGems 1.2.</p>
<p>You can install them via github or rubyforge:</p>
<p><code>sudo gem install log_buddy<br />
sudo gem install cap_gun</p>
<p>or </p>
<p>gem sources -a http://gems.github.com<br />
sudo gem install relevance-log_buddy<br />
sudo gem install relevance-cap_gun<br />
</code></p>
<p>Please log bugs or issues at our <a href="http://opensource.thinkrelevance.com/">Trac</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=dcOE6J"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=dcOE6J" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=ZVk8NJ"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=ZVk8NJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=eP342j"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=eP342j" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PanasonicYouth/~4/327853640" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robsanheim.com/2008/07/06/capgun-and-logbuddy-updated-to-005/feed/</wfw:commentRss>
		<feedburner:origLink>http://robsanheim.com/2008/07/06/capgun-and-logbuddy-updated-to-005/</feedburner:origLink></item>
		<item>
		<title>Git 1.5.6 released</title>
		<link>http://feeds.feedburner.com/~r/PanasonicYouth/~3/315154791/</link>
		<comments>http://robsanheim.com/2008/06/18/git-156-released/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 04:51:47 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
		
		<category><![CDATA[Git]]></category>

		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://robsanheim.com/2008/06/18/git-156-released/</guid>
		<description>Git 1.5.6 has been released, and there are a lot of usability fixes and tweaks which should make the upgrade worth your while.  Looking at the detailed list of changes since 1.5.5, it looks like submodules have been getting quite a bit of love from many contributors, so it might be time to get [...]</description>
			<content:encoded><![CDATA[<p>Git 1.5.6 has been <a href="http://kerneltrap.org/Git/1.5.6_Relatively_Small_Impact_Changes">released</a>, and there are a lot of usability fixes and tweaks which should make the upgrade worth your while.  Looking at the detailed list of changes since 1.5.5, it looks like submodules have been getting quite a bit of love from many contributors, so it might be time to get them another shot.  Scroll down or search in the <a href="http://kerneltrap.org/Git/1.5.6_Relatively_Small_Impact_Changes">announcement</a> for the the part starting with "Changes since v1.5.5" and look through there for some of the submodule improvements that are coming.</p>
<p>The directions <a href="http://solutions.treypiepmeier.com/2008/02/25/installing-git-on-os-x-leopard/">posted here</a> worked fine for me to upgrade my existing source based installation in /usr/local.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=4g6Z0I"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=4g6Z0I" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=nH1wnI"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=nH1wnI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=rgJ5Ri"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=rgJ5Ri" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PanasonicYouth/~4/315154791" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robsanheim.com/2008/06/18/git-156-released/feed/</wfw:commentRss>
		<feedburner:origLink>http://robsanheim.com/2008/06/18/git-156-released/</feedburner:origLink></item>
		<item>
		<title>Git lessons learned</title>
		<link>http://feeds.feedburner.com/~r/PanasonicYouth/~3/306129941/</link>
		<comments>http://robsanheim.com/2008/06/06/git-lessons-learned/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 14:17:44 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
		
		<category><![CDATA[Git]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://robsanheim.com/2008/06/06/git-lessons-learned/</guid>
		<description>Lessons learned from day to day use with various ruby and rails projects.
* Submodules completely suck when things get complex - I'm moving away from no submodules, and using direct exports for now until I have time to research braid or piston 2.0.  For more details on this, see this or this post on [...]</description>
			<content:encoded><![CDATA[<p>Lessons learned from day to day use with various ruby and rails projects.</p>
<p>* Submodules completely suck when things get complex - I'm moving away from no submodules, and using direct exports for now until I have time to research braid or piston 2.0.  For more details on this, see <a href="http://blog.buildingwebapps.com/2008/5/20/got-git-submodules-not-a-go-go">this</a> or <a href="http://groups.google.com/group/github/browse_thread/thread/5f49768707d015dd">this post</a> on the github group.</p>
<p>* Use capistrano 2.2, not 2.3!  2.3 breaks git support</p>
<p>* Always use :remote_cache for deployments -- super fast with git</p>
<p>* If you have weird errors, it probably means you need to pull - when in doubt pull to make sure you have the latest</p>
<p>* Branch more locally - I've been burned a few times when I've started work in master and then regretted it later when I wished my work wasn't in mainline (yes, its possible to fix this after the fact, but that gets into more advanced git usage)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=yPCTcI"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=yPCTcI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=gdTjjI"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=gdTjjI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=VcPygi"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=VcPygi" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PanasonicYouth/~4/306129941" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robsanheim.com/2008/06/06/git-lessons-learned/feed/</wfw:commentRss>
		<feedburner:origLink>http://robsanheim.com/2008/06/06/git-lessons-learned/</feedburner:origLink></item>
		<item>
		<title>Refactotum Rails Conf 2008</title>
		<link>http://feeds.feedburner.com/~r/PanasonicYouth/~3/300621610/</link>
		<comments>http://robsanheim.com/2008/05/29/refactotum-rails-conf-2008/#comments</comments>
		<pubDate>Thu, 29 May 2008 15:39:41 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
		
		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[RailsConf]]></category>

		<guid isPermaLink="false">http://robsanheim.com/2008/05/29/refactotum-rails-conf-2008/</guid>
		<description>I'm in Portland for Rails Conf with over 80% of the Relevance crew.  We were testing out our "plane number" yesterday, but thank goodness American didn't let us down.
We'll be speaking today at about how to contribute to open source at Refactotum from 1:30 to 5.  We will cover some tools to help [...]</description>
			<content:encoded><![CDATA[<p>I'm in Portland for Rails Conf with over 80% of the <a href="http://thinkrelevance.com/about" title='see our ugly mugs'>Relevance crew</a>.  We were testing out our "plane number" yesterday, but thank goodness American didn't let us down.</p>
<p>We'll be speaking today at about how to contribute to open source at <a href="http://en.oreilly.com/rails2008/public/schedule/detail/2101">Refactotum</a> from 1:30 to 5.  We will cover some tools to help you find the code with the most technical debt, go over example refactorings, and then spend the rest of the session going from project to project and helping out as folks hit obstacles.  Please bring a laptop with any projects checked out that you'd like to hack on during the session (git preferred but not necessary). </p>
<p>Hope to see you there!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=aEkrFH"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=aEkrFH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=Ou4JEH"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=Ou4JEH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=85f3Eh"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=85f3Eh" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PanasonicYouth/~4/300621610" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robsanheim.com/2008/05/29/refactotum-rails-conf-2008/feed/</wfw:commentRss>
		<feedburner:origLink>http://robsanheim.com/2008/05/29/refactotum-rails-conf-2008/</feedburner:origLink></item>
		<item>
		<title>Testing Velocity Part 2 - Why do we test?</title>
		<link>http://feeds.feedburner.com/~r/PanasonicYouth/~3/272923471/</link>
		<comments>http://robsanheim.com/2008/04/18/testing-velocity-part-2-why-do-we-test/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 14:29:48 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
		
		<category><![CDATA[Agile]]></category>

		<category><![CDATA[BDD]]></category>

		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://robsanheim.com/2008/04/18/testing-velocity-part-2-why-do-we-test/</guid>
		<description>A couple weeks ago, I began a series on keeping your test suite fast and effective.  I now am going to digress a bit, take a step back and view the big picture to establish context.
Before addressing test performance and what makes up a good test, we should ask ourselves why is it that [...]</description>
			<content:encoded><![CDATA[<p>A couple weeks ago, I <a href="http://robsanheim.com/2008/03/26/testing-velocity-keeping-your-test-suite-fast-part-1/">began a series</a> on keeping your test suite fast and effective.  I now am going to digress a bit, take a step back and view the big picture to establish context.</p>
<p>Before addressing test performance and what makes up a good test, we should ask ourselves why is it that we write tests at all?  If we want to be effective, we should always stay conscious of the overall goal of testing, as well as the specific goals behind each test in context.</p>
<p>Some would argue that tests are primarily a design tool.  Or that tests are a living, breathing, specification for our code.  Others would say it's primarily a means to drive and maintain quality.  Some may say that tests are useful to ensure that the really difficult parts of our system work, or to keep lax developers in line.</p>
<p>Testing is *only* valuable and useful insofar as it supports software as a cooperative game.  When you think "cooperative game", imagine rock-climbing, or ?  To quote Alistair Cockburn:</p>
<p><cite><em>Software development is a (resource-limited) cooperative game of invention and communication. The primary goal of the game is to deliver useful, working software. The secondary goal, the residue of the game, is to set up for the next game. The next game may be to alter or replace the system or to create a neighboring system.</em></cite></p>
<p>So is testing for design, or quality, or correctness, or communication?  The answer is that it's for *all* of those things (and more) as long as it helps deliver working software and prepare for the next game!  So when someone asks, "Why do you write tests?  Why do you care about the speed of your tests?"  The first answer is, "It depends."  It depends on the software you are delivering, on the teammates and domain you are working with, and on what the next game (if any) is.  Since every software project will be different, clearly how you write the code and its tests will differ.  An embedded system targeting your phone will have a much different test suite than a large enterprise web app.</p>
<p>This digression is to clarify debates I've heard (and been involved in) over issues like what should a "proper" unit test should do, how much setup is okay, mocks or stubs or fake objects, and when it's okay to mock/stub versus when it's not okay.  There are not hard and fast answers to any of these questions.  You need to consider context: What is being built?  What are the current technical issues?  Does the client want to run (or create) acceptance tests?  How slow is the test suite currently, and is it impacting dev speed?  How large is the system, and how much larger do you expect it to be?  Who will be maintaining the system after it's released, and what will their skill level be?  </p>
<p>Answer those types of questions before making statements like "this spec is doing too much setup and runs too slow," or "we shouldn't be stubbing in a functional test like this."  It will ensure that your discussions and debates will stay grounded and useful instead of becoming endless religious debates.  Keep context and the cooperative game model of software in the back of your mind, and I will too as I continue this series and try to lay out some practical, overall guidelines.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=dKskFJG"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=dKskFJG" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=ZtLzBuG"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=ZtLzBuG" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=60HRLpg"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=60HRLpg" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PanasonicYouth/~4/272923471" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robsanheim.com/2008/04/18/testing-velocity-part-2-why-do-we-test/feed/</wfw:commentRss>
		<feedburner:origLink>http://robsanheim.com/2008/04/18/testing-velocity-part-2-why-do-we-test/</feedburner:origLink></item>
		<item>
		<title>CapGun Released!  Super simple Capistrano deployment notifications</title>
		<link>http://feeds.feedburner.com/~r/PanasonicYouth/~3/272563868/</link>
		<comments>http://robsanheim.com/2008/04/17/capgun-released-super-simple-capistrano-deployment-notifications/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 01:57:20 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
		
		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://robsanheim.com/2008/04/17/capgun-released-super-simple-capistrano-deployment-notifications/</guid>
		<description>Tell everyone about your releases!  Send email notification after Capistrano deployments!  Rule the world!
Drop your ActionMailer configuration information into your deploy.rb file, configure recipients for the deployment notifications, and setup the callback task.
Setup and configuration are done entirely inside your deploy.rb file to keep it super simple.  Your emails are sent locally [...]</description>
			<content:encoded><![CDATA[<p>Tell everyone about your releases!  Send email notification after Capistrano deployments!  Rule the world!</p>
<p>Drop your ActionMailer configuration information into your deploy.rb file, configure recipients for the deployment notifications, and setup the callback task.</p>
<p>Setup and configuration are done entirely inside your deploy.rb file to keep it super simple.  Your emails are sent locally from the box performing the deployment, but CapGun queries the server to grab the necessary release info.</p>
<p>This even includes the Net::SMTP TLS hack inside as a vendored dependancy to allow super easy email sending without setting up an MTA.</p>
<p>This is the "Rock n Roll McDonalds" release - 0.0.1.</p>
<h4>INSTALL</h4>
<ul>
<li>sudo gem install cap_gun  and gem unpack into your vendor/plugins</li>
<li>or just grab the tarball from github (see below)</li>
<li>see the readme and rdocs for more config notes</li>
</ul>
<h4>URLS</h4>
<ul>
<li>Log bugs, issues, and suggestions on Trac: <a href="http://opensource.thinkrelevance.com/wiki/cap_gun"> http://opensource.thinkrelevance.com/wiki/cap_gun </a></li>
<li>View source: <a href="http://github.com/relevance/cap_gun/tree/master">http://github.com/relevance/cap_gun/tree/master</a></li>
<li>Git clone source: git://github.com/relevance/cap_gun.git</li>
<li>RDocs: <a href="http://thinkrelevance.rubyforge.org/cap_gun/">http://thinkrelevance.rubyforge.org/cap_gun/</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=O7RrAKG"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=O7RrAKG" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=rlfruhG"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=rlfruhG" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=7fH8pmg"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=7fH8pmg" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PanasonicYouth/~4/272563868" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robsanheim.com/2008/04/17/capgun-released-super-simple-capistrano-deployment-notifications/feed/</wfw:commentRss>
		<feedburner:origLink>http://robsanheim.com/2008/04/17/capgun-released-super-simple-capistrano-deployment-notifications/</feedburner:origLink></item>
		<item>
		<title>history meme onwards…</title>
		<link>http://feeds.feedburner.com/~r/PanasonicYouth/~3/271191976/</link>
		<comments>http://robsanheim.com/2008/04/16/history-meme-onwards/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 05:15:27 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
		
		<category><![CDATA[Command Line]]></category>

		<category><![CDATA[Git]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://robsanheim.com/2008/04/16/history-meme-onwards/</guid>
		<description>rsanheim@ares:~$ history 1000 &amp;#124; awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' &amp;#124; sort -rn &amp;#124; head
71 gst
67 l
38 ****
38 c
28 git
22 ss
21 gca
13 gsd
13 :
12 rake

I like keeping it short.  The 3rd one thats bleeped out is a shortcut to my main client project right now.  The aliases can be found in [...]</description>
			<content:encoded><![CDATA[<p><code style="font-size:small">rsanheim@ares:~$ history 1000 | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head<br />
71 gst<br />
67 l<br />
38 ****<br />
38 c<br />
28 git<br />
22 ss<br />
21 gca<br />
13 gsd<br />
13 :<br />
12 rake<br />
</code></p>
<p>I like keeping it short.  The 3rd one thats bleeped out is a shortcut to my main client project right now.  The aliases can be found in our open source'd <a href="http://github.com/relevance/etc/tree/master/bash">etc stash on github.</a></p>
<p>Tagging <a href="http://muness.blogspot.com/">Muness</a>, <a href="http://jasonrudolph.com">Jason</a>, <a href="http://aaronbedra.com">Aaron</a>, and <a href="http://ozmm.org/">Chris</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=0IqvkYG"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=0IqvkYG" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=59inntG"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=59inntG" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/PanasonicYouth?a=81XOErg"><img src="http://feeds.feedburner.com/~f/PanasonicYouth?i=81XOErg" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/PanasonicYouth/~4/271191976" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robsanheim.com/2008/04/16/history-meme-onwards/feed/</wfw:commentRss>
		<feedburner:origLink>http://robsanheim.com/2008/04/16/history-meme-onwards/</feedburner:origLink></item>
	</channel>
</rss>
