<?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>Baroquebobcat &#187; ruby</title>
	<atom:link href="http://blog.baroquebobcat.com/category/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.baroquebobcat.com</link>
	<description>Ruby, Computer Science, Japan and Stuff</description>
	<lastBuildDate>Thu, 19 Jan 2012 02:05:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Upgrading from Rails 2.3.8 to 2.3.14: find_or_create_by on associations changed</title>
		<link>http://blog.baroquebobcat.com/2012/01/09/upgrading-from-rails-2-3-8-to-2-3-14-find_or_create_by-on-associations-change/</link>
		<comments>http://blog.baroquebobcat.com/2012/01/09/upgrading-from-rails-2-3-8-to-2-3-14-find_or_create_by-on-associations-change/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 03:52:08 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[rails 2.3]]></category>

		<guid isPermaLink="false">http://blog.baroquebobcat.com/?p=729</guid>
		<description><![CDATA[Update: I&#8217;m not the first one to run into this: lighthouse ticket find_or_create-via-has_many-fails-for-hash-parameters and rails/rails#207. Between 2.3.8 and 2.3.9 a change was added to ActiveRecord::Associations::AssociationCollection#method_missing that caused find_or_create_by_* to no longer accept hashes as arguments. An app I was upgrading from 2.3.8 ran into this as it passed hashes to a find_or_create_by_* call. The symptom [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> I&#8217;m not the first one to run into this: <a href="https://rails.lighthouseapp.com/projects/8994/tickets/6147-find_or_create-via-has_many-fails-for-hash-parameters">lighthouse ticket find_or_create-via-has_many-fails-for-hash-parameters</a> and <a href="https://github.com/rails/rails/pull/207">rails/rails#207</a>.<br />
Between 2.3.8 and 2.3.9 a change was added to <tt>ActiveRecord::Associations::AssociationCollection#method_missing</tt> that caused <tt>find_or_create_by_*</tt> to no longer accept hashes as arguments. An app I was upgrading from 2.3.8 ran into this as it passed hashes to a <tt>find_or_create_by_*</tt> call.</p>
<p>The symptom was that <tt>foobar</tt> in <tt>find_or_create_by_foobar</tt> became a serialized hash when saved to the database, instead of the string I was expecting.</p>
<p><script src="https://gist.github.com/1586708.js?file=db_col"></script></p>
<p>The reason it was changed was to ensure that the caches on the collection were updated properly (<a href="https://rails.lighthouseapp.com/projects/8994/tickets/1108">lighthouse 1108</a>) &#038; (<a href="https://github.com/rails/rails/commit/fad166c15277c72b370c90e890d509d0f6c9af63">commit fad166c1</a>), which is pretty important, but the fix didn&#8217;t take into account dealing w/ two of the cases that <tt>find_or_create_by_*</tt> accepts when called on an ActiveRecord class:</p>
<ul>
<li><tt>post.comments.find_or_create_by_body :body => 'bar', :type => 'baz'</tt></li>
<li><tt>post.comments.find_or_create_by_body 'bar', :type => 'baz'</tt></li>
</ul>
<p>The new behavior looked like this:</p>
<p><script src="https://gist.github.com/1586708.js?file=test.rb"></script></p>
<p>I wrote a patch for it (<a href="https://github.com/rails/rails/pull/4331">github.com/rails/rails/pull/4331</a>). Then I found out that 2.3 is only accepting security patches, so I closed it.</p>
<p>If you run into this and you want to use my patch, refer to gist <a href="https://gist.github.com/1586708">1586708</a> which has a monkey patchified version of it. If you want to work around the bug, you can use the optional block to set the attributes you were passing in the hash.</p>
<p><script src="https://gist.github.com/1586708.js?file=workaround.rb"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.baroquebobcat.com/2012/01/09/upgrading-from-rails-2-3-8-to-2-3-14-find_or_create_by-on-associations-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test ActiveRecord with Reset Transactions Without Rails</title>
		<link>http://blog.baroquebobcat.com/2012/01/09/test-activerecord-with-reset-transactions-without-rails/</link>
		<comments>http://blog.baroquebobcat.com/2012/01/09/test-activerecord-with-reset-transactions-without-rails/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 03:23:58 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.baroquebobcat.com/?p=725</guid>
		<description><![CDATA[I found myself wanting to use Rails&#8217; test transaction functionality in a Rails-less environment, and couldn&#8217;t find a tutorial about it. So I dug into the Rails source to figure out how it worked&#8211;just enough to pull it out into a gist. So, if you add this to your test_helper.rb or equivalent, you too can [...]]]></description>
			<content:encoded><![CDATA[<p>I found myself wanting to use Rails&#8217; test transaction functionality in a Rails-less environment, and couldn&#8217;t find a tutorial about it. So I dug into the Rails source to figure out how it worked&#8211;just enough to pull it out into a gist. So, if you add this to your <tt>test_helper.rb</tt> or equivalent, you too can have your ActiveRecord tests wrapped in transactions that rollback after each case. It also lets you use fixtures, but who does that?</p>
<p><script src="https://gist.github.com/1571808.js?file=test_transactions_without_rails.rb"></script><br />
<noscript><br />
<code># Snippet to wrap tests with ActiveRecord db transactions outside Rails.<br />
#<br />
# references:<br />
#   https://github.com/rails/rails/blob/master/railties/lib/rails/test_help.rb#L27<br />
#   https://github.com/rails/rails/blob/master/activerecord/lib/active_record/fixtures.rb#L704<br />
#<br />
# TestFixtures checks whether configurations is blank<br />
# to determine whether to use transactions/fixtures or not.<br />
# which is why we need to set it to something.<br />
ActiveRecord::Base.configurations= {test: {<br />
    database: 'something_test',<br />
    adapter: 'mysql',<br />
    # ...<br />
}}<br />
ActiveRecord::Base.establish_connection ActiveRecord::Base.configurations[:test]<br />
class ActiveSupport::TestCase < ::Test::Unit::TestCase<br />
  include ActiveRecord::TestFixtures<br />
  setup do<br />
    ActiveRecord::IdentityMap.clear<br />
  end<br />
# if you want to use fixtures you can set the fixture path, and it'll load them like rails does.<br />
# self.fixture_path = "my_fixtures"<br />
end</code><br />
</noscript></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.baroquebobcat.com/2012/01/09/test-activerecord-with-reset-transactions-without-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another BugMash This Saturday</title>
		<link>http://blog.baroquebobcat.com/2011/10/24/another-bugmash-this-saturday/</link>
		<comments>http://blog.baroquebobcat.com/2011/10/24/another-bugmash-this-saturday/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 01:16:06 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Boulder]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.baroquebobcat.com/?p=684</guid>
		<description><![CDATA[It&#8217;s halloween weekend and I&#8217;m going to mashing some bugs. Rails has got 557 issues open and we&#8217;re going to take a crack at &#8216;em. If you&#8217;ve never contributed to Rails before, or you have a couple commits that have been accepted, we&#8217;d love to have you. If you want to join me, please RSVP [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s halloween weekend and I&#8217;m going to mashing some bugs. Rails has got <a href="https://github.com/rails/rails/issues">557</a> issues open and we&#8217;re going to take a crack at &#8216;em.</p>
<p>If you&#8217;ve never contributed to Rails before, or you have a couple commits that have been accepted, we&#8217;d love to have you.</p>
<p> If you want to join me, please RSVP at <a href="http://plancast.com/p/86c6/rails-bugmash-halloween-special-edition">http://plancast.com/p/86c6/rails-bugmash-halloween-special-edition</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.baroquebobcat.com/2011/10/24/another-bugmash-this-saturday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RubyConf</title>
		<link>http://blog.baroquebobcat.com/2011/09/27/rubyconf/</link>
		<comments>http://blog.baroquebobcat.com/2011/09/27/rubyconf/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 03:11:10 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[travel]]></category>
		<category><![CDATA[rubyconf]]></category>

		<guid isPermaLink="false">http://blog.baroquebobcat.com/?p=656</guid>
		<description><![CDATA[RubyConf is this week. I&#8217;ll be there in my hat and beard. I&#8217;ll also be wearing my funny shoes. If anyone&#8217;s interested in talking about Mirah, ping me. Also, my friend Prakash is speaking, so give his talk a look.]]></description>
			<content:encoded><![CDATA[<p><a href="http://rubyconf.org/">RubyConf</a> is this week. I&#8217;ll be there in my hat and beard. I&#8217;ll also be wearing my funny shoes. If anyone&#8217;s interested in talking about Mirah, ping me.</p>
<p>Also, my friend <a href="http://www.prakashmurthy.com/">Prakash</a> is speaking, so give <a href="http://rubyconf.org/presentations/47">his talk</a> a look.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.baroquebobcat.com/2011/09/27/rubyconf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rocky Mountain Ruby Conf</title>
		<link>http://blog.baroquebobcat.com/2011/09/08/rocky-mountain-ruby-conf/</link>
		<comments>http://blog.baroquebobcat.com/2011/09/08/rocky-mountain-ruby-conf/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 15:56:25 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.baroquebobcat.com/?p=630</guid>
		<description><![CDATA[I enjoyed the conference last week. Serious props to Marty and the rest of the organizers. I wish I could have gone to more of it. Mini Code Retreat The code retreat went pretty well. I think the people who showed up had a good time, and learned a thing or two. We had about [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://picasaweb.google.com/lh/photo/29IGJH5q47Xv5PIW8XcstA?feat=embedwebsite"><img src="https://lh4.googleusercontent.com/-W8DajMlQtvM/Tl_ipb1vmBI/AAAAAAAAByA/DOcnENj6g6w/s288/2011-09-01_08-09-40_861.jpg" height="288" width="165" style="float:left;padding:5px" /></a></p>
<p>I enjoyed the conference last week. Serious props to Marty and the rest of the organizers. I wish I could have gone to more of it.</p>
<p><strong>Mini Code Retreat</strong><br />
The code retreat went pretty well. I think the people who showed up had a good time, and learned a thing or two. We had about 16 people show up initially, with some leaving after the first session.</p>
<p>It was my second time co-facilitating. I still get that, &#8220;Do I really know what I&#8217;m doing?&#8221; feeling, but I&#8217;ve gotten better about it. The thing that was hard for me was not asking as many questions. I want to see what people are thinking, and how they are conceptualizing what they are doing.</p>
<p>But, that&#8217;s not really necessary. I think my most important role in code retreat is enforcing the structure. Getting people to do more pairing with others that they don&#8217;t know, making sure the sessions run on time, that sort of thing. Which I certainly did.</p>
<p>Prakash facilitated with me. It was his first time doing it, and he totally rocked it. Together we had a lot of fun introducing some people to what code retreat is, and hopefully got them thinking about their craft in a way that will affect their day to day coding. Or at least that they had fun.</p>
<p><strong>Conferencing</strong></p>
<p>I could only go to the sessions on Thursday due to some timing issues on Friday, but I really enjoyed the talks I saw.</p>
<p><strong>Mike Gehard</strong> encouraged us all to meditate three times a week and tweet about it with the tag <a href="http://twitter.com/#!/search/%23devmed">#devmed</a>. So far I&#8217;ve managed to meditate in the mornings twice. My goal is to meditate for 10 minutes Monday/Wednesday/Friday, but we&#8217;ll see how that goes.</p>
<p><strong>Michael Feathers&#8217;</strong> keynote was on code blindness. He talked about how organizations who don&#8217;t deal directly in software tend to view and manage their software development and the stages they go through as they improve or don&#8217;t. There was a lot of good stuff in there. I thought the stages of code blindness/better understanding and management resonated with other things I&#8217;d read and experienced.</p>
<p>I came away with a few key things that affected me. One is to plan for your software&#8217;s obsolescence. Face it, code has a lifecycle. Another was that metrics are only useful in context. &#8220;We&#8217;re 5 this week &#038; we were 4 last week&#8221;&#8211;what does that mean? Also, don&#8217;t make metrics into goals, unless you want people to meet them to the exclusion of other, more useful things.</p>
<p><strong>API Design Matters</strong> by <a href="http://www.anthonyeden.com/">Anthony Eden</a> really resonated with me. Shipping software the last year or so, I&#8217;ve become more aware of the issues inherent in developing an API. I really think Readme Driven Design, and building the client code first, etc are really useful. Those are the sorts of things I think about working on Mirah and the other OSS projects I work on. They help you create an API that is fun and quick to understand. Not to say it&#8217;s easy to do though.</p>
<p><strong>REST and Hypermedia</strong> by <a href="http://nicksda.apotomo.de/">Nick Sutterer</a>. Apparently I&#8217;ve been doing it wrong all this time. In short, this is &#8220;APIs need links too.&#8221; More specifically, clients should never have to construct a URL beyond the initial entry point into your system. Every API response should contain within it links with associated actions s.t. a client can just traverse your system from one point to the next. Kind of like a person with a browser.</p>
<p><strong>Exceptional Ruby</strong> by Avdi Grimm. This was awesome. The examples were short and to the point. And, they were easy to understand. Exceptions in Ruby are really nifty. I need to play with <a href="http://avdi.org/devblog/2010/01/18/hammertime/">hammertime</a>.</p>
<p><strong>Mastering the Ruby Debugger</strong> by Jim Weirich. Jim&#8217;s a really good speaker. I always enjoy listening to his talks. I don&#8217;t really have much experience with Ruby&#8217;s debugger. This primer made me feel like if I needed to, I could just drop in and use it. He also introduced us to the <a href="https://rubygems.org/gems/pry">pry</a> library, which is a really cool little gem for inspecting object state.</p>
<p><strong>Unconference</strong><br />
<a href="https://picasaweb.google.com/lh/photo/ZuUwmfoVQRQEf1IG0qHHEg?feat=embedwebsite"><img src="https://lh4.googleusercontent.com/-S4fPJ3iTz7g/TmhMoiap0iI/AAAAAAAABz8/dKEfftusjy4/s400/2011-09-01_18-35-43_830.jpg" height="225" width="400" /></a><br />
I went to the unconference on Thursday evening and sat in on the Diversity Panel, and gave a short talk on Mirah.</p>
<p>We talked about the lack of diversity in our profession and the current dearth of good engineers and what to do about it. At the end, we came up with some things to do to bring more people into our community.</p>
<p>All in all, I enjoyed myself, met a lot of new and interesting people and learned quite a bit.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.baroquebobcat.com/2011/09/08/rocky-mountain-ruby-conf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mini Code Retreat at Rocky Mountain Ruby</title>
		<link>http://blog.baroquebobcat.com/2011/08/29/mini-code-retreat-at-rocky-mountain-ruby/</link>
		<comments>http://blog.baroquebobcat.com/2011/08/29/mini-code-retreat-at-rocky-mountain-ruby/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 04:25:40 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.baroquebobcat.com/?p=602</guid>
		<description><![CDATA[Tomorrow I&#8217;m helping facilitate a mini code retreat&#8211;one of the events for Rocky Mountain Ruby Conf. It&#8217;ll be the same format as a full code retreat, only with half the sessions. See you tomorrow!]]></description>
			<content:encoded><![CDATA[<p>Tomorrow I&#8217;m helping facilitate a <a href="http://minicoderetreat.eventbrite.com/">mini code retreat</a>&#8211;one of the events for <a href="http://rockymtnruby.com/">Rocky Mountain Ruby Conf</a>.</p>
<p>It&#8217;ll be the same format as a <a href="http://coderetreat.com/facilitation.html">full code retreat</a>, only with half the sessions.</p>
<p>See you tomorrow!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.baroquebobcat.com/2011/08/29/mini-code-retreat-at-rocky-mountain-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mountain West Ruby Conf</title>
		<link>http://blog.baroquebobcat.com/2011/03/22/mountain-west-ruby-conf/</link>
		<comments>http://blog.baroquebobcat.com/2011/03/22/mountain-west-ruby-conf/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 05:14:58 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[geekery]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.baroquebobcat.com/?p=536</guid>
		<description><![CDATA[Mountain West Ruby Conf last week rocked. It was well organized as always&#8211;props to Mike Moore(@blowmage) for putting it together and Confreaks for recording it and all the other people who made it the awesome conf that I like coming to every year(e.g. Jeremy Nicoll-Smashing Photographer). CHE-UP my friends. More seriously, Zed&#8217;s talk made me [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Badge &amp; Breakfast by baroquebobcat, on Flickr" href="http://www.flickr.com/photos/baroquebobcat/5549205906/"><img src="http://farm6.static.flickr.com/5093/5549205906_28d4b0f37a.jpg" alt="Badge &amp; Breakfast" width="500" height="281" /></a></p>
<p><a href="http://mtnwestrubyconf.org/2011/">Mountain West Ruby Conf</a> last week rocked. It was well organized as always&#8211;props to Mike Moore(<a href="http://twitter.com/blowmage">@blowmage</a>) for putting it together and <a href="http://confreaks.net/">Confreaks</a> for recording it and all the other people who made it the awesome conf that I like coming to every year(e.g. Jeremy Nicoll-Smashing Photographer).</p>
<h3>CHE-UP my friends.</h3>
<p>More seriously, Zed&#8217;s talk made me think more carefully about my open source contributions in terms of who benefits from my work. Am I just a sucker for working on stuff like Dubious or am I just doing it because I find it interesting and engaging. I think he crafted a really good talk and a good meme(CHE-UP) and made a good point about being aware of the motivations behind projects you contribute to. Now I just need to find some suckers/contributors to help me with my plans for world domination <img src='http://blog.baroquebobcat.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<h3>Mind Monkey Patching</h3>
<p>David Brady&#8217;s talk about head hacking reminded me that I need to finish Pragmatic Thinking &amp; Learning, a good book I&#8217;ve been reading off and on for more than 6 months now. I need to try using that crazy cat picture (the one with too many eyes) to trigger hardware interrupts at interesting times. Might be fun.</p>
<h3>&#8220;Web&#8221; Development</h3>
<p>Wayne Seguin&#8217;s talk was very topical as MWRC is my favorite conference to meet new and interesting Rubyists. I feel like I did some definite &#8220;web&#8221; development while I was there. I met new people and spent more time getting to know better some of the people in the community I&#8217;d met at other conferences.</p>
<p>I came away from the talk feeling inspired to do more looking at teaching and mentoring, something I looked at a little at RubyConf.</p>
<h3>Concurrency</h3>
<p>Concurrency was a big theme at the conference with Ilya Grigorick talking about more advanced concurrency models, and Preston Lee presenting about using the GPU and CUDA to solve embarrassingly parallel problems.</p>
<p>Ilya talked about the Actor model, which Erlang uses as well as Pi-Calculus/CSP which is what Go uses. Both deal with concurrency by providing constraints on what you can do within them. Interestingly, their constraints are very similar, but have different abstractions with regard to what is named.</p>
<p>In the Actor model,</p>
<ol>
<li>Name every process</li>
<li>Every process has a mailbox</li>
<li>Communicate via messages</li>
</ol>
<p>In the CSP,</p>
<ol>
<li>Processes are anonymous</li>
<li>Every channel has a name</li>
<li>Processes communicate over channels</li>
</ol>
<p>He wrote a gem that acts like CSP called <a href="https://rubygems.org/gems/agent">agent</a></p>
<p>&nbsp;</p>
<h3>5K</h3>
<p>I ran in the 5k. I slept through it last year and decided that I had to do it this year. There were 13 of us. It was very dramatic.</p>
<div id="attachment_541" class="wp-caption aligncenter" style="width: 510px"><a href="https://smashingshots.com/image_albums/38-mountain-west-ruby-conference/images/2870/slideshow"><img class="size-full wp-image-541  " title="Rounding the last corner" src="http://blog.baroquebobcat.com/wp-content/uploads/2011/03/hands_in_the_air_mwrc_5k_20111-e1300770043369.jpg" alt="Rounding the last corner" width="500" height="749" /></a><p class="wp-caption-text">Rounding the last corner (pic by smashingshots.com)</p></div>
<p>I think I was last.</p>
<h3>Mirah &amp; Dubious</h3>
<p><a href="http://mirah.org">Mirah</a> and <a href="http://github.com/mirah/dubious">Dubious</a> were represented. I did a lightning talk on Dubious Thursday and Joe O&#8217;Brien showed off what is going on with <a href="http://github.com/mirah/pindah">Pindah</a> as part of his <a href="http://mtnwestrubyconf.org/2011/sessions#objo">Ruby on Android talk</a>. I got to introduce a few people to Mirah and Dubious which was pretty cool. It seems like people are getting more interested in Mirah and projects written in it, which I think is pretty awesome.</p>
<h3>Some other thoughts</h3>
<p>Redis is a pretty cool project that I&#8217;d like to look at more than I have.</p>
<p>Wood cuts make for nifty slides.</p>
<p>Figs are killer.</p>
<p>&nbsp;</p>
<p>Thanks again everybody for a great conference.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.baroquebobcat.com/2011/03/22/mountain-west-ruby-conf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s That Time of Year Again: Mountain West Ruby Conf Time.</title>
		<link>http://blog.baroquebobcat.com/2011/03/15/its-that-time-of-year-again-mountain-west-ruby-conf-time/</link>
		<comments>http://blog.baroquebobcat.com/2011/03/15/its-that-time-of-year-again-mountain-west-ruby-conf-time/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 04:57:34 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.baroquebobcat.com/?p=522</guid>
		<description><![CDATA[I&#8217;m going to Mountain West Ruby Conf again this year. The talks look great, the venue, as always is awesome and this year I might even run the 5k(in my VFFs of course). I&#8217;m hoping to get some hacking done on Dubious and introduce some more people to it. You can do some really cool [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to Mountain West Ruby Conf again this year. The <a href="http://mtnwestrubyconf.org/2011/sessions">talks look great</a>, the <a href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Salt+Lake+City+Public+Library,+Main+Library,+210+E+400+S,+Salt+Lake+City,+UT+84111&amp;sll=40.760082,-111.884841&amp;sspn=0.011068,0.022724&amp;ie=UTF8&amp;hq=Salt+Lake+City+Public+Library,+Main+Library&amp;hnear=Salt+Lake+City+Public+Library,+Main+Library,+210+E+400+S,+Salt+Lake+City,+Utah+84111-2804&amp;z=15">venue</a>, as always is awesome and this year I might even run the <a href="http://mtnwestrubyconf.org/2011/5k">5k</a>(in my VFFs of course).</p>
<p>I&#8217;m hoping to get some hacking done on <a href="https://github.com/mirah/dubious">Dubious</a> and introduce some more people to it. You can do some really cool things with it, even in its current, limited state, and I&#8217;d like to see it played with and used more.</p>
<p>If you see me there, I&#8217;ll probably be wearing my black fedora and sporting a nice beard. Not as big as last year&#8217;s though(exhibit A).</p>
<p><a title="Matz &amp; me by baroquebobcat, on Flickr" href="http://www.flickr.com/photos/baroquebobcat/4453467686/"><img src="http://farm3.static.flickr.com/2728/4453467686_b9358d6ff0.jpg" alt="Matz &amp; me at last year's MWRC" width="500" height="375" /><br />
<small>Matz &amp; me at last year&#8217;s MWRC</small><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.baroquebobcat.com/2011/03/15/its-that-time-of-year-again-mountain-west-ruby-conf-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JRuby, Can&#8217;t Find File in Classpath (You Needed a Slash, in </title>
		<link>http://blog.baroquebobcat.com/2011/01/10/jruby-cant-find-file-in-classpathyou-need-a-slash/</link>
		<comments>http://blog.baroquebobcat.com/2011/01/10/jruby-cant-find-file-in-classpathyou-need-a-slash/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 04:25:44 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.baroquebobcat.com/?p=497</guid>
		<description><![CDATA[Update: this is no longer valid as of the release of 1.6.0. I was debugging this Dubious problem where a class I was sure was on the class path couldn&#8217;t be found(link). First, I tried compiling on my local checkout, and it worked oddly. Then I realized I was dumb, because the class was being [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: </strong>this is no longer valid as of the release of 1.6.0.</p>
<p>I was debugging this Dubious problem where a class I was sure was on the class path couldn&#8217;t be found(<a href="https://github.com/mirah/dubious/issues/#issue/19">link</a>). First, I tried compiling on my local checkout, and it worked oddly. Then I realized I was dumb, because the class was being picked up from the finished jar. So, I clobbered my build artifacts and then my local copy didn&#8217;t compile either.</p>
<p>I did some digging and found out why.</p>
<p>In the end it was because of <a href="http://kenai.com/projects/jruby/pages/FAQs?nav=off#How_come_Java_can_t_find_resources_in_class_folders_that_I_ve_appended_to_the_$CLASSPATH_global_variable_at_runtime?">how JRuby implements $CLASSPATH</a>&#8211;the way you can modify the classpath from within JRuby. JRuby uses a subclass of <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URLClassLoader.html">URLClassLoader</a> to implement it which gives it some possibly unexpected behavior. In particular, URLClassLoader treats anything that does not end in a slash as a jar. That&#8217;s why the class files in my build directory were not being picked up properly.</p>
<h4>Lessons Learned:</h4>
<p><strong>Combat &#8220;It Works on My Machine™&#8221;</strong>. Clobber local generated files every now and again, and checkout a fresh tree from time to time to reduce the chance something local is weird.</p>
<p><strong>Look for and ask for help when you don&#8217;t know something</strong>. First time I tried to figure out the problem, I just tinkered and compiled and tinkered and compiled. A little research would have saved some time.</p>
<h4>TL;DR</h4>
<p>If JRuby can&#8217;t find your classes and you think they should have been added to $CLASSPATH, make sure you have trailing slashes on your directory names.</p>
<h4>Update:</h4>
<p>This has actually been fixed, but not released yet: <a href="https://github.com/jruby/jruby/commit/8740a6b3ea946a1442dd7fa833aed3c30d82e23f">https://github.com/jruby/jruby/commit/8740a6b3ea946a1442dd7fa833aed3c30d82e23f</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.baroquebobcat.com/2011/01/10/jruby-cant-find-file-in-classpathyou-need-a-slash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RubyConfX: Awesomesauce!? Hells Yes!</title>
		<link>http://blog.baroquebobcat.com/2010/11/18/rubyconfx-awesomesauce-hells-yes/</link>
		<comments>http://blog.baroquebobcat.com/2010/11/18/rubyconfx-awesomesauce-hells-yes/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 04:19:21 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[food]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://blog.baroquebobcat.com/?p=498</guid>
		<description><![CDATA[RubyConf X in NOLA last week was epic. Epic. Seriously though, I had a rocking time. I gave part of a talk, I talked to an amazing amount of awesomely smart people and just generally enjoyed my ass off. It was the first RubyConf I&#8217;d been to, and I think the biggest conference I&#8217;ve gone [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rubyconf.org/">RubyConf X </a>in NOLA last week was epic.</p>
<p>Epic.</p>
<p>Seriously though, I had a rocking time. I gave part of a talk, I talked to an amazing amount of awesomely smart people and just generally enjoyed my ass off.</p>
<p>It was the first RubyConf I&#8217;d been to, and I think the biggest conference I&#8217;ve gone to yet as a developer(<a href="http://blog.baroquebobcat.com/2009/07/24/went-to-ala-in-chicago/">ALA doesn&#8217;t count</a>). I liked being in New Orleans again, surrounded by Jazz and a culture that contains people who think it is perfectly reasonable to drive around playing a trombone out of a car window. It&#8217;d be awesome if RubyConf was there next year.</p>
<p>My talk went pretty well I think, though I wish I&#8217;d taken more time to practice. It didn&#8217;t help that I hadn&#8217;t met my co-speaker, Bob Aman before the conference. But, it worked out pretty well, I think (<a href="http://speakerrate.com/talks/5022-app-engine-and-dubious-and-new-google-apis-oh-my">speakerrate</a> may or may not say otherwise). And we got some good feedback on twitter.</p>
<p>New Orleans, as I well know, is a great place to experience. I mean, look at this Po&#8217;Boy:</p>
<p><a title="A Large Dressed Roast Beef Po'Boy by baroquebobcat, on Flickr" href="http://www.flickr.com/photos/baroquebobcat/5181367515/"><img src="http://farm2.static.flickr.com/1286/5181367515_5abeea7260.jpg" alt="A Large Dressed Roast Beef Po'Boy" width="281" height="500" /></a></p>
<p>Running in the  RubyConf Xk(I ran the 5k) was fun. I totally expected to be unable to jog the whole way, but I did. And, I upped my pace on the second lap coming in at a respectable 29:41. Not bad for someone who has not gotten enough exercise in recent months. Oh, and <a href="http://twitter.com/tenderlove">@tenderlove</a> ran too, in spandex no less:</p>
<p><a title="Heroic Race Finishers by baroquebobcat, on Flickr" href="http://www.flickr.com/photos/baroquebobcat/5181368115/"><img src="http://farm5.static.flickr.com/4106/5181368115_fe3e5aa902.jpg" alt="Heroic Race Finishers" width="281" height="500" /></a></p>
<p>I definitely need to up my silliness for the next Ruby conference I go to. I feel out classed.</p>
<p>All in all, I had a freaking blast.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.baroquebobcat.com/2010/11/18/rubyconfx-awesomesauce-hells-yes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

