<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/atom10full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <title>planet jerry! - Home</title>
  <id>tag:jerryr.com,2008:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.7.2">Mephisto Noh-Varr</generator>
  
  <link href="http://jerryr.com/" rel="alternate" type="text/html" />
  <updated>2008-10-15T20:24:55Z</updated>
  <geo:lat>41.2281</geo:lat><geo:long>-85.85778</geo:long><link rel="self" href="http://feeds.feedburner.com/jerryr" type="application/atom+xml" /><entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2008-10-15:1773</id>
    <published>2008-10-15T20:23:00Z</published>
    <updated>2008-10-15T20:24:55Z</updated>
    <category term="Ruby and Rails" />
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/421935700/my-great-lakes-ruby-bash-notes" rel="alternate" type="text/html" />
    <title>My Great Lakes Ruby Bash Notes</title>
<content type="html">
            &lt;h1&gt;Ann Arbor, Michigan, October 10, 2008&lt;/h1&gt;


	&lt;h2&gt;Predicting The Future: A Perspectives on Ruby and Rails – Winston Tsang (9:10am)&lt;/h2&gt;


	&lt;p&gt;Be Sensitive to areas from which change is emerging. Be aware of what is going on around you.&lt;/p&gt;


	&lt;h3&gt;A Look into the Past at Problems People Had&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Packages (Jars, &lt;span class='caps'&gt;RPM&lt;/span&gt;’s)- Ruby’s Gems solved the problem, plus documentation using ‘gem server’&lt;/li&gt;
		&lt;li&gt;Testing (required immense configuration) – Rails? Tests are baked right in. autotest takes it to the next level of automation&lt;/li&gt;
		&lt;li&gt;Deployment – Capistrano solves it for rails apps&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;“The future is here, it’s just not evenly distributed yet.” – William Gibson&lt;/p&gt;


	&lt;h2&gt;Using Active Scaffold – Joseph Faisal Nusairat (9:30am)&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;Production Quality Scaffolding&lt;/li&gt;
		&lt;li&gt;Ajaxified/Restful/Sexy&lt;/li&gt;
		&lt;li&gt;3rd Party Plugins Available&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ol&gt;
	&lt;li&gt;Add the active_scaffold plugin from the git repo&lt;/li&gt;
		&lt;li&gt;”&amp;lt;%= active_scaffold_includes %&amp;gt;” in your layout&lt;/li&gt;
	&lt;/ol&gt;


&lt;pre&gt;&lt;code&gt;
active_scaffold :keyword do |conf|
    conf.create.columns = [:name, :description]
    conf.update.columns = [:name, :description]
    conf.list.columns = [:name, :description]
    conf.create.link.label = "Add Keyword" 
    conf.actions.exclude :show
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;ol&gt;
	&lt;li&gt;can use a global config to ignore columns&lt;/li&gt;
		&lt;li&gt;observes validations from ActiveRecord&lt;/li&gt;
		&lt;li&gt;search comes for free on string fields&lt;/li&gt;
		&lt;li&gt;can add live searching with a config&lt;/li&gt;
		&lt;li&gt;can add new children (categories, keywords)&lt;/li&gt;
		&lt;li&gt;can get prettier calendars as plugins&lt;/li&gt;
		&lt;li&gt;easy to add column sorting&lt;/li&gt;
	&lt;/ol&gt;


	&lt;ul&gt;
	&lt;li&gt;Useful for admin site areas, less so for front-end customer-facing areas&lt;/li&gt;
		&lt;li&gt;Tempo on integrallis.com is an example in use&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Hacking the Mid-End: Advanced Rails UI Techniques – Michael Bleigh     (10:00am)&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;Intridia =&amp;gt; [:crowd_sound, :media_plug, :present_ly]&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Define Mid-End&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;MC – Backend developers&lt;/li&gt;
		&lt;li&gt;V – Designers and Frontend Developers&lt;/li&gt;
		&lt;li&gt;&lt;span class='caps'&gt;MVC&lt;/span&gt;+I (I is for Interaction) =&amp;gt; Mid-End Developer is all about Abstraction
	&lt;ul&gt;
	&lt;li&gt;Delivering Smart Partials to the Front-End developer&lt;/li&gt;
		&lt;li&gt;Deliver a Smart Helper to the Back-End Developer&lt;/li&gt;
		&lt;li&gt;Get &lt;span class='caps'&gt;XHTML&lt;/span&gt;/CSS from the Front-End Developer&lt;/li&gt;
		&lt;li&gt;Get App/Structure from the Back-End Developer&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Mid End Should Be&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Fast – perception is key, must feel fast&lt;/li&gt;
		&lt;li&gt;Accessible – to as many people as possible (screen readers, color contrast) and to Multiple Devices
	&lt;ul&gt;
	&lt;li&gt;Unobtrusive Javascript is an automatic best practice – rails is imperfect here&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Intuitive – Leverage User Expectations
	&lt;ul&gt;
	&lt;li&gt;is this a web app or a desktop app on the web? No wrong choice, but web apps are right.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Responsive – immediate or near-immediate feedback after an action that action is underway or completed&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Solving Midend Problems&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Helpers – Block-Accepting&lt;/li&gt;
		&lt;li&gt;Partials&lt;/li&gt;
		&lt;li&gt;jQuery&lt;/li&gt;
		&lt;li&gt;LowPro (makes prototype less obtrusive)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;The Approach&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;build it without js&lt;/li&gt;
		&lt;li&gt;abstract UI into helpers and partials&lt;/li&gt;
		&lt;li&gt;add unobtrusive javascript&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Avoid the “Unknowing, What’s Going On” Stage&lt;/li&gt;
		&lt;li&gt;Add generate.html.erb (our old show.html.erb)&lt;/li&gt;
		&lt;li&gt;Show action becomes – “TPS Reports May Take Up to 10 seconds to Generate”&lt;/li&gt;
	&lt;/ul&gt;


