<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>DABlog - Home</title>
  <id>tag:dablog.rubypal.com,2009:mephisto/</id>
  <generator version="0.7.3" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://dablog.rubypal.com/xml/atom/feed.xml" rel="self" type="application/atom+xml"/>
  <link href="http://dablog.rubypal.com/" rel="alternate" type="text/html"/>
  <updated>2009-06-10T23:57:57Z</updated>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2009-06-10:1375</id>
    <published>2009-06-10T23:57:00Z</published>
    <updated>2009-06-10T23:57:57Z</updated>
    <category term="Computers"/>
    <category term="Events"/>
    <category term="Ruby"/>
    <link href="http://dablog.rubypal.com/2009/6/10/my-new-ruby-book-is-out" rel="alternate" type="text/html"/>
    <title>My new Ruby book is out!</title>
<content type="html">
            &lt;p&gt;I&#8217;m realizing that the new book isn&#8217;t getting enough buzz, so here&#8217;s some buzz!&lt;/p&gt;


	&lt;p&gt;My new book, &lt;a href=&quot;http://www.manning.com/black2&quot;&gt;The Well-Grounded Rubyist&lt;/a&gt;, is now out and available from the publisher as well as Amazon and other retailers and stores.&lt;/p&gt;


	&lt;p&gt;If you&#8217;re learning Ruby, or want to learn Ruby, or want to refresh your Ruby knowledge and get more deeply into it&#8230;read this book! 
&lt;img src=&quot;/images/twgr.jpg&quot; /&gt;
I talk more about the book in my recent interviews for &lt;a href=&quot;http://www.infoq.com/articles/interview-david-black&quot;&gt;InfoQ&lt;/a&gt;, &lt;a href=&quot;http://on-ruby.blogspot.com/2009/05/author-interview-well-grounded-rubyist.html&quot;&gt;On Ruby&lt;/a&gt;, and &lt;a href=&quot;http://rubylearning.com/blog/2009/06/09/interview-author-david-black/&quot;&gt;RubyLearning&lt;/a&gt;.&lt;/p&gt;


&lt;h2&gt;Some reviews and comments&lt;/h2&gt;

	&lt;p&gt;Here are some review quotations, from various sources:&lt;/p&gt;


&lt;div&gt;
&lt;blockquote&gt;
I think this book is a definite read and should be in every Ruby developer’s library. 
&lt;/blockquote&gt;
...
&lt;blockquote&gt;
Excellent. Easy to read, but not dumbed down. I came away with a much deeper understanding of &lt;span class=&quot;caps&quot;&gt;WHY&lt;/span&gt; oop is used, and how to use it in ruby. 
&lt;br /&gt;
&lt;br /&gt;
If you are looking to understand ruby, look no further.
&lt;/blockquote&gt;
...
&lt;blockquote&gt;
David does an excellent job going beyond the language and hitting those concepts in the built-in classes and modules that you need to know and will experience in the real-world.
&lt;/blockquote&gt;
&lt;/div&gt;

	&lt;p&gt;You can also find complete reviews &lt;a href=&quot;http://citizen428.net/archives/386-Review-The-Well-Grounded-Rubyist-Manning-Publications.html&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://www.infoq.com/news/2009/01/The-Well-Grounded-Rubyist&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;(And don&#8217;t get confused if some sites have a different-looking cover. There were two cover designs. The new one is the one you see here.)&lt;/p&gt;


	&lt;p&gt;Enjoy!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2009-04-21:413</id>
    <published>2009-04-21T23:15:00Z</published>
    <updated>2009-04-21T23:16:10Z</updated>
    <category term="Computers"/>
    <category term="Events"/>
    <category term="Ruby"/>
    <link href="http://dablog.rubypal.com/2009/4/21/the-well-grounded-rubyist-now-available-in-pdf" rel="alternate" type="text/html"/>
    <title>"The Well-Grounded Rubyist" now available in PDF!</title>
<content type="html">
            &lt;p&gt;It&#8217;s been a busy few days, with the release of not &lt;a href=&quot;http://dablog.rubypal.com/2009/4/21/envycasts-featuring-david-a-black-ruby-1-9-what-you-need-to-know&quot;&gt;my Ruby 1.9
Envycasts&lt;/a&gt; but also the &lt;span class=&quot;caps&quot;&gt;PDF&lt;/span&gt; version of my new book 
&lt;a href=&quot;http://manning.com/black2&quot;&gt;The Well-Grounded Rubyist&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;TWGR&lt;/span&gt; is an expanded, updated, Ruby-only reworking of my 2006 book
&#8220;Ruby for Rails&#8221;. It targets Ruby 1.9.1, and includes a great deal of
new material (enough that it took me almost a year longer than I
thought it would to write :-) The book is entirely about the Ruby
language, not Rails. Lots of readers of &lt;span class=&quot;caps&quot;&gt;R4R&lt;/span&gt; encouraged me to write a
&#8220;just-Ruby&#8221; book, and here it is!&lt;/p&gt;


	&lt;p&gt;I&#8217;m looking forward to the release of the paper version on May 1, too. Not sure yet whether there are Kindle and/or Sony e-reader versions coming, but I&#8217;ll keep you posted.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2009-03-21:395</id>
    <published>2009-03-21T01:22:00Z</published>
    <updated>2009-03-21T01:23:32Z</updated>
    <category term="Coolth and Weirdth"/>
    <link href="http://dablog.rubypal.com/2009/3/21/is-this-an-early-use-of-the-slang-cool" rel="alternate" type="text/html"/>
    <title>Is this an early use of the slang "cool"?</title>
<content type="html">
            &lt;p&gt;Here&#8217;s a passage from &lt;i&gt;The Man in Lower Ten&lt;/i&gt; by Mary Roberts Rinehart, published in 1906. I&#8217;ve included some context but the main thing I&#8217;m interested in is the appearance of the word &#8220;cool&#8221; in the second paragraph.&lt;/p&gt;


&lt;blockquote&gt;
&#8220;Nonsense,&#8221; he said. &#8220;Bring yourself. The lady
that keeps my boarding-house is calling to me to insist. You
remember Dorothy, don&#8217;t you, Dorothy Browne? She says unless
you have lost your figure you can wear my clothes all right. All
you need here is a bathing suit for daytime and a dinner coat for
evening.&#8221; 
&lt;br /&gt;
&lt;br /&gt;
&#8220;It sounds cool,&#8221; I temporized. &#8220;If you are sure
I won&#8217;t put you out—very well, Sam, since you and your wife are
good enough. I have a couple of days free. Give my love to Dorothy
until I can do it myself.&#8221; 
&lt;/blockquote&gt;

	&lt;p&gt;I can&#8217;t see what &#8220;cool&#8221; means in the second paragraph, other than &#8220;cool&#8221; in the slang sense that we use it. My understanding is that &#8220;cool&#8221; in that sense started, or at least came into common usage, during or after World War II. In any case, 1906 seems insanely early for it.&lt;/p&gt;


	&lt;p&gt;But what else could it mean in the quotation above? The wardrobe described in the first paragraph doesn&#8217;t suggest a particularly cool climate. Is there some other nuance of the word I&#8217;m not getting?&lt;/p&gt;


	&lt;p&gt;I shall leave comments open on this one, at least until the spam gets intolerable.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2009-03-14:392</id>
    <published>2009-03-14T14:21:00Z</published>
    <updated>2009-03-14T14:22:23Z</updated>
    <category term="Computers"/>
    <category term="Events"/>
    <category term="Ruby"/>
    <category term="Travel"/>
    <link href="http://dablog.rubypal.com/2009/3/14/did-i-mention-ruby-training-in-atlanta-april-1-3" rel="alternate" type="text/html"/>
    <title>Did I mention Ruby training in Atlanta, April 1-3?</title>
<content type="html">
            &lt;p&gt;The answer is&#8230;yes! I did mention it. But I&#8217;ll mention it again.&lt;/p&gt;


