<?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>overwatering &#187; work</title>
	<atom:link href="http://www.overwatering.org/blog/category/work/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.overwatering.org/blog</link>
	<description>Random musings on fish, books and occasionally programming.</description>
	<lastBuildDate>Mon, 07 Nov 2011 07:06:02 +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>Lessons from a Pure JavaScript Project: CoffeeScript</title>
		<link>http://www.overwatering.org/blog/2011/10/lessons-from-a-pure-javascript-project-coffeescript/</link>
		<comments>http://www.overwatering.org/blog/2011/10/lessons-from-a-pure-javascript-project-coffeescript/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 06:18:30 +0000</pubDate>
		<dc:creator>giles</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[computing]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[coffeescript]]></category>
		<category><![CDATA[jasmine]]></category>

		<guid isPermaLink="false">http://www.overwatering.org/blog/?p=396</guid>
		<description><![CDATA[This is the second post in a series on observations and questions from implementing a single page pure JavaScript web application for a recent project. For background and the other posts in this series, see the introduction

Before joining this project I spent two weeks on another project helping them make a technology decision. This other [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second post in a series on observations and questions from implementing a single page pure JavaScript web application for a recent project. For background and the other posts in this series, see the <a href="http://www.overwatering.org/blog/2011/10/lessons-from-a-pure-javascript-project/">introduction</a></p>

<p>Before joining this project I spent two weeks on another project helping them make a technology decision. This other project had a requirement for a sophisticated web UI. The choices were Flash or JavaScript. After helping with some spikes the team decided to use JavaScript. As this would be the first time anyone on the team would be using JavaScript, I made some recommendations. One of these was not to use <a href="http://jashkenas.github.com/coffee-script/">CoffeeScript</a>.</p>

<p>I was wrong.</p>

<p>It was a new project with a team of people who weren&#8217;t very familiar with JavaScript and certainly had not written a large JavaScript application. I felt that CoffeeScript would be another new thing for what until very recently had been a Java team. It would be better to first learn JavaScript; understand that and then learn how CoffeeScript can make the language better.</p>

<p>After that short consulting gig, I started on this project on the following Monday. This was another sophisticated JavaScript UI application. But it was already about two months into development. This project had already decided not to use CoffeeScript, for similar reasons as I&#8217;d gone through on the previous Friday. It was like jumping forward in time two months. More than anything else, with the amount of JavaScript code we had, the syntax was just agony. It simply made the code harder to read. This may sound like a small detail, but I believe very strongly that code needs to be readable by humans above everything else. JavaScript&#8217;s syntax is simply woefully inappropriate for the style of programming the language is otherwise very tuned for.</p>

<p>As I mentioned above, we used <code>underscore.js</code> pretty heavily. This encourages a lot of anonymous functions passed as parameters, something that reads very nicely in Ruby. In JavaScript, a simple loop to lowercase every string in an array reads pretty painfully.</p>

<pre><code>var keyNames = _.map(recipientNames, function(name) {
  return name.toLowerCase();
});
</code></pre>

<p>By the way, the glyph <code>});</code> is henceforth known as the coffee-break.</p>

<p>The absolute bare minimum for a lambda is <code>function() { return; }</code>. That&#8217;s 19 characters! 19! Here&#8217;s the same code in CoffeeScript:</p>

<pre><code>keyNames = _.map recipientNames, (name) -&gt; name.toLowerCase()
</code></pre>

<p>That is one plausible line. Yes please, can I have some more? This may seem like a small detail on its own. It&#8217;s just syntax, you say. You may disagree with my opinion that syntax is critical. Allow me to offer another example from this project. A couple of us are Ruby programmers, and fans of the very declarative style of test that is possible in RSpec, using <code>let</code>.</p>

<pre><code>describe "an account" do
  let(:subject) { Account.new(:balance =&gt; balance) }
  describe "positive balance" do
    let(:balance) { 100 }
    it "should allow withdrawals" …
  end
end
</code></pre>

<p>The JavaScript unit testing library of choice, <a href="http://pivotal.github.com/jasmine/">Jasmine</a> doesn&#8217;t (yet) include any equivalent of this. So I whipped something up pretty quickly to allow the equivalent:</p>

<pre><code>describe("an account", function() {
  define({subject: function(ctxt) { return createAccount({balance: ctxt.balance()}); }}, function(ctxt) {
    describe("positive balance", function() {
      define(ctxt, {balance: function() { return 100; }}, function(ctxt) {
        it("should allow withdrawals", function() { …; });
      });
    });
  });
});
</code></pre>

<p>There are two problems here. Firstly, JavaScript doesn&#8217;t have <code>instance_eval</code> or <code>method_missing</code> so you can&#8217;t decorate a lexical scope before passing it downwards, hence explicitly passing down the <code>ctxt</code> parameter. Actually, while the lack of <code>method_missing</code> is a real pain, I think <code>instance_eval</code> is no great loss and I would happily write much, much code in a language that doesn&#8217;t allow libraries to mess with name bindings quite so liberally.</p>

<p>Secondly, the sheer noise of the JavaScript syntax is incredibly painful. Here is the equivalent, translated directly into CoffeeScript.</p>

<pre><code>describe "an account", -&gt;
  define
    subject: (ctxt) -&gt; createAccount balance: ctxt.balance()
  , (ctxt) -&gt;
    describe "positive balance", -&gt;
      define ctxt,
        balance: -&gt; 100
      , (ctxt) -&gt;
        it "should allow withdrawals", -&gt; … 
</code></pre>

<p>The most interesting thing from this conversion, to me, is that it shows that the double-nesting of <code>define</code>s and <code>describe</code>s is actually pretty unclear. In my copious spare time I&#8217;m working on a better implementation of that <code>define()</code> function, in the hope of getting it added to Jasmine. If I&#8217;d been staring at that second version throughout the project I would have started down that path earlier.</p>

<p>But the better syntax is not everything; the other features in CoffeeScript, like list comprehensions and default arguments are Good Things and would have been very nice to have.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overwatering.org/blog/2011/10/lessons-from-a-pure-javascript-project-coffeescript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lessons from a Pure JavaScript Project</title>
		<link>http://www.overwatering.org/blog/2011/10/lessons-from-a-pure-javascript-project/</link>
		<comments>http://www.overwatering.org/blog/2011/10/lessons-from-a-pure-javascript-project/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 05:59:01 +0000</pubDate>
		<dc:creator>giles</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[computing]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[coffeescript]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[jasmine]]></category>

		<guid isPermaLink="false">http://www.overwatering.org/blog/?p=394</guid>
		<description><![CDATA[Our team is wrapping up the first release of a pure JavaScript, single page web application. No one on the team has ever built one of these before and it seems they are becoming the new hotness, so I thought it would be useful to attempt to write down some observations and questions. Hopefully, you [...]]]></description>
			<content:encoded><![CDATA[<p>Our team is wrapping up the first release of a pure JavaScript, single page web application. No one on the team has ever built one of these before and it seems they are becoming the new hotness, so I thought it would be useful to attempt to write down some observations and questions. Hopefully, you can learn something and I can be pointed in the direction of doing it better next time.</p>

<p>The application is a mobile web app for a customer who already has a number of native apps for iPhone and Android. All these apps use an existing set of services to access the core data. Our app used <a href="http://jquerymobile.com/">JQuery Mobile</a> and <a href="http://documentcloud.github.com/underscore/">Underscore.js</a> as the only libraries. For testing, we used <a href="http://pivotal.github.com/jasmine/">Jasmine</a> and <a href="http://cukes.info/">cucumber</a>.</p>

<p>Originally, I wanted to post this as a single post, but it go long. Very long. Looking back on our project, there were four things I&#8217;d like to try doing differently.</p>

<ul>
<li><p><a href="http://www.overwatering.org/blog/2011/10/lessons-from-a-pure-javascript-project-coffeescript/">We didn&#8217;t use CoffeeScript</a> for what felt like very good reasons at the time. In hindsight, this was a mistake.</p></li>
<li><p>Writing functional tests for a pure JavaScript application is a different problem requiring different solutions than a typical web application.</p></li>
<li><p>Your JavaScript application is going to end up as a very sophisticated GUI application, with more complex state and flow management than most typical web applications. Consider your use of models and controllers very seriously.</p></li>
<li><p>Web applications have long had to deal with the Back and Refresh browser buttons. A single page JavaScript application adds some new wrinkles. But I think that HTML 5 also includes some neat solutions.</p></li>
</ul>

<p>As I get my posts written, I&#8217;ll update the above with links.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overwatering.org/blog/2011/10/lessons-from-a-pure-javascript-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Illinois, Texas, Cali and Accents</title>
		<link>http://www.overwatering.org/blog/2011/10/illinois-texas-cali-and-accents/</link>
		<comments>http://www.overwatering.org/blog/2011/10/illinois-texas-cali-and-accents/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 21:01:11 +0000</pubDate>
		<dc:creator>giles</dc:creator>
				<category><![CDATA[livingintheus]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[coffee]]></category>
		<category><![CDATA[food]]></category>
		<category><![CDATA[illinois]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[texas]]></category>

		<guid isPermaLink="false">http://www.overwatering.org/blog/?p=390</guid>
		<description><![CDATA[Inspired by some of my friends and family who have also moved overseas this year, it is time to start writing about living in the US.

The first week and a half was Chicago. A couple of days of thrilling things like opening a bank account and applying for my social security number. Banks are different [...]]]></description>
			<content:encoded><![CDATA[<p>Inspired by <a href="http://adventures-of-jane.blogspot.com/">some</a> of my <a href="http://davehasgone.blogspot.com/">friends</a> and <a href="http://dnaoflondon.blogspot.com/">family</a> who have also moved overseas this year, it is time to start writing about living in the US.</p>

<p>The first week and a half was Chicago. A couple of days of thrilling things like opening a bank account and applying for my social security number. Banks are different over here. There are only two account packages that were offered, and both only have a monthly fee of $8 which is waived at the drop of a hat. And banks are open on Saturdays! The horror.</p>

<p>The week on the beach was a good break. In the end, with public holidays, transition leave and beach time, it was three weeks between stopping work in Australia and starting on a project over here.</p>

<p>Of course, the coffee is still almost universally rubbish. To counter that, we spent quite awhile in Chicago hunting for the perfect burger. After being repeatedly scared off by threats of three hour waits we finally had a really good one the afternoon I was flying out.</p>

<p>And the first project was in Plano, Texas. That&#8217;s a suburb of Dallas. And a complete wasteland. It&#8217;s a dead-flat plain, smeared with office parks and strip malls. I didn&#8217;t know what a strip mall was until I got down there. I see why they inspire such horror. Around Plano is basically nothing, but fortunately we stayed in a hotel in another suburb about 15 minutes to the South: Addison. Addison at least has a strip of franchise restaurants, and kind-of-bars. The highlight of that was the evening we ate dinner in a Greek restaurant, while watching a car on fire across the road. Metre high flames and plumes of black smoke. Very exciting.</p>

<p>By &#8216;we&#8217; I mean the ThoughtWorks team. Just two other travellers. They started to think I liked Starbucks. I tried to put a stop to that, but I couldn&#8217;t help but be excited at almost drinkable coffee. Sigh.</p>

<p>Dallas has three redeeming features: first, Texas BBQ — hell yeah! It&#8217;s completely unlike anything I&#8217;ve had and really amazing. Half a pound of meat, served on paper, eaten with your fingers, no sauce, sitting in a dirty shack. Well worth it. Lockhart&#8217;s Smokehouse in Oak Cliff, if you&#8217;re ever down that way.</p>

<p>Second is the 6th Floor Museum. In the Old Texas Book Depository. That&#8217;s right, a museum dedicated to the assassination of JFK. It&#8217;s actually a good museum. Small enough to really see; respectful without being sycophantic; and complete: it finishes with the conspiracy theories. In one corner they have recreated Oswald&#8217;s perch, as it was when they first found it. Down in the plaza outside it&#8217;s a different story. There&#8217;s an &#8216;X&#8217; on the road at The Spot. And the grassy knoll is covered in lunatics delivering speeches and handing out pamphlets. Again, if you&#8217;re there, then go.</p>

<p>And finally, my accent was quite novel. Apart from the teasing and joking from the team, I walked into a pub and wanted to order a beer. I made the mistake of trying to order by name, instead of just pointing. There&#8217;s a San Francisco beer I quite like called &#8216;Anchor Steam.&#8217; Some of you would have already seen where this is going. I had to repeat myself several times. The waitress went to stare at the beer fridge. Conferred with a couple of other staff. And then returned with another waitress. She&#8217;d brought over a Brit to translate for me. Sigh. The trick is to really hoe into those &#8216;Rs&#8217;.</p>

<p>Working with the client was kind of fun. I spent a day pairing with a very junior client dev. She was from Louisiana. She has only been in a taxi twice. At stand-up, the next day she said that pairing was fun but a bit difficult to follow. A helpful ThoughtWorker then said &#8220;That&#8217;s just Giles.&#8221; Very quickly she said &#8220;Oh, but I love his accent!&#8221; In a Southern drawl. So I&#8217;m playing up the Australian thing. They&#8217;re all my mates, and there are no worries to be seen anywhere.</p>

<p>I&#8217;ve finished up in Dallas, and spent the weekend back in Chicago. And now I&#8217;m on another plane. This time I&#8217;m off to San Francisco. Joining a big team out there, I&#8217;ll probably be here until September, I think. The client is at 2nd and Mission, and we&#8217;re staying in hotels around Union Square. This should be quite a lot of fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overwatering.org/blog/2011/10/illinois-texas-cali-and-accents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A modest proposal towards reusable step definitions for Cucumber</title>
		<link>http://www.overwatering.org/blog/2011/10/a-modest-proposal-towards-reusable-step-definitions-for-cucumber/</link>
		<comments>http://www.overwatering.org/blog/2011/10/a-modest-proposal-towards-reusable-step-definitions-for-cucumber/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 04:35:25 +0000</pubDate>
		<dc:creator>giles</dc:creator>
				<category><![CDATA[computing]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[cucumber]]></category>

		<guid isPermaLink="false">http://www.overwatering.org/blog/?p=382</guid>
		<description><![CDATA[



While the title is a nod to the original modest proposal this is completely serious. I just liked the title. Pez thought I should be more clear.




Typically, cucumber step definitions look like this:

When /^I select the recipient named "([^"]*)"$/ do &#124;recipientname&#124;
 within_jqm_page do
   page.find('a', :text =&#62; recipientname).click
 end
end


Step definitions implemented like this end [...]]]></description>
			<content:encoded><![CDATA[<div align="center">

<div style="text-align: left; width: 80%; background-color: rgb(255, 255, 153); font-size: 65%; padding-bottom: 10px; padding-left: 10px; padding-right: 10px;">

While the title is a nod to the original <a href="http://en.wikipedia.org/wiki/A_Modest_Proposal">modest proposal</a> this is completely serious. I just liked the title. <a href="http://twitter.com/perrynfowler">Pez</a> thought I should be more clear.

</div>
</div>

<p>Typically, <a href="http://cukes.info/">cucumber</a> step definitions look like this:</p>

<pre><code>When /^I select the recipient named "([^"]*)"$/ do |recipientname|
 within_jqm_page do
   page.find('a', :text =&gt; recipientname).click
 end
end
</code></pre>

<p>Step definitions implemented like this end up becoming a pain to re-use. Essentially you are calling a function, except to do so you have to construct a string, and then execute that. We&#8217;ve all seen how that ends.</p>

<pre><code>Given /^all the entered recipient details are valid$/ do
  When %{I fill in "name" with "Valid Name"}
  And %{I fill in "phone" with "4152234567"}
  And %{I fill in "email1" with "valid.email@example.com"}
end
</code></pre>

<p>The direct outcome is very hard to maintain step definitions &mdash; like the above &mdash; and thus very poor quality cucumber tests. Patterns like <a href="http://blog.josephwilk.net/cucumber/page-object-pattern.html">page objects</a> and <a href="http://pilchardfriendly.wordpress.com/2011/09/25/test-personas-a-pattern-for-acceptance-tests/">personas</a> take work to extract when following this approach. This approach that is analogous to writing VB6 applications in the early 2000s where all logic was just a double-click on a form button away. And as with VB6, that cucumber directly encourages this approach is part of the problem.</p>

<p>I hear a lot of complaints about cucumber these days. These complaints tend to target the English language test scripts: while business readable acceptance tests may be nice, these are useless if the business is never actually reading the tests.</p>

<p>The unspoken heart of this complaint seems to be the English language tests are responsible for the poor maintainability of the average cucumber test suite. I agree. But that shouldn&#8217;t be the case.</p>

<p>After trying to build well-factored cucumber suites on a few occasions, I pretty much hate the pattern of just attaching anonymous blocks to regular expressions. Instead, I want step definitions that directly invoke methods. Something like:</p>

<pre><code>Given /^I am on the (\w+) page$/ =&gt; :go_to_known_page,
  :on =&gt; { current_user }

class User
  def self.current_user
    …
  end

  def go_to_known_page(page_name)
    visit Page.page_named(page_name)
  end
end

World(User)
</code></pre>

<p>The significant part is in the first two lines. Instead of passing a block to the <code>Given</code>, a symbol for a method to invoke would be passed. This method would be invoked with the arguments matched by the regular expression, after any <code>Transform</code>s have been applied. The <code>:on</code> is optional. This is a block evaluated against the <code>World</code>. If <code>:on</code> is provided, the method would be sent to the result of this block instead.</p>

<p>Yes, this would force you to define classes and attach methods to those. Yes, this would require you to think about the interrelationships of your objects. Yes, this is quite a lot more limited than an arbitrary block of code. Yes, that is exactly the point.</p>

<p>After a quick glance through the cucumber source this does not look difficult to add. Should I go to the effort of adding it?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overwatering.org/blog/2011/10/a-modest-proposal-towards-reusable-step-definitions-for-cucumber/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Patterns for Bundler and rvm</title>
		<link>http://www.overwatering.org/blog/2011/03/patterns-for-bundler-and-rvm/</link>
		<comments>http://www.overwatering.org/blog/2011/03/patterns-for-bundler-and-rvm/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 11:49:25 +0000</pubDate>
		<dc:creator>giles</dc:creator>
				<category><![CDATA[computing]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[ruby bundler rvm]]></category>

		<guid isPermaLink="false">http://www.overwatering.org/blog/?p=367</guid>
		<description><![CDATA[A couple of long standing problems in the world of Ruby have been dealing with all the gems that are so easy to toss into your project and the differences between Ruby implementations. They do differ: between 1.8.6 and 1.8.7 standard library APIs changed. Slow clap.

In the world of adults the solution to these problems [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of long standing problems in the world of Ruby have been dealing with all the gems that are so easy to toss into your project and the differences between Ruby implementations. They do differ: between 1.8.6 and 1.8.7 standard library APIs changed. Slow clap.</p>

<p>In the world of adults the solution to these problems is known as dependency management. There are now two tools to help Ruby: <a href="http://rvm.beginrescueend.com">rvm</a> and <a href="http://gembundler.com">Bundler</a>. These are both opinionated pieces of software that try to do a lot to help. Often far too much. After digging quite deeply into Bundler with <a href="http://pilchardfriendly.wordpress.com/">Nick Drew</a> on a recent project, here are some things that we learnt that I&#8217;ve tried to distill into a set of guides on good ways to use Bundler and rvm. This is just what I&#8217;ve discovered, if there are any tips or better ways to use these tools, or other tools that help, please share.</p>

<p>This is going to assume that you already know something about both.</p>

<ul>
<li>Firstly, use rvm and Bundler. If you have used them in the past and were unhappy, try again. The early versions had some truly horrible bugs. Development has moved quickly and things are a lot better now. If you&#8217;re using Rails 3 then you have little choice about Bundler. But for any projects you should use these.</li>
<li>Use rvm to install your Ruby, don&#8217;t use the system Ruby. Create at least one gemset and use that.</li>
<li><p>Create a <code>.rvmrc</code> for your project and check it into source control. Naming the gemset after your project, it should probably look something like:</p>

<pre><code>rvm_install_on_use_flag=1
rvm --create use ruby-1.8.7-p330@project
</code></pre></li>
<li><p>Use rvm on your build box. But not in production.</p></li>
<li>Create a <code>personal</code> gem set and toss the gems you use on simple little scripts into that.</li>
<li>Install Bundler into the global gemset for the Ruby you are using.</li>
<li>Include <code>development</code> and <code>test</code> groups in your <code>Gemfile</code>. Be strict about the difference between a gem required to run the build system (development), used in tests (test — obviously) and a gem required to run the application.</li>
<li>Don&#8217;t check the <code>.bundle/config</code> file into source control. Bundler often chooses to remember settings in this file. This will cause much irritation. This is an example of being more helpful than is helpful.</li>
<li>Don&#8217;t use the <code>--deployment</code> switch to <code>bundle install</code> unless you really mean that. As well as producing a local bundle of gems, installing in deployment mode will freeze the Gemfile. This is remembered and will cause much frustration when you&#8217;re trying to add new gems. If this does happen you will get an opaque error complaining that you have not checked your <code>Gemfile.lock</code> into source control. To get around this, just delete your <code>.bundle/config</code>. You&#8217;re doing that to remove the remembered setting about freezing your gems.</li>
<li><p>Your build script (the one you run before committing) should call <code>bundle package</code>. In fact, it should look quite a lot like:</p>

<pre><code>bundle package &amp;&amp; bundle install &amp;&amp; rake spec features
</code></pre></li>
<li><p>Check the gem files in <code>vendor/cache</code> into source control.</p></li>
<li>Definitely use <code>bundle install --deployment --local --without="development test"</code> either as part of your Capistrano tasks or as part of packaging for a release. Every one of those switches except the first should not be required. But they are. So there you go.</li>
<li>Bundler attempts to take over your world. This is intensely irritating. Expect to be annoyed.</li>
<li><p>If you ever need to start a Ruby program from your Ruby program but in a different Bundler world, you will need to do some cleaning of your environment. In particular you will need to clean the environment variables <code>BUNDLE_GEMFILE</code>, <code>BUNDLE_PATH</code>, <code>BUNDLE_BIN_PATH</code> and most surprisingly <code>RUBYOPT</code>. You may find the following function helpful.</p>

<pre><code>def without_bundler_env
  original_env = ENV.to_hash
  ENV.delete("BUNDLE_GEMFILE")
  ENV.delete("BUNDLE_PATH")
  ENV.delete("BUNDLE_BIN_PATH")
  ENV.delete("RUBYOPT")
  yield
ensure
  ENV.replace(original_env.to_hash)
end
</code></pre></li>
<li><p>If you need to examine the <code>Gemfile</code> from another Ruby project in your Bundler controlled world, you will think that you can use <code>Bundler::Definition.build("&lt;i&gt;path to Gemfile&lt;/i&gt;", "&lt;i&gt;path to Gemfile.lock&lt;/i&gt;", nil)</code>. That would be a good start. You will also need to set <code>ENV["BUNDLE_GEMFILE"]</code> to point to that file and call <code>resolve_with_cache!</code>, however. Try the following:</p>

<pre><code>ENV['BUNDLE_GEMFILE'] = 'Gemfile'
bundle_def = Bundler::Definition.build('Gemfile',
                                       'Gemfile.lock',
                                       nil)
bundle_def.resolve_with_cache!
</code></pre></li>
</ul>

<p>Ultimately, the goal of Bundler and rvm are noble. Dependency management is a hard problem. And there are no alternatives if you are choosing to use Ruby. Are there things that could perhaps be done better? Absolutely. But there is probably nothing so bad that some patterns couldn&#8217;t fix. So please, let&#8217;s all work out how to get the most out of these tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overwatering.org/blog/2011/03/patterns-for-bundler-and-rvm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Talk on Seph</title>
		<link>http://www.overwatering.org/blog/2010/09/a-talk-on-seph/</link>
		<comments>http://www.overwatering.org/blog/2010/09/a-talk-on-seph/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 11:09:18 +0000</pubDate>
		<dc:creator>giles</dc:creator>
				<category><![CDATA[comp. sci.]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[seph]]></category>
		<category><![CDATA[thoughtworks]]></category>

		<guid isPermaLink="false">http://www.overwatering.org/blog/?p=343</guid>
		<description><![CDATA[ThoughtWorks&#8216; resident language inventor Ola Bini will be visiting Sydney in September. Ola is one of the four committers on the JRuby project (now the fastest Ruby runtime) and the inventor of the highly experimental prototype-based language Ioke. And we&#8217;ve convinced him to give a talk about his latest language project Seph:


  So without [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.thoughtworks.com/">ThoughtWorks</a>&#8216; resident language inventor <a href="http://olabini.com/">Ola Bini</a> will be visiting Sydney in September. Ola is one of the four committers on the <a href="http://jruby.org/">JRuby</a> project (now the fastest Ruby runtime) and the inventor of the highly experimental prototype-based language <a href="http://en.wikipedia.org/wiki/Ioke_(programming_language)">Ioke</a>. And we&#8217;ve convinced him to give a talk about his latest language project Seph:</p>

<blockquote>
  <p>So without further ado, the big announcement is that I’m working on a new
  language called Seph. [&hellip;] Why? I already have Ioke and JRuby to care
  for, so it’s a very valid question to ask why I would want to take on
  another language project [&hellip;]. The answer is a bit complicated. I
  always knew [&hellip;] that Ioke was an experiment in all senses of the
  word. This means my hope was that some of the quirky features of Ioke would
  influence other languages. But the other side of it is that if Ioke seems
  good enough as an idea, there might be value in expanding and refining the
  concept to make something that can be used in the real world. And that is
  what Seph is really about.<br />
  <span class="byline">&mdash; <a href="http://olabini.com/blog/2010/07/preannouncing-seph/">Preannouncing Seph</a></span></p>
</blockquote>

<p>This will be an informal, and highly technical, talk on a really interesting new language. Come along for a chance to ask your questions. Also, to enjoy some free beer and pizza. There&#8217;s a pretty good chance that <a href="http://martinfowler.com/">Martin Fowler</a> may be in the room, though I&#8217;m not promising anything&hellip;</p>

<p><style>
dl {
  font-size: 0.875em;
}
dt {
  font-weight: bold;
}
</style></p>

<dl>
<dt>Where?</dt>
<dd>ThoughtWorks Sydney Office, Level 8, 51 Pitt St, Sydney</dd>
<dt>When?</dt>
<dd>Wednesday, 8th Sept; 6pm for a 6.30pm start</dd>
<dt>Who?</dt>
<dd>You! Assuming you&#8217;re a developer interested in learning about languages.</dd>
<dt>How?</dt>
<dd>RSVP to <a href="mailto:giles.alexander@thoughtworks.com">Giles Alexander</a> as I need some idea of numbers.</dd>
</dl>

<p>And that&#8217;s all you need to know, see you on Wednesday.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overwatering.org/blog/2010/09/a-talk-on-seph/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Satisfaction</title>
		<link>http://www.overwatering.org/blog/2008/12/satisfaction/</link>
		<comments>http://www.overwatering.org/blog/2008/12/satisfaction/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 07:35:00 +0000</pubDate>
		<dc:creator>giles</dc:creator>
				<category><![CDATA[career]]></category>
		<category><![CDATA[comp. sci.]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.overwatering.org/blog/2008/12/satisfaction/</guid>
		<description><![CDATA[Working on projects or working on products? Which is for you? Both
provide for interesting, stimulating work with difficult problems to
solve. Which are you personally going to derive the most satisfaction
from? Well, I have a theory, or, a way of phrasing the question that
has helped others in the past and might help you.


When you are working [...]]]></description>
			<content:encoded><![CDATA[<p>Working on projects or working on products? Which is for you? Both
provide for interesting, stimulating work with difficult problems to
solve. Which are you personally going to derive the most satisfaction
from? Well, I have a theory, or, a way of phrasing the question that
has helped others in the past and might help you.</p>

<ul>
<li><p>When you are working on projects you will sit down with someone with a
problem. You&#8217;ll get to know that person and their problem intimately
and personally. Hopefully you&#8217;ll then solve their problem and leave
them in happier and better place. All thanks to the expertise you have
imparted.</p></li>
<li><p>When you are working on products you will not have this personal
connection with your customers. Instead you will attempt to imagine
how all the possible customers in the world could potentially want to
use your product. You&#8217;ll try to place yourself in an enormous range of
situations and attempt to make each of those a bit better. Hopefully,
if your product is completed and a success in the market then you will
have made the world a better place for a huge range of people. None of
whom you&#8217;ll ever know.</p></li>
</ul>

<p>So… satisfaction from helping just a few people you know well, or
satisfaction from helping a huge range of people you&#8217;ll never know? Of
course, if you do choose to work on projects then you&#8217;re guaranteed to
help people, whereas products succeed far less often.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overwatering.org/blog/2008/12/satisfaction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