delayed_loader.js
&lt;pre&gt;&lt;code&gt;
DelayedLoader = $.klass({
    initialize.function() {
        link = this.element.find('a.continue');
        this.url = link.attr('href');
        link.replaceWith('&amp;lt; image of spinner &amp;gt;');

        var element = this.element;
        $.get(this.url, function(data) {
            element.html = data;
        });
    }
});
&lt;/code&gt;&lt;/pre&gt;

	&lt;ol&gt;
	&lt;li&gt;pre-load all tabs for js-users, then show content as necessary. &lt;/li&gt;
		&lt;li&gt;remove ‘current’ class from non-current tab names&lt;/li&gt;
	&lt;/ol&gt;


	&lt;h3&gt;Problem: Updating Parts of a Page in Ajax, But not Updating the “Time Ago” for earlier entries&lt;/h3&gt;


	&lt;ol&gt;
	&lt;li&gt;time ago in words for js&lt;/li&gt;
		&lt;li&gt;add the actual time as a title&lt;/li&gt;
		&lt;li&gt;reparse times from titles using Date.update_relative_times()&lt;/li&gt;
	&lt;/ol&gt;


	&lt;h2&gt;Usability on Rails: Tips &amp; Tricks for Creating Passionate Users – Larry Karnowski (11:00am)&lt;/h2&gt;


	&lt;h3&gt;Don’t Test Your Views&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Treat views as Data, not Code&lt;/li&gt;
		&lt;li&gt;Extract all code from view for testing&lt;/li&gt;
		&lt;li&gt;Validate Your Views for Testing&lt;/li&gt;
		&lt;li&gt;Test Your Helpers – ActionView::TestCase&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Tarantula – spiders your app using webrick in memory&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;login&lt;/li&gt;
		&lt;li&gt;follow_redirect!&lt;/li&gt;
		&lt;li&gt;tarantula_crawl(self) – fuzzy spider – follows links and hits forms with fuzzy data&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;safe_erb – disallows potentially-tainted strings&lt;/li&gt;
		&lt;li&gt;unit_controller – narrows scope of testing to the controller only&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Into the Middle of Things (In Media Res)&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Customers are not at the beginning of the process. By the time we meet them, they have a problem.&lt;/li&gt;
		&lt;li&gt;They don’t love software, They want to kick ass. &lt;/li&gt;
		&lt;li&gt;Make them feel empowered.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Flashback! to the beginning&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;What do we need to build?
	&lt;ul&gt;
	&lt;li&gt;Start with a User Interview&lt;/li&gt;
		&lt;li&gt;Learn the user’s language&lt;/li&gt;
		&lt;li&gt;stay agile&lt;/li&gt;
		&lt;li&gt;be aware of user needs vs. their supervisors/employers (if I was talking to a real user, this will be a better app)&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;What is it going to look like?
	&lt;ul&gt;
	&lt;li&gt;Start with pen &amp; paper sketches – different part of the brain (cheap, easy, permission to contribute is implicit)&lt;/li&gt;
		&lt;li&gt;Find the best user experience first
	&lt;ul&gt;
	&lt;li&gt;learn the intent of the app&lt;/li&gt;
		&lt;li&gt;don’t consider implementation initially&lt;/li&gt;
		&lt;li&gt;3-4 wireframes =&amp;gt; it takes a lot of bad ideas to get to one good one&lt;/li&gt;
		&lt;li&gt;Adjust scope to reality &lt;/li&gt;
		&lt;li&gt;OmniGraffle&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;&lt;span class='caps'&gt;HTML&lt;/span&gt;/CSS Mockups
	&lt;ul&gt;
	&lt;li&gt;user serve plus erb&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;The Engineer’s Fallacy – People are not logical, they are emotional. Engineers don’t know that.&lt;/p&gt;


	&lt;h3&gt;User Behavior&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Data Smells&lt;/li&gt;
		&lt;li&gt;Non-Linear Scanning of Pages&lt;/li&gt;
		&lt;li&gt;Ad Blindness&lt;/li&gt;
		&lt;li&gt;Technology Myths &amp; Superstitions&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt; Agile User Testing – Coming Soon&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;forget big labs, video, audio&lt;/li&gt;
		&lt;li&gt;cheap, cheap, cheap&lt;/li&gt;
		&lt;li&gt;try to get real users (office manager is more computer savvy), but grade on a curve&lt;/li&gt;
		&lt;li&gt;neighbors, spouses, Mom&lt;/li&gt;
		&lt;li&gt;need three testers, but rinse &amp; repeat&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Keep vocabulary consistent across multiple uses inside the app – same word – don’t use synonyms&lt;/p&gt;


	&lt;h3&gt;“Get It” Testing&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;earlier&lt;/li&gt;
		&lt;li&gt;sketches wireframes, mockups&lt;/li&gt;
		&lt;li&gt;“i spy”, not “show &amp; tell” – tell me what you see.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Think aloud testing&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;determine use cases&lt;/li&gt;
		&lt;li&gt;emphasize that software is being tested, not the user&lt;/li&gt;
		&lt;li&gt;after every iteration if possible, but once a month is great&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Quick Tips&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;show users where they are
	&lt;ul&gt;
	&lt;li&gt;mileposts&lt;/li&gt;
		&lt;li&gt;bread crumbs&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;reduce memory load (we have 2x-10x the memory they do)&lt;/li&gt;
		&lt;li&gt;don’t leave ‘em wondering&lt;/li&gt;
		&lt;li&gt;&lt;span class='caps'&gt;NEVER&lt;/span&gt; throw away your user’s work&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Good Error Messages&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;context aware
	&lt;ul&gt;
	&lt;li&gt;Rails validation error messages are not context aware (being in the models) and are cumbersome with associations&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;plain english&lt;/li&gt;
		&lt;li&gt;suggest their own fix&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Wicked Messenger – Creates a Hierarchy of Error Messages&lt;/h3&gt;


	&lt;h3&gt;Help Doesn’t&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;people don’t read until after they screw up&lt;/li&gt;
		&lt;li&gt;use &lt;span class='caps'&gt;JIT&lt;/span&gt; help&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;We aren’t there to help when the big battle is underway. We are the supernatural aid to the hero.&lt;/p&gt;


	&lt;p&gt;“Don’t make me think” – Steve Krug
“The Back of the Napkin” – Dan Roam&lt;/p&gt;


	&lt;p&gt;Boxesandarrows.com
adaptivepath.com
codinghorrow.com&lt;/p&gt;


	&lt;p&gt;github.com/lawjoskar&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&lt;span class='caps'&gt;HAML&lt;/span&gt; =&amp;gt; “I don’t want input from a designer, ever.”&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;h2&gt;Playing it Safe – How to write library friendly code in Ruby – Jim Weirich (1:00pm)    (or How to Avoid Being Leeroy Jenkins)&lt;/h2&gt;


	&lt;p&gt;Playing well with Others – Does it Matter? Application (No) vs. Library (Yes)&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;“At least I have chicken.”—Leeroy Jenkins&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;h3&gt;Tips for Playing it Safe&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;protect against accidental problems&lt;/li&gt;
		&lt;li&gt;Use Namespaces (node =&amp;gt; put it in a module)&lt;/li&gt;
		&lt;li&gt;Choose Project Name Carefully (check gems, github, RubyForge and don’t duplicate those)&lt;/li&gt;
		&lt;li&gt;Avoid Top Level Functions and Constants (put them in the module)&lt;/li&gt;
		&lt;li&gt;Avoid Modifying Existing Classes – Prefer adding over modifying (adding rake_dup in kernel instead of modifying Kernel::dup), &lt;/li&gt;
		&lt;li&gt;When adding use project scoped names (scoped with the “rake” name to reduce conflicts)&lt;/li&gt;
		&lt;li&gt;you be nice and check for conflicts – “unless instance_methods.include? ‘ext’” – ask first, then add&lt;/li&gt;
		&lt;li&gt;Selector Namespaces (coming in Ruby 2.0 per Matz)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Replacing Behavior&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;allow backwards compatibility&lt;/li&gt;
		&lt;li&gt;const_missing to return Rake::Task and give you a warning&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Hooking Tips&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;go back and invoke the original const_missing – chain your hook behavior&lt;/li&gt;
		&lt;li&gt;only handle your special cases&lt;/li&gt;
		&lt;li&gt;limit the scope of your hook, esp. for method_missing (handle your methods then hand it up the chain)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;kirby problem vs. whiny_nils =&amp;gt; make it better than the existing method&lt;/h3&gt;


	&lt;h3&gt;Require Hooks&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;ruby_gems overrides require
	&lt;ul&gt;
	&lt;li&gt;try original require&lt;/li&gt;
		&lt;li&gt;adds a rescue on the LoadError to search for the gem, adds it to the load path&lt;/li&gt;
		&lt;li&gt;try original require and raise the original require’s error if it still fails&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;blockquote&gt;
		&lt;p&gt;Preserve the Original Behavior&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;h3&gt;Understand and Obey Contracts between Callers and libraries (Design by Contract)&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;pre-condition: What Must be true before a method is called (for Math.sqrt, n &amp;gt;= 0)&lt;/li&gt;
		&lt;li&gt;post-condition: What Must be true after a method is called (for Math.sqrt, (Result*Result-n).abs &amp;lt; 0.001)&lt;/li&gt;
		&lt;li&gt;New Behavior Added Must have the same or weaker precondition&lt;/li&gt;
		&lt;li&gt;New Behavior Added Must have the same or stronger postcondition (ReallyAccurate.sqrt(n))&lt;/li&gt;
		&lt;li&gt;Bertrand Meyer =&amp;gt; Require no more. Promise no less.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Summary&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Be Polite with Global Resources&lt;/li&gt;
		&lt;li&gt;Respect and Obey Contracts when Duck Typing&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;New Features in Test::Unit 2.0 – Daniel Berger (2:00pm)&lt;/h2&gt;


