<?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>Sam Pierson&#039;s Blog &#187; Software Development</title>
	<atom:link href="http://sampierson.com/blog/category/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://sampierson.com/blog</link>
	<description>Augmentation of an Imperfect Memory.</description>
	<lastBuildDate>Wed, 21 Jul 2010 01:41:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How do dump a Javascript object&#8217;s methods</title>
		<link>http://sampierson.com/blog/software-development/how-do-dump-a-javascript-objects-methods/</link>
		<comments>http://sampierson.com/blog/software-development/how-do-dump-a-javascript-objects-methods/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 01:41:32 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=695</guid>
		<description><![CDATA[
&#160;
for&#40;var i in objectname&#41; &#123;console.log&#40;i&#41;;&#125;

]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&nbsp;
<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #000066; font-weight: bold;">in</span> objectname<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/how-do-dump-a-javascript-objects-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to optimize a Solr index from Sunspot</title>
		<link>http://sampierson.com/blog/software-development/how-to-optimize-a-solr-index-from-sunspot/</link>
		<comments>http://sampierson.com/blog/software-development/how-to-optimize-a-solr-index-from-sunspot/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 03:37:10 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[solr]]></category>
		<category><![CDATA[sunspot]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=678</guid>
		<description><![CDATA[It doesn&#8217;t look like SunSpot has a builtin optimize command.
Here&#8217;s one way you can do it:

&#160;
Sunspot.session.session.send&#40;:connection&#41;.update RSolr::Message::Generator.new.build &#123; &#124;b&#124; b.optimize &#125;

Anyone know of a simpler one?
]]></description>
			<content:encoded><![CDATA[<p>It doesn&#8217;t look like SunSpot has a builtin optimize command.<br />
Here&#8217;s one way you can do it:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">&nbsp;
Sunspot.<span style="color:#9900CC;">session</span>.<span style="color:#9900CC;">session</span>.<span style="color:#9900CC;">send</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:connection</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">update</span> <span style="color:#6666ff; font-weight:bold;">RSolr::Message::Generator</span>.<span style="color:#9900CC;">new</span>.<span style="color:#9900CC;">build</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>b<span style="color:#006600; font-weight:bold;">|</span> b.<span style="color:#9900CC;">optimize</span> <span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p>Anyone know of a simpler one?</p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/how-to-optimize-a-solr-index-from-sunspot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resque</title>
		<link>http://sampierson.com/blog/software-development/resque/</link>
		<comments>http://sampierson.com/blog/software-development/resque/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 03:15:14 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[redis]]></category>
		<category><![CDATA[resque]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=683</guid>
		<description><![CDATA[Github&#8217;s excellent analysis of the extant background jobs runners and introduction to Resque
]]></description>
			<content:encoded><![CDATA[<p>Github&#8217;s excellent analysis of the extant background jobs runners and <a href="http://github.com/blog/542-introducing-resque">introduction to Resque</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/resque/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selenium-RC and Snow Leopard</title>
		<link>http://sampierson.com/blog/software-development/selenium-rc-and-snow-leopard/</link>
		<comments>http://sampierson.com/blog/software-development/selenium-rc-and-snow-leopard/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 00:47:34 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=661</guid>
		<description><![CDATA[Selenium-RC was having issues on Snow Leopard:

&#160;
dyld: Library not loaded: /usr/lib/libsqlite3.dylib
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0

Web searches produced a lot of information including some workarounds that didn&#8217;t.  Finally I read that Selenium-RC 1.x has some hardcoded paths in it that mean it won&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Selenium-RC was having issues on Snow Leopard:</p>

<div class="wp_syntax"><div class="code"><pre class="foo" style="font-family:monospace;">&nbsp;
dyld: Library not loaded: /usr/lib/libsqlite3.dylib
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0</pre></div></div>

<p>Web searches produced a lot of information including some workarounds that didn&#8217;t.  Finally I read that Selenium-RC 1.x has some hardcoded paths in it that mean it won&#8217;t work with Snow Leopard, and you need to get the Selenium-RC 2.x jar (alpha at this time).  The easiest way to do this is to install the <a href="http://gemcutter.org/gems/selenium-rc">selenium-rc gem</a> that <a href="http://github.com/pivotal/selenium-rc">Pivotal packaged</a>.</p>
<p>[Update]</p>
<p>More recently,  have been having issues running Cucumber/Webrat/Selenium on new MacOS systems.  It turns out that Webrat contains an out-of-date version of the selenium server jar file.  If you are using Webrat, you need to copy the good selenium-server.jar from the selenium-rc package over the version contained in the Webrat gem.  Something like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Ruby<span style="color: #000000; font-weight: bold;">/</span>Gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span>selenium-rc-2.2.1<span style="color: #000000; font-weight: bold;">/</span>vendor<span style="color: #000000; font-weight: bold;">/</span>selenium-server.jar <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Ruby<span style="color: #000000; font-weight: bold;">/</span>Gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span>webrat-0.7.0<span style="color: #000000; font-weight: bold;">/</span>vendor<span style="color: #000000; font-weight: bold;">/</span>selenium-server.jar</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/selenium-rc-and-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RubyMine not recognizing cucumber features</title>
		<link>http://sampierson.com/blog/software-development/rubymine-not-recognizing-cucumber-features/</link>
		<comments>http://sampierson.com/blog/software-development/rubymine-not-recognizing-cucumber-features/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 22:19:23 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rubymine]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=658</guid>
		<description><![CDATA[If RubyMine isn&#8217;t recognizing cucumber features, ensure the following:

Cucumber gem is attached to project: RM &#124; Settings &#124; Ruby SDK and Gems &#124; Attach gems.
If you edited *.feature files in early version of RubyMine it may be mapped on Text file. So you should check that *.feature extension is mapped on &#8220;Cucumber scenario files&#8221; in [...]]]></description>
			<content:encoded><![CDATA[<p>If RubyMine isn&#8217;t recognizing cucumber features, ensure the following:</p>
<ol>
<li>Cucumber gem is attached to project: RM | Settings | Ruby SDK and Gems | Attach gems.</li>
<li>If you edited *.feature files in early version of RubyMine it may be mapped on Text file. So you should check that *.feature extension is mapped on &#8220;Cucumber scenario files&#8221; in RM | Settings | File Types |  Recognized File Types.</li>
</ol>
<p>per <a href="http://www.jetbrains.net/devnet/message/5238832#5238832">Roman at JetBrains</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/rubymine-not-recognizing-cucumber-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Superstar Developers</title>
		<link>http://sampierson.com/blog/software-development/superstar-developers/</link>
		<comments>http://sampierson.com/blog/software-development/superstar-developers/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 17:11:57 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=655</guid>
		<description><![CDATA[Zed Shaw is at it again.  This is an excellent post, that contains much truth: 3 Simple Rules That Will Make You a ‘Superstar’ Developer.
Which also provoked a great comment.
]]></description>
			<content:encoded><![CDATA[<p>Zed Shaw is at it again.  This is an excellent post, that contains much truth: <a href="http://coderoom.wordpress.com/2010/01/28/3-simple-rules-that-will-make-you-a-superstar-developer/">3 Simple Rules That Will Make You a ‘Superstar’ Developer</a>.</p>
<p>Which also provoked a <a href="http://coderoom.wordpress.com/2010/02/01/the-best-comment-ever-no-i-didnt-write-it/">great comment</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/superstar-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy rspec matchers</title>
		<link>http://sampierson.com/blog/software-development/easy-rspec-matchers/</link>
		<comments>http://sampierson.com/blog/software-development/easy-rspec-matchers/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 00:04:09 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=646</guid>
		<description><![CDATA[http://rspec.rubyforge.org/rspec/1.2.9/classes/Spec/Matchers.html
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rspec.rubyforge.org/rspec/1.2.9/classes/Spec/Matchers.html">http://rspec.rubyforge.org/rspec/1.2.9/classes/Spec/Matchers.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/easy-rspec-matchers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strongbox for ActiveRecord encryption</title>
		<link>http://sampierson.com/blog/software-development/strongbox-for-activerecord-encryption/</link>
		<comments>http://sampierson.com/blog/software-development/strongbox-for-activerecord-encryption/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 16:42:31 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=641</guid>
		<description><![CDATA[This looks really handy:
First spotted in a teachmetocode.com screencast.
Which references Spike&#8217;s original post.
]]></description>
			<content:encoded><![CDATA[<p>This looks really handy:</p>
<p>First spotted in <a href="http://www.teachmetocode.com/screencasts/11">a teachmetocode.com screencast</a>.<br />
Which references <a href="http://stuff-things.net/2009/04/17/introducing-strongbox/">Spike&#8217;s original post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/strongbox-for-activerecord-encryption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Calendar and iCalendar X-WR-CALNAME</title>
		<link>http://sampierson.com/blog/software-development/google-calendar-and-icalendar-x-wr-calname/</link>
		<comments>http://sampierson.com/blog/software-development/google-calendar-and-icalendar-x-wr-calname/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 16:35:16 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=637</guid>
		<description><![CDATA[I just figured out another Goggle Calendar idiosyncrasy:
When building an iCalendar (RFC 2445 / RFC 5545) feed, if you want to subscribe to that feed with Google Calendar, and you want to give your calendar a name, Google Calendar accepts the X-WR-CALNAME extension to the iCalendar standard, but it will only allow a text name [...]]]></description>
			<content:encoded><![CDATA[<p>I just figured out another Goggle Calendar idiosyncrasy:</p>
<p>When building an iCalendar (<a href="http://tools.ietf.org/html/rfc2445">RFC 2445</a> / <a href="http://tools.ietf.org/html/rfc5545">RFC 5545</a>) feed, if you want to subscribe to that feed with Google Calendar, and you want to give your calendar a name, Google Calendar accepts the X-WR-CALNAME extension to the iCalendar standard, but it will <strong>only</strong> allow a text name if you add the parameter VALUE=TEXT, i.e.</p>
<pre>

X-WR-CALNAME;VALUE=TEXT:My Calendar Name
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/google-calendar-and-icalendar-x-wr-calname/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replacing folders with submodules in Git</title>
		<link>http://sampierson.com/blog/software-development/replacing-folders-with-submodules-in-git/</link>
		<comments>http://sampierson.com/blog/software-development/replacing-folders-with-submodules-in-git/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 03:15:18 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=629</guid>
		<description><![CDATA[I recently ran across the following problem:

Multiple people are developing on the same project, pushing commits into the same (e.g. GitHub) repo.
Developer A is working, and commits locally.
Developer B converts a folder into a Git submodule.
Developer A tries to git pull&#8230; BOOM &#8211; unresolveable conflict, local repo is left in a mess.

The problem is that [...]]]></description>
			<content:encoded><![CDATA[<p>I recently ran across the following problem:</p>
<ol>
<li>Multiple people are developing on the same project, pushing commits into the same (e.g. GitHub) repo.</li>
<li>Developer A is working, and commits locally.</li>
<li>Developer B converts a folder into a Git submodule.</li>
<li>Developer A tries to <em>git pull</em>&#8230; BOOM &#8211; unresolveable conflict, local repo is left in a mess.</li>
</ol>
<p>The problem is that because Developer A has a local commit, this forces a merge. <em>Git merge</em> has absolutely no idea how to resolve a conflict between a folder and a submodule.</p>
<p>To fix this, divide the merge into two parts, so you can separate the actions of removing the folder, and adding the submodule:</p>
<ul>
<li>Figure out the SHA of the commit where the folder was removed; let&#8217;s call it <em>abcdef</em> (as far as I am aware you cannot remove a folder and add in the submodule in 1 commit, so there will always be 2 commits here).</li>
<li>Reset your local repo back to HEAD</li>
<li>Merge up to that commit: git merge.</li>
<li>Merge the remaining commits</li>
</ul>
<p>i.e.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
git reset <span style="color: #660033;">--hard</span> HEAD
git merge abcdef
git merge</pre></div></div>

<p>Alternatively, if only a few commits have been made and you are very lazy, you can do the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
git merge origin~<span style="color: #000000;">5</span>
git merge origin~<span style="color: #000000;">4</span>
git merge origin~<span style="color: #000000;">3</span>
git merge origin~<span style="color: #000000;">2</span>
git merge origin~<span style="color: #000000;">1</span>
git merge</pre></div></div>

<p>Note that if you don&#8217;t have local changes, this issue does not occur as the fast-forward mechanism just applies all the commits in sequence and everything is cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/replacing-folders-with-submodules-in-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