&lt;h2&gt;Want to learn Ruby, and learn it right?&lt;/h2&gt;

	&lt;p&gt;Come to Atlanta for three days and learn Ruby from:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;me (author of &lt;a href=&quot;http://www.manning.com/black&quot;&gt;&lt;em&gt;Ruby for Rails&lt;/em&gt;&lt;/a&gt;, &lt;a href=&quot;http://www.manning.com/black2&quot;&gt;&lt;em&gt;The Well-Grounded Rubyist&lt;/em&gt;&lt;/a&gt;, and other stuff; long-time Ruby programmer; one of the most experienced Ruby trainers on the planet)&lt;/li&gt;
		&lt;li&gt;Jeremy McAnally (&#8220;mrneighborly&#8221;, author of &lt;a href=&quot;http://www.manning.com/mcanally&quot;&gt;&lt;em&gt;Ruby in Practice&lt;/em&gt;&lt;/a&gt;, creator of the Ruby Hoedown (annual conference))&lt;/li&gt;
		&lt;li&gt;Rick Olson (&#8220;technoweenie&#8221;, member of the Rails core team; plugin writer extraordinaire)&lt;/li&gt;
	&lt;/ul&gt;


&lt;h2&gt;You gotta better way to learn Ruby?&lt;/h2&gt;

	&lt;p&gt;I doubt it. Just read that list of instructors again&#8230; and you get training materials, a book (&#8220;Ruby in Practice&#8221;), and lunches.&lt;/p&gt;


	&lt;p&gt;There&#8217;s registration info &lt;a href=&quot;http://www.entp.com/training/atlanta09&quot;&gt;here&lt;/a&gt;, and you can &lt;a href=&quot;mailto:dblack@rubypal.com&quot;&gt;contact me directly&lt;/a&gt; with any questions.&lt;/p&gt;


	&lt;p&gt;Hope to see you there!&lt;/p&gt;


	&lt;p&gt;P.S. If you&#8217;re a Ruby expert but have friends or co-workers or employees who could use an accelerated intro/intermediate course, send them along!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2009-02-16:385</id>
    <published>2009-02-16T14:50:00Z</published>
    <updated>2009-02-16T14:52:25Z</updated>
    <category term="Computers"/>
    <category term="Events"/>
    <category term="Ruby"/>
    <link href="http://dablog.rubypal.com/2009/2/16/ruby-training-in-atlanta-april-1-3" rel="alternate" type="text/html"/>
    <title>Ruby training in Atlanta, April 1-3!</title>
<content type="html">
            &lt;p&gt;Want to learn Ruby, or improve what you already know? Come to Atlanta!&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://www.rubypal.com&quot;&gt;Ruby Power and Light&lt;/a&gt;
 and &lt;a href=&quot;http://www.entp.com&quot;&gt;&lt;span class=&quot;caps&quot;&gt;ENTP&lt;/span&gt;&lt;/a&gt; are teaming up to present a three-day Ruby course in Atlanta. You can get more info, and register, &lt;a href=&quot;http://www.entp.com/training/atlanta09&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Training will be by me and Ruby developer/author Jeremy McAnally (&#8220;mrneighborly&#8221;). And Rick Olson (&#8220;technoweenie&#8221;) will be there too, helping with the training and sagely dispensing Ruby wisdom and advice. (Seriously!) It will be at the Georgia Tech Hotel &#38; Conference Center.&lt;/p&gt;


	&lt;p&gt;Please &lt;a href=&quot;mailto:dblack@rubypal.com&quot;&gt;email me&lt;/a&gt; if you have any questions. Otherwise, see you there!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2009-02-03:381</id>
    <published>2009-02-03T01:38:00Z</published>
    <updated>2009-02-03T01:38:44Z</updated>
    <category term="Coolth and Weirdth"/>
    <link href="http://dablog.rubypal.com/2009/2/3/why-athletes-thanking-god-for-victories-is-stupid" rel="alternate" type="text/html"/>
    <title>Why athletes thanking God for victories is stupid</title>
<content type="html">
            &lt;p&gt;I hate it when athletes thank God when they win. My reasons for hating
it have nothing to do with my own atheism. I hate it because it&#8217;s
narcissistic and because it&#8217;s theologically infantile.&lt;/p&gt;


	&lt;p&gt;If you win a game and then thank God, &lt;em&gt;and do not thank God when you
lose&lt;/em&gt;, you are going on record as believing that God wanted you to win,
and that a victory by your opponent would have represented a thwarting of
God&#8217;s plan.&lt;/p&gt;


	&lt;p&gt;But how do you know? Isn&#8217;t it possible that losing is what God has planned for
you, and that it will do you good? Maybe losing will strengthen your
character. Maybe your opponent needs the win (or the prize money) more than
you do, and God somehow managed to figure that out in spite of being dazzled
by your greatness.  Maybe you should be thanking God for protecting you from
the sin of pride by not letting you win a spiritually meaningless, entirely
earthly contest.&lt;/p&gt;


	&lt;p&gt;But I&#8217;ve never seen an athlete drop to his or her knees and thank God after a
loss.  Why not? Because the ones who thank God when they win have a dinky,
anthropomorphic conception of God. Their God is &#8220;the man upstairs,&#8221; the Santa
Claus figure, the parent who may or may not give them the birthday present
they want. And to hell with the other kids. Me, Me, Me.&lt;/p&gt;


	&lt;p&gt;So what gives? Where does this all come from? Whose big idea was it to thank
God only for bringing about what they themselves wanted to happen anyway?&lt;/p&gt;


	&lt;p&gt;Let&#8217;s go back to ancient times. Things were different with respect to thanking
gods, &lt;em&gt;because there were lots of gods&lt;/em&gt; and the gods took sides
in the contest. It made sense for the Greeks
to thank Athena for the victory over the Trojans because Athena was, at some
Olympian level, duking it out with Ares and Aphrodite. The Greeks&#8217; powerful
friends prevailed over the Trojans&#8217; powerful friends. And the Greeks
understood that someone had actually made an effort on their behalf, faced
uncertainty, and prevailed. So they thanked her.&lt;/p&gt;


	&lt;p&gt;Dear athlete: Do you think that God faces uncertainty when you play a tennis
match?&lt;/p&gt;


	&lt;p&gt;Do you think that God has to make an effort on your behalf to make sure you
win?&lt;/p&gt;


	&lt;p&gt;Do you think that God&#8217;s enemy is rooting for your opponent?&lt;/p&gt;


	&lt;p&gt;And if you don&#8217;t think all that, what exactly are you thanking God for when
you win? I mean &lt;em&gt;exactly&lt;/em&gt;. Not just vaguely that you&#8217;re happy, and
happiness feels good, so it must come from God. That&#8217;s theological babytalk.&lt;/p&gt;


	&lt;p&gt;The best thing that can be said about thanking God for an athletic victory and not for a loss is
that it&#8217;s an ignorant corruption of what was a perfectly reasonable pagan practice. 
If you&#8217;re a monotheist and thank God for a win, you&#8217;re making
a statement about your own inherent worth, and what you believe is God&#8217;s
opinion of that worth, in comparison to the inherent worth of your opponent.
You&#8217;re asserting that your victory is of the Lord to an extent that a victory
by your opponent would not have been. And you&#8217;re implying unmistakeably that
your opponent is in league with God&#8217;s enemy.&lt;/p&gt;


	&lt;p&gt;In other words, thanking God for an athletic victory is stupid, uninformed,
thoughtless, self-absorbed, and about as far from anything religious or
spiritual as you can get. I understand the whole thing about religion not being the same as
rational thought. But this isn&#8217;t even the same as religious thought. It&#8217;s just
vanity.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2009-01-23:371</id>
    <published>2009-01-23T22:31:00Z</published>
    <updated>2009-01-23T22:32:07Z</updated>
    <category term="Computers"/>
    <category term="Events"/>
    <category term="Ruby"/>
    <link href="http://dablog.rubypal.com/2009/1/23/railsconf-registration-and-a-hiatus-year-for-railsconf-europe" rel="alternate" type="text/html"/>
    <title>RailsConf registration (and a hiatus year for RailsConf Europe)</title>
<content type="html">
            &lt;p&gt;Registration is now open for RailsConf 2009 (May 4-7). You can get more details, and register, at
&lt;a href=&quot;http://www.railsconf.com&quot;&gt;the RailsConf 2009 website&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;RailsConf is taking place in Las Vegas, one of my favorite cities. Yes, I know what a weird and ironic place it is. But for whatever reason, I&#8217;ve always found it extremely enjoyable. May is a good time to go&amp;mdash;hopefully not to hot to step outside!&lt;/p&gt;


	&lt;p&gt;There&#8217;s a lot going on at RailsConf this year, highlighted by its timing in the wake of the Rails/Merb merger decision. There will be lots of merger news and highlights, along with the usual great lineup of talks and, above all, the chance to meet and get to know other Rails developers as well as Rails core team members, authors, bloggers, and pretty much the whole gang!&lt;/p&gt;


&lt;h2&gt;A hiatus year for RailsConf Europe&lt;/h2&gt;

	&lt;p&gt;Ruby Central and O&#8217;Reilly have decided to take a hiatus from producing RailsConf Europe this year, for the simple reason that it didn&#8217;t bring in enough revenue last year to justify doing it again, particularly given the tight economy and the need to err on the side of caution. RailsConf Europe has always been a really great event, and people who go to it really love it, but we need a year of retrenchment while we figure out how to get everyone else to realize how great it is! Plans for 2010 are not certain yet; we&#8217;re taking it one year at a time.&lt;/p&gt;


	&lt;p&gt;Meanwhile, the Ruby and Rails communities continue to produce an astonishing number of high-quality, uniquely branded and flavored events. I&#8217;m not even going to try to list them all here. Do a search, though, and you may very well find one near you.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2009-01-16:362</id>
    <published>2009-01-16T14:20:00Z</published>
    <updated>2009-01-16T14:20:36Z</updated>
    <category term="Computers"/>
    <category term="Ruby"/>
    <link href="http://dablog.rubypal.com/2009/1/16/son-of-10-things-to-be-aware-of-in-ruby-1-9" rel="alternate" type="text/html"/>
    <title>Son of 10 things to be aware of in Ruby 1.9!</title>
<content type="html">
            &lt;p&gt;I&#8217;m happy to see that my recent
&lt;a href=&quot;http://dablog.rubypal.com/2009/1/14/10-things-to-be-aware-of-in-moving-to-ruby-1-9&quot;&gt;10 things to be aware
of in moving to Ruby 19&lt;/a&gt; article has proven helpful to lots of people. This article is a follow-up.&lt;/p&gt;


	&lt;p&gt;The goal of the article was to point out 1.9 features and changes that
might cause your existing code not to run correctly, or not to run at
all. I went a bit soft, though: two of the original ten (hashes being
ordered and the changes in method-argument syntax) weren&#8217;t really
things that might break your 1.8 code.&lt;/p&gt;


	&lt;p&gt;So I feel I owe the world two more code-breaking 1.9 features! And
they&#8217;re here, along with a bonus one.&lt;/p&gt;


&lt;h2&gt;But first, some links&lt;/h2&gt;

	&lt;p&gt;The denizens of ruby-talk have provided lots of helpful ideas and
feedback. James Edward Gray II and others mentioned &lt;span class=&quot;caps&quot;&gt;M17N&lt;/span&gt;, a topic on
which I defer to the more expert among us, especially James who has
written a multi-part &lt;a href=&quot;http://blog.grayproductions.net/articles/understanding_m17n&quot;&gt;&lt;span class=&quot;caps&quot;&gt;M17N&lt;/span&gt; guide&lt;/a&gt;.
He&#8217;s going to be expanding it to include 1.9 encoding, so keep an eye on it.&lt;/p&gt;


	&lt;p&gt;Brian Candler suggested that people might be interested in
the presentation by me and Dave Thomas at RubyConf 2008
on &lt;a href=&quot;http://rubyconf2008.confreaks.com/ruby-19-what-to-expect.html&quot;&gt;Ruby 1.9: What to Expect&lt;/a&gt;.
We cover some pitfalls but also some new, non-pitfall features you
might want to know about.&lt;/p&gt;


	&lt;p&gt;If you&#8217;re interested in Ruby 1.9 generally, you might be interested
in my forthcoming book &lt;a href=&quot;http://www.manning.com/black2&quot;&gt;The Well-Grounded
Rubyist&lt;/a&gt;, which is a fully revised,
revamped, &#8220;Ruby only&#8221; second incarnation of my 2006 book
&lt;a href=&quot;http://www.manning.com/black&quot;&gt;Ruby for Rails&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Apologies to anyone I&#8217;ve failed to credit, and thanks to all for the feedback.&lt;/p&gt;


	&lt;p&gt;And with that, here are the pitfalls! (Speaking of pitfalls, I think
I&#8217;ve remembered all the &amp;lt;pre&amp;gt; tags this time&#8230;.)&lt;/p&gt;


&lt;h2&gt;String indexing behavior has changed&lt;/h2&gt;

	&lt;p&gt;(Thanks to Michael Fellinger and Robert Dober)&lt;/p&gt;


	&lt;p&gt;In Ruby 1.8, indexing strings with &lt;code&gt;[]&lt;/code&gt;, as in &lt;code&gt;&quot;string&quot;[3]&lt;/code&gt;, gives
you an &lt;span class=&quot;caps&quot;&gt;ASCII&lt;/span&gt; code:&lt;/p&gt;


&lt;pre&gt;
  &amp;gt;&amp;gt; &quot;string&quot;[3]
  =&amp;gt; 105
&lt;/pre&gt;

	&lt;p&gt;In order to get a one-character-long substring, you have to provide a
length:&lt;/p&gt;


&lt;pre&gt;
  &amp;gt;&amp;gt; &quot;string&quot;[3,1]
  =&amp;gt; &quot;i&quot; 
&lt;/pre&gt;

	&lt;p&gt;In Ruby 1.9, the indexing operation gives you a character.&lt;/p&gt;


&lt;pre&gt;
  &amp;gt;&amp;gt; &quot;string&quot;[3]
  =&amp;gt; &quot;i&quot; 
&lt;/pre&gt;

	&lt;p&gt;Also, kind of along the same lines, the ?-notation now gives a
character rather than a code. In 1.8:&lt;/p&gt;


&lt;pre&gt;
  &amp;gt;&amp;gt; ?a
  =&amp;gt; 97
&lt;/pre&gt;

	&lt;p&gt;and in 1.9:&lt;/p&gt;


&lt;pre&gt;
  &amp;gt;&amp;gt; ?a
  =&amp;gt; &quot;a&quot; 
&lt;/pre&gt;

&lt;h2&gt;if-conditions can no longer end with a colon&lt;/h2&gt;

	&lt;p&gt;In 1.8 you can do this:&lt;/p&gt;


&lt;pre&gt;
  if x:
    puts &quot;Yes!&quot; 
  end
&lt;/pre&gt;

	&lt;p&gt;In 1.9, you can&#8217;t use that colon any more. The same is true of when
clauses in case statements. This will not parse in 1.9:&lt;/p&gt;


&lt;pre&gt;
  case x
  when 1: &quot;yes!&quot; 
  end
&lt;/pre&gt;

&lt;h2&gt;Bonus thing! No more default to_a&lt;/h2&gt;

	&lt;p&gt;In 1.9 you cannot assume that every object has a &lt;code&gt;to_a&lt;/code&gt; method.
You&#8217;ve probably seen warnings about this in 1.8, and the day of
reckoning has now arrived.&lt;/p&gt;


&lt;pre&gt;
  &amp;gt;&amp;gt; &quot;abc&quot;.to_a
  NoMethodError: undefined method `to_a' for &quot;abc&quot;:String
&lt;/pre&gt;

	&lt;p&gt;You can use the Array method to turn anything into an array. If it&#8217;s
an array already, it returns the object itself (not a copy). If it&#8217;s
anything else, it tries to run &lt;code&gt;to_ary&lt;/code&gt; and &lt;code&gt;to_a&lt;/code&gt; on it (in that order),
and if those aren&#8217;t available, it just wraps it in an array.&lt;/p&gt;


	&lt;p&gt;Array isn&#8217;t new, but we&#8217;re likely to be using it a lot more
now that there&#8217;s no default &lt;code&gt;to_a&lt;/code&gt; operation.&lt;/p&gt;


	&lt;p&gt;Have fun!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2009-01-14:359</id>
    <published>2009-01-14T19:21:00Z</published>
    <updated>2009-02-15T03:51:21Z</updated>
    <category term="Computers"/>
    <category term="Ruby"/>
    <link href="http://dablog.rubypal.com/2009/1/14/10-things-to-be-aware-of-in-moving-to-ruby-1-9" rel="alternate" type="text/html"/>
    <title>10 things to be aware of in moving to Ruby 1.9</title>
<content type="html">
            &lt;p&gt;&lt;em&gt;Update: There&#8217;s a sequel to this post,
called &lt;a href=&quot;http://dablog.rubypal.com/2009/1/16/son-of-10-things-to-be-aware-of-in-ruby-1-9&quot;&gt;Son of 10 things&#8230;&lt;/a&gt; &lt;/em&gt;&lt;/p&gt;

	&lt;p&gt;I&#8217;ve been writing a lot about Ruby 1.9 (my book &lt;a href=&quot;http://www.manning.com/black2&quot;&gt;The Well-Grounded Rubyist&lt;/a&gt; is due out in 
a couple of months), and I thought I&#8217;d share my personal list of things you need 
to be careful of as you go from 1.8 to 1.9. This is not a list of changes; it&#8217;s 
a list of changes that you really need to know about to get your 1.8 code to 
work in 1.9, things that have a relatively high likelihood of biting you if you 
don&#8217;t know about them.&lt;/p&gt;


&lt;h3&gt;Strings are no longer enumerable&lt;/h3&gt;

	&lt;p&gt;You can&#8217;t do &lt;code&gt;string.each&lt;/code&gt; and friends any more. This has an impact, for
example, on the Rack interface, where there has in the past been a requirement
that the third item in the returned array respond to &lt;code&gt;each&lt;/code&gt;.&lt;/p&gt;


&lt;h3&gt;Block argument semantics&lt;/h3&gt;

	&lt;p&gt;This is a big change, and a big topic. The salient point is that when you do this:&lt;/p&gt;


&lt;pre&gt;
  array.each {|x| ... }
&lt;/pre&gt;

	&lt;p&gt;the block parameter list is handled like a method parameter list. In 1.8, blocks
use assignment semantics, so that &lt;code&gt;@ is like @x=&lt;/code&gt;. That&#8217;s why in 1.8 you can do:&lt;/p&gt;


&lt;pre&gt;
  array.each {|@x| ... }
&lt;/pre&gt;

	&lt;p&gt;(assign to an instance variable) or even:&lt;/p&gt;


&lt;pre&gt;
  array.each {|self.attr| ... }
&lt;/pre&gt;

	&lt;p&gt;(call the &lt;code&gt;attr=&lt;/code&gt; method on &lt;code&gt;self&lt;/code&gt;). You can&#8217;t do those things in 1.9; the parameters are bound
to the arguments using method-argument semantics, not assignment semantics.&lt;/p&gt;


&lt;h3&gt;Block variables scope&lt;/h3&gt;

	&lt;p&gt;Block parameters are local to the block.&lt;/p&gt;


&lt;pre&gt;
  x = 1
  [2,3].each {|x|  }
&lt;/pre&gt;

	&lt;p&gt;In 1.8, &lt;code&gt;x&lt;/code&gt; would now be 3 (outside the block). In 1.9 the two &lt;code&gt;x&lt;/code&gt;&#8217;s are not the
same variable, so the original &lt;code&gt;x&lt;/code&gt; is still 1.&lt;/p&gt;


	&lt;p&gt;However, a variable that (a) already exists, and (b) is not a block parameter,
is not local to the block.&lt;/p&gt;


&lt;pre&gt;
  x = 1
  [2,3].each {|y| x = y }
&lt;/pre&gt;

&lt;code&gt;x&lt;/code&gt; is now 3. If you want or need to shield your existing variables from being
used inside the block, declare variables as block local by putting them after a
semi-colon in the parameter list:
&lt;pre&gt;
  x = 1
  [2,3].each {|y;x| x = y }
&lt;/pre&gt;

	&lt;p&gt;&lt;code&gt;x&lt;/code&gt; is still 1.&lt;/p&gt;


&lt;h3&gt;Method argument semantics&lt;/h3&gt;

	&lt;p&gt;Method arguments do some new things too. In particular, you can now put required
arguments after the optional argument glob parameter:&lt;/p&gt;


&lt;pre&gt;
  def my_meth(a,*b,c)
&lt;/pre&gt;

	&lt;p&gt;There aren&#8217;t too many situations where you&#8217;d want to do this (though there are one or two).&lt;/p&gt;


&lt;h3&gt;The * operator has changed semantics&lt;/h3&gt;

Compare 1.8:
&lt;pre&gt;
  &amp;gt;&amp;gt; a = [1,2]
  =&amp;gt; [1, 2]
  &amp;gt;&amp;gt; *b = a
  =&amp;gt; [[1, 2]]
  &amp;gt;&amp;gt; b
  =&amp;gt; [[1, 2]]
&lt;/pre&gt;

	&lt;p&gt;and 1.9:&lt;/p&gt;


&lt;pre&gt;
  &amp;gt;&amp;gt; a = [1,2]
  =&amp;gt; [1, 2]
  &amp;gt;&amp;gt; *b = a
  =&amp;gt; [1, 2]
  &amp;gt;&amp;gt; b
  =&amp;gt; [1, 2]
&lt;/pre&gt;

	&lt;p&gt;I&#8217;ve always interpreted the &lt;code&gt;*&lt;/code&gt; operator in the following way:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;The expression *x represents the contents of the array x, as a
list.&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;In 1.8, &lt;code&gt;*b = [1,2]&lt;/code&gt; means that &lt;code&gt;[1,2]&lt;/code&gt; is the contents of the array &lt;code&gt;b&lt;/code&gt;, which
means that &lt;code&gt;b&lt;/code&gt; is &lt;code&gt;[[1,2]]&lt;/code&gt;.  The 1.9 semantics don&#8217;t seem to behave that way. I&#8217;m
not sure what the new general rule for &lt;code&gt;*&lt;/code&gt; is, or whether maybe I was wrong that
there was such a rule that governed all cases (though I can&#8217;t think of an
exception).&lt;/p&gt;


&lt;h3&gt;Hashes are ordered&lt;/h3&gt;

	&lt;p&gt;This isn&#8217;t likely to bite you but it&#8217;s something to be aware of, both in your
own code and in looking at the code of others. Hashes are ordered by insertion
order. Reassigning to a key does not change the insertion placement of that key.&lt;/p&gt;


&lt;h3&gt;method and friends return symbols&lt;/h3&gt;

	&lt;p&gt;Expressions like &lt;code&gt;obj.methods&lt;/code&gt; and &lt;code&gt;klass.instance_methods&lt;/code&gt; return symbols instead
of strings in 1.9. That means that you might have to do &lt;code&gt;to_s&lt;/code&gt; operations on them,
if you need them as strings. However&#8230;&lt;/p&gt;


&lt;h3&gt;Symbols are string-like&lt;/h3&gt;

	&lt;p&gt;... symbols have become very string-like. You can match them against regular
expressions, run methods like &lt;code&gt;#upcase&lt;/code&gt; and &lt;code&gt;#swapcase&lt;/code&gt; on them, and ask them their
&lt;code&gt;size&lt;/code&gt; (i.e., their size in characters). I&#8217;m not sure what the purpose of this is. I&#8217;d just as soon
have symbols not be any more string-like than they absolutely have to be.&lt;/p&gt;


&lt;h3&gt;Gems are automatically in the load path&lt;/h3&gt;

	&lt;p&gt;When you start Ruby (or irb), your load path (&lt;code&gt;$:&lt;/code&gt;) will include the necessary
directories for all the gems on your system. That means you can just require
things, without having to require rubygems first. You can manipulate the load
path per gem version with the gem method.&lt;/p&gt;


&lt;h3&gt;Lots of enumerable methods return enumerators&lt;/h3&gt;

	&lt;p&gt;Called without a block, most enumerable methods now return an enumerator. It&#8217;s
fairly unusual to use the return value of blockless calls to &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;select&lt;/code&gt;, and
others, but it&#8217;s worth knowing that now you cannot assume that, for example,
&lt;code&gt;Array#each&lt;/code&gt; will always return its receiver.&lt;/p&gt;


	&lt;p&gt;You can use this feature to chain enumerators, though the circumstances in which
chaining enumerators really buys you anything are pretty few. I don&#8217;t
know of a case where you would do this:&lt;/p&gt;


&lt;pre&gt;
  array.map.other_method { ... }
&lt;/pre&gt;

	&lt;p&gt;with the exception of &lt;code&gt;map.with_index&lt;/code&gt;. The &lt;code&gt;map&lt;/code&gt; call is essentially a pass-through
filter here. (This was not true in early versions of 1.9, where you could attach
knowledge of a block to a chained enumerator, but that behavior was removed.)&lt;/p&gt;


	&lt;p&gt;Incidentally, you win the prize (which is endless glory :-) if you can account
for the difference between these two snippets:&lt;/p&gt;


&lt;pre&gt;
  &amp;gt;&amp;gt; {1 =&amp;gt; 2}.select {|x,y| x }
  =&amp;gt; {1=&amp;gt;2}
  &amp;gt;&amp;gt; {1 =&amp;gt; 2}.select.select {|x,y| x }
  =&amp;gt; [[1, 2]]
&lt;/pre&gt;

	&lt;p&gt;It&#8217;s all about enumerators&#8230;.&lt;/p&gt;


	&lt;p&gt;If you&#8217;re careful about these changes, and keep an eye out for others, you should be able to
continue to have fun with Ruby in version 1.9 and beyond!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2008-12-29:337</id>
    <published>2008-12-29T15:13:00Z</published>
    <updated>2008-12-29T15:14:38Z</updated>
    <category term="Coolth and Weirdth"/>
    <category term="Events"/>
    <category term="Friends"/>
    <category term="Ruby"/>
    <link href="http://dablog.rubypal.com/2008/12/29/cool-wishlist-management-at-wishsight" rel="alternate" type="text/html"/>
    <title>Cool wishlist management at WishSight!</title>
<content type="html">
            &lt;p&gt;Announcing the opening of &lt;a href=&quot;http://www.wishsight.com&quot;&gt;WishSight&lt;/a&gt;!&lt;/p&gt;


	&lt;p&gt;WishSight is for managing wishlists and gift-giving. It lets you see who&#8217;s given (or promised) what to whom, and it lets gift-givers for particular people communicate with each other, via a comment-board, so that they don&#8217;t duplicate gifts.&lt;/p&gt;


	&lt;p&gt;It&#8217;s based on a Christmas-list application I wrote in 2005 that my family and friends have been using every year since then. It&#8217;s completely merchant-unaffiliated. You can post links for the gifts you want,
and they can be links to any merchant.&lt;/p&gt;


	&lt;p&gt;WishSight helps you cut down on gift duplication, and increases the chances that people will get things they actually want, without the gift-givers having to do a round-robin of email or phone calls to pin down who&#8217;s buying what. And chances are they don&#8217;t all know each other anyway&amp;mdash;which doesn&#8217;t matter on WishSight, because you all communicate by leaving comments directly on your mutual friend&#8217;s wishlist.&lt;/p&gt;


	&lt;p&gt;All you have to do is:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;sign up&lt;/li&gt;
		&lt;li&gt;list the email addresses of people who you want to be able to see your wishlist&lt;/li&gt;
		&lt;li&gt;get those people to sign up and &#8220;whitelist&#8221; your email address&lt;/li&gt;
		&lt;li&gt;list your wishes&lt;/li&gt;
		&lt;li&gt;stake &#8220;claims&#8221; on other people&#8217;s wishes&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;There&#8217;s no stealth: the email addresses are only used internally to determine who&#8217;s allowed to
see whose wishlist. Also, you can list email addresses even if the people haven&#8217;t signed up yet.
Once they do sign up, they will automatically have permission to see your wishlist and claim
your wishes. No two-sided &#8220;handshakes&#8221; required; you just whitelist people.&lt;/p&gt;


	&lt;p&gt;Have fun, and let me know if any questions or problems!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2008-12-21:320</id>
    <published>2008-12-21T15:59:00Z</published>
    <updated>2008-12-21T16:23:03Z</updated>
    <category term="Coolth and Weirdth"/>
    <category term="Friends"/>
    <link href="http://dablog.rubypal.com/2008/12/21/on-the-menu-this-season-muslims-and-gays" rel="alternate" type="text/html"/>
    <title>On the menu this season: Muslims and gays</title>
<content type="html">
            &lt;p&gt;Don&#8217;t get me wrong. I&#8217;m not saying that other forms of hate and prejudice are
extinct, or even on the wane. But it feels like the stars anti-Muslim sentiment
and homophobia are in the ascendancy.&lt;/p&gt;


	&lt;p&gt;It&#8217;s very much about statements that don&#8217;t sound aggressive or hateful, on the
surface, but that would never be made if hate didn&#8217;t lurk just below. I&#8217;m thinking,
for example, of a report I heard on the radio of some attack or other, involving
&#8220;three Muslims of middle-eastern descent.&#8221; I might have the phrasing of the &#8220;middle-eastern
descent&#8221; part wrong (though it was that or close to it). In any case, the salient bit, for
me, was &#8220;three Muslims.&#8221;&lt;/p&gt;


	&lt;p&gt;When was the last time you heard a crime described as having been committed by &#8220;three
Christians&#8221;? How about &#8220;A Jew broke into a convenience store&#8230;&#8221;? So what&#8217;s up with &#8220;three
Muslims&#8221;?&lt;/p&gt;


	&lt;p&gt;What&#8217;s up, of course, is hate. I don&#8217;t think the radio announcer or the newswriter hates Muslims.
But they do operate under a compulsion to mention explicitly that Muslims are Muslims, and
ultimately that&#8217;s so that the listenership can be put on alert to hate them. Does the
phrase &#8220;three Muslims&#8221; have explanatory power? Did these people do whatever they did
&lt;i&gt;because&lt;/i&gt; they are Muslims? No. There&#8217;s no reason to mention their religion except
out of habit of mentioning the fact that Muslims are Muslims.&lt;/p&gt;


	&lt;p&gt;Back when I was a university professor (1992-2005; in this case somewhere around 2003, I think),
the school newspaper had a kind of &#8220;person-in-the-street&#8221; feature, where they&#8217;d ask a few
people around campus a question and print selected answers. One week, the question was something
about Iraq. One of the people quoted in the feature said something along the lines of, &#8220;Bomb them
all off the face of the earth.&#8221; Or &#8220;Blow them all up&#8221;&amp;mdash;words to that effect.&lt;/p&gt;


	&lt;p&gt;My response was to call the editor-in-chief of the newspaper into my office and have a little
chat with him. I was under no institutional imperative to do so&amp;mdash;I was not involved with the paper directly&amp;mdash;but
it seemed to me that I had an opportunity to teach him perhaps the most important lesson of his
college career. &#8220;If the question of the week had been about how to improve the cafeteria food,&#8221; I asked
him, &#8220;and someone had said, &#8216;Line the whole cafeteria staff against the wall and shoot them dead,&#8217; would
you have printed it?&#8221;&lt;/p&gt;


	&lt;p&gt;Of course he would not have, and said that he would not have. &#8220;The fact that what we would not
say about the cafeteria workers, we &lt;i&gt;would&lt;/i&gt; say about the entire population of
a Muslim country,&#8221; I explained, &#8220;is the
dehumanization process at work.&#8221; I do believe he understood and took my point on board.&lt;/p&gt;


	&lt;p&gt;So we mention that people are Muslims, and we lower the bar when it comes to suggesting (or, if you
like, joking about) their violent deaths. And it&#8217;s all very dangerous and should be sending up
serious alarms.&lt;/p&gt;


	&lt;p&gt;Labeling the gay as gay is an even more popular pastime. The world has settled for a breathtakingly
stunted view of what homosexuality entails, and how it manifests itself. It manifests itself, by the
way, as itself, not as an obsession with the song &#8220;YMCA&#8221; or an expertise in designer footware. Hey, more power
to you if you have that expertise. But the set of all men who do intersects in a miniscule subset with the set
of all men whose primary sexual orientation is toward men. Ditto for all the stereotypes.&lt;/p&gt;


	&lt;p&gt;Of course, the world can&#8217;t
deal with the idea that homosexuality manifests itself only as itself, because if that&#8217;s true, it means
you can&#8217;t tell who&#8217;s gay; and that,
like being unable to tell who&#8217;s Jewish, is unacceptable. The workaround is to &lt;i&gt;pretend&lt;/i&gt; that
you can tell who&#8217;s gay, resorting to babytalk about your &#8220;gaydar&#8221; when the stereotypes, as they must,
fail you.&lt;/p&gt;


	&lt;p&gt;And then, following a fairly tight train of thought, there&#8217;s hatred of gays.&lt;/p&gt;


	&lt;p&gt;First of all, let me explain that I include, as hatred, the &#8220;love the sinner, hate the sin&#8221; horseshit
espoused by the Catholic church. It is, to be sure, a kinder, gentler hatred than the burning-at-the-stake kind. The
idea is that you&#8217;re enlightened enough to acknowledge that some people just are gay. But you also understand that,
as gays, they must never indulge in the kinds of sexual activities they feel interested in. So you, as the
compassionate believer, offer to contribute to their happiness by giving them support and encouragement
as they fight to maintain their chastity.&lt;/p&gt;


	&lt;p&gt;How noble.&lt;/p&gt;


	&lt;p&gt;The church, of course, has two thousand years of experience disguising hate as love. But this one is
particularly devious and malign. Let&#8217;s cut to the chase: the only reason that one adult human being
would try to stop another adult human being, on a lifelong basis, from attaining romantic and/or
erotic satisfaction is that he or she (human one) &lt;i&gt;hates&lt;/i&gt; him or her (human two). No amount
of theological stroking can change that. It&#8217;s hate.&lt;/p&gt;


	&lt;p&gt;Not news, of course, that the Pope and friends hate gays. But interesting to see how slimy and
prurient they can get, in the process. Anyway, let&#8217;s move on.&lt;/p&gt;


	&lt;p&gt;Actually we can borrow a concept from the church: &#8220;invincible ignorance.&#8221; When I read the stuff about
homosexuality being a choice (note that it&#8217;s not that sexual preference is a choice, just homosexuality&amp;mdash;which
makes it kind of weird to describe it as a choice), my reaction is that if you put twenty articulate, knowledgeable
people in a room for twenty years with the person who&#8217;s taking the &#8220;choice&#8221; position, that person would emerge
still saying that homosexuality is a choice. There&#8217;s no point of entry for explanation, and no point of contact with
reality.&lt;/p&gt;


	&lt;p&gt;It&#8217;s pathetic, but I still count it as hate. At least it leads to hate. Or from hate, perhaps. Or maybe these people are
actually choosing to be vicious, and could stop themselves if they really wanted to. It&#8217;s hard to know. They&#8217;re
not saying.&lt;/p&gt;


	&lt;p&gt;With gay marriage on the news radar these days, more and more of this kind of discourse is showing up: the choice
thing, but also the &#8220;gays recruit people&#8221; thing (which is actually backwards; have these people ever watched television commercials?)
and, most disturbingly of all, the &#8220;gays prey on children&#8221; thing. And each of these things embodies two problems:
first, that people believe it; and second, that it&#8217;s acceptable to say it publicly.&lt;/p&gt;


	&lt;p&gt;Which hateful statements are acceptable and which aren&#8217;t is a kind of lump under the carpet that moves around
but never goes away. Unfortunately, the underlying hate never goes away either&amp;mdash;and ultimately, no matter
which targeted people or groups we&#8217;re talking about, it&#8217;s the underlying hate that matters. But who gets to say
what, and when, and with what consequences (or lack thereof) is, in itself, something that I think it&#8217;s worth
keeping fairly close tabs on.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2008-11-30:282</id>
    <published>2008-11-30T13:05:00Z</published>
    <updated>2008-11-30T13:26:09Z</updated>
    <category term="Computers"/>
    <category term="Ruby"/>
    <link href="http://dablog.rubypal.com/2008/11/30/probative-programming-the-physical-unification-of-code-and-tests" rel="alternate" type="text/html"/>
    <title>Probative Programming: the physical unification of code and tests</title>
<content type="html">
            &lt;p&gt;I&#8217;m encouraged by a couple of recent conversations to go public with this
possible wacky idea. It has to do with code and testing.&lt;/p&gt;


	&lt;p&gt;I&#8217;ll start with the idea, and then say something about why I&#8217;m thinking along
these lines.&lt;/p&gt;


	&lt;p&gt;The idea is for a programming system designed in such a way that the code and
its tests are physically together, in one file. Furthermore, that file is not
executable. You have to run it through a dedicated filter utility to generate
the actual code file(s) from it.&lt;/p&gt;


	&lt;p&gt;So it&#8217;s a bit like, and indeed inspired by, Knuth&#8217;s Literate Programming,
where the code and its documentation are fused together in a single file which
contains both but is, itself, neither. You can&#8217;t execute that file; you have
to generate the real code files from it.&lt;/p&gt;


	&lt;p&gt;Adapting the master-file idea to testing, as I envision it, would also entail
the following constraint: that the system &lt;em&gt;would refuse to generate the code
files&lt;/em&gt; unless the code involved already had tests, and those tests passed.
In other words, the whole system would militate against using untested code in
production, by physically obstructing the creation of executable code files for
untested stretches of code.&lt;/p&gt;


	&lt;p&gt;It seems to me that this would make for a much more sensible and efficient flow
of energy than what we&#8217;ve got now. What we&#8217;ve got now are separate files, and
therefore the &lt;em&gt;possibility&lt;/em&gt; of running untested code. As long as that
possibility exists, people will run untested code. Reordering things so
that the creation of the executable code comes &lt;em&gt;after&lt;/em&gt; the successful
test run would, potentially, realign the energy of the whole process in a very
productive way.&lt;/p&gt;


	&lt;p&gt;As things stand now, the energy is flowing in a wrong and wasteful way. The
evidence for this is sociological, at least as much as it is technical.
Thorough testing involves keeping the code and the tests in contact with each
other through willpower and force, like holding like ends of two magnets
together. Therefore, people who test consistently end up with bragging rights,
which they often exercise. I hasten to add that I&#8217;m not talking about the
really accomplished, masterful engineers of the great testing frameworks we&#8217;ve
got available to us. Those people are above bragging. But there&#8217;s a
sub-population that isn&#8217;t.&lt;/p&gt;


	&lt;p&gt;I&#8217;m really tired of seeing the test police needling people about not having
written tests. It&#8217;s not that people shouldn&#8217;t write tests. Like I said, it&#8217;s
about the energy flowing the wrong way. The whole culture of test machismo is,
start to finish, a waste of energy and, above all, doesn&#8217;t work. You can&#8217;t get
the whole world to write tests by trying to shame people into it, one person at
a time. As long as the technical conditions allow for untested code, untested
code there will be.&lt;/p&gt;


	&lt;p&gt;So we&#8217;ve got untested code, alongside a culture of testier-than-thou
assertiveness.  Neither is good.&lt;/p&gt;


	&lt;p&gt;And then there&#8217;s the programming should be fun thing. Programming should be fun.
Testing should be a big part of programming. Therefore, testing should be fun.
However, it&#8217;s acquired a sort of &#8220;do it because it&#8217;s good for you&#8221; aura, like
using a treadmill or eating your vegetables. Again, this take on testing is
wasteful and irrelevant&amp;mdash;but it arises directly from the physical
possibility of running untested code, and will not go away as long as that
possibility exists.&lt;/p&gt;


	&lt;p&gt;I&#8217;ve made some very sketchy, preliminary attempts to see what a Probative
Programming file might look like, for a Ruby program. It&#8217;s a daunting task, and
one I may or may not ever succeed at. But I&#8217;m convinced that something along
these lines is both possible and desirable.&lt;/p&gt;


	&lt;p&gt;Finally, if there are existing systems that do what I&#8217;m describing, or anything substantially similar
to it, I&#8217;d be interested in hearing about them.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2008-11-24:277</id>
    <published>2008-11-24T12:18:00Z</published>
    <updated>2008-11-24T12:19:26Z</updated>
    <category term="Computers"/>
    <category term="Ruby"/>
    <link href="http://dablog.rubypal.com/2008/11/24/restful-rails-for-the-restless" rel="alternate" type="text/html"/>
    <title>RESTful Rails for the restless</title>
<content type="html">
            &lt;h2&gt;QuickStarts-R-Us&lt;/h2&gt;

	&lt;p&gt;As one of the most active Rails trainers on the circuit, I come up a
lot against the challenge of introducing RESTful Rails to relative
newcomers. It&#8217;s a challenge because the &lt;span class=&quot;caps&quot;&gt;REST&lt;/span&gt; support in Rails is very
high-level and, even for the diligent, basically impossible to
understand deeply without a knowledge of the subsystems&amp;mdash;in particular,
the routing system&amp;mdash;on which it is built.&lt;/p&gt;


	&lt;p&gt;I believe it&#8217;s possible, nonetheless, to understand up front how the RESTful support in
Rails fits into the subsystems that support it; and I believe that it&#8217;s beneficial to
gain such an understanding. My purpose is thus to provide a &#8220;QuickStart&#8221; 
introduction, not to the practice of writing RESTful Rails applications but
to the way the &lt;span class=&quot;caps&quot;&gt;REST&lt;/span&gt; support in Rails fits into what&#8217;s around and beneath it. If you
want to do RESTful Rails but either find it too magical or don&#8217;t quite understand
how it relates to the framework overall (does it add? supersede? enhance?), then this
article may be of interest to you.&lt;/p&gt;


	&lt;p&gt;You may wonder why I&#8217;m not making use of the Rails scaffolding. That
is, as they say, &#8220;a whole nother&#8221; story. Short answer: the scaffolding
gives you a quick start, but also a quick end. It explains nothing and
leaves you with a lot of work to do to reverse the ill effects of
having a lot of &#8220;one-size-fits-none&#8221; code lying around your
application directory.&lt;/p&gt;


	&lt;p&gt;So no scaffolding. Also, no &lt;span class=&quot;caps&quot;&gt;REST&lt;/span&gt; theory&amp;mdash;but by all means have a look
at the theory once you get into the practice. It&#8217;s just not my focus here.&lt;/p&gt;


	&lt;p&gt;In what follows, I&#8217;ve tried to be concise&amp;mdash;minimalist, 
almost. I&#8217;d advise not skimming over anything, even if you
think you already know it. I&#8217;m chosing the path carefully. If you
don&#8217;t trust me as a guide, that&#8217;s another matter entirely :-) If you
do, welcome.&lt;/p&gt;


&lt;h2&gt;What a (non-RESTful) Rails application does&lt;/h2&gt;

	&lt;p&gt;The job of a Rails application is to provide responses to requests.
Responses are generated by controller actions, which are (in Ruby
terms) instance methods of controller classes.&lt;/p&gt;


	&lt;p&gt;When your application receives a request, the first order of business
is to figure out which action to execute. The subsystem that does this
is the routing system.  It&#8217;s the routing system&#8217;s job, for every
request, to determine two things: &lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;1. controller
2. action&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;If it cannot determine those two things, it has failed, and you get a
routing error. If it can, the routing has succeeded. End of story.
(You might get a &#8220;No such action&#8221; error, but that&#8217;s not the routing
system&#8217;s problem. The routing system has done its job if it comes up
with an action, whether the action exists or not.)&lt;/p&gt;


	&lt;p&gt;The main information that the routing system uses to determine which
controller and action you want for a given request is the request &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;.
By definition, every &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; that&#8217;s meaningful to your application can be
resolved to a controller/action pair. If the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; contains information
beyond that which is needed to determine a controller and action, that
information gets stored in the &lt;tt&gt;params&lt;/tt&gt; hash, to which the controller
action has access. (That&#8217;s how you get &lt;tt&gt;params[:id]&lt;/tt&gt;, for example.)&lt;/p&gt;


	&lt;p&gt;The routing system uses a rule-based approach to resolving URLs into
controller/action pairs. The rules are stored in routes.rb. A rule might say,
for example (paraphrased here in English),
&#8220;A &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; with (1) a string, (2) a slash, (3) a string, (4) a slash, and (5) an
integer means: execute action (3) of controller (1) with &lt;tt&gt;params[:id]&lt;/tt&gt;
set to (5)&#8221; (and indeed the default routing rule says exactly that).
Rules can be specific, to the point of silliness.  It&#8217;s perfectly
possible to program the routing system so that &#8220;/blah&#8221; means:
&#8220;the show action of the students controller with &lt;tt&gt;params[:id]&lt;/tt&gt; set to
1010.&#8221; There&#8217;s almost certainly no point in such a mapping, but the
point is that you can program the routing system in a fine-grained
way.&lt;/p&gt;


	&lt;p&gt;In the non-RESTful case, the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; is all that the routing system needs
to do its job of performing a rule-based determination of a controller
and an action.&lt;/p&gt;


	&lt;p&gt;In the RESTful case, it isn&#8217;t.&lt;/p&gt;


&lt;h2&gt;Enter the verbs&lt;/h2&gt;

	&lt;p&gt;This is the crux of RESTful routing in Rails. Everything else flows
directly from this, so make sure you understand it.&lt;/p&gt;


	&lt;p&gt;Instead of routing based solely on rule-driven mapping of each &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; to
a controller/action pair, RESTful Rails adds another decision gate to
the chain: the &lt;span class=&quot;caps&quot;&gt;HTTP&lt;/span&gt; request method of the incoming request. That
method will be one of &lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt;, POST, &lt;span class=&quot;caps&quot;&gt;PUT&lt;/span&gt;, or &lt;span class=&quot;caps&quot;&gt;DELETE&lt;/span&gt;. It&#8217;s the combined
information&amp;mdash;URL plus request method&amp;mdash;that the RESTful routing uses to
determine the controller and the action.&lt;/p&gt;


	&lt;p&gt;That means that for every incoming request, the correct
controller/action pair is determined not per &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;, but per &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; per
request method. That, in turn, means that a given &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;, such as this:&lt;/p&gt;


&lt;pre&gt;
  http://blah.blah/houses/14
&lt;/pre&gt;

	&lt;p&gt;might map to two or more different controller/action pairs. It all
depends on the &lt;span class=&quot;caps&quot;&gt;HTTP&lt;/span&gt; request method.&lt;/p&gt;


	&lt;p&gt;In theory, any one &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; can be routed to as many as four
controller/action pairs, because any one &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; can be used in a &lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt;,
&lt;span class=&quot;caps&quot;&gt;PUT&lt;/span&gt;, POST, or &lt;span class=&quot;caps&quot;&gt;DELETE&lt;/span&gt; request. In practice there aren&#8217;t that many
permutations, because some combinations of request method and &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;
semantics are not meaningful. But the principle is what matters: a
single &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; no longer has an unambiguous meaning, but must be
interpreted in conjunction with the request method.&lt;/p&gt;


	&lt;p&gt;Furthermore, these conjoined interpretations are hard-coded to a
pre-determined set of seven actions: &lt;tt&gt;index&lt;/tt&gt;, &lt;tt&gt;show&lt;/tt&gt;,
&lt;tt&gt;delete&lt;/tt&gt;, &lt;tt&gt;edit&lt;/tt&gt;,
&lt;tt&gt;update&lt;/tt&gt;, &lt;tt&gt;new&lt;/tt&gt;, and &lt;tt&gt;create&lt;/tt&gt;. (You can add 
custom ones, but those are the
canonical ones.) For example, the &#8220;houses&#8221; &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; above, if requested
as a &lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt;, automatically routes to the &lt;tt&gt;show&lt;/tt&gt; action of the houses
controller, with &lt;tt&gt;params[:id]&lt;/tt&gt; set to 14. If submitted with a &lt;span class=&quot;caps&quot;&gt;PUT&lt;/span&gt;, it
goes to the &lt;tt&gt;update&lt;/tt&gt; action. &lt;span class=&quot;caps&quot;&gt;A URL&lt;/span&gt; with no id field (/houses) goes
either to &lt;tt&gt;index&lt;/tt&gt; or to &lt;tt&gt;create&lt;/tt&gt;, depending on the request method. And so
forth.&lt;/p&gt;


	&lt;p&gt;That, as I say, is the crux of the matter: routing based on &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; plus
request method. Keep this in mind as you get into the details and
bells and whistles of RESTful Rails.&lt;/p&gt;


	&lt;p&gt;Interpreting requests, though, is only half of the job of the routing
system. The other half is the generation of strings.&lt;/p&gt;


&lt;h2&gt;RESTful &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; generation&lt;/h2&gt;

	&lt;p&gt;When you write this in your view:&lt;/p&gt;


&lt;pre&gt;
  &amp;lt;%= link_to &quot;Click here for help&quot;, :controller =&amp;gt; &quot;users&quot;, :action =&amp;gt; &quot;help&quot; %&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;your view ends up containing this:&lt;/p&gt;


&lt;pre&gt;
  &amp;lt;a href=&quot;/users/help&quot;&amp;gt;Click here for help&amp;lt;/a&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;It&#8217;s the routing system that does the job of processing the &lt;tt&gt;link_to&lt;/tt&gt;
arguments and figuring out what the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; (or, in this case, the
relative path) in your tag should consist of.&lt;/p&gt;


	&lt;p&gt;The same thing happens with RESTful routing, except that you never
have to spell out the controller and action. Instead, you call yet
more helper methods. Compare this:&lt;/p&gt;


&lt;pre&gt;
  &amp;lt;%= link_to &quot;User profile for #{user.name}&quot;,
               :controller =&amp;gt; &quot;users&quot;, 
               :action =&amp;gt; &quot;show&quot;,
               :id =&amp;gt; user.id %&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;with this:&lt;/p&gt;


&lt;pre&gt;
  &amp;lt;%= link_to &quot;User profile for #{user.name}&quot;, user_path(user) %&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;You don&#8217;t have to define the method &lt;tt&gt;user_path&lt;/tt&gt;. It comes into being
automatically, when you write:&lt;/p&gt;


&lt;pre&gt;
  map.resources :users
&lt;/pre&gt;

	&lt;p&gt;in routes.rb. And it has a simple job: return the right string, in
this case the string &#8221;/users/14&#8221; (assuming that user.id is 14).&lt;/p&gt;


	&lt;p&gt;For every resource you route, you get a fistful of such methods:
&lt;tt&gt;user_path(user)&lt;/tt&gt;, &lt;tt&gt;users_path&lt;/tt&gt;, 
&lt;tt&gt;new_user_path&lt;/tt&gt;, and &lt;tt&gt;edit_user_path&lt;/tt&gt; (plus
all of these with &lt;tt&gt;_url&lt;/tt&gt; instead of &lt;tt&gt;_path&lt;/tt&gt;). These methods do nothing but
generate strings. They have no knowledge of request methods or &lt;span class=&quot;caps&quot;&gt;REST&lt;/span&gt;. 
In fact, they&#8217;re just examples of named routes&amp;mdash;methods that generate
the right strings for specific routing rules&amp;mdash;and you can use named
routes in routes.rb even without &lt;span class=&quot;caps&quot;&gt;REST&lt;/span&gt;. The only &lt;span class=&quot;caps&quot;&gt;REST&lt;/span&gt;-related special
treatment is that &lt;tt&gt;map.resources&lt;/tt&gt; automatically writes a bunch of these
methods for you. You can think of &lt;tt&gt;map.resources&lt;/tt&gt; as, primarily, a macro
that writes named route methods, much as &lt;tt&gt;attr_accessor&lt;/tt&gt; automatically
writes getter and setter methods.&lt;/p&gt;


	&lt;p&gt;The specifics of what the various RESTful named route methods do is
for future study. The point here is to see the roadmap. You do
&lt;tt&gt;map.resources :users&lt;/tt&gt;, and from that point on, you can use methods in
your views to create &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; strings, rather than having to spoonfeed the
information about which controller, action, and id are involved.&lt;/p&gt;


	&lt;p&gt;But that still leaves the question of the request method. How does
&#8221;/users/14&#8221; know which action to trigger when clicked?&lt;/p&gt;


&lt;h2&gt;Specifying request methods&lt;/h2&gt;

	&lt;p&gt;When you write view code that generates path strings (with &lt;tt&gt;link_to&lt;/tt&gt;,
&lt;tt&gt;form_for&lt;/tt&gt;, &lt;tt&gt;link_to_remote&lt;/tt&gt;, etc.), you want the right string, obviously,
but you also need the link, when clicked, to use a particular &lt;span class=&quot;caps&quot;&gt;HTTP&lt;/span&gt;
request method for the request. Otherwise the RESTful routing system
won&#8217;t have enough information to make sense of the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;The helper methods that generate hyperlinks all have sensible &lt;span class=&quot;caps&quot;&gt;HTTP&lt;/span&gt;
request method defaults (which you can override if needed). &lt;tt&gt;link_to&lt;/tt&gt;
generates a link that will submit a &lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt; request. &lt;tt&gt;form_for&lt;/tt&gt; generates a
&lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; form tag (method=&#8220;post&#8221;), unless you tell it to use &lt;span class=&quot;caps&quot;&gt;PUT&lt;/span&gt; (which is
conventional for update operations, as opposed to new record creation
operations), and so forth.&lt;/p&gt;


	&lt;p&gt;Again, the named route methods don&#8217;t have request method intelligence.
The enclosing hyperlink-writing methods (&lt;tt&gt;link_to&lt;/tt&gt; and friends) do. They
just used the named route methods as lower-level helpers for the
specific purpose of generating the right strings.&lt;/p&gt;


&lt;h2&gt;Invisible ink&lt;/h2&gt;

	&lt;p&gt;One of the challenges of using RESTful routing in Rails is that you
end up with not very much information available to you visually. When
you write a RESTful form in your view, let&#8217;s say for an update:&lt;/p&gt;


&lt;pre&gt;
  &amp;lt;% form_for :house, :url =&amp;gt; house_path(@house.id),
                     :html =&amp;gt; { :method =&amp;gt; :put } do |f| %&amp;gt;
  &amp;lt;% end %&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;you never see the word &#8220;update&#8221; in routes.rb, nor in the &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;, nor in
the view templates, nor in the &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; source of your rendered views.
You just have to know that a &lt;tt&gt;thing_path&lt;/tt&gt;-style named route, coupled
with a request method override to &lt;span class=&quot;caps&quot;&gt;PUT&lt;/span&gt; (override of the default &lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt;
for &lt;tt&gt;form_for&lt;/tt&gt;, that is), will result in a form that, when submitted,
will send a &lt;span class=&quot;caps&quot;&gt;PUT&lt;/span&gt; request to the &lt;tt&gt;update&lt;/tt&gt; action of the houses controller.
And you have to trust that the routing system will succeed in so
routing it.&lt;/p&gt;


	&lt;p&gt;RESTful routing pushes most of the routing intelligence&amp;mdash;which, as you
now know, means the determination of a controller/action pair from an
incoming request&amp;mdash;under the surface. You have to learn how the
&lt;span class=&quot;caps&quot;&gt;REST&lt;/span&gt;-ified routing system thinks. The early phases of learning RESTful
routing tend to involve memorizing the combinations of named routes
and request methods, and which action they point to. The good news is
that there&#8217;s a finite number of them, and they make sense. If it seems
like routing soup, hang in there and look closely at the logic. It
will come clear.&lt;/p&gt;


&lt;h2&gt;The rest&#8230;&lt;/h2&gt;

	&lt;p&gt;That&#8217;s the basics. There&#8217;s a lot more to it, including (but not
limited to) more &#8220;magic&#8221; shortcuts. But if you get the basic ideas
you&#8217;ll be in good shape. &lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;The basic routing system resolves a &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; to a controller/action pair.&lt;/li&gt;
		&lt;li&gt;RESTful routing resolves a &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;/request-method combination to a
  controller/action pair. &lt;/li&gt;
		&lt;li&gt;&lt;tt&gt;map.resources :things&lt;/tt&gt; generates a bunch of named routes
  (&lt;tt&gt;things_path&lt;/tt&gt;, etc.) for you automatically.&lt;/li&gt;
		&lt;li&gt;You don&#8217;t see as much visual evidence of the routing logic with
  RESTful routing as with non-RESTful routing, so you have to
  learn exactly what it&#8217;s thinking, especially the seven hard-coded
  action names.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Now go forth and &lt;span class=&quot;caps&quot;&gt;REST&lt;/span&gt;. Oh, one more thing. Here&#8217;s a chart I once made, showing how the
named routes map through the request methods to the seven canonical actions. The chart uses
the &lt;tt&gt;_url&lt;/tt&gt; methods (which give you the whole thing, including http://), but the
&lt;tt&gt;_path&lt;/tt&gt; versions would exist too.&lt;/p&gt;


	&lt;p&gt;&lt;img src=&quot;http://www.wobblini.net/images/routes.png&quot; alt=&quot;RESTful routing chart&quot; /&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2008-10-03:233</id>
    <published>2008-10-03T21:14:00Z</published>
    <updated>2008-10-03T21:15:36Z</updated>
    <category term="Coolth and Weirdth"/>
    <category term="Events"/>
    <link href="http://dablog.rubypal.com/2008/10/3/why-i-am-suspicious-of-the-bailout-bill" rel="alternate" type="text/html"/>
    <title>Why I am suspicious of the bailout bill</title>
<content type="html">
            &lt;p&gt;The bailout bill has just passed. I know very little about economics, little enough that I don&#8217;t feel entitled to a strong opinion one way or the other on whether the bill should have passed. But I am suspicious of it.&lt;/p&gt;


	&lt;p&gt;I&#8217;m suspicious of it, for one thing, because of the fear-mongering that has surrounded it; it&#8217;s very reminiscent of the ongoing &#8220;Terrorists will come and kill your family if the executive branch doesn&#8217;t get a blank check for waging undeclared war&#8221; campaign, and things in that vein.&lt;/p&gt;


	&lt;p&gt;But I&#8217;m even more suspicious of the bill because of all the rhetoric about how it will help &#8220;Main Street&#8221; as well as &#8220;Wall Street&#8221;. I don&#8217;t know whether it will or not, but what troubles me is the fact that this kind of rhetoric makes it sound like Congress and the Bush administration are desperate to help Main Street. The fact is that, in general, they&#8217;re not.&lt;/p&gt;


	&lt;p&gt;Every microsecond of every day in the history of this country there have been uncountable opportunities for the government to help citizens with financial problems, difficulty paying for a home, lack of job opportunities, inability to get credit, and all the rest of it. The thrust of the behavior of the government for most of the history of the country has been not to bother helping such people to any significant degree.&lt;/p&gt;


	&lt;p&gt;Now, all of a sudden, helping Main Street leaps to the front of the congressional and executive agenda. I&#8217;m disinclined to buy it. If the common weal were really a government priority, we would have known by now. I find it immensely suspicious that the greatest outpouring of social concern, at least as measured in money, comes tethered to a Wall Street bailout.&lt;/p&gt;


	&lt;p&gt;If Main Street is going to benefit from the delivery of a de facto blank check to Wall Street, surely it would not benefit any &lt;i&gt;less&lt;/i&gt; from having money delivered to it directly. But you don&#8217;t hear any talk of, say, the government purchasing houses for the victims of fiscal mismanagement. I suppose it would have taken too long to draft a bill that did that; and as we know, the earth would have left its axis if the bill had not been passed this week&#8230;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://dablog.rubypal.com/">
    <author>
      <name>dblack</name>
    </author>
    <id>tag:dablog.rubypal.com,2008-09-13:219</id>
    <published>2008-09-13T10:00:00Z</published>
    <updated>2008-09-13T10:05:23Z</updated>
    <category term="Computers"/>
    <category term="Events"/>
    <category term="Ruby"/>
    <link href="http://dablog.rubypal.com/2008/9/13/tracks-a-go-go-at-rubyconf-2008" rel="alternate" type="text/html"/>
    <title>Tracks a-go-go at RubyConf 2008!</title>
<content type="html">
            &lt;p&gt;&lt;a href=&quot;http://www.rubycentral.org&quot;&gt;Ruby Central&lt;/a&gt; is gearing up for
&lt;a href=&quot;http://2008.rubyconf.org&quot;&gt;RubyConf 2008&lt;/a&gt;, which has a
fantastic program and which you can still 
&lt;a href=&quot;https://www.regonline.com/rubyconf2008&quot;&gt;register for&lt;/a&gt; (at
time of writing, anyway!).&lt;/p&gt;


	&lt;p&gt;People have noticed, naturally, that we&#8217;ve gone over entirely to a
multi-track format (except for keynotes and a couple of other special
slots). And they&#8217;re surprised; we used to be one-track, and then last
year we were multi-track but with a good dose of plenary sessions.&lt;/p&gt;


	&lt;p&gt;So I thought I&#8217;d say something about the multi-trackedness of RubyConf
2008, for anyone who&#8217;s interested.&lt;/p&gt;


	&lt;p&gt;The bottom line is that we&#8217;ve scheduled multiple tracks because we
got so many really, really good proposals. Of course we can&#8217;t accept
all of them; we can&#8217;t be &lt;em&gt;that&lt;/em&gt; multi-track.  There will always
be a cutoff, and where the cutoff comes always involve a judgment
call. This time around the judgment was that the number of talks we&#8217;d
have to exclude, in order to dilute the multi-trackedness
significantly, was too great.&lt;/p&gt;


	&lt;p&gt;In fact, we started drafting a schedule without explicitly discussing
the multi-track issue; it mostly emerged from what we jotted down, and
then it continued to make sense to us as we started analyzing the
track issue more closely.&lt;/p&gt;


	&lt;p&gt;People have asked whether it&#8217;s about the size of the event. It is, in
a couple of ways&amp;mdash;subtle ways, perhaps, but important.&lt;/p&gt;


	&lt;p&gt;For one thing, we know that not every speaker is comfortable getting
up in front of 500 people. Lots are, but it&#8217;s still a lot to ask.
Breakout sessions make for situations in which more speakers are
likely to be comfortable.&lt;/p&gt;


	&lt;p&gt;Of course, if there are only fifteen speakers, we could easily find
people who don&#8217;t mind a big audience. But what about that &#8220;only
fifteen speakers&#8221; thing?&lt;/p&gt;


	&lt;p&gt;In a conference with 400-500 people present, it&#8217;s definitely more fun
if, say, twelve percent of the people prowling the halls and sitting
next to you at lunch are speakers, instead of two or three percent.
Having fifteen speakers at an event with over 400 people isn&#8217;t the
same, for anyone, as having fifteen speakers at an event with sixty
people. If the ratio is too lop-sided, it gets too much into the &#8220;us
and them&#8221; thing. We&#8217;ve never been into that.&lt;/p&gt;


	&lt;p&gt;Another reason we&#8217;re OK with moving toward a multi-track format is the
proliferation and success of the Ruby regional conferences, many of
which are one-track. Everyone should attend, at some point, a
one-track conference. It&#8217;s really cool the way everyone at such a
conference shares the same experience. My first conference was a
one-track academic film conference in 1985, and it was great. 
And the wonderful flowering of the Ruby regional conference culture
means that, even if it isn&#8217;t at RubyConf, many Rubyists will get a
chance to have that experience.&lt;/p&gt;


	&lt;p&gt;We started our regional conference grant program in 2006 in the hope
that &#8220;regional&#8221; wasn&#8217;t going to mean &#8220;provincial&#8221;&amp;mdash;that regional
conferences could be top-notch events&amp;mdash;and that hope has been
fulfilled beyond what we could possibly have wished for. (And
certainly way beyond what we can take credit for. The regional 
organizers have been amazing!) These high-quality small events can
address many needs and desires, including the desire for the
experience of a one-track format.&lt;/p&gt;


	&lt;p&gt;In sum, the RubyConf format for 2008 is a format for its time, its
year, its configuration of the Ruby world. We&#8217;re nothing but excited
about it and hope you&#8217;ll come and share the fun!&lt;/p&gt;
          </content>  </entry>
</feed>