&lt;pre&gt;&lt;code&gt;
require 'rubygems'
gem 'test-unit'
require 'test/unit'
&lt;/code&gt;&lt;/pre&gt;

	&lt;ul&gt;
	&lt;li&gt;assert_true, assert_false, assert_boolean&lt;/li&gt;
		&lt;li&gt;omit, omit_if, omit_unless =&amp;gt; skips a test good for platform-specific , omissions are tracked separately in the output&lt;/li&gt;
		&lt;li&gt;pend – a todo with annoyance&lt;/li&gt;
		&lt;li&gt;notify – maybe as a test debugger, but it is tracked&lt;/li&gt;
		&lt;li&gt;startup and shutdown – analogous to setup and teardown, run once per test case&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre&gt;&lt;code&gt;
def self.startup
    # anything you need to only do one time
end

def self.shutdown
    # anything you need to only do one time
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;ul&gt;
	&lt;li&gt;multiple setup &amp; teardown – organize setups better if they start to get too long&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre&gt;&lt;code&gt;
setup # first
def foo
end

setup # second 
def foo_2
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;ul&gt;
	&lt;li&gt;better diff output&lt;/li&gt;
		&lt;li&gt;priority mode reduced test time – runs all failed tests plus 50% of successful ones (priority :must and it will always run)&lt;/li&gt;
		&lt;li&gt;colorized output&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Behavior Driven Development with Cucumber – Brandon Keepers (2:30pm)&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;Language is a barrier between developers and clients&lt;/li&gt;
		&lt;li&gt;User Stories Capture Intent of the Feature&lt;/li&gt;
		&lt;li&gt;why, who then feature&lt;/li&gt;
		&lt;li&gt;Quality: works as expected&lt;/li&gt;
		&lt;li&gt;After gaining confidence, Testing can become part of the design process, then Specifying Behavior Completes the Evolution&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Cucumber&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;rbehave, then rspec story runner, then cucumber&lt;/li&gt;
		&lt;li&gt;runs in ruby but can be used to test other web apps&lt;/li&gt;
		&lt;li&gt;is a rake file to run the features&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre&gt;&lt;code&gt;
Feature (top level story): Manage Companies
    In order to keep track of companies
    a user
    should be able to manage companies

    Scenario: Add a New Company
        Given I am logged in
        When I create a new company named Acme
        Then I should see that a company named Acme exists
&lt;/code&gt;&lt;/pre&gt;        

	&lt;ul&gt;
	&lt;li&gt;Don’t implement login as the first feature&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Into the Limelight: An Introduction to a Ruby Rich Client Framework – Paul Pagel (3:15pm)&lt;/h2&gt;


	&lt;h2&gt;Metawhat? A look into the mysterious metaclass     Brandon Dimcheff (3:45pm)&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;Metaclass, Singleton Class, Eigenclass, Virtual Class&lt;/li&gt;
		&lt;li&gt;an object is a pointer to its class&lt;/li&gt;
		&lt;li&gt;a class has a collection of methods and a super pointer&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;method dispatch&lt;/h3&gt;


	&lt;ol&gt;
	&lt;li&gt;dereference my class pointer&lt;/li&gt;
		&lt;li&gt;check the methods table for my method&lt;/li&gt;
		&lt;li&gt;call the method or move on to the superclass and search there if it doesn’t exist&lt;/li&gt;
	&lt;/ol&gt;


	&lt;h3&gt;instance-specific values causes a singleton class to be created&lt;/h3&gt;


	&lt;h3&gt;a metaclass is a singleton class of a class&lt;/h3&gt;


	&lt;h3&gt;all classes have metaclasses&lt;/h3&gt;


