<?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>Pivotal Labs &#187; Chad Woolley</title>
	<atom:link href="http://pivotallabs.com/author/chad/feed/" rel="self" type="application/rss+xml" />
	<link>http://pivotallabs.com</link>
	<description>Agility Developed</description>
	<lastBuildDate>Fri, 24 May 2013 13:28:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Automating Bundler In Your Deploy</title>
		<link>http://pivotallabs.com/bundler-and-capistrano/</link>
		<comments>http://pivotallabs.com/bundler-and-capistrano/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 00:09:00 +0000</pubDate>
		<dc:creator>Chad Woolley</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[bundler]]></category>
		<category><![CDATA[geminstaller]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/bundler-and-capistrano/</guid>
		<description><![CDATA[<p><p>If you are using <a href="http://github.com/carlhuda/bundler">Bundler</a> to lock and package your gem dependencies in your app &#40;which you should&#41;, here's some tips on making everything automatic in your Capistrano deploy.</p>

<p>Refer to the <a href="http://github.com/carlhuda/bundler">Bundler Documentation</a> for instructions on how to use Bundler to properly package your gems and check everything in.</p>

<p>Once this is done, however, you still must ensure that two things are done on every machine to which you will deploy:</p>

<ol>
<li>Bundler is installed</li>
<li>You run 'bundle install' on every deploy to install the packaged gems on the local machine &#40;and compile any gems with native dependencies&#41;</li>
</ol>

<p>Here's the Capistrano magic to accomplish these two tasks automatically on every deploy:</p>

<pre>
before &#34;deploy:bundle_install&#34;, &#34;deploy:install_bundler&#34;
after &#34;deploy:update_code&#34;, &#34;deploy:bundle_install&#34;

namespace :deploy do
  desc &#34;installs Bundler if it is not already installed&#34;
  task :install_bundler, :roles =&#62; :app do
    sudo &#34;sh -c 'if [ -z `which bundle` ]; then echo Installing Bundler; sudo gem install bundler; fi'&#34;
  end

  desc &#34;run 'bundle install' to install Bundler's packaged gems for the current deploy&#34;
  task :bundle_install, :roles =&#62; :app do
    run &#34;cd #{release_path} &#38;&#38; bundle install&#34;
  end
end
</pre>

<p>Oh, and for you <a href="http://geminstaller.rubyforge.org">GemInstaller</a> users out there - here's an easy way to generate a Bundler Gemfile from your geminstaller.yml config:</p>

<pre>
geminstaller --bundler-export &#62; Gemfile
</pre>

<p>You'll probably still need some tweaks, but this will get you started.  Just make sure you upgrade to GemInstaller 0.5.5 first &#40;0.5.4 forgot to put the 'source' line in the Gemfile&#41;.</p>

<p>Happy Bundling!
-- Chad</p>

<p>P.S. There is a similar article <a href="http://rand9.com/blog/bundler-0-9-1-with-capistrano">here</a>, which includes tasks to symlink your .bundle dir into the Capistrano shared directory, but my deploy was pretty fast anyway, so I didn't worry about it.  YMMV.</p> <a href="http://pivotallabs.com/bundler-and-capistrano/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/bundler-and-capistrano/">Automating Bundler In Your Deploy</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>If you are using <a href="http://github.com/carlhuda/bundler">Bundler</a> to lock and package your gem dependencies in your app &#40;which you should&#41;, here&#8217;s some tips on making everything automatic in your Capistrano deploy.</p>
<p>Refer to the <a href="http://github.com/carlhuda/bundler">Bundler Documentation</a> for instructions on how to use Bundler to properly package your gems and check everything in.</p>
<p>Once this is done, however, you still must ensure that two things are done on every machine to which you will deploy:</p>
<ol>
<li>Bundler is installed</li>
<li>You run &#8216;bundle install&#8217; on every deploy to install the packaged gems on the local machine &#40;and compile any gems with native dependencies&#41;</li>
</ol>
<p>Here&#8217;s the Capistrano magic to accomplish these two tasks automatically on every deploy:</p>
<pre>
before &quot;deploy:bundle_install&quot;, &quot;deploy:install_bundler&quot;
after &quot;deploy:update_code&quot;, &quot;deploy:bundle_install&quot;

namespace :deploy do
  desc &quot;installs Bundler if it is not already installed&quot;
  task :install_bundler, :roles =&gt; :app do
    sudo &quot;sh -c 'if [ -z `which bundle` ]; then echo Installing Bundler; sudo gem install bundler; fi'&quot;
  end

  desc &quot;run 'bundle install' to install Bundler's packaged gems for the current deploy&quot;
  task :bundle_install, :roles =&gt; :app do
    run &quot;cd #{release_path} &amp;&amp; bundle install&quot;
  end
end
</pre>
<p>Oh, and for you <a href="http://geminstaller.rubyforge.org">GemInstaller</a> users out there &#8211; here&#8217;s an easy way to generate a Bundler Gemfile from your geminstaller.yml config:</p>
<pre>
geminstaller --bundler-export &gt; Gemfile
</pre>
<p>You&#8217;ll probably still need some tweaks, but this will get you started.  Just make sure you upgrade to GemInstaller 0.5.5 first &#40;0.5.4 forgot to put the &#8216;source&#8217; line in the Gemfile&#41;.</p>
<p>Happy Bundling!<br />
&#8211; Chad</p>
<p>P.S. There is a similar article <a href="http://rand9.com/blog/bundler-0-9-1-with-capistrano">here</a>, which includes tasks to symlink your .bundle dir into the Capistrano shared directory, but my deploy was pretty fast anyway, so I didn&#8217;t worry about it.  YMMV.</p>
<p>The post <a href="http://pivotallabs.com/bundler-and-capistrano/">Automating Bundler In Your Deploy</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/bundler-and-capistrano/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>[ANN] GemInstaller 0.5.3 Released</title>
		<link>http://pivotallabs.com/ann-geminstaller-0-5-3-released/</link>
		<comments>http://pivotallabs.com/ann-geminstaller-0-5-3-released/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 06:25:00 +0000</pubDate>
		<dc:creator>Chad Woolley</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[geminstaller]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/ann-geminstaller-0-5-3-released/</guid>
		<description><![CDATA[<p><p>This fixes several bugs that people have complained about for quite a while.  Please let me know if anything is broken.</p>

<hr />

<h1>GemInstaller 0.5.3 has been released!</h1>

<h1>GemInstaller</h1>

<ul>
<li>by <a href="mailto:thewoolleyman@gmail.com">Chad Woolley</a></li>
<li><a href="http://geminstaller.rubyforge.org">http://geminstaller.rubyforge.org</a></li>
</ul>

<h2>CHANGES</h2>

<ul>
<li>0.5.3 / 2009-08-25</li>
<li>Many long overdue bugfixes and patches, see
<a href="http://geminstaller.rubyforge.org">http://tinyurl.com/geminstaller-0-5-3-release</a> for details.</li>
<li>Thanks to Greg Fitzgerald, Britt Crawford, John Trupiano, Gabriel
Gironda, and Eric Hodel for patches and assistance.</li>
<li>Issues with case statement under Ruby 1.9</li>
<li>GemInstaller cannot distinguish between gems that have the ame name
but capitalized differently.</li>
<li>add ./ci as default location for config file</li>
<li>Disable GemInstaller install in default rails preinitializer.rb, but
fork if it is used</li>
<li>autogem&#40;&#41; fails when run for newly-installed gem</li>
<li>Sometimes installing fails due to RubyGems cache not being cleared
between multiple API calls</li>
</ul>

<h2>DESCRIPTION</h2>

<p>Automated Gem installation, activation, and much more!</p>

<h2>FEATURES</h2>

<p>GemInstaller provides automated installation, loading and activation
of RubyGems.  It uses a simple YAML config file to:</p>

<ul>
<li>Automatically install the correct versions of all required gems
wherever your app runs.</li>
<li>Automatically ensure installed gems and versions are consistent
across multiple applications, machines, platforms, and environments</li>
<li>Automatically activate correct versions of gems on the ruby load
path when your app runs &#40;'require_gem'/'gem'&#41;</li>
<li>Automatically reinstall missing dependency gems &#40;built in to RubyGems > 1.0&#41;</li>
<li>Automatically detect correct platform to install for multi-platform
gems &#40;built in to RubyGems > 1.0&#41;</li>
<li>Print YAML for "rogue gems" which are not specified in the current
config, to easily bootstrap your config file, or find gems that were
manually installed without GemInstaller.</li>
<li>Allow for common configs to be reused across projects or
environments by supporting multiple config files, including common
config file snippets, and defaults with overrides.</li>
<li>Allow for dynamic selection of gems, versions, and platforms to be
used based on environment vars or any other logic.</li>
<li>Avoid the "works on demo, breaks on production" syndrome</li>
<li>Find lost socks.</li>
</ul>

<h3>Quick Start</h3>

<p>See <a href="http://geminstaller.rubyforge.org" title="Overview">http://geminstaller.rubyforge.org/documentation/index.html</a></p>

<h2>INSTALL</h2>

<ul>
<li>[sudo] gem install geminstaller</li>
</ul> <a href="http://pivotallabs.com/ann-geminstaller-0-5-3-released/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/ann-geminstaller-0-5-3-released/">[ANN] GemInstaller 0.5.3 Released</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This fixes several bugs that people have complained about for quite a while.  Please let me know if anything is broken.</p>
<hr />
<h1>GemInstaller 0.5.3 has been released!</h1>
<h1>GemInstaller</h1>
<ul>
<li>by <a href="mailto:thewoolleyman@gmail.com">Chad Woolley</a></li>
<li><a href="http://geminstaller.rubyforge.org">http://geminstaller.rubyforge.org</a></li>
</ul>
<h2>CHANGES</h2>
<ul>
<li>0.5.3 / 2009-08-25</li>
<li>Many long overdue bugfixes and patches, see<br />
<a href="http://geminstaller.rubyforge.org">http://tinyurl.com/geminstaller-0-5-3-release</a> for details.</li>
<li>Thanks to Greg Fitzgerald, Britt Crawford, John Trupiano, Gabriel<br />
Gironda, and Eric Hodel for patches and assistance.</li>
<li>Issues with case statement under Ruby 1.9</li>
<li>GemInstaller cannot distinguish between gems that have the ame name<br />
but capitalized differently.</li>
<li>add ./ci as default location for config file</li>
<li>Disable GemInstaller install in default rails preinitializer.rb, but<br />
fork if it is used</li>
<li>autogem&#40;&#41; fails when run for newly-installed gem</li>
<li>Sometimes installing fails due to RubyGems cache not being cleared<br />
between multiple API calls</li>
</ul>
<h2>DESCRIPTION</h2>
<p>Automated Gem installation, activation, and much more!</p>
<h2>FEATURES</h2>
<p>GemInstaller provides automated installation, loading and activation<br />
of RubyGems.  It uses a simple YAML config file to:</p>
<ul>
<li>Automatically install the correct versions of all required gems<br />
wherever your app runs.</li>
<li>Automatically ensure installed gems and versions are consistent<br />
across multiple applications, machines, platforms, and environments</li>
<li>Automatically activate correct versions of gems on the ruby load<br />
path when your app runs &#40;&#8217;require_gem&#8217;/'gem&#8217;&#41;</li>
<li>Automatically reinstall missing dependency gems &#40;built in to RubyGems > 1.0&#41;</li>
<li>Automatically detect correct platform to install for multi-platform<br />
gems &#40;built in to RubyGems > 1.0&#41;</li>
<li>Print YAML for &#8220;rogue gems&#8221; which are not specified in the current<br />
config, to easily bootstrap your config file, or find gems that were<br />
manually installed without GemInstaller.</li>
<li>Allow for common configs to be reused across projects or<br />
environments by supporting multiple config files, including common<br />
config file snippets, and defaults with overrides.</li>
<li>Allow for dynamic selection of gems, versions, and platforms to be<br />
used based on environment vars or any other logic.</li>
<li>Avoid the &#8220;works on demo, breaks on production&#8221; syndrome</li>
<li>Find lost socks.</li>
</ul>
<h3>Quick Start</h3>
<p>See <a href="http://geminstaller.rubyforge.org" title="Overview">http://geminstaller.rubyforge.org/documentation/index.html</a></p>
<h2>INSTALL</h2>
<ul>
<li>[sudo] gem install geminstaller</li>
</ul>
<p>The post <a href="http://pivotallabs.com/ann-geminstaller-0-5-3-released/">[ANN] GemInstaller 0.5.3 Released</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/ann-geminstaller-0-5-3-released/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The Great Ruby IDE Smackdown of &#039;09</title>
		<link>http://pivotallabs.com/the-great-ruby-ide-smackdown-of-09/</link>
		<comments>http://pivotallabs.com/the-great-ruby-ide-smackdown-of-09/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 09:33:00 +0000</pubDate>
		<dc:creator>Chad Woolley</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/the-great-ruby-ide-smackdown-of-09/</guid>
		<description><![CDATA[<p><p>In a <a href="http://ruby.meetup.com/81/messages/6864007/">recent thread</a> on the East Bay Ruby Meetup list, several people chimed in with Ruby IDE suggestions.  I suggested <a href="http://www.jetbrains.com/ruby/index.html">RubyMine</a>, which we use at Pivotal.  Several people mentioned <a href="http://www.netbeans.org/">NetBeans</a> and <a href="http://www.aptana.com/rails">Aptana RadRails</a>, so I decided to have a little contest.</p>

<p>Now, if I am going to work in an IDE and sacrifice the speed of a text editor, I want to see it <em>work</em> for me &#40;'cuz RubyMine can chew through all your CPU and RAM and then some faster than you can say <a href="http://en.wikipedia.org/wiki/Moore%27s_law">Moore's Law</a>&#41;.  That means <em>understanding</em> Ruby, and using that information to save me some significant thinking and work.  </p>

<p>I <strong>don't</strong> mean code-generation macros or dumb context-aware keyword-completion, I mean something useful like <em>knowing where my classes and methods are</em>.  In my book, that leaves out Emacs, Vi, and even TextMate, regardless of their other merits &#40;sorry people, I like text editors too, but I'm making up this test - flame away, the comments section is below&#41;.</p>

<p>So, here's the smackdown scenario:</p>

<ul>
<li>Download the latest NetBeans, RadRails and RubyMine. </li>
<li>Open a <a href="http://geminstaller.rubyforge.org">Ruby project</a>, this example is one of mine &#40;I wrote this three years ago to learn Ruby, so don't make fun of me for doing dumb stuff...&#41;</li>
<li>Test the ability of the IDE to navigate through Ruby language constructs.  This should be easy, it is a command-line app using a <a href="http://en.wikipedia.org/wiki/Dependency_injection">Dependency Injection architecture</a>, no metaprogramming curveballs!
<ul>
<li>Open the root Ruby class for the project <a href="http://github.com/thewoolleyman/geminstaller/blob/master/lib/geminstaller.rb#L17">&#40;<code>lib/geminstaller.rb</code>&#41;</a></li>
<li>Pick a variable &#40;<code>app</code> in <code>self.install</code>&#41;</li>
<li>Try to work back to the class declaration &#40;<code>GemInstaller::Application</code>&#41; using IDE navigation &#40;<code>Command-click</code> in all the IDEs, although sometimes they ignore you&#41;</li>
</ul></li>
</ul>

<p>Result?  <strong>RubyMine succeeded, NetBeans and RadRails failed miserably</strong>.  Here's what happened in each:</p>

<h2>NetBeans</h2>

<ol>
<li>Click <code>create_application</code> class method reference in <code>app = create_application</code>.  NetBeans takes me to the method declaration in same class.</li>
<li>Click the <code>app</code> method in <code>registry.app</code>.</li>
</ol>

<p><strong>FAIL! ANGRY BEEP!</strong> <code>app</code> is an <code>attr_accessor</code> on another class, NetBeans can't find it.</p>

<h2>RadRails</h2>

<ol>
<li>Click <code>create_application</code> class method reference in <code>app = create_application</code>.  RadRails takes me to the method declaration in same class.</li>
<li>Click <code>app</code> method in <code>registry.app</code>.  RadRails takes me to the <code>attr_accessor</code> on the <code>Registry</code> class &#40;without a prompt, and highlighting the symbol, which is even better than RubyMine&#41;.</li>
<li>Click &#40;and F3&#41; on the <code>:app</code> symbol argument to <code>attr_accessor</code>.</li>
</ol>

<p><strong>FAIL! ANGRY BEEP!</strong> RadRails can't figure out the symbol parameter to <code>attr_accessor</code>.  It says "Current text selection does not resolve to a Ruby element".</p>

<h2>RubyMine</h2>

<ol>
<li>Click <code>create_application</code> class method reference in <code>app = create_application</code>.  RubyMine takes me to the method declaration in same class.</li>
<li>Click <code>app</code> method in <code>registry.app</code>.  RubyMine pops up a dialog asking if I mean the <code>attr_accessor</code> on the <code>Registry</code> class, or the local variable I'm declaring.  That's rather silly, I admit, but the point is it <em>followed</em> the reference to another class.</li>
<li>Click on the <code>attr_accessor</code> choice.  RubyMine takes me to the <code>attr_accessor</code> line in Registry.</li>
<li>Click on the <code>:app</code> symbol argument to <code>attr_accessor</code>.  RubyMine takes me to the point where the <code>@app</code> instance variable is initialized.</li>
<li>Click on the <code>Application</code> class name in the <code>GemInstaller::Application.new</code> constructor invocation.  RubyMine pops up a dialog asking if I mean the <code>Application</code> class in my application, or two other Application classes that happen to be in my Ruby installation.  This is also a silly question - it should have known the correct choice because of my namespacing, but it <em>still found the class</em>.</li>
<li>Click on the <code>GemInstaller:Application</code> choice.  RubyMine takes me to the class declaration.</li>
</ol>

<p><strong>SUCCESS!</strong>  RubyMine drilled all the way to the class declaration, even through an <code>attr_accessor</code>, albeit with a couple of stupid questions.</p>

<h2>Summary</h2>

<p>I personally think this is a Big Deal.  In the past, I've mocked Ruby IDE functionality as a poor simulacrum of the vast power in Java IDEs.  When using Eclipse in Java, I could perform epic refactorings, extracting superclasses and adding parameters to method signatures; refactoring scores of classes across multiple projects in a few mighty keystrokes.  Yes, I'm fully aware that this is because Ruby is a dynamic language, but that doesn't make me miss a real refactoring IDE any less, and <a href="http://www.40withegg.com/articles/visual-studio-ruby-on-rails-and-old-dudes-who-know-smalltalk">others have long lamented these shortcomings, as well</a>.  </p>

<p>So, for years, even though I'd always indulge my pairs if they wanted to use an IDE, I've done all my personal hacking with a fast, lightweight text editor and command line tools.  To me, the benefits of a memory- and processor-sucking IDE with tons of unnecessary, unconfigurable, resource-eating tiny-ass-fonts and chrome did not justify giving up the speed and responsiveness of a great text editor.</p>

<p>However, RubyMine can now <em>navigate code for me</em>.  I don't have to <em>think</em> and <em>manually find</em> that class, RubyMine <em>knows</em> where it is.  Granted, that ain't no Extract Superclass, but it saves me a lot of thought and time, both of which are increasingly rare commodities for me.</p>

<p>To be fair, this is really just a problem related to parsing and interpreting <code>attr_accessor</code> declarations, and I expect that NetBeans and RadRails will pass this test as well in another release or two.  That's all great news, because it means that Ruby IDEs are finally, slowly, coming of age.  I think I'll still be waiting a long time for an automated Modify Method Signature refactoring, though...</p> <a href="http://pivotallabs.com/the-great-ruby-ide-smackdown-of-09/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/the-great-ruby-ide-smackdown-of-09/">The Great Ruby IDE Smackdown of &#039;09</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In a <a href="http://ruby.meetup.com/81/messages/6864007/">recent thread</a> on the East Bay Ruby Meetup list, several people chimed in with Ruby IDE suggestions.  I suggested <a href="http://www.jetbrains.com/ruby/index.html">RubyMine</a>, which we use at Pivotal.  Several people mentioned <a href="http://www.netbeans.org/">NetBeans</a> and <a href="http://www.aptana.com/rails">Aptana RadRails</a>, so I decided to have a little contest.</p>
<p>Now, if I am going to work in an IDE and sacrifice the speed of a text editor, I want to see it <em>work</em> for me &#40;&#8217;cuz RubyMine can chew through all your CPU and RAM and then some faster than you can say <a href="http://en.wikipedia.org/wiki/Moore%27s_law">Moore&#8217;s Law</a>&#41;.  That means <em>understanding</em> Ruby, and using that information to save me some significant thinking and work.  </p>
<p>I <strong>don&#8217;t</strong> mean code-generation macros or dumb context-aware keyword-completion, I mean something useful like <em>knowing where my classes and methods are</em>.  In my book, that leaves out Emacs, Vi, and even TextMate, regardless of their other merits &#40;sorry people, I like text editors too, but I&#8217;m making up this test &#8211; flame away, the comments section is below&#41;.</p>
<p>So, here&#8217;s the smackdown scenario:</p>
<ul>
<li>Download the latest NetBeans, RadRails and RubyMine. </li>
<li>Open a <a href="http://geminstaller.rubyforge.org">Ruby project</a>, this example is one of mine &#40;I wrote this three years ago to learn Ruby, so don&#8217;t make fun of me for doing dumb stuff&#8230;&#41;</li>
<li>Test the ability of the IDE to navigate through Ruby language constructs.  This should be easy, it is a command-line app using a <a href="http://en.wikipedia.org/wiki/Dependency_injection">Dependency Injection architecture</a>, no metaprogramming curveballs!
<ul>
<li>Open the root Ruby class for the project <a href="http://github.com/thewoolleyman/geminstaller/blob/master/lib/geminstaller.rb#L17">&#40;<code>lib/geminstaller.rb</code>&#41;</a></li>
<li>Pick a variable &#40;<code>app</code> in <code>self.install</code>&#41;</li>
<li>Try to work back to the class declaration &#40;<code>GemInstaller::Application</code>&#41; using IDE navigation &#40;<code>Command-click</code> in all the IDEs, although sometimes they ignore you&#41;</li>
</ul>
</li>
</ul>
<p>Result?  <strong>RubyMine succeeded, NetBeans and RadRails failed miserably</strong>.  Here&#8217;s what happened in each:</p>
<h2>NetBeans</h2>
<ol>
<li>Click <code>create_application</code> class method reference in <code>app = create_application</code>.  NetBeans takes me to the method declaration in same class.</li>
<li>Click the <code>app</code> method in <code>registry.app</code>.</li>
</ol>
<p><strong>FAIL! ANGRY BEEP!</strong> <code>app</code> is an <code>attr_accessor</code> on another class, NetBeans can&#8217;t find it.</p>
<h2>RadRails</h2>
<ol>
<li>Click <code>create_application</code> class method reference in <code>app = create_application</code>.  RadRails takes me to the method declaration in same class.</li>
<li>Click <code>app</code> method in <code>registry.app</code>.  RadRails takes me to the <code>attr_accessor</code> on the <code>Registry</code> class &#40;without a prompt, and highlighting the symbol, which is even better than RubyMine&#41;.</li>
<li>Click &#40;and F3&#41; on the <code>:app</code> symbol argument to <code>attr_accessor</code>.</li>
</ol>
<p><strong>FAIL! ANGRY BEEP!</strong> RadRails can&#8217;t figure out the symbol parameter to <code>attr_accessor</code>.  It says &#8220;Current text selection does not resolve to a Ruby element&#8221;.</p>
<h2>RubyMine</h2>
<ol>
<li>Click <code>create_application</code> class method reference in <code>app = create_application</code>.  RubyMine takes me to the method declaration in same class.</li>
<li>Click <code>app</code> method in <code>registry.app</code>.  RubyMine pops up a dialog asking if I mean the <code>attr_accessor</code> on the <code>Registry</code> class, or the local variable I&#8217;m declaring.  That&#8217;s rather silly, I admit, but the point is it <em>followed</em> the reference to another class.</li>
<li>Click on the <code>attr_accessor</code> choice.  RubyMine takes me to the <code>attr_accessor</code> line in Registry.</li>
<li>Click on the <code>:app</code> symbol argument to <code>attr_accessor</code>.  RubyMine takes me to the point where the <code>@app</code> instance variable is initialized.</li>
<li>Click on the <code>Application</code> class name in the <code>GemInstaller::Application.new</code> constructor invocation.  RubyMine pops up a dialog asking if I mean the <code>Application</code> class in my application, or two other Application classes that happen to be in my Ruby installation.  This is also a silly question &#8211; it should have known the correct choice because of my namespacing, but it <em>still found the class</em>.</li>
<li>Click on the <code>GemInstaller:Application</code> choice.  RubyMine takes me to the class declaration.</li>
</ol>
<p><strong>SUCCESS!</strong>  RubyMine drilled all the way to the class declaration, even through an <code>attr_accessor</code>, albeit with a couple of stupid questions.</p>
<h2>Summary</h2>
<p>I personally think this is a Big Deal.  In the past, I&#8217;ve mocked Ruby IDE functionality as a poor simulacrum of the vast power in Java IDEs.  When using Eclipse in Java, I could perform epic refactorings, extracting superclasses and adding parameters to method signatures; refactoring scores of classes across multiple projects in a few mighty keystrokes.  Yes, I&#8217;m fully aware that this is because Ruby is a dynamic language, but that doesn&#8217;t make me miss a real refactoring IDE any less, and <a href="http://www.40withegg.com/articles/visual-studio-ruby-on-rails-and-old-dudes-who-know-smalltalk">others have long lamented these shortcomings, as well</a>.  </p>
<p>So, for years, even though I&#8217;d always indulge my pairs if they wanted to use an IDE, I&#8217;ve done all my personal hacking with a fast, lightweight text editor and command line tools.  To me, the benefits of a memory- and processor-sucking IDE with tons of unnecessary, unconfigurable, resource-eating tiny-ass-fonts and chrome did not justify giving up the speed and responsiveness of a great text editor.</p>
<p>However, RubyMine can now <em>navigate code for me</em>.  I don&#8217;t have to <em>think</em> and <em>manually find</em> that class, RubyMine <em>knows</em> where it is.  Granted, that ain&#8217;t no Extract Superclass, but it saves me a lot of thought and time, both of which are increasingly rare commodities for me.</p>
<p>To be fair, this is really just a problem related to parsing and interpreting <code>attr_accessor</code> declarations, and I expect that NetBeans and RadRails will pass this test as well in another release or two.  That&#8217;s all great news, because it means that Ruby IDEs are finally, slowly, coming of age.  I think I&#8217;ll still be waiting a long time for an automated Modify Method Signature refactoring, though&#8230;</p>
<p>The post <a href="http://pivotallabs.com/the-great-ruby-ide-smackdown-of-09/">The Great Ruby IDE Smackdown of &#039;09</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/the-great-ruby-ide-smackdown-of-09/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>&quot;open_gem&quot; Gem Plugin</title>
		<link>http://pivotallabs.com/open-gem-gem-plugin/</link>
		<comments>http://pivotallabs.com/open-gem-gem-plugin/#comments</comments>
		<pubDate>Sat, 09 May 2009 07:50:00 +0000</pubDate>
		<dc:creator>Chad Woolley</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/open-gem-gem-plugin/</guid>
		<description><![CDATA[<p><p><strong><em>From the Too Useful Not to Blog Department:</strong></em></p>

<p><a href="http://github.com/adamsanderson/open_gem">open_gem</a> from <a href="http://endofline.wordpress.com/">Adam Sanderson</a> is a new <a href="http://www.infoq.com/news/2009/04/rubygems-plugins">RubyGems Plugin</a> to automatically open a gem's source in your favorite $EDITOR.  </p>

<pre><code>gem update --system
sudo gem install open_gem
export EDITOR=mate
gem open rails
</code></pre>

<p>NOTE: If you have RubyGems 1.1 or 1.2, 'gem update --system' may not work.  See the <a href="http://rubyforge.org/forum/forum.php?forum_id=32072">RubyGems Release Notes</a> for more info.</p> <a href="http://pivotallabs.com/open-gem-gem-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/open-gem-gem-plugin/">&quot;open_gem&quot; Gem Plugin</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><strong><em>From the Too Useful Not to Blog Department:</strong></em></p>
<p><a href="http://github.com/adamsanderson/open_gem">open_gem</a> from <a href="http://endofline.wordpress.com/">Adam Sanderson</a> is a new <a href="http://www.infoq.com/news/2009/04/rubygems-plugins">RubyGems Plugin</a> to automatically open a gem&#8217;s source in your favorite $EDITOR.  </p>
<pre><code>gem update --system
sudo gem install open_gem
export EDITOR=mate
gem open rails
</code></pre>
<p>NOTE: If you have RubyGems 1.1 or 1.2, &#8216;gem update &#8211;system&#8217; may not work.  See the <a href="http://rubyforge.org/forum/forum.php?forum_id=32072">RubyGems Release Notes</a> for more info.</p>
<p>The post <a href="http://pivotallabs.com/open-gem-gem-plugin/">&quot;open_gem&quot; Gem Plugin</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/open-gem-gem-plugin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GoGaRuCo &#039;09 &#8211; Relational Modeling Framework &#8211; Nathan Sobo</title>
		<link>http://pivotallabs.com/gogaruco-09-relational-modeling-framework-nathan-sobo/</link>
		<comments>http://pivotallabs.com/gogaruco-09-relational-modeling-framework-nathan-sobo/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 09:11:00 +0000</pubDate>
		<dc:creator>Chad Woolley</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[gogaruco]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/gogaruco-09-relational-modeling-framework-nathan-sobo/</guid>
		<description><![CDATA[<p><p><a href="http://gogaruco.com/schedule/#sobo">Relational Modeling Framework - Nathan Sobo</a></p>

<h2>Intro</h2>

<p><a href="http://www.flickr.com/photos/pivotallabs/3454377078/" title="GoGaRuCo '09 - Relational Modeling Framework - Nathan Sobo by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3612/3454377078_11def1775b.jpg" height="375" alt="GoGaRuCo '09 - Relational Modeling Framework - Nathan Sobo" width="500" /></a></p>

<p>Video of interaction model that drove thinking</p>

<p>Grockit - it is all common - pushing events collaboratively.  This is harder than asynchronous model.</p>

<p>Client needs to respond to to the server in an asynchrounous manner.</p>

<p>All rendering occurs in the browser modifying the DOM as needed.</p>

<p>How do you model this?  With a relational model.  They build a relational model in the browser.</p>

<p>It is good because you don't need pointers, you just use foreign keys and scalar values.  Really flat, really easy to serialize and move across the wire.</p>

<p>However, it is difficult to work with.  Things are indexed by id, etc.</p>

<h2>Demo</h2>

<p>Lots of live coding.  See the video &#40;up soon&#41; at <a href="GoGaRuCo.com">GoGaRuCo.com</a></p>

<p>New project is "June" - based on Unison, but Unison is being deprecated.</p>

<p>The most primitive object in June is the set</p>

<p>System for working things in the browser.</p>

<p>It behaves as you would expect any relational model. Support add/remove etc.
Example has User, Pet, and Species.  Updating Tuples.  Testing with Screwunit</p>

<p>Can have events on sets &#40;i.e. on_insert, on_remove, on_update &#41;</p>

<p><a href="http://www.flickr.com/photos/pivotallabs/3453564025/" title="GoGaRuCo '09 - Relational Modeling Framework - Nathan Sobo by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3411/3453564025_6a56fe8288.jpg" height="375" alt="GoGaRuCo '09 - Relational Modeling Framework - Nathan Sobo" width="500" /></a></p>

<p>Events have other stateful information passed through a hash in changed attributes for each event.</p>

<pre><code>on_update&#40;function&#40;model, changed_attributes&#41; {
  if &#40;changed_attributes.name&#41; {
    print&#40;changed_attributes.name.old_value + " was renamed to " + changed_attibutes.name.new_vaue &#41;;
  }
}&#41;;
</code></pre>

<p>Also has join model:</p>

<pre><code>var stephs_species = stephs_pets.join&#40;Species&#41;.on&#40;Pet.species_id.eq&#40;Species.id&#41;&#41;.project&#40;Species&#41;;
</code></pre>

<p>Also has has_many, and others will be implemented too.</p>

<p>Nathan can live code very well.  He is writing a lot of really cool code and talking about it at the same time.  Like this:</p>

<pre><code>relates_to_many&#40;"pet_species", function&#40;&#41; {
  return this.pets_relation
    .join&#40;Species&#41;.on&#40;Pet.species_id.eq&#40;Species.id&#41;&#41;
    .project&#40;Species&#41;;
}&#41;;
</code></pre>

<p>Can also remotely access the entire server-side database &#40;don't worry, there will be a security model&#41;:</p>

<pre><code>var remote = June.remote&#40;"/domain"&#41;;
</code></pre>

<p>However, you can't pull the whole database down to the browser.  So, you can get a subset of the data that the client requests.</p>

<p>Security: Only give the browser access to things the user is authorized to see.  Every Tuple acts as it's own database.</p>

<p>Objects that have specific permissions only receive tuples and events that pertain to them.</p> <a href="http://pivotallabs.com/gogaruco-09-relational-modeling-framework-nathan-sobo/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/gogaruco-09-relational-modeling-framework-nathan-sobo/">GoGaRuCo &#039;09 &#8211; Relational Modeling Framework &#8211; Nathan Sobo</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://gogaruco.com/schedule/#sobo">Relational Modeling Framework &#8211; Nathan Sobo</a></p>
<h2>Intro</h2>
<p><a href="http://www.flickr.com/photos/pivotallabs/3454377078/" title="GoGaRuCo '09 - Relational Modeling Framework - Nathan Sobo by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3612/3454377078_11def1775b.jpg" height="375" alt="GoGaRuCo '09 - Relational Modeling Framework - Nathan Sobo" width="500" /></a></p>
<p>Video of interaction model that drove thinking</p>
<p>Grockit &#8211; it is all common &#8211; pushing events collaboratively.  This is harder than asynchronous model.</p>
<p>Client needs to respond to to the server in an asynchrounous manner.</p>
<p>All rendering occurs in the browser modifying the DOM as needed.</p>
<p>How do you model this?  With a relational model.  They build a relational model in the browser.</p>
<p>It is good because you don&#8217;t need pointers, you just use foreign keys and scalar values.  Really flat, really easy to serialize and move across the wire.</p>
<p>However, it is difficult to work with.  Things are indexed by id, etc.</p>
<h2>Demo</h2>
<p>Lots of live coding.  See the video &#40;up soon&#41; at <a href="GoGaRuCo.com">GoGaRuCo.com</a></p>
<p>New project is &#8220;June&#8221; &#8211; based on Unison, but Unison is being deprecated.</p>
<p>The most primitive object in June is the set</p>
<p>System for working things in the browser.</p>
<p>It behaves as you would expect any relational model. Support add/remove etc.<br />
Example has User, Pet, and Species.  Updating Tuples.  Testing with Screwunit</p>
<p>Can have events on sets &#40;i.e. on_insert, on_remove, on_update &#41;</p>
<p><a href="http://www.flickr.com/photos/pivotallabs/3453564025/" title="GoGaRuCo '09 - Relational Modeling Framework - Nathan Sobo by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3411/3453564025_6a56fe8288.jpg" height="375" alt="GoGaRuCo '09 - Relational Modeling Framework - Nathan Sobo" width="500" /></a></p>
<p>Events have other stateful information passed through a hash in changed attributes for each event.</p>
<pre><code>on_update&#40;function&#40;model, changed_attributes&#41; {
  if &#40;changed_attributes.name&#41; {
    print&#40;changed_attributes.name.old_value + " was renamed to " + changed_attibutes.name.new_vaue &#41;;
  }
}&#41;;
</code></pre>
<p>Also has join model:</p>
<pre><code>var stephs_species = stephs_pets.join&#40;Species&#41;.on&#40;Pet.species_id.eq&#40;Species.id&#41;&#41;.project&#40;Species&#41;;
</code></pre>
<p>Also has has_many, and others will be implemented too.</p>
<p>Nathan can live code very well.  He is writing a lot of really cool code and talking about it at the same time.  Like this:</p>
<pre><code>relates_to_many&#40;"pet_species", function&#40;&#41; {
  return this.pets_relation
    .join&#40;Species&#41;.on&#40;Pet.species_id.eq&#40;Species.id&#41;&#41;
    .project&#40;Species&#41;;
}&#41;;
</code></pre>
<p>Can also remotely access the entire server-side database &#40;don&#8217;t worry, there will be a security model&#41;:</p>
<pre><code>var remote = June.remote&#40;"/domain"&#41;;
</code></pre>
<p>However, you can&#8217;t pull the whole database down to the browser.  So, you can get a subset of the data that the client requests.</p>
<p>Security: Only give the browser access to things the user is authorized to see.  Every Tuple acts as it&#8217;s own database.</p>
<p>Objects that have specific permissions only receive tuples and events that pertain to them.</p>
<p>The post <a href="http://pivotallabs.com/gogaruco-09-relational-modeling-framework-nathan-sobo/">GoGaRuCo &#039;09 &#8211; Relational Modeling Framework &#8211; Nathan Sobo</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/gogaruco-09-relational-modeling-framework-nathan-sobo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GoGaRuCo &#039;09 &#8211; Arduino is Rails for hardware hacking &#8211; Greg Borenstein</title>
		<link>http://pivotallabs.com/gogaruco-09-arduino-is-rails-for-hardware-hacking-greg-borenstein/</link>
		<comments>http://pivotallabs.com/gogaruco-09-arduino-is-rails-for-hardware-hacking-greg-borenstein/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 08:20:00 +0000</pubDate>
		<dc:creator>Chad Woolley</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[gogaruco]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/gogaruco-09-arduino-is-rails-for-hardware-hacking-greg-borenstein/</guid>
		<description><![CDATA[<p><p><a href="http://gogaruco.com/schedule/#borenstein">Arduino is Rails for hardware hacking - Greg Borenstein</a></p>

<h2>Intro</h2>

<p><a href="ideasfordozens.com">Greg Borenstein</a></p>

<p><a href="http://www.flickr.com/photos/pivotallabs/3454300216/" title="GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3387/3454300216_72b5738565.jpg" height="375" alt="GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein" width="500" /></a></p>

<p><strong>Obligatory safety talk</strong></p>

<p>Electrical engineering is for experts!</p>

<p>Physical computing is for everyone!</p>

<ul>
<li>Artists!</li>
<li>Idealists - Fab labs in India</li>
<li>Hackers - Cockroach driven robot.  Cockroach runs, spins ball, drives robot</li>
</ul>

<p>Physical computing is programming for stuff
read inputs from your surroundings and modify them based on logic</p>

<h2>[Arduino]&#40;http://www.arduino.cc/&#41;</h2>

<p>Open source hardware and software project that makes physical computing really easy</p>

<p><img src="http://arduino.cc/en/uploads/Main/arduino316.jpg" alt="arduino" /></p>

<ul>
<li>Program via USB</li>
<li>power via 9v</li>
<li>14 digital i/o pins</li>
<li>AVR microcontroller</li>
<li>6 analog i/o pins</li>
</ul>

<p>Most of the API is for sensing and controlling the physical world.</p>

<p>HELLO WORLD - make an LED blink on and off</p>

<pre><code>class HelloWorld &#60; ArduinoSketch
  output_pin 13, :as =&#62; led

  def loop
    led.blink&#40;500&#41;
  end
end
</code></pre>

<p><a href="http://www.flickr.com/photos/pivotallabs/3453486229/" title="GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3608/3453486229_23f767d8d7.jpg" height="375" alt="GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein" width="500" /></a></p>

<p><a href="http://github.com/atduskgreg/rad">RAD</a> is Ruby Arduino Development</p>

<p>In a hardware demo, everyone is required to go "Oooooooooooh" &#40;even if it doesn't work&#41;</p>

<p>rad command generates a project directories</p>

<p>You can buy an Arduino board for ~$30 from <a href="http://www.makershed.com/SearchResults.asp?Cat=43">Make</a>
or a <a href="http://www.dorkbotpdx.org/wiki/dorkboard">Dorkboard</a> for ~$6</p>

<p>Bell rings as a post commit-hook for git</p>

<p>.git/hooks/post-commit
   require 'bell.rb'
   Bell.ring
   exit 0</p>

<h2>Demo Reason + Archeopteryx playing a drum</h2>

<p><a href="http://www.flickr.com/photos/pivotallabs/3454301914/" title="GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3411/3454301914_5796caeb4e.jpg" height="375" alt="GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein" width="500" /></a></p>

<ul>
<li>Play midi via <a href="http://www.propellerheads.se/products/reason/">Reason</a></li>
<li>Playing same midi through arduino, a motor, a drumstick and a snare drum</li>
</ul>

<p>Archeopteryx: code describes patterns with channels, and randomness.</p>

<p>Reason sends midi to Tascam midi device, Tascam sends to Arduino, which turns solenoid attached to drumstick.</p>

<p>Physical computing is for everyone, if you've ever wanted to make your code interact with the world, now you can.</p>

<p>Q: Can you use this to play rockband?<br />
A: Yes. You can use a photoresistor to detect notes coming across the line.</p>

<p>Q: Are there latency problems with midi playback?<br />
A: The clockspeed of the arduino is fast enough to keep up with the playback. </p> <a href="http://pivotallabs.com/gogaruco-09-arduino-is-rails-for-hardware-hacking-greg-borenstein/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/gogaruco-09-arduino-is-rails-for-hardware-hacking-greg-borenstein/">GoGaRuCo &#039;09 &#8211; Arduino is Rails for hardware hacking &#8211; Greg Borenstein</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://gogaruco.com/schedule/#borenstein">Arduino is Rails for hardware hacking &#8211; Greg Borenstein</a></p>
<h2>Intro</h2>
<p><a href="ideasfordozens.com">Greg Borenstein</a></p>
<p><a href="http://www.flickr.com/photos/pivotallabs/3454300216/" title="GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3387/3454300216_72b5738565.jpg" height="375" alt="GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein" width="500" /></a></p>
<p><strong>Obligatory safety talk</strong></p>
<p>Electrical engineering is for experts!</p>
<p>Physical computing is for everyone!</p>
<ul>
<li>Artists!</li>
<li>Idealists &#8211; Fab labs in India</li>
<li>Hackers &#8211; Cockroach driven robot.  Cockroach runs, spins ball, drives robot</li>
</ul>
<p>Physical computing is programming for stuff<br />
read inputs from your surroundings and modify them based on logic</p>
<h2>[Arduino]&#40;http://www.arduino.cc/&#41;</h2>
<p>Open source hardware and software project that makes physical computing really easy</p>
<p><img src="http://arduino.cc/en/uploads/Main/arduino316.jpg" alt="arduino" /></p>
<ul>
<li>Program via USB</li>
<li>power via 9v</li>
<li>14 digital i/o pins</li>
<li>AVR microcontroller</li>
<li>6 analog i/o pins</li>
</ul>
<p>Most of the API is for sensing and controlling the physical world.</p>
<p>HELLO WORLD &#8211; make an LED blink on and off</p>
<pre><code>class HelloWorld &lt; ArduinoSketch
  output_pin 13, :as =&gt; led

  def loop
    led.blink&#40;500&#41;
  end
end
</code></pre>
<p><a href="http://www.flickr.com/photos/pivotallabs/3453486229/" title="GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3608/3453486229_23f767d8d7.jpg" height="375" alt="GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein" width="500" /></a></p>
<p><a href="http://github.com/atduskgreg/rad">RAD</a> is Ruby Arduino Development</p>
<p>In a hardware demo, everyone is required to go &#8220;Oooooooooooh&#8221; &#40;even if it doesn&#8217;t work&#41;</p>
<p>rad command generates a project directories</p>
<p>You can buy an Arduino board for ~$30 from <a href="http://www.makershed.com/SearchResults.asp?Cat=43">Make</a><br />
or a <a href="http://www.dorkbotpdx.org/wiki/dorkboard">Dorkboard</a> for ~$6</p>
<p>Bell rings as a post commit-hook for git</p>
<p>.git/hooks/post-commit<br />
   require &#8216;bell.rb&#8217;<br />
   Bell.ring<br />
   exit 0</p>
<h2>Demo Reason + Archeopteryx playing a drum</h2>
<p><a href="http://www.flickr.com/photos/pivotallabs/3454301914/" title="GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3411/3454301914_5796caeb4e.jpg" height="375" alt="GoGaRuCo '09 - Arduino is Rails for hardware hacking - Greg Borenstein" width="500" /></a></p>
<ul>
<li>Play midi via <a href="http://www.propellerheads.se/products/reason/">Reason</a></li>
<li>Playing same midi through arduino, a motor, a drumstick and a snare drum</li>
</ul>
<p>Archeopteryx: code describes patterns with channels, and randomness.</p>
<p>Reason sends midi to Tascam midi device, Tascam sends to Arduino, which turns solenoid attached to drumstick.</p>
<p>Physical computing is for everyone, if you&#8217;ve ever wanted to make your code interact with the world, now you can.</p>
<p>Q: Can you use this to play rockband?<br />
A: Yes. You can use a photoresistor to detect notes coming across the line.</p>
<p>Q: Are there latency problems with midi playback?<br />
A: The clockspeed of the arduino is fast enough to keep up with the playback. </p>
<p>The post <a href="http://pivotallabs.com/gogaruco-09-arduino-is-rails-for-hardware-hacking-greg-borenstein/">GoGaRuCo &#039;09 &#8211; Arduino is Rails for hardware hacking &#8211; Greg Borenstein</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/gogaruco-09-arduino-is-rails-for-hardware-hacking-greg-borenstein/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GoGaRuCo &#039;09 &#8211; Raffles!</title>
		<link>http://pivotallabs.com/gogaruco-09-raffles/</link>
		<comments>http://pivotallabs.com/gogaruco-09-raffles/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 07:46:00 +0000</pubDate>
		<dc:creator>Chad Woolley</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[gogaruco]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/gogaruco-09-raffles/</guid>
		<description><![CDATA[<p><p>Lots of nice prizes.  Some people weren't there.  They lost!</p>

<p><a href="http://www.flickr.com/photos/pivotallabs/3453416617/" title="GoGaRuCo '09 - Raffles by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3643/3453416617_026c51cbf3.jpg" height="375" alt="GoGaRuCo '09 - Raffles" width="500" /></a></p>

<p>Zach won an iPhone!</p>

<p><a href="http://www.flickr.com/photos/pivotallabs/3453417011/" title="GoGaRuCo '09 - Raffles by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3637/3453417011_1aba82f21d.jpg" height="375" alt="GoGaRuCo '09 - Raffles" width="500" /></a></p> <a href="http://pivotallabs.com/gogaruco-09-raffles/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/gogaruco-09-raffles/">GoGaRuCo &#039;09 &#8211; Raffles!</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Lots of nice prizes.  Some people weren&#8217;t there.  They lost!</p>
<p><a href="http://www.flickr.com/photos/pivotallabs/3453416617/" title="GoGaRuCo '09 - Raffles by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3643/3453416617_026c51cbf3.jpg" height="375" alt="GoGaRuCo '09 - Raffles" width="500" /></a></p>
<p>Zach won an iPhone!</p>
<p><a href="http://www.flickr.com/photos/pivotallabs/3453417011/" title="GoGaRuCo '09 - Raffles by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3637/3453417011_1aba82f21d.jpg" height="375" alt="GoGaRuCo '09 - Raffles" width="500" /></a></p>
<p>The post <a href="http://pivotallabs.com/gogaruco-09-raffles/">GoGaRuCo &#039;09 &#8211; Raffles!</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/gogaruco-09-raffles/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GoGaRuCo &#039;09 &#8211; Webrat: Rails Acceptance Testing Evolved &#8211; Bryan Helmkamp</title>
		<link>http://pivotallabs.com/gogaruco-09-webrat-rails-acceptance-testing-evolved-bryan-helmkamp/</link>
		<comments>http://pivotallabs.com/gogaruco-09-webrat-rails-acceptance-testing-evolved-bryan-helmkamp/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 06:04:00 +0000</pubDate>
		<dc:creator>Chad Woolley</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[gogaruco]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/gogaruco-09-webrat-rails-acceptance-testing-evolved-bryan-helmkamp/</guid>
		<description><![CDATA[<p><p><a href="http://gogaruco.com/schedule/#helmkamp">Webrat: Rails Acceptance Testing Evolved - Bryan Helmkamp</a></p>

<h2>Intro</h2>

<p>Bryan Helmkamp &#40; <a href="http://www.brynary.com/about/">more about him</a> &#41;.  He works at <a href="http://www.weplay.com/">WePlay</a>.  He is the co-author of "The RSpec Book"</p>

<p>Links:</p>

<ul>
<li><a href="bit.ly/wbrt-ggrc">bit.ly/wbrt-ggrc</a></li>
<li>Twitter: @brynary #webrat</li>
<li><a href="brynary.com">brynary.com</a></li>
</ul>

<p>Audience Poll: How many people know and use webrat &#40;50%+ using, 25% using&#41;</p>

<p>Webrat is an awesome tool everyone should use, but it doesn't run on the iPhone, not written in Scala, and there is no Pr0n.</p>

<p><a href="http://www.flickr.com/photos/pivotallabs/3453971586/" title="GoGaRuCo '09 - Webrat: Rails Acceptance Testing Evolved - Bryan Helmkamp by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3340/3453971586_6a00461a9d.jpg" height="375" alt="GoGaRuCo '09 - Webrat: Rails Acceptance Testing Evolved - Bryan Helmkamp" width="500" /></a></p>

<h2>Beer Disclaimer</h2>

<p>If you have questions that aren't answered, find him for a beer after the conference</p>

<h2>API</h2>

<p>Writing a rails integration test how we test websites, traditional methods are brittle and tedious.</p>

<p>Webrat code is more readable than traditionally written integration tests</p>

<p>It behaves like a browser:</p>

<ul>
<li>"visit" method - the equivalent typing in a URL to the browser.</li>
<li>"click_link" - like clicking a link &#40;duh&#41;</li>
<li>"fill_in" - fills in a field</li>
<li>"assert_contain" - perform assertions</li>
</ul>

<p>Uses <a href="http://wiki.github.com/tenderlove/nokogiri">nokogiri</a> to parse the response HTML and run assertions on it.</p>

<h2>How to use it?</h2>

<pre><code>#config/environment.rb
config.gem "webrat", :version =&#62; "&#62;= 0.4.4"

#test/test_helper.rb
Webrat.configure do &#124;config&#124;
  config.mode = :rails
end
</code></pre>

<h2>Webrat's Core API</h2>

<ul>
<li>visit</li>
<li>click_link</li>
<li>fill_in</li>
<li>check and uncheck</li>
<li>choose</li>
<li>select</li>
<li>attach_file</li>
<li>click_button</li>
</ul>

<p>Webrat works with RSpec, Shoulda and <a href="http://wiki.github.com/aslakhellesoy/cucumber">Cucumber</a>
Webrat and cucumber do not have to be used together.  You can use Webrat with whatever testing framework you want to use.
Webrat also works with Rails, Sinatra and Merb.</p>

<p>Webrat can do input matching to labels.  Webrat encourages you to put good labels on your form fields.</p>

<p><a href="http://www.flickr.com/photos/pivotallabs/3453157785/" title="GoGaRuCo '09 - Webrat: Rails Acceptance Testing Evolved - Bryan Helmkamp by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3356/3453157785_1e6df43671.jpg" height="500" alt="GoGaRuCo '09 - Webrat: Rails Acceptance Testing Evolved - Bryan Helmkamp" width="375" /></a></p>

<p>Webrat verifies HTTP Status codes for you behind the scenes.</p>

<ul>
<li>Automatically makes sure you don't get 500 HTTP server errors.</li>
<li>Also ensures that fields exist</li>
</ul>

<h2>Verify HTML content</h2>

<pre><code>response.should contain&#40;"Hello, world!"&#41;
response.should have_selector&#40;"li", :class =&#62; "new", :count =&#62; 2&#41;
response.should_not have_xpath&#40;".//meta[@name='robots']"&#41;


response.should have_selector&#40;"#album li:nth-child&#40;3&#41;"&#41; do &#124;li&#124;
  li.should have_selector&#40;"img", :src =&#62; photo_path&#40;@photo&#41;&#41;
  li.should contain&#40;"Vacation Photo"&#41;
end
</code></pre>

<p>When things go wrong Webrat uses '''save_and_open_page''' and writes out the current response body and brings up the page.</p>

<h2>Webrat Adapters</h2>

<ul>
<li>Rails</li>
<li>Merb</li>
<li>Sinatra</li>
<li>Selenium</li>
<li>Mechanize &#40;can use to scrape other websites i.e. google&#41;</li>
</ul>

<p>Evil plot is to write adapters so he can test everything at once.</p>

<h2>Selenium</h2>

<p>Webrat started as an alternative to selenium, but it now includes a selenium adapter.  Bryan suggests not using selenium whenever possible.  You should start with the traditional webrat mode and not the selenium mode.  Unfortunately, it's the only way to test a real browser, such as javascript.</p>

<pre><code># selenium doesn't support transactional fixtures
class ActiveSupport::TestCase
  #...
  self.use_transactional_fixtures = false
  #...
end

setup do &#124;session&#124;
  session_host "localhost:3000"
end


Webrat.configure do &#124;config&#124;
  config.mode = :selenium
end
</code></pre>

<p>Webrat talks to the selenium client gem to talk to the Selenium RC server which then drives a browser &#40;IE, safari, and/or firefox&#41;.</p>

<p>Sometimes you'll need to an action differently when a browser is actually present.  These commands let you write code for a specific context:
webrat.simulate - traditional webrat simulation mode
webrate.automate - drive a real browser</p>

<pre><code># is not run in normal webrat mode
  webrat.automate do
end

# is not run in selenium webrat mode
webrat.simulate do
  ...
end
</code></pre>

<p>The 'selenium' object is exposed from the selenium client gem.  You can use it directly within your tests.</p>

<p><strong>Automating a real web browser is SLOW</strong></p>

<h2>One more thing...</h2>

<p>rack::test - gives you a quick way to generate requests to any rack enabled application
Makes it easy to test complicated routing of requests through rack apps.  For example, a rails metal that routes to a sinatra app.</p>

<h2>Rack::Test API</h2>

<p>get
post, put, delete head
request
...</p>

<h2>Questions</h2>

<ul>
<li>Q: How do you deal with links with the same names?<br /></li>
<li><p>A: Webrat has a method called "within" which allows you to scope your selectors to be inside an HTML tag.</p></li>
<li><p>Q: Does it have support for checking HTML validity?<br /></p></li>
<li><p>A: No, that is outside of the scope of core webrat.  However, we have talked about the ability to capture </p></li>
<li><p>Q: Where does the output of save_and_open_page go?<br /></p></li>
<li><p>A: Into Rails' tmp directory</p></li>
<li><p>Q: Selenium client has some interesting screen grab is that being exposed?<br /></p></li>
<li>A: Webrat has that in Selenium mode now.</li>
</ul> <a href="http://pivotallabs.com/gogaruco-09-webrat-rails-acceptance-testing-evolved-bryan-helmkamp/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/gogaruco-09-webrat-rails-acceptance-testing-evolved-bryan-helmkamp/">GoGaRuCo &#039;09 &#8211; Webrat: Rails Acceptance Testing Evolved &#8211; Bryan Helmkamp</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://gogaruco.com/schedule/#helmkamp">Webrat: Rails Acceptance Testing Evolved &#8211; Bryan Helmkamp</a></p>
<h2>Intro</h2>
<p>Bryan Helmkamp &#40; <a href="http://www.brynary.com/about/">more about him</a> &#41;.  He works at <a href="http://www.weplay.com/">WePlay</a>.  He is the co-author of &#8220;The RSpec Book&#8221;</p>
<p>Links:</p>
<ul>
<li><a href="bit.ly/wbrt-ggrc">bit.ly/wbrt-ggrc</a></li>
<li>Twitter: @brynary #webrat</li>
<li><a href="brynary.com">brynary.com</a></li>
</ul>
<p>Audience Poll: How many people know and use webrat &#40;50%+ using, 25% using&#41;</p>
<p>Webrat is an awesome tool everyone should use, but it doesn&#8217;t run on the iPhone, not written in Scala, and there is no Pr0n.</p>
<p><a href="http://www.flickr.com/photos/pivotallabs/3453971586/" title="GoGaRuCo '09 - Webrat: Rails Acceptance Testing Evolved - Bryan Helmkamp by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3340/3453971586_6a00461a9d.jpg" height="375" alt="GoGaRuCo '09 - Webrat: Rails Acceptance Testing Evolved - Bryan Helmkamp" width="500" /></a></p>
<h2>Beer Disclaimer</h2>
<p>If you have questions that aren&#8217;t answered, find him for a beer after the conference</p>
<h2>API</h2>
<p>Writing a rails integration test how we test websites, traditional methods are brittle and tedious.</p>
<p>Webrat code is more readable than traditionally written integration tests</p>
<p>It behaves like a browser:</p>
<ul>
<li>&#8220;visit&#8221; method &#8211; the equivalent typing in a URL to the browser.</li>
<li>&#8220;click_link&#8221; &#8211; like clicking a link &#40;duh&#41;</li>
<li>&#8220;fill_in&#8221; &#8211; fills in a field</li>
<li>&#8220;assert_contain&#8221; &#8211; perform assertions</li>
</ul>
<p>Uses <a href="http://wiki.github.com/tenderlove/nokogiri">nokogiri</a> to parse the response HTML and run assertions on it.</p>
<h2>How to use it?</h2>
<pre><code>#config/environment.rb
config.gem "webrat", :version =&gt; "&gt;= 0.4.4"

#test/test_helper.rb
Webrat.configure do |config|
  config.mode = :rails
end
</code></pre>
<h2>Webrat&#8217;s Core API</h2>
<ul>
<li>visit</li>
<li>click_link</li>
<li>fill_in</li>
<li>check and uncheck</li>
<li>choose</li>
<li>select</li>
<li>attach_file</li>
<li>click_button</li>
</ul>
<p>Webrat works with RSpec, Shoulda and <a href="http://wiki.github.com/aslakhellesoy/cucumber">Cucumber</a><br />
Webrat and cucumber do not have to be used together.  You can use Webrat with whatever testing framework you want to use.<br />
Webrat also works with Rails, Sinatra and Merb.</p>
<p>Webrat can do input matching to labels.  Webrat encourages you to put good labels on your form fields.</p>
<p><a href="http://www.flickr.com/photos/pivotallabs/3453157785/" title="GoGaRuCo '09 - Webrat: Rails Acceptance Testing Evolved - Bryan Helmkamp by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3356/3453157785_1e6df43671.jpg" height="500" alt="GoGaRuCo '09 - Webrat: Rails Acceptance Testing Evolved - Bryan Helmkamp" width="375" /></a></p>
<p>Webrat verifies HTTP Status codes for you behind the scenes.</p>
<ul>
<li>Automatically makes sure you don&#8217;t get 500 HTTP server errors.</li>
<li>Also ensures that fields exist</li>
</ul>
<h2>Verify HTML content</h2>
<pre><code>response.should contain&#40;"Hello, world!"&#41;
response.should have_selector&#40;"li", :class =&gt; "new", :count =&gt; 2&#41;
response.should_not have_xpath&#40;".//meta[@name='robots']"&#41;


response.should have_selector&#40;"#album li:nth-child&#40;3&#41;"&#41; do |li|
  li.should have_selector&#40;"img", :src =&gt; photo_path&#40;@photo&#41;&#41;
  li.should contain&#40;"Vacation Photo"&#41;
end
</code></pre>
<p>When things go wrong Webrat uses &#8221;&#8217;save_and_open_page&#8221;&#8217; and writes out the current response body and brings up the page.</p>
<h2>Webrat Adapters</h2>
<ul>
<li>Rails</li>
<li>Merb</li>
<li>Sinatra</li>
<li>Selenium</li>
<li>Mechanize &#40;can use to scrape other websites i.e. google&#41;</li>
</ul>
<p>Evil plot is to write adapters so he can test everything at once.</p>
<h2>Selenium</h2>
<p>Webrat started as an alternative to selenium, but it now includes a selenium adapter.  Bryan suggests not using selenium whenever possible.  You should start with the traditional webrat mode and not the selenium mode.  Unfortunately, it&#8217;s the only way to test a real browser, such as javascript.</p>
<pre><code># selenium doesn't support transactional fixtures
class ActiveSupport::TestCase
  #...
  self.use_transactional_fixtures = false
  #...
end

setup do |session|
  session_host "localhost:3000"
end


Webrat.configure do |config|
  config.mode = :selenium
end
</code></pre>
<p>Webrat talks to the selenium client gem to talk to the Selenium RC server which then drives a browser &#40;IE, safari, and/or firefox&#41;.</p>
<p>Sometimes you&#8217;ll need to an action differently when a browser is actually present.  These commands let you write code for a specific context:<br />
webrat.simulate &#8211; traditional webrat simulation mode<br />
webrate.automate &#8211; drive a real browser</p>
<pre><code># is not run in normal webrat mode
  webrat.automate do
end

# is not run in selenium webrat mode
webrat.simulate do
  ...
end
</code></pre>
<p>The &#8216;selenium&#8217; object is exposed from the selenium client gem.  You can use it directly within your tests.</p>
<p><strong>Automating a real web browser is SLOW</strong></p>
<h2>One more thing&#8230;</h2>
<p>rack::test &#8211; gives you a quick way to generate requests to any rack enabled application<br />
Makes it easy to test complicated routing of requests through rack apps.  For example, a rails metal that routes to a sinatra app.</p>
<h2>Rack::Test API</h2>
<p>get<br />
post, put, delete head<br />
request<br />
&#8230;</p>
<h2>Questions</h2>
<ul>
<li>Q: How do you deal with links with the same names?</li>
<li>
<p>A: Webrat has a method called &#8220;within&#8221; which allows you to scope your selectors to be inside an HTML tag.</p>
</li>
<li>
<p>Q: Does it have support for checking HTML validity?</p>
</li>
<li>
<p>A: No, that is outside of the scope of core webrat.  However, we have talked about the ability to capture </p>
</li>
<li>
<p>Q: Where does the output of save_and_open_page go?</p>
</li>
<li>
<p>A: Into Rails&#8217; tmp directory</p>
</li>
<li>
<p>Q: Selenium client has some interesting screen grab is that being exposed?</p>
</li>
<li>A: Webrat has that in Selenium mode now.</li>
</ul>
<p>The post <a href="http://pivotallabs.com/gogaruco-09-webrat-rails-acceptance-testing-evolved-bryan-helmkamp/">GoGaRuCo &#039;09 &#8211; Webrat: Rails Acceptance Testing Evolved &#8211; Bryan Helmkamp</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/gogaruco-09-webrat-rails-acceptance-testing-evolved-bryan-helmkamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GoGaRuCo &#039;09 &#8211; Using Shoes to create better iPhone apps &#8211; Tim Elliott</title>
		<link>http://pivotallabs.com/gogaruco-09-using-shoes-to-create-better-iphone-apps-tim-elliott/</link>
		<comments>http://pivotallabs.com/gogaruco-09-using-shoes-to-create-better-iphone-apps-tim-elliott/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 02:43:00 +0000</pubDate>
		<dc:creator>Chad Woolley</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[gogaruco]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/gogaruco-09-using-shoes-to-create-better-iphone-apps-tim-elliott/</guid>
		<description><![CDATA[<p><p><a href="http://gogaruco.com/schedule/#elliott">Using Shoes to Have Fun - Tim Elliott</a></p>

<h2>Intro</h2>

<p>He rode his bicycle from Chico.  He works at Trevidia, and is a Rails developer</p>

<p>Links:</p>

<ul>
<li><a href="http://shoooes.net">The Shoes website</a> - To get and learn about Shoes<br /></li>
<li><a href="http://the-shoebox.org">The Shoe Box</a> -  A collection of user apps written in Shoes<br /></li>
<li><a href="http://hackety.org/press/nks.html">Nobody Knows Shoes</a> &#40;comic book&#41;</li>
</ul>

<p><a href="http://www.flickr.com/photos/pivotallabs/3453518694/" title="GoGaRuCo '09 - Tim Elliott by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3355/3453518694_17fbf9aeed.jpg" height="500" alt="GoGaRuCo '09 - Tim Elliott" width="375" /></a></p>

<h2>Shoes</h2>

<p>The highlight is the fun that he has found by programming in Shoes.  This was originally a talk about iPhone, but he wanted to put more fun into it.</p>

<p>why the lucky stiff wrote a comic about Shoes.  In 2003, why wrote a blog post called "The Little Coder's Predicament".  It is a call to arms for all programmers, beginning and expert, to have more fun.</p>

<p>Such as the old Commodore 64 program, written in BASIC:
    10 PRINT "TIM RULES"
    20 GOTO 10</p>

<p>You could do really fun things really easily, even if you didn't own a C64!</p>

<p>However, Ruby is harder for kids &#40;especially on windows&#41; to get started with:</p>

<ul>
<li>Ruby one click installer</li>
<li>RubyGems</li>
<li><p>Sqlite</p>

<p>rails cat_app
script/generate
etc...</p></li>
</ul>

<p>That lets you "make a cat", but not too exciting for kids.  Involves too many other languages &#40;HTML, CSS, Javascript&#41;. They want cats to jump around the screen and do cool stuff.</p>

<p>Shoes</p>

<ul>
<li>One installer</li>
<li>draw and animate</li>
</ul>

<p>Shoes is not a Gem</p>

<p>Couldn't use a standard ruby distro, had to install a new one, but this is because shoes is not geared towards developers, but people who are installing for the first time.</p>

<p><a href="http://www.flickr.com/photos/pivotallabs/3452703147/" title="GoGaRuCo '09 - Tim Elliott by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3313/3452703147_610f9fef0b.jpg" height="375" alt="GoGaRuCo '09 - Tim Elliott" width="500" /></a></p>

<p>Shoes is a GUI toolkit that embeds Ruby.  It includes a packager and a few gems.</p>

<p>Very flexible but understandable layout engine.</p>

<p><code>Example of Shoes:
Shoes.app do
 stack do
     para 'wanna click a button?'
     button&#40;'sure'&#41; { alert 'woot' }
  end
end</code></p>

<p>"Stacks" and "Flows".  You can do simple or complex layouts using these two principles.</p>

<p>Flows act like left floated html elements.</p>

<p>Everything is wrapped in a Shoes.app block, and does a class eval.</p>

<p>You can put your own classes outside the app block and use them inside, but there's a gotcha.  Once you use classes from outside the app block, the class eval doesn't work, but there is a workaround.</p>

<p>Shoes keeps an array in the form of an in-memory stack that remembers everything.  So when you start putting controls in, Shoes knows where to put them.  it is always tracking which container you are in, so you can get an idea of where everything shows up.</p>

<p>Also watch out for long-running tasks at the OS level, this can kill the app performance &#40;due to green threads&#41;.  </p>

<p>Demo of Shoes:</p>

<p>Drawing some ovals</p>

<p><a href="http://shoooes.net/">Shoes online manual</a></p>

<p>Shoes itself comes with online documentation when you install it, which has a nice search tool and examples.</p>

<p>Shoes is also good for rapid prototyping, such as desktop apps or iPhone apps. The advantage is that you get to do it all in Ruby.</p>

<h2>Sharing with friends</h2>

<p>It is easy to share.  If you are running shoes, you can use a packager that comes with it to create an executable installer which runs on Windows, Linux, or OSX.</p>

<p>It will be small, a few meg, and still under ten even if you use video.</p>

<p>You can use ruby-debug to interactively debug.</p>

<p>`Shoes.setup do
    gem 'ruby-debug'
end</p>

<p>require 'ruby-debug'</p>

<p>Shoes.app do
    debugger
end
`
Shoes has a gem installer gui and will install gems includes in the Shoes setup block, this gets included in the package.</p>

<p>It includes native HTTP download libraries for all platforms, because ruby http lib is slow and for other issues.</p>

<p>In the git distro, it includes "bloopsiphone" which lets you create Atari-like sounds and noises, and it also has an easy API.</p>

<p>Be creative and have fun, make robot apps, make the robots eat each other.  This is a great way to connect your passion with non-programmers, because everyone likes robots eating other robots.</p>

<p>Q: You mentioned development for the iPhone can you go into more detail?
A: You can't run ruby on the iPhone yet but its still useful for prototyping.</p> <a href="http://pivotallabs.com/gogaruco-09-using-shoes-to-create-better-iphone-apps-tim-elliott/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/gogaruco-09-using-shoes-to-create-better-iphone-apps-tim-elliott/">GoGaRuCo &#039;09 &#8211; Using Shoes to create better iPhone apps &#8211; Tim Elliott</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://gogaruco.com/schedule/#elliott">Using Shoes to Have Fun &#8211; Tim Elliott</a></p>
<h2>Intro</h2>
<p>He rode his bicycle from Chico.  He works at Trevidia, and is a Rails developer</p>
<p>Links:</p>
<ul>
<li><a href="http://shoooes.net">The Shoes website</a> &#8211; To get and learn about Shoes</li>
<li><a href="http://the-shoebox.org">The Shoe Box</a> &#8211;  A collection of user apps written in Shoes</li>
<li><a href="http://hackety.org/press/nks.html">Nobody Knows Shoes</a> &#40;comic book&#41;</li>
</ul>
<p><a href="http://www.flickr.com/photos/pivotallabs/3453518694/" title="GoGaRuCo '09 - Tim Elliott by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3355/3453518694_17fbf9aeed.jpg" height="500" alt="GoGaRuCo '09 - Tim Elliott" width="375" /></a></p>
<h2>Shoes</h2>
<p>The highlight is the fun that he has found by programming in Shoes.  This was originally a talk about iPhone, but he wanted to put more fun into it.</p>
<p>why the lucky stiff wrote a comic about Shoes.  In 2003, why wrote a blog post called &#8220;The Little Coder&#8217;s Predicament&#8221;.  It is a call to arms for all programmers, beginning and expert, to have more fun.</p>
<p>Such as the old Commodore 64 program, written in BASIC:<br />
    10 PRINT &#8220;TIM RULES&#8221;<br />
    20 GOTO 10</p>
<p>You could do really fun things really easily, even if you didn&#8217;t own a C64!</p>
<p>However, Ruby is harder for kids &#40;especially on windows&#41; to get started with:</p>
<ul>
<li>Ruby one click installer</li>
<li>RubyGems</li>
<li>
<p>Sqlite</p>
<p>rails cat_app<br />
script/generate<br />
etc&#8230;</p>
</li>
</ul>
<p>That lets you &#8220;make a cat&#8221;, but not too exciting for kids.  Involves too many other languages &#40;HTML, CSS, Javascript&#41;. They want cats to jump around the screen and do cool stuff.</p>
<p>Shoes</p>
<ul>
<li>One installer</li>
<li>draw and animate</li>
</ul>
<p>Shoes is not a Gem</p>
<p>Couldn&#8217;t use a standard ruby distro, had to install a new one, but this is because shoes is not geared towards developers, but people who are installing for the first time.</p>
<p><a href="http://www.flickr.com/photos/pivotallabs/3452703147/" title="GoGaRuCo '09 - Tim Elliott by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3313/3452703147_610f9fef0b.jpg" height="375" alt="GoGaRuCo '09 - Tim Elliott" width="500" /></a></p>
<p>Shoes is a GUI toolkit that embeds Ruby.  It includes a packager and a few gems.</p>
<p>Very flexible but understandable layout engine.</p>
<p><code>Example of Shoes:<br />
Shoes.app do<br />
 stack do<br />
     para 'wanna click a button?'<br />
     button&#40;'sure'&#41; { alert 'woot' }<br />
  end<br />
end</code></p>
<p>&#8220;Stacks&#8221; and &#8220;Flows&#8221;.  You can do simple or complex layouts using these two principles.</p>
<p>Flows act like left floated html elements.</p>
<p>Everything is wrapped in a Shoes.app block, and does a class eval.</p>
<p>You can put your own classes outside the app block and use them inside, but there&#8217;s a gotcha.  Once you use classes from outside the app block, the class eval doesn&#8217;t work, but there is a workaround.</p>
<p>Shoes keeps an array in the form of an in-memory stack that remembers everything.  So when you start putting controls in, Shoes knows where to put them.  it is always tracking which container you are in, so you can get an idea of where everything shows up.</p>
<p>Also watch out for long-running tasks at the OS level, this can kill the app performance &#40;due to green threads&#41;.  </p>
<p>Demo of Shoes:</p>
<p>Drawing some ovals</p>
<p><a href="http://shoooes.net/">Shoes online manual</a></p>
<p>Shoes itself comes with online documentation when you install it, which has a nice search tool and examples.</p>
<p>Shoes is also good for rapid prototyping, such as desktop apps or iPhone apps. The advantage is that you get to do it all in Ruby.</p>
<h2>Sharing with friends</h2>
<p>It is easy to share.  If you are running shoes, you can use a packager that comes with it to create an executable installer which runs on Windows, Linux, or OSX.</p>
<p>It will be small, a few meg, and still under ten even if you use video.</p>
<p>You can use ruby-debug to interactively debug.</p>
<p>`Shoes.setup do<br />
    gem &#8216;ruby-debug&#8217;<br />
end</p>
<p>require &#8216;ruby-debug&#8217;</p>
<p>Shoes.app do<br />
    debugger<br />
end<br />
`<br />
Shoes has a gem installer gui and will install gems includes in the Shoes setup block, this gets included in the package.</p>
<p>It includes native HTTP download libraries for all platforms, because ruby http lib is slow and for other issues.</p>
<p>In the git distro, it includes &#8220;bloopsiphone&#8221; which lets you create Atari-like sounds and noises, and it also has an easy API.</p>
<p>Be creative and have fun, make robot apps, make the robots eat each other.  This is a great way to connect your passion with non-programmers, because everyone likes robots eating other robots.</p>
<p>Q: You mentioned development for the iPhone can you go into more detail?<br />
A: You can&#8217;t run ruby on the iPhone yet but its still useful for prototyping.</p>
<p>The post <a href="http://pivotallabs.com/gogaruco-09-using-shoes-to-create-better-iphone-apps-tim-elliott/">GoGaRuCo &#039;09 &#8211; Using Shoes to create better iPhone apps &#8211; Tim Elliott</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/gogaruco-09-using-shoes-to-create-better-iphone-apps-tim-elliott/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GoGaRuCo &#039;09 &#8211; Meta Meta &#8211; LiveBlogging the LiveBlogging &#8211; Coda/SubEtha</title>
		<link>http://pivotallabs.com/gogaruco-09-meta-meta-liveblogging-the-liveblogging-coda-subetha/</link>
		<comments>http://pivotallabs.com/gogaruco-09-meta-meta-liveblogging-the-liveblogging-coda-subetha/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 02:01:00 +0000</pubDate>
		<dc:creator>Chad Woolley</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[gogaruco]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/gogaruco-09-meta-meta-liveblogging-the-liveblogging-coda-subetha/</guid>
		<description><![CDATA[<p><p>For the second day of <a href="http://gogaruco.com/">GoGaRuCo</a>, my fellow Pivots <a href="http://pivotallabs.com/users/stevend/profile">David Stevenson</a>, <a href="http://pivotallabs.com/users/zach/profile">Zach Brock</a>, and <a href="http://pivotallabs.com/users/rdy/profile">Ryan Dy</a> are helping out with the <a href="http://pivotallabs.com/gogaruco/blog">live-blogging duties</a> &#40;Tom Sawyer says live blogging is SOO FUN!&#41;.</p>

<p>We are ALL writing the blog posts collaboratively, using the <a href="http://www.panic.com/coda/">Coda editor</a> which is based on the <a href="http://www.codingmonkeys.de/subethaengine/">SubEthaEngine</a>:</p>

<p><a href="http://www.flickr.com/photos/pivotallabs/3453417760/" title="GoGaRuCo '09 - MetaMeta - LiveBlogging the LiveBlogging - Coda/SubEtha by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3352/3453417760_8fb0b10ac4.jpg" height="399" alt="GoGaRuCo '09 - MetaMeta - LiveBlogging the LiveBlogging - Coda/SubEtha" width="500" /></a></p> <a href="http://pivotallabs.com/gogaruco-09-meta-meta-liveblogging-the-liveblogging-coda-subetha/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/gogaruco-09-meta-meta-liveblogging-the-liveblogging-coda-subetha/">GoGaRuCo &#039;09 &#8211; Meta Meta &#8211; LiveBlogging the LiveBlogging &#8211; Coda/SubEtha</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>For the second day of <a href="http://gogaruco.com/">GoGaRuCo</a>, my fellow Pivots <a href="http://pivotallabs.com/users/stevend/profile">David Stevenson</a>, <a href="http://pivotallabs.com/users/zach/profile">Zach Brock</a>, and <a href="http://pivotallabs.com/users/rdy/profile">Ryan Dy</a> are helping out with the <a href="http://pivotallabs.com/gogaruco/blog">live-blogging duties</a> &#40;Tom Sawyer says live blogging is SOO FUN!&#41;.</p>
<p>We are ALL writing the blog posts collaboratively, using the <a href="http://www.panic.com/coda/">Coda editor</a> which is based on the <a href="http://www.codingmonkeys.de/subethaengine/">SubEthaEngine</a>:</p>
<p><a href="http://www.flickr.com/photos/pivotallabs/3453417760/" title="GoGaRuCo '09 - MetaMeta - LiveBlogging the LiveBlogging - Coda/SubEtha by pivotalphotos, on Flickr"><img src="http://farm4.static.flickr.com/3352/3453417760_8fb0b10ac4.jpg" height="399" alt="GoGaRuCo '09 - MetaMeta - LiveBlogging the LiveBlogging - Coda/SubEtha" width="500" /></a></p>
<p>The post <a href="http://pivotallabs.com/gogaruco-09-meta-meta-liveblogging-the-liveblogging-coda-subetha/">GoGaRuCo &#039;09 &#8211; Meta Meta &#8211; LiveBlogging the LiveBlogging &#8211; Coda/SubEtha</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/gogaruco-09-meta-meta-liveblogging-the-liveblogging-coda-subetha/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using apc
Database Caching using apc
Object Caching 1148/1239 objects using apc

 Served from: pivotallabs.com @ 2013-05-24 11:31:39 by W3 Total Cache -->