&amp;lt;style media='screen' type='text/css'&gt;
    pre { margin-left: 35px; }
    code { padding:3px; background-color:#000; color: #0F0; width: 600px; line-height: 20px; font-size: 12px; }
&amp;lt;/style&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/421935700" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2008%2F10%2F15%2Fmy-great-lakes-ruby-bash-notes</feedburner:awareness><feedburner:origLink>http://jerryr.com/2008/10/15/my-great-lakes-ruby-bash-notes</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2008-07-25:1760</id>
    <published>2008-07-25T21:25:00Z</published>
    <updated>2008-07-25T21:26:22Z</updated>
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/346041549/on-diversification" rel="alternate" type="text/html" />
    <title>On Diversification</title>
<content type="html">
            &lt;p&gt;I’ve been all over the map on diversification. Initially, I was in mutual funds and tracking stocks. In downward spirals, they all gravitated lower. Breadth in a bear market was a guaranteed way to lose money. It seems like individual equities are the only thing that escaped the downdrafts.&lt;/p&gt;


	&lt;p&gt;Lately, I have been playing for quick pops – looking for a big move in 48-72 hours, usually around earnings or extraordinary events. When I find one that looks promising, I go big and try to maximize the profit generated.&lt;/p&gt;


	&lt;p&gt;The guys that send the checks from my employer to my 401K account have noticed the same trend in my investing. They are none too keen on my style, but they can’t knock my results.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/346041549" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2008%2F7%2F25%2Fon-diversification</feedburner:awareness><feedburner:origLink>http://jerryr.com/2008/7/25/on-diversification</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2008-04-25:1757</id>
    <published>2008-04-25T17:28:00Z</published>
    <updated>2008-04-25T17:33:25Z</updated>
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/277785666/class-of-90-let-s-reunite" rel="alternate" type="text/html" />
    <title>Class of 90? Let's Reunite</title>
<content type="html">
            &lt;p&gt;Members of the Warsaw Community High School Class of 1990: Planning has begun on our 20-year reunion.&lt;/p&gt;


	&lt;p&gt;So far, we have a &lt;a href='http://www.facebook.com/group.php?gid=26729364664'&gt;group on facebook&lt;/a&gt; (since that is free) where some of the discussions are taking place.&lt;/p&gt;


	&lt;p&gt;&lt;a href='http://www.facebook.com/group.php?gid=26729364664'&gt;http://www.facebook.com/group.php?gid=26729364664&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;The first date we’ve discussed is June 19th, 2010. Anybody have any problems with that right now?&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/277785666" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2008%2F4%2F25%2Fclass-of-90-let-s-reunite</feedburner:awareness><feedburner:origLink>http://jerryr.com/2008/4/25/class-of-90-let-s-reunite</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2008-03-11:1748</id>
    <published>2008-03-11T14:48:00Z</published>
    <updated>2008-03-11T14:49:38Z</updated>
    <category term="Politics" />
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/249546084/how-different-are-mccain-and-hillary" rel="alternate" type="text/html" />
    <title>How different are McCain and Hillary?</title>
<content type="html">
            &lt;p&gt;Would a Hillary presidency be substantially different from a McCain White House?&lt;/p&gt;


	&lt;p&gt;Will she succeed in bringing health care to the uninsured? She didn’t the first time she tried. The bumbling Clinton administration set back the cause of universal coverage by a generation.&lt;/p&gt;


	&lt;p&gt;Will she reign in the power of the presidency and roll back the unconstitutional pattern of behavior blazed by the Bush administration? This is not a cause that I have heard her take up. Her inability to take a stand against torture is an implicit endorsement of its use. In this area, I think McCain may scratch my anti-torture itch more effectively than Clinton.&lt;/p&gt;


	&lt;p&gt;Will she take up the cause of the poor and fight poverty? Welfare reform under Clinton the 1st was a pure capitulation to Republican interests after taking a beating in 1994.&lt;/p&gt;


	&lt;p&gt;Will gay and lesbian Americans be made whole citizens under the law under Clinton the 2nd? “Don’t ask, don’t tell” is a politician’s answer to a moral question.&lt;/p&gt;


	&lt;p&gt;We support Obama because he will change America and Americans for the better. For Barack, becoming President is a means to an end. The end we seek is a better nation.&lt;/p&gt;


	&lt;p&gt;Winning the White House as an end in itself, exclusively for the sake of beating the Republican party, is insufficient. Winning without conscience is losing.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/249546084" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2008%2F3%2F11%2Fhow-different-are-mccain-and-hillary</feedburner:awareness><feedburner:origLink>http://jerryr.com/2008/3/11/how-different-are-mccain-and-hillary</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2007-10-18:1529</id>
    <published>2007-10-18T17:35:00Z</published>
    <updated>2008-03-11T14:55:25Z</updated>
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/171703303/merlin-mann-inbox-zero-video-notes" rel="alternate" type="text/html" />
    <title>Merlin Mann Inbox Zero Video - Notes</title>
<content type="html">
            &lt;p&gt;build walls where none existed&lt;/p&gt;


	&lt;p&gt;knowledge workers – add value to information&lt;/p&gt;


	&lt;p&gt;time and attention are finite, most vital resources&lt;/p&gt;


	&lt;p&gt;multitasking is a myth&lt;/p&gt;


	&lt;p&gt;honor where your time and attention go&lt;/p&gt;


	&lt;p&gt;demands on time and attention are infinite&lt;/p&gt;


	&lt;p&gt;ultimately – make sure stupid blocks don’t get in the box&lt;/p&gt;


	&lt;p&gt;Manage Actions – map time and attention to the things you consider important&lt;/p&gt;


	&lt;p&gt;Prior Art: &lt;span class='caps'&gt;GTD&lt;/span&gt; concept of processing – advanced common sense&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Email is just a medium&lt;/li&gt;
		&lt;li&gt;one place for anything&lt;/li&gt;
		&lt;li&gt;process to zero – every time you check your email&lt;/li&gt;
		&lt;li&gt;convert to actions&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Processing&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;more than checking&lt;/li&gt;
		&lt;li&gt;deal with the problem&lt;/li&gt;
		&lt;li&gt;less than responding&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Answer the question: So What? What actions do I have to take as a result of this email?&lt;/p&gt;


	&lt;p&gt;Don’t just take orders – Make Sandwiches&lt;/p&gt;


	&lt;p&gt;Limited Number of Options – 5 Verbs (in order of desirability):&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;delete (or archive)
	&lt;ul&gt;
	&lt;li&gt;a single folder&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;delegate (horizontally or vertically)
	&lt;ul&gt;
	&lt;li&gt;with a follow-up tickler (2 week reminder, @waiting_on)&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;respond
	&lt;ul&gt;
	&lt;li&gt;1 or 2 line replies&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;defer – respond, but outside work first
	&lt;ul&gt;
	&lt;li&gt;to_respond folder&lt;/li&gt;
		&lt;li&gt;inbox is for stuff you haven’t read&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;do
	&lt;ul&gt;
	&lt;li&gt;or add to a to-do list or calendar&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;The Processing Habit&lt;/p&gt;


	&lt;p&gt;“We are what we frequently do.” – Aristotle&lt;/p&gt;


	&lt;p&gt;Do Email Less – once per hour for 10 minutes or less&lt;/p&gt;


	&lt;p&gt;Cheat&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;filtering&lt;/li&gt;
		&lt;li&gt;templates&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;No fiddling&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/171703303" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2007%2F10%2F18%2Fmerlin-mann-inbox-zero-video-notes</feedburner:awareness><feedburner:origLink>http://jerryr.com/2007/10/18/merlin-mann-inbox-zero-video-notes</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2007-09-19:1520</id>
    <published>2007-09-19T19:22:11Z</published>
    <updated>2008-03-11T14:59:36Z</updated>
    <category term="Sports" />
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/158695996/east-coast-ethics" rel="alternate" type="text/html" />
    <title>East Coast Ethics</title>
<content type="html">
            &lt;p&gt;As an Indiana resident and longtime fan of the Indianapolis Colts, it has been gratifying to watch the New England Patriots sweat while under investigation for taping the defensive coaches of the New York Jets.&lt;/p&gt;


	&lt;p&gt;Unfortunately, fans of the Patriots have been less than crestfallen at the ethical breech. This absence of outrage originates in a fundamental east coast world view that rewards cheating and laughs off ethical constraints.&lt;/p&gt;


	&lt;p&gt;To me, Belicheck and Patriots quarterback Brady are the embodiment of “east coast ethics.” For the average fan of the Patriots, Bill Belichick must be commended for taping the opposing sidelines – he would be a “sucker” if he didn’t push the envelope.&lt;/p&gt;


	&lt;p&gt;Brady, the playboy, impregnates supermodels at lightning speed, but can’t seem to figure out why deliberately breaking a written rule of the &lt;span class='caps'&gt;NFL&lt;/span&gt; might be considered cheating.&lt;/p&gt;


	&lt;p&gt;Since he can’t deal with adults but still finds success in his occupation, Belichick is called a genius. Instead of genius, he instead gets by on cheating and intimidation. Ask brain-damaged former Patriots linebacker &lt;a href='http://www.boston.com/sports/football/patriots/articles/2007/02/02/i_dont_want_anyone_to_end_up_like_me/'&gt;Ted Johnson&lt;/a&gt; about Belichick’s commitment to his players. It ends the second you’re no longer useful to him. Belichick abstains from morality, in favor of expediency.&lt;/p&gt;


	&lt;p&gt;Picking up a well-known, team-splitting troublemaker like Randy Moss is no problem for the Patriots. As long as he produces on the field, his personality and his behavior are irrelevant. Adding one more spoiled apple to the oily, soulless bunch has no obvious effect.&lt;/p&gt;


	&lt;p&gt;The integrity-free exploits of Belichick and Brady stand in sharp contrast to the personas of Colts’ coach Tony Dungee and quarterback Peyton Manning. Regarded for their earnestness, ethics and work ethics, Dungee and Manning bring an old-school, midwestern personality to their team and to their state. That’s a personality that I can root for.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/158695996" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2007%2F9%2F19%2Feast-coast-ethics</feedburner:awareness><feedburner:origLink>http://jerryr.com/2007/9/19/east-coast-ethics</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2007-09-19:1519</id>
    <published>2007-09-19T17:37:28Z</published>
    <updated>2007-09-19T17:39:21Z</updated>
    <category term="Politics" />
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/158645230/dick-lugar-hoosier-statesman" rel="alternate" type="text/html" />
    <title>Dick Lugar: Hoosier Statesman</title>
<content type="html">
            &lt;p&gt;I am consistently impressed, but never surprised, by the wisdom and leadership exhibited by Indiana’s senior senator, Dick Lugar. According to &lt;a href='http://restore-habeas.org/'&gt;restore-habeas.org&lt;/a&gt;, he supports the Leahy-Specter-Dodd Amendment to restore habeas corpus. Between this stance and his recent “outside the party line” &lt;a href='http://www.nytimes.com/2007/06/27/washington/27cong.html'&gt;take on Iraq&lt;/a&gt;, it is a wonder the rest of the Republican senate even lets this guy in the clubhouse anymore.&lt;/p&gt;


	&lt;p&gt;Revered for his foreign policy acumen, Lugar should be commended for having the courage to step out of line and take on his own party, and put nation above partisanship on the real issues of the day.&lt;/p&gt;


	&lt;p&gt;At another level, though, Lugar is reflecting a state that is only solidly red in the eyes of national commentators on presidential election nights. Casual observers note Indiana’s track record of supporting Republicans in presidential races (LBJ was the last Democrat to collect our electoral college votes), but fail to note the  generally-functional two party system that prevails in most of our other races.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Hoosiers routinely split the statehouse, abhorring the leadership vacuum that a one-party system inevitably creates. &lt;/li&gt;
		&lt;li&gt;After a pair of Democrats, our current Republican governor is thought to be in jeopardy in his bid for re-election. &lt;/li&gt;
		&lt;li&gt;Between Lugar and Evan Bayh, we’ve elected two senators who are moderates in the positive sense of the word, building consensus in Indiana and in Washington instead of exploiting easy class, social and political divisions.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Coming at the call of a moderate populace, the actions of Dick Lugar should be a source of pride for all of Indiana.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/158645230" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2007%2F9%2F19%2Fdick-lugar-hoosier-statesman</feedburner:awareness><feedburner:origLink>http://jerryr.com/2007/9/19/dick-lugar-hoosier-statesman</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2007-09-13:1516</id>
    <published>2007-09-13T21:16:00Z</published>
    <updated>2008-03-11T14:59:48Z</updated>
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/156145546/190-over-130-is-bad" rel="alternate" type="text/html" />
    <title>190 over 130 is bad?</title>
<summary type="html">&lt;p&gt;It turns out my experimental “Fast Food Only” diet of the past 5 years was not as well-designed as I had originally thought.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;It turns out my experimental “Fast Food Only” diet of the past 5 years was not as well-designed as I had originally thought.&lt;/p&gt;
&lt;p&gt;Wacky blood pressure. It turns out my experimental “Fast Food Only” diet of the past 5 years was not as well-designed as I had originally thought. Luckily I’ve ducked hospitalization twice. Nitroglycerin brings the blood pressure down out of the “imminent stroke” range and into the “prolonged suffering preceding the eventual stroke” range with just a raging migraine as the side-effect.&lt;/p&gt;


	&lt;p&gt;I’ve cut out a ton of sodium that I had been eating (OK, literally 2-3 grams per day) and I hope to be in the “might eventually be healthy” and then the “healthy” range soon. Hopefully last week was my “rock bottom” to be followed by a precipitous improvement.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/156145546" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2007%2F9%2F13%2F190-over-130-is-bad</feedburner:awareness><feedburner:origLink>http://jerryr.com/2007/9/13/190-over-130-is-bad</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2007-08-14:1512</id>
    <published>2007-08-14T05:03:00Z</published>
    <updated>2008-03-11T14:59:09Z</updated>
    <category term="Politics" />
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/143916745/rove-heading-home-i-don-t-buy-it" rel="alternate" type="text/html" />
    <title>Rove Heading Home? I don't buy it.</title>
<content type="html">
            &lt;p&gt;Karl Rove said Monday that he would resign his position as a deputy White House chief of staff at the end of the month. I would love to accept this as good news, but until I see a house on top of him, I won’t believe the wicked witch is gone for good.&lt;/p&gt;


	&lt;p&gt;Isn’t this the perfect time to slither to a new campaign and weasel back into the ruling class for four more years? Be on the lookout for slime trails leading to New Hampshire, Iowa or South Carolina.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/143916745" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2007%2F8%2F14%2Frove-heading-home-i-don-t-buy-it</feedburner:awareness><feedburner:origLink>http://jerryr.com/2007/8/14/rove-heading-home-i-don-t-buy-it</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2007-07-08:1454</id>
    <published>2007-07-08T01:50:00Z</published>
    <updated>2008-03-11T14:58:36Z</updated>
    <category term="Television" />
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/131544530/the-comcast-channel-adder-guy" rel="alternate" type="text/html" />
    <title>The Comcast Channel-Adder Guy</title>
<content type="html">
            &lt;p&gt;Comcast channel-adder guy has been reading my mind again. I first noticed this phenomenon last summer during the world cup. The day before the first game was to be shown on &lt;span class='caps'&gt;ESPN2&lt;/span&gt;, we magically got &lt;span class='caps'&gt;ESPN2&lt;/span&gt; in HD. That fall was the second instance, this time the local Fox affiliate’s HD hit our lineup, just in time for the first &lt;span class='caps'&gt;NFL&lt;/span&gt; broadcast of the season. Thanksgiving night, the &lt;span class='caps'&gt;CCAG&lt;/span&gt; struck again, sneaking the &lt;span class='caps'&gt;NFL&lt;/span&gt; Network’s HD feed over the top of a previously assigned HD channel in time for the first &lt;span class='caps'&gt;NFL&lt;/span&gt;-N regular season broadcast.&lt;/p&gt;


	&lt;p&gt;Today, he’s back, adding the Universal HD Channel in time for its coverage of the Live Earth concerts today. Allegiances can change, love can fade, but I always know that the Comcast channel-adder guy has my back.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/131544530" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2007%2F7%2F8%2Fthe-comcast-channel-adder-guy</feedburner:awareness><feedburner:origLink>http://jerryr.com/2007/7/8/the-comcast-channel-adder-guy</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2007-05-30:1379</id>
    <published>2007-05-30T13:46:00Z</published>
    <updated>2008-03-11T14:56:46Z</updated>
    <category term="Ruby and Rails" />
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/120797289/south-bend-ruby-group-meeting" rel="alternate" type="text/html" />
    <title>South Bend Ruby Group Meeting</title>
<content type="html">
            &lt;p&gt;Last night, John Nunemaker and I presented information we gleaned from RailsConf earlier this month in Portland, Oregon. Below are notes from my test-heavy track of RailsConf 2007 sessions, as presented to the &lt;a&gt;SouthBend.rb&lt;/a&gt; ruby and rails user group on May 29, 2007.&lt;/p&gt;


&amp;lt;object type='application/x-shockwave-flash' height='348' width='425' data='https://s3.amazonaws.com:443/slideshare/ssplayer.swf?id=57359&amp;doc=selected-sessions-from-railsconf-2007-12960'&gt;&amp;lt;param name='movie' value='https://s3.amazonaws.com:443/slideshare/ssplayer.swf?id=57359&amp;doc=selected-sessions-from-railsconf-2007-12960' /&gt;&amp;lt;/object&gt;

	&lt;p&gt;Here’s a MacBook’s view of John’s Presentation.&lt;/p&gt;


&lt;p&gt;
&lt;a href='http://www.flickr.com/photos/jerryr/520750021/' title='Photo Sharing'&gt;&lt;img src='http://farm1.static.flickr.com/242/520750021_1430ff5322_m.jpg' height='180' alt='sb.rb' width='240' /&gt;&lt;/a&gt;

	&lt;p&gt;Two &lt;a href='http://www.flickr.com/photos/jerryr/sets/72157600286900146/'&gt;crowd reaction shots&lt;/a&gt; are in my &lt;a href='http://www.flickr.com/photos/jerryr/sets/72157600286900146/'&gt;sbrb flickr set&lt;/a&gt;.&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/120797289" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2007%2F5%2F30%2Fsouth-bend-ruby-group-meeting</feedburner:awareness><feedburner:origLink>http://jerryr.com/2007/5/30/south-bend-ruby-group-meeting</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2007-05-24:1371</id>
    <published>2007-05-24T02:51:00Z</published>
    <updated>2007-05-24T03:11:21Z</updated>
    <category term="Ruby and Rails" />
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/119189204/railsconf-2007-tutorials-intro-to-tdd-for-rails" rel="alternate" type="text/html" />
    <title>RailsConf 2007: Intro to TDD for Rails</title>
<content type="html">
            &lt;p&gt;&lt;span class='caps'&gt;TDD&lt;/span&gt; and Refactoring, with a dash of Extreme Ping Pong…&lt;/p&gt;


	&lt;h1&gt;Intro to Test-Driven Development for Rails – &lt;cite&gt;David Chelimsky&lt;/cite&gt;&lt;/h1&gt;


	&lt;blockquote&gt;
		&lt;p&gt;We all love to hack, deep in our holes. – &lt;cite&gt;David Chelimsky&lt;/cite&gt;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;h2&gt;Description&lt;/h2&gt;


	&lt;p&gt;Test-Driven Development is a design and testing practice in which the developer writes the test before the code being tested. Practiced with discipline, &lt;span class='caps'&gt;TDD&lt;/span&gt; can lead to cleaner, more flexible designs that are implicitly testable and, consequently, more easily maintained over the lifetime of an application.&lt;/p&gt;


	&lt;p&gt;In this hands-on tutorial, we’ll go through the basics of &lt;span class='caps'&gt;TDD&lt;/span&gt;, beginning with a simple Ruby program and then moving onto a Rails application. This is intended for Rails developers of any level (but with at least some novice Ruby and Rails experience) who have little or no previous &lt;span class='caps'&gt;TDD&lt;/span&gt; experience.&lt;/p&gt;


	&lt;h2&gt;Extreme Programming Practices&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;User Stories =&amp;gt; expressing simple requirements from the perspective of a user in the system. forces developers and users to talk about the details during the development process (versus documenting the whole thing up front)&lt;/li&gt;
		&lt;li&gt;Customer Acceptance Tests&lt;/li&gt;
		&lt;li&gt;Test Driven Development&lt;/li&gt;
		&lt;li&gt;Pair Programming (increases the bus number)&lt;/li&gt;
		&lt;li&gt;Refactoring =&amp;gt; change the structure of the code without changing the behavior of the code
	&lt;ul&gt;
	&lt;li&gt;assumes you have the right tests and enough tests =&amp;gt; not infallible&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;“Clean Code That Works” =&amp;gt; The Goals of Test-Driven Development&lt;/h2&gt;


	&lt;blockquote&gt;
		&lt;p&gt;What the hell was I thinking earlier today?  &lt;cite&gt;- David Chelimsky&lt;/cite&gt;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;ul&gt;
	&lt;li&gt;It’s cheaper to do something right than to do it over.&lt;/li&gt;
		&lt;li&gt;Will feel slower initially.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;blockquote&gt;
		&lt;p&gt;Any fool can write code that a computer can understand. Good programmers write code that humans can understand. &lt;cite&gt;- Martin Fowler&lt;/cite&gt;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;ul&gt;
	&lt;li&gt;code should tell its own story&lt;/li&gt;
		&lt;li&gt;tests tell how the code fits together.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;&lt;span class='caps'&gt;TDD&lt;/span&gt; Demo&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;Ping Pong =&amp;gt; one programmer writes a failing test, the other programmer makes the test pass&lt;/li&gt;
		&lt;li&gt;what is the error and how do I make it go away?&lt;/li&gt;
		&lt;li&gt;test/unit ships with ruby =&amp;gt; looks for method names starting with test, catalogs them and reinitializes the test class, creating a new instance for each method&lt;/li&gt;
		&lt;li&gt;assert asserts the existence of an object (nil makes it fail, 0 is an object, so it would pass)&lt;/li&gt;
		&lt;li&gt;try to have 1 assertion per method&lt;/li&gt;
		&lt;li&gt;“tell, don’t ask” =&amp;gt; instead of asking an object for stuff, tell it to do stuff. results in more loosely coupled systems.&lt;/li&gt;
		&lt;li&gt;read fowler’s refactoring book&lt;/li&gt;
		&lt;li&gt;&lt;span class='caps'&gt;TDD&lt;/span&gt; is about design&lt;/li&gt;
		&lt;li&gt;don’t write any code except to make a test pass =&amp;gt; sometimes seems counter-intuitive&lt;/li&gt;
		&lt;li&gt;code is a liability, not an asset&lt;/li&gt;
		&lt;li&gt;clarity is king in tests, not &lt;span class='caps'&gt;DRY&lt;/span&gt;&lt;/li&gt;
		&lt;li&gt;&lt;span class='caps'&gt;DRY&lt;/span&gt; is about objects, not typing&lt;/li&gt;
		&lt;li&gt;weigh duplication against clarity&lt;/li&gt;
		&lt;li&gt;setup comes from test/unit, runs before each method&lt;/li&gt;
		&lt;li&gt;good names are vital&lt;/li&gt;
		&lt;li&gt;reduces the number of up-front decisions you have to make. postponing decisions is a competitive advantage.&lt;/li&gt;
		&lt;li&gt;test collections for 0, 1 and 3&lt;/li&gt;
		&lt;li&gt;code dojos&lt;/li&gt;
		&lt;li&gt;rspec and bdd&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;&lt;span class='caps'&gt;TDD&lt;/span&gt; Cycle&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;write a small test (one assertion per test)&lt;/li&gt;
		&lt;li&gt;watch it fail (compilation errors count)&lt;/li&gt;
		&lt;li&gt;make the test pass doing the simplest thing that will possibly work&lt;/li&gt;
		&lt;li&gt;refactor to remove duplication&lt;/li&gt;
		&lt;li&gt;repeat&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Refactoring&lt;/h2&gt;


	&lt;p&gt;Improving the structure of code without changing its behavior&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;run all of the tests
	&lt;ul&gt;
	&lt;li&gt;they all must pass&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;make a change&lt;/li&gt;
		&lt;li&gt;run all of the tests
	&lt;ul&gt;
	&lt;li&gt;they all must pass&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Must be green (passing all tests) before refactoring. Comment out a failing test to get green if you must.&lt;/li&gt;
		&lt;li&gt;Refactoring should never take you into the red (failing tests).&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Mock Objects&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;mocha can do mock objects in test/unit; rspec has its own mock objects&lt;/li&gt;
	&lt;/ul&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/119189204" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2007%2F5%2F24%2Frailsconf-2007-tutorials-intro-to-tdd-for-rails</feedburner:awareness><feedburner:origLink>http://jerryr.com/2007/5/24/railsconf-2007-tutorials-intro-to-tdd-for-rails</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2007-05-23:1370</id>
    <published>2007-05-23T20:27:00Z</published>
    <updated>2008-03-11T14:59:55Z</updated>
    <category term="Ruby and Rails" />
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/119100742/railsconf-2007-sessions-testing-legacy-rails-applications" rel="alternate" type="text/html" />
    <title>RailsConf 2007: Testing Legacy Rails Applications</title>
<content type="html">
            &lt;p&gt;Looking through my notes, I really made my own “Testing” track at RailsConf. Obviously the product of real-world experience, Rabble’s session on testing “legacy” rails apps was instructive, measured and to the point, laying out a step-by-step path to full test coverage.&lt;/p&gt;


	&lt;h1&gt;Adding Tests to Legacy Rails Apps – &lt;cite&gt;Evan (Rabble) Henshaw-Plath&lt;/cite&gt;&lt;/h1&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href='http://slideshare.net/rabble'&gt;slideshare.net/rabble&lt;/a&gt; &lt;/li&gt;
		&lt;li&gt;&lt;a href='http://anarchogeek.com'&gt;anarchogeek.com&lt;/a&gt; &lt;/li&gt;
		&lt;li&gt;&lt;a href='http://testingrails.com'&gt;testingrails.com&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Description&lt;/h2&gt;


	&lt;p&gt;Most first-time Rails apps are built before a developer understands their importance. Testing is painful in many frameworks and ignored when many people switch to using rails.&lt;/p&gt;


	&lt;p&gt;Ruby on Rails encourages regression testing in the framework by making it easy and creating the tests out of the box. Despite the encouragement, many Rails developers jumped ahead to the coding and left testing to languish for months or years untouched.&lt;/p&gt;


	&lt;p&gt;This talk will provide a pragmatic approach to adding testing to your existing Rails application. Built on real-world experience adding test coverage to large Rails applications. The talk will cover the benefits of adding incremental test coverage to an existing app and techniques for getting started on testing a legacy app.&lt;/p&gt;


	&lt;p&gt;Techniques for testing a legacy app:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Steps to adding tests&lt;/li&gt;
		&lt;li&gt;How to get on the path of writing and using tests&lt;/li&gt;
		&lt;li&gt;Using tests in deployment&lt;/li&gt;
		&lt;li&gt;Adjusting release cycles with expanded test coverage&lt;/li&gt;
		&lt;li&gt;Integrating testing in to the developer’s workflow&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Tools for testing a legacy app:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Building tests from the logs&lt;/li&gt;
		&lt;li&gt;Evaluating test coverage using rake and rcov&lt;/li&gt;
		&lt;li&gt;Using zentest to build out tests quickly&lt;/li&gt;
		&lt;li&gt;Autotest for setting up cia and continuous_builder&lt;/li&gt;
		&lt;li&gt;&lt;span class='caps'&gt;RIG&lt;/span&gt;: Rails Integration Generator&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Even a few tests with the right setup can help improve a project if they are integrated into, and run as part of, the development process. There is hope for the legacy Rails app without tests.&lt;/p&gt;


	&lt;h2&gt;Do we have legacy apps already?&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;No, but we do have test-less apps.&lt;/li&gt;
		&lt;li&gt;Testing != Health Food
	&lt;ul&gt;
	&lt;li&gt;Who has time for tests?&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Testing == Debugging&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Starting&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;Don’t do it all at once. It won’t work.&lt;/li&gt;
		&lt;li&gt;first, run rake
	&lt;ul&gt;
	&lt;li&gt;mysqladmin -u root create chq2_test&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Use Migrations&lt;/li&gt;
		&lt;li&gt;Scaffolding is broken =&amp;gt; those tests don’t work.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Now, let’s get going. One step at a time, literally:&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;find a bug, write a test&lt;/li&gt;
		&lt;li&gt;refactor a method, write a test&lt;/li&gt;
		&lt;li&gt;treat each method as a box – don’t get pulled in to testing everything&lt;/li&gt;
		&lt;li&gt;test one thing at a time&lt;/li&gt;
		&lt;li&gt;Test: what goes in? what comes out? (returning something in the method)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;rake or direct testing&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;rake testing: rake test:uncommitted&lt;/li&gt;
		&lt;li&gt;direct: -n test_name to run one test in a file&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;build tests from logs&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;parameters =&amp;gt; reproduce actual requests&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;what to test:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;right response code&lt;/li&gt;
		&lt;li&gt;correct template&lt;/li&gt;
		&lt;li&gt;variable assignment&lt;/li&gt;
		&lt;li&gt;assignment of desired object&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;test coverage&lt;/h2&gt;


	&lt;p&gt;rcov test coverage =&amp;gt; what needs to be tested&lt;/p&gt;


	&lt;h2&gt;autotest&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;sometimes our tests can run themselves&lt;/li&gt;
		&lt;li&gt;continuous integration only runs when you check-in&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;fixtures == ugliness&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;ar_fixtures&lt;/li&gt;
		&lt;li&gt;use mocks&lt;/li&gt;
		&lt;li&gt;fixture scenarios&lt;/li&gt;
	&lt;/ul&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/119100742" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2007%2F5%2F23%2Frailsconf-2007-sessions-testing-legacy-rails-applications</feedburner:awareness><feedburner:origLink>http://jerryr.com/2007/5/23/railsconf-2007-sessions-testing-legacy-rails-applications</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2007-05-23:1369</id>
    <published>2007-05-23T19:41:00Z</published>
    <updated>2007-05-23T19:48:47Z</updated>
    <category term="Ruby and Rails" />
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/119100743/railsconf-2007-sessions-clean-code" rel="alternate" type="text/html" />
    <title>RailsConf 2007 Sessions: Clean Code</title>
<content type="html">
            &lt;p&gt;Robert Martin’s session on clean code has already reshaped my development practices. Bob provided an excellent overview of the use of Test-First practices and nailed down many of the gaps in my understanding. His demonstration of &lt;span class='caps'&gt;TDD&lt;/span&gt; without making breaking changes was especially interesting, serving to affirm the mantra “I am not allowed to make a change that breaks the system.”&lt;/p&gt;


	&lt;h1&gt;Clean Code – &lt;cite&gt;&lt;a href='mailto:unclebob@objectmentor.com'&gt;Robert Martin&lt;/a&gt;, &lt;a href='http://objectmentor.com/'&gt;Object Mentor&lt;/a&gt;&lt;/cite&gt;&lt;/h1&gt;


	&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; Ward Cunningham once said that Smalltalk failed because it was too easy to make a mess. Professionals don’t make messes. This talk demonstrates the techniques and heuristics for keeping Ruby code clean and stresses the attitude of professionalism and craftsmanship that can keep Ruby from Smalltalk’s fate.&lt;/p&gt;


	&lt;h2&gt;What are we going to do about bad code?&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;The grand redesign in the sky
	&lt;ul&gt;
	&lt;li&gt;10 years to develop the new system&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;incremental improvement
	&lt;ul&gt;
	&lt;li&gt;always check code in better than you checked it out&lt;/li&gt;
		&lt;li&gt;never let the sun set on bad code&lt;/li&gt;
		&lt;li&gt;test first =&amp;gt; “test obsessed” 
	&lt;ul&gt;
	&lt;li&gt;provides the necessary flexibility&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;understand the open closed principle =&amp;gt; open for extension, closed for modification&lt;/li&gt;
		&lt;li&gt;Time to refactor =&amp;gt; things are about to get smelly.&lt;/li&gt;
		&lt;li&gt;started out clean, 
	&lt;ul&gt;
	&lt;li&gt;built up over time&lt;/li&gt;
		&lt;li&gt;initial structure didn’t scale well&lt;/li&gt;
		&lt;li&gt;the more it grew the worse it got&lt;/li&gt;
		&lt;li&gt;eventually I had to stop&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;iterating is where its at&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;&lt;span class='caps'&gt;TDD&lt;/span&gt; =&amp;gt; Keep the system running at all times!&lt;/h2&gt;


	&lt;p&gt;I am not allowed to make a change that breaks the system. Every tiny change I make will keep that system working.&lt;/p&gt;


	&lt;h2&gt;Let’s refactor&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;Principle of least surprise&lt;/li&gt;
		&lt;li&gt;tiny steps =&amp;gt; change each variable type, then run the tests&lt;/li&gt;
		&lt;li&gt;shrink the granularity of your development&lt;/li&gt;
		&lt;li&gt;meta-programming to build marshallers only when you need them&lt;/li&gt;
		&lt;li&gt;create a barrier between things that change and things that don’t&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Is it worth it?&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;crafting good solutions&lt;/li&gt;
		&lt;li&gt;clean it up as soon as it gets messy&lt;/li&gt;
		&lt;li&gt;the dinner parable: get up and walk away from the dinner table or keep your dishes clean all the time&lt;/li&gt;
		&lt;li&gt;bad schedules, requirements, team dynamics can all be fixed&lt;/li&gt;
		&lt;li&gt;bad code rots ferments and becomes an inexorable weight that drags the team down.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Professional Behavior&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;The “Green Band” on his wrist that says “Test Obsessed” &lt;/li&gt;
		&lt;li&gt;Professionals write their tests first&lt;/li&gt;
		&lt;li&gt;Professionals keep their code clean&lt;/li&gt;
		&lt;li&gt;Professionals know that the only way to go fast is to go well.&lt;/li&gt;
		&lt;li&gt;making things a little bit nicer =&amp;gt; the check-in rule&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Contact&lt;/h2&gt;


	&lt;p&gt;&lt;a href='http://fitnesse.org'&gt;Fitnesse&lt;/a&gt;&lt;/p&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/119100743" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2007%2F5%2F23%2Frailsconf-2007-sessions-clean-code</feedburner:awareness><feedburner:origLink>http://jerryr.com/2007/5/23/railsconf-2007-sessions-clean-code</feedburner:origLink></entry>
  <entry xml:base="http://jerryr.com/">
    <author>
      <name>jerry</name>
    </author>
    <id>tag:jerryr.com,2007-05-23:1368</id>
    <published>2007-05-23T18:39:00Z</published>
    <updated>2007-05-24T03:11:39Z</updated>
    <category term="Ruby and Rails" />
    <link href="http://feeds.feedburner.com/~r/jerryr/~3/119081750/railsconf-2007-session-notes-doing-rest-right" rel="alternate" type="text/html" />
    <title>RailsConf 2007: Doing REST Right</title>
<content type="html">
            &lt;p&gt;&lt;a href='http://scottraymond.net/'&gt;Scott Raymond’s&lt;/a&gt; “Doing &lt;span class='caps'&gt;REST&lt;/span&gt; Right” session was a highlight for me at the just-concluded RailsConf. An experienced creator of &lt;span class='caps'&gt;REST&lt;/span&gt;-based solutions, Raymond shared an overview of &lt;span class='caps'&gt;REST&lt;/span&gt;, outside the context of rails, and an invaluable &lt;span class='caps'&gt;FAQ&lt;/span&gt;. Here are my notes from that session.&lt;/p&gt;


	&lt;h1&gt;Doing &lt;span class='caps'&gt;REST&lt;/span&gt; Right – &lt;cite&gt;Scott Raymond, Firewheel Design&lt;/cite&gt;&lt;/h1&gt;


	&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; Rails helps developers build &lt;span class='caps'&gt;REST&lt;/span&gt;-style web services in many ways, but important design decisions remain for each application. In this talk, we’ll go beyond the basics and tackle the practical questions that arise when implementing a modern web service in Rails.&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;Come unto me, all ye that labour and are heavy laden, and I will give you &lt;span class='caps'&gt;REST&lt;/span&gt; – &lt;cite&gt;God&lt;/cite&gt;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;Recognize rest principles in what you’re already doing. Apply them to your whole process.&lt;/p&gt;


	&lt;p&gt;Orthodoxy (right teaching, right beliefs, right thoughts) versus Orthopraxy (right practice)&lt;/p&gt;


	&lt;h2&gt;Orthodoxy&lt;/h2&gt;


	&lt;p&gt;Roy Fielding’s Thesis defined &lt;span class='caps'&gt;REST&lt;/span&gt; (Representational State Transfer)&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;All models are wrong but some are useful. &lt;cite&gt;George Box&lt;/cite&gt;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;Leaky abstractions.&lt;/p&gt;


	&lt;p&gt;Diagrams are wrong but useful in representing complex, real-world systems. Same thing with abstractions.&lt;/p&gt;


	&lt;h3&gt;&lt;span class='caps'&gt;REST&lt;/span&gt; Isn’t&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Pretty URLs&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;span class='caps'&gt;CRUD&lt;/span&gt;
	&lt;table&gt;
		&lt;tr&gt;
			&lt;td&gt;http&lt;/td&gt;
			&lt;td&gt;crud&lt;/td&gt;
			&lt;td&gt;sql&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;post&lt;/td&gt;
			&lt;td&gt;create&lt;/td&gt;
			&lt;td&gt;insert&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;get&lt;/td&gt;
			&lt;td&gt;retrieve&lt;/td&gt;
			&lt;td&gt;select&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;put&lt;/td&gt;
			&lt;td&gt;update&lt;/td&gt;
			&lt;td&gt;update&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;delete&lt;/td&gt;
			&lt;td&gt;destroy&lt;/td&gt;
			&lt;td&gt;delete&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;tools for organizing your application code
	&lt;ul&gt;
	&lt;li&gt;respond_to &lt;/li&gt;
		&lt;li&gt;map.resources&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;http&lt;/li&gt;
		&lt;li&gt;a protocol&lt;/li&gt;
		&lt;li&gt;an architecture&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;&lt;span class='caps'&gt;REST&lt;/span&gt; is…&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;the architectural style of the web&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Roy Fielding’s Hierarchy
	&lt;table&gt;
		&lt;tr&gt;
			&lt;td&gt;Abstract&lt;/td&gt;
			&lt;td&gt;Communication Theory&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;—&lt;/td&gt;
			&lt;td&gt;&lt;span class='caps'&gt;REST&lt;/span&gt;&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;—&lt;/td&gt;
			&lt;td&gt;Web Architecture&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;Concrete&lt;/td&gt;
			&lt;td&gt;Implementation&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;A resource is anything that can be named&lt;/li&gt;
		&lt;li&gt;A resource is an object with a couple of contraints – can only implement a very small number of methods, same for all resources&lt;/li&gt;
		&lt;li&gt;you don’t access a resource—you access a representation of it. (respond_to with format.xml, format.txt, etc.)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Orthopraxy&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;Identification (Address)
	&lt;ul&gt;
	&lt;li&gt;My name is &lt;span class='caps'&gt;URL&lt;/span&gt;.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Interaction (Method or Verb) – the uniform interface, uniform small set of methods
	&lt;ul&gt;
	&lt;li&gt;safety—has no side effects, incurs no obligations (get is the only method that is safe by definition)&lt;/li&gt;
		&lt;li&gt;idempotent—applying a function once returns the same value as applying it multiple times (get, put and delete)&lt;/li&gt;
		&lt;li&gt;post is neither safe nor idempotent =&amp;gt; reserve it for when you need it&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Content (Data, Body of Request)
	&lt;ul&gt;
	&lt;li&gt;&lt;span class='caps'&gt;REST&lt;/span&gt; pushes all of the complexity into content, out of identification and interaction&lt;/li&gt;
		&lt;li&gt;standards
	&lt;ul&gt;
	&lt;li&gt;messages should be self-descriptive, like html&lt;/li&gt;
		&lt;li&gt;look for content types that map to your application domain
	&lt;ul&gt;
	&lt;li&gt;instead of to_xml, use an established type. &lt;/li&gt;
		&lt;li&gt;for users do vcard instead of your arbitrary user xml&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Questions in &lt;span class='caps'&gt;SCO&lt;/span&gt;’s Experience&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;How do I update several resources at once? Like a to-do list application with a bunch of “finished” checkboxes…
	&lt;ul&gt;
	&lt;li&gt;Scope this request to a set of resources, using the &lt;span class='caps'&gt;URL&lt;/span&gt;&lt;/li&gt;
		&lt;li&gt;create a url that names that superset, then update them all (one resource) with one request&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;How can I do partial updates? Like a person resource, changing just the name…
	&lt;ul&gt;
	&lt;li&gt;Scope in the url =&amp;gt; give names a url (“people/5/name”), then post to that resource&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;I’m special; I need more than &lt;span class='caps'&gt;GET&lt;/span&gt;/POST/PUT/DELETE semantics.
	&lt;ul&gt;
	&lt;li&gt;You’re wrong. You can model any problem in &lt;span class='caps'&gt;REST&lt;/span&gt;. The uniform interface is sufficiently general.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;How should I do authentication?
	&lt;ul&gt;
	&lt;li&gt;cookies force application state into the server&lt;/li&gt;
		&lt;li&gt;how about &lt;span class='caps'&gt;HTTP&lt;/span&gt; Basic? Makes each request self sufficient. Guards against restart, but UI sucks. Password is in cleartext with every request.&lt;/li&gt;
		&lt;li&gt;&lt;span class='caps'&gt;HTTP&lt;/span&gt;-Digest =&amp;gt; eh, not quite.&lt;/li&gt;
		&lt;li&gt;use cookies, but make each request self-sufficient with its own session information&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Should I include content-type info in the &lt;span class='caps'&gt;URL&lt;/span&gt;?
	&lt;ul&gt;
	&lt;li&gt;Opinions have changed over the past year. &lt;/li&gt;
		&lt;li&gt;Previously =&amp;gt; No, and you get network effects. But you can’t link to a specific representation, only the default representation.&lt;/li&gt;
		&lt;li&gt;URLs are UI, don’t let rails force your hand.&lt;/li&gt;
		&lt;li&gt;Now =&amp;gt; Yes. gets you better page caching.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;What about reliability?
	&lt;ul&gt;
	&lt;li&gt;with posts, you divide them into 2 phases
	&lt;ul&gt;
	&lt;li&gt;Post to a factory method that creates a new url&lt;/li&gt;
		&lt;li&gt;Post (commit) to that fancy url.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;What about concurrency?
	&lt;ul&gt;
	&lt;li&gt;Use entity tags&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;What about transactions?
	&lt;ul&gt;
	&lt;li&gt;Still a scope question =&amp;gt; make a new &lt;span class='caps'&gt;URL&lt;/span&gt; that represents the full transaction.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;I need more than one representation with the same media type.
	&lt;ul&gt;
	&lt;li&gt;avoid using a generic media type, make your own&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;
          &lt;img src="http://feeds.feedburner.com/~r/jerryr/~4/119081750" height="1" width="1"/&gt;</content>  <feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=jerryr&amp;itemurl=http%3A%2F%2Fjerryr.com%2F2007%2F5%2F23%2Frailsconf-2007-session-notes-doing-rest-right</feedburner:awareness><feedburner:origLink>http://jerryr.com/2007/5/23/railsconf-2007-session-notes-doing-rest-right</feedburner:origLink></entry>
<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetFeedData?uri=jerryr</feedburner:awareness></feed>
