<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>has_many :thoughts: Tag Rails</title>
    <link>http://blog.kineticweb.com/articles/tag/rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Musings from a Ruby on Rails development team</description>
    <item>
      <title>layout false if request.xhr?</title>
      <description>&lt;p&gt;Rather simple actually&amp;#8230; since ActionController::Base.layout takes a proc, and calls it upon a request.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;ApplicationController&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActionController&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;self.without_layout_on_xhr&lt;/span&gt;
    &lt;span class="ident"&gt;layout&lt;/span&gt; &lt;span class="ident"&gt;proc&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;controller&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt; &lt;span class="ident"&gt;controller&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;in_popup?&lt;/span&gt; &lt;span class="punct"&gt;?&lt;/span&gt; &lt;span class="constant"&gt;nil&lt;/span&gt; &lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;application&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="punct"&gt;}&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;

  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;in_popup?&lt;/span&gt;
    &lt;span class="ident"&gt;request&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;xhr?&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;

&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;BusyWorkController&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ApplicationController&lt;/span&gt;
  &lt;span class="ident"&gt;without_layout_on_xhr&lt;/span&gt;

  &lt;span class="ident"&gt;before_filter&lt;/span&gt; &lt;span class="symbol"&gt;:login_required&lt;/span&gt;

  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;new&lt;/span&gt;
    &lt;span class="attribute"&gt;@work&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Busy&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;I&amp;#8217;ve abstracted out the conditions for rendering without a template based on the controller instance method #in_popup?. Feel free to change it to whatever you want.&lt;/p&gt;</description>
      <pubDate>Mon, 13 Jul 2009 10:30:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:824f787b-d1a8-4896-aecf-5baee6ffb921</guid>
      <author>Justin Reagor</author>
      <link>http://blog.kineticweb.com/articles/2009/07/13/layout-false-if-request-xhr</link>
      <category>Rails</category>
      <category>ruby</category>
      <category>code</category>
    </item>
    <item>
      <title>Good things come to he who waits</title>
      <description>&lt;p&gt;When the merger of Merb and Rails was announced a few months ago, I don&amp;#8217;t think anyone really expected the goal of having Rails 3 released at RailsConf to be met. Alas, it was not. But David announced today that much of the groundwork to combining the two frameworks has already been done. Most of the work has been behind the scenes refactoring&amp;#8212;the kind of changes that developers will likely never notice. But other features that are in the codebase and coming soon include:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;An all-new router, with an improve &lt;span class="caps"&gt;DSL&lt;/span&gt; that&amp;#8217;s more merbish. It will include routing based on subdomains and user gents, and the ability to mount multiple apps side by side.&lt;/li&gt;
		&lt;li&gt;Since many developers aren&amp;#8217;t consistently using the h() helper method to escape potential script injections, the default behavior will now be to escape everything except when an all-new raw() method is utilized.&lt;/li&gt;
		&lt;li&gt;Much of the code to make Rails JS framework agnostic is complete. New features include using data=remote=&amp;#8221;true&amp;#8221; and data-method=&amp;#8221;delete&amp;#8221; (which validate in &lt;span class="caps"&gt;HTML5&lt;/span&gt;) to allow unobtrusive binding of JS events.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;David equated the new Rails philosophy to Burger King&amp;#8217;s &amp;#8220;Have it Your Way&amp;#8221; concept. If I want a great burger, I can order a Whopper. But, if I have specific tastes, I can order it without pickles. Or with extra ketchup. Rails will allow you to get a great framework out of the box for users that just want it to work. But, for those that are passionate about a particular JS framework or other toolset, they can freely customize their Rails.&lt;/p&gt;


	&lt;p&gt;Toward the end of David&amp;#8217;s keynote, he relayed a couple experiences he&amp;#8217;s had. He reminded us to make sure that, as developers, we don&amp;#8217;t accept the requirements bestowed upon us by stakeholders at face value. We need to constantly offer up alternatives and input. In his experience, many times when you relay to the stakeholder a different, sometimes lest costly, way to do things, their response is often: &amp;#8220;Sure, whatever&amp;#8221;.&lt;/p&gt;


	&lt;p&gt;This approach can save we developers hours of wasted time. That&amp;#8217;s because, when stuck on a tough challenge, as time drags on, our motivation drops. We try to keep up our spirits but, when it looks like the challenge is impossible, we end up burning needless hours. We should quit at the point our mind checks out and reexamine the problem. David gave an example of a tough issue he worked on for two weeks and he explained that only a week and half of it he was really working and after that the rest was just goofing around because he already had given up. He should have gone back to stakeholders right then rather than burning a few more days with zero motivation.&lt;/p&gt;</description>
      <pubDate>Tue, 05 May 2009 14:31:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:f8a4ff69-8de0-4cb9-873f-364d86aa6522</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2009/05/05/good-things-come-to-he-who-waits</link>
      <category>Rails</category>
      <category>RailsConf</category>
      <category>railsconf09</category>
      <category>rails3</category>
    </item>
    <item>
      <title>when timeouts aren't timeouts</title>
      <description>&lt;p&gt;Last Friday, a good chunk of our team spent a while debugging a problem afflicting some sites on one of our shared hosting machines.&lt;/p&gt;


	&lt;p&gt;After a bunch of red herrings, some &lt;span class="caps"&gt;TCP&lt;/span&gt; dumps determined that the sites in question were all hung up on numerous &lt;span class="caps"&gt;DNS&lt;/span&gt; requests. That led us to the call to a web service we use on the sites in question. As it turns out, the IP geocode service being called, &lt;a href="http://www.hostip.info"&gt;HostIP.info&lt;/a&gt;, was completely down. (It&amp;#8217;s free; you get what you pay for.)&lt;/p&gt;


	&lt;p&gt;We assumed this couldn&amp;#8217;t be the case, since those calls are wrapped in a Ruby Timeout calls with a maximum of 2 seconds each (Timeout.timeout(2)). Well, apparently, Ruby Timeout &lt;a href="http://ph7spot.com/articles/system_timer"&gt;just doesn&amp;#8217;t work sometimes&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Big props to Andy for sleuthing that down. And bigger props to &lt;a href="http://ph7spot.com/"&gt;Philippe Hanrigou&lt;/a&gt; for writing that very detailed article where he says, specifically:&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&amp;#8220;In particular, initiating network connections and/or a broken or slow &lt;span class="caps"&gt;DNS&lt;/span&gt; server will typically block the whole Ruby process while the call completes.&amp;#8221;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;Bingo! We&amp;#8217;re going to try Philippe&amp;#8217;s library on these projects and others in the future when we need guaranteed timeouts.&lt;/p&gt;</description>
      <pubDate>Mon, 09 Feb 2009 19:11:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:81728fc6-1d26-4f79-afd6-12a29e0fcb48</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2009/02/09/when-timeouts-arent-timeouts</link>
      <category>ruby</category>
      <category>timeout</category>
      <category>Rails</category>
    </item>
    <item>
      <title>The Rails Language aka The DHH DSL</title>
      <description>&lt;p&gt;Please Note: This is bitching. I&amp;#8217;m a nit picky kinda programmer. I pull things apart, rip out what I hate and go nuts over it so I remember to never do it again. This is a rant, your warned.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m not too happy with a lot of things going into Rails lately, outside of the stuff that they are learning about through &lt;a href="http://merbivore.com"&gt;other frameworks&lt;/a&gt;. Some additions have been made to Rails lately that are bringing it further from Ruby, into its own language.&lt;/p&gt;


	&lt;p&gt;Many people already believe that &amp;#8220;Ruby on Rails&amp;#8221; is a language in and of itself. I guess they believe that the &amp;#8220;Ruby on&amp;#8221; part is just a cool name. Frankly, some commits as of late could possibly be developing that language.&lt;/p&gt;


	&lt;h3&gt;Array#second, #third, etc.&lt;/h3&gt;


	&lt;p&gt;When I first learned scripting languages I learned Python, and I still love Python (despite having no current use for it). Even back to my C/C++ days I enjoyed Array indexing as Array#[] (in ruby terms). Whats so hard about an integer (0..n) being used between them? How else do you easily modify them into Ranges&amp;#8230;. well Rails has &lt;a href="http://github.com/rails/rails/commit/e50530ca3ab5db53ebc74314c54b62b91b932389"&gt;solved all of this&lt;/a&gt; for us!&lt;/p&gt;


	&lt;p&gt;Array#first, plus now Array#second, #third, #fourth. &lt;a href="http://github.com/dhh"&gt;Our playboy&lt;/a&gt; even says he&amp;#8217;s found a way of &amp;#8220;massive savings in overhead&amp;#8221; for something Ruby never had a need for in the &lt;span class="caps"&gt;FIRST&lt;/span&gt; place.&lt;/p&gt;


	&lt;h3&gt;Object#try&lt;/h3&gt;


	&lt;p&gt;Object#try is another one. Again, something Ruby and Matz never put into the language itself. That doesn&amp;#8217;t stop Rails from developing it into its own language.&lt;/p&gt;


	&lt;h3&gt;Object#blank?&lt;/h3&gt;


	&lt;p&gt;Ever try to bring a script over from Rails, and find yourself rewriting #blank?. Sure, I love blank, it saves time right? But where&amp;#8217;s the Ruby in a method that was never originally intended to be monkey patched into the language itself?&lt;/p&gt;


	&lt;h3&gt;My Point&lt;/h3&gt;


	&lt;p&gt;My point is, there are other frameworks that try to keep &lt;a href="http://github.com/rails/rails/tree/e50530ca3ab5db53ebc74314c54b62b91b932389/activesupport/lib/active_support/core_ext"&gt;this sort of thing to a minimum&lt;/a&gt;. The benefits are countless, and I think the best are&amp;#8230;&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;Monkey patching is kept to a minimum. If you don&amp;#8217;t understand the danger in monkey patching, please don&amp;#8217;t ever read a blog entry I write again.&lt;/li&gt;
		&lt;li&gt;Lowered need of detailed attention being required when transferring code to other frameworks and platforms&lt;/li&gt;
		&lt;li&gt;Less lines of code within your code base, required pieces.&lt;/li&gt;
		&lt;li&gt;Universal code that is understandable by anyone using the original language.&lt;/li&gt;
		&lt;li&gt;Learning the appropriate methods the first time around&lt;/li&gt;
		&lt;li&gt;Not having to re-implement if you find yourself without one of these methods&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;Now I&amp;#8217;m not against these sorts of things completely, and there are frameworks that implement them correctly (Merb and DataMapper&amp;#8217;s combined ExtLib library being one of them).&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m just not impressed by the magic tricks anymore, and tired of seeing Rails core become the bastard child of someone&amp;#8217;s personal &amp;#8220;good ideas&amp;#8221;. Just because your doing it in your projects doesn&amp;#8217;t mean it should be forced down my throat.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Dec 2008 18:08:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:ce04563d-71ec-4433-9235-b098e4a35a22</guid>
      <author>Justin Reagor</author>
      <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl</link>
      <category>Rails</category>
      <category>bitching</category>
      <category>dsl</category>
      <category>language</category>
    </item>
    <item>
      <title>RailsConf 2008 - Justin's Schedule</title>
      <description>&lt;p&gt;Below is the schedule I came up with when going over the sessions available this year at RailsConf&amp;#8230; Going to try to make these, if not switch with Colin so we cover the conference well&amp;#8230; very glad to see some advanced classes! Would have loved a &lt;span class="caps"&gt;REAL&lt;/span&gt; advanced Rspec session though.&lt;/p&gt;


	&lt;p&gt;8:30am Thursday, 05/29/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1862"&gt;Meta-programming Ruby for Fun &amp;amp; Profit&lt;/a&gt;
Portland Ballroom 252&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2650"&gt;Neal Ford&lt;/a&gt; (ThoughtWorks), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2751"&gt;Patrick Farley&lt;/a&gt; (ThoughtWorks)
Ruby is the revenge of the Smalltalkers. Not since Smalltalk has a language had such powerful meta-programming facilities. While this may seem like a minor feature, it turns out that surgical meta-programming allows solutions to problems that are clearer, more concise, more maintainable, and take orders of magnitudes fewer lines of code. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1862"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;1:30pm Thursday, 05/29/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1213"&gt;Powering &lt;span class="caps"&gt;AIR&lt;/span&gt; Applications with Rails&lt;/a&gt;
Portland Ballroom 252
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/467"&gt;Tony Hillerson&lt;/a&gt; (EffectiveUI), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2576"&gt;Daniel Wanja&lt;/a&gt; (Nouvelles Solutions, Inc.)
Adobe&amp;#8217;s &lt;span class="caps"&gt;AIR&lt;/span&gt; platform offers developers familiar with web technology the tools to create desktop applications. Come and learn how to drive an &lt;span class="caps"&gt;HTML&lt;/span&gt; and a Flex &lt;span class="caps"&gt;AIR&lt;/span&gt; application with Rails using RubyAMF. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1213"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;10:45am Friday, 05/30/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2495"&gt;Entrepreneurs On Rails&lt;/a&gt;
Portland Ballroom 251&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/4997"&gt;Dan Benjamin&lt;/a&gt; (Rails Machine)
Many of the people working with Rails are independent developers, doing freelance work or running small development shops. This makes sense &amp;#8211; Rails provides a great framework for an indy developer, making it easy to work with with designers and other developers. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2495"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;11:45am Friday, 05/30/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2043"&gt;Hosting and the Woes&lt;/a&gt;
Portland Ballroom 255&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/1583"&gt;Ezra Zygmuntowicz&lt;/a&gt; (EngineYard), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2863"&gt;Jamie van Dyke&lt;/a&gt; (Engine Yard), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2866"&gt;Tom Mornini&lt;/a&gt; (Engine Yard)
What are the day to day issues with Rails hosting. How can they be solved, and what are the best practise methods of avoiding them. Engine Yard have extensive experience with high volume Rails applications and would like to talk about what we&amp;#8217;ve learned and what our customers have learnt. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2043"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;1:50pm Friday, 05/30/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1883"&gt;Faster, Better, &lt;span class="caps"&gt;ORM&lt;/span&gt; with DataMapper&lt;/a&gt;
Portland Ballroom 256&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2686"&gt;Yehuda Katz&lt;/a&gt; (EngineYard)
This session will cover using the DataMapper &lt;span class="caps"&gt;ORM&lt;/span&gt; with Ruby on Rails, and go in-depth into its code. It will focus on integration with Ruby on Rails and provide an advanced-level overview of the codebase and design philosophy. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1883"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;2:50pm Friday, 05/30/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/4342"&gt;Rubinius &amp;#8211; Under the Hood and Behind the Curtain&lt;/a&gt;
&lt;span class="caps"&gt;D135&lt;/span&gt;-136&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/13749"&gt;Evan Phoenix&lt;/a&gt; (Engine Yard), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/22997"&gt;Brian Ford&lt;/a&gt; (Engine Yard), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/13767"&gt;Wilson Bilkovich&lt;/a&gt; (Engine Yard)
Rubinius is a virtual machine built from the ground up to provide a robust, high-performance runtime for Ruby code. The Rubinius team is guiding the development of 20,000+ specifications that define the Ruby language. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/4342"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;4:25pm Friday, 05/30/2008&lt;br&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1963"&gt;The Launch: Dos and Don&amp;#8217;ts of Real Life Deploys&lt;/a&gt;
Portland Ballroom 255&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2518"&gt;Chris Wanstrath&lt;/a&gt; (Err Free)
There&amp;#8217;s more to launching an app than &amp;#8220;cap deploy&amp;#8221;&amp;#8212;the process is as much a psychological challenge as a technical one. So, what does it take to launch an app you can depend on and be proud of? With a handful of production launches under his belt, Chris will talk about the big picture and little details of bringing your site to life. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1963"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;10:45am Saturday, 05/31/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2042"&gt;Assembling Pages Last: Edge Caching, &lt;span class="caps"&gt;ESI&lt;/span&gt; &amp;amp; Rails&lt;/a&gt;
Portland Ballroom 256&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2594"&gt;Aaron Batalion&lt;/a&gt; (Hungry Machine &lt;span class="caps"&gt;LLC&lt;/span&gt;)
When working on scaling Rails to millions of users/day with complex personalization, caching becomes essential. This talk will cover edge caching, edge side includes (ESI) in Rails, and partial page caching higher in the stack. It will also cover &lt;span class="caps"&gt;ESI&lt;/span&gt; as a fabric for assembling heterogeneous applications into a single, cacheable web experience. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2042"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;11:45am Saturday, 05/31/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1755"&gt;Advanced RESTful Rails&lt;/a&gt;
Portland Ballroom 252&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/1467"&gt;Ben Scofield&lt;/a&gt; (Viget Labs)
Designing RESTful systems in Rails carries many benefits. It is not a problem-free approach, however; there are accessibility issues with the standard conventions, and some functions are more difficult to map to resources than others. In this session, we&amp;#8217;ll look at solutions for these (and other) problems that arise when you take &lt;span class="caps"&gt;REST&lt;/span&gt; beyond the standard examples. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1755"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;1:50pm Saturday, 05/31/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2031"&gt;Build Your Own Distributed, Self-Configuring Rails Cluster&lt;/a&gt;
Portland Ballroom 251&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2833"&gt;Dave Fayram&lt;/a&gt; (Powerset, Inc), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2520"&gt;Tom Preston-Werner&lt;/a&gt; (Powerset, Inc.)
Fuzed is a Rails server stack written in Erlang that can replace standard mongrel/reverse proxy architectures. It focuses on reliability and ease of deployment in distributed environments. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2031"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;2:50pm Saturday, 05/31/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1871"&gt;Custom Nginx Modules: Accelerate Rails, &lt;span class="caps"&gt;HTTP&lt;/span&gt; Tricks&lt;/a&gt;
General Portland Ballroom 251&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2451"&gt;Adam Wiggins&lt;/a&gt; (Heroku)
Got a Rails app that needs even more speed? Adam Wiggins of Heroku will show you how to write a custom Nginx module to bring blinding speed to critical code paths (and do &lt;span class="caps"&gt;HTTP&lt;/span&gt; tricks that can&amp;#8217;t be done with Rails and Mongrel alone), using examples from Heroku&amp;#8217;s own authentication module ngx_heroku_gate. Dust off your C compiler and prepare to push the limits of nginx, Rails, and &lt;span class="caps"&gt;HTTP&lt;/span&gt;. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1871"&gt;Read more.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;4:25pm Saturday, 05/31/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1948"&gt;Metaprogramming and Ruby Internals for Rails Programmers&lt;/a&gt;
Portland Ballroom 256&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2751"&gt;Patrick Farley&lt;/a&gt; (ThoughtWorks)
Rails programmers are Ruby programmers. In this session we&amp;#8217;ll cover some useful Ruby metaprogramming techniques as used in real world Rails applications and extensions. Then we&amp;#8217;ll dig deep into &lt;span class="caps"&gt;MRI&lt;/span&gt; and JRuby source to gain a nuanced understanding of the implementation details of Singletons, Mixins and the Ruby Object model. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1948"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;10:45am Sunday, 06/01/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2021"&gt;Scaling Ruby from the Inside Out&lt;/a&gt;
Portland Ballroom 252&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/1583"&gt;Ezra Zygmuntowicz&lt;/a&gt; (EngineYard)
This is a talk about what it takes to &lt;strong&gt;really&lt;/strong&gt; scale Ruby applications. We will not only examine all the aspects of hardware and web server configurations, we will also look at scaling the ruby interpreter itself. Including performance quirks of &lt;span class="caps"&gt;MRI&lt;/span&gt; and how Rubinius is set to fix a lot of these problems. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2021"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;11:45am Sunday, 06/01/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1945"&gt;Everyday DTrace on &lt;span class="caps"&gt;OSX&lt;/span&gt;: A Guide To Using DTrace for Your Full Application Stack&lt;/a&gt;
Portland Ballroom 251&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2752"&gt;Scott Barron&lt;/a&gt; (EdgeCase), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2696"&gt;Chad Humphries&lt;/a&gt; (EdgeCase)
Have you ever wanted to know why a part of your application is slow? How about how long that query takes? Wouldn&amp;#8217;t it be nice if you could get this type of information for ruby, rails, and the database server in one place? You can now with DTrace on &lt;span class="caps"&gt;OSX 10&lt;/span&gt;.5. We&amp;#8217;ll show you how to best use this tool-chain to debug, profile, and gather more information about your application. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1945"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


	&lt;p&gt;1:50pm Sunday, 06/01/2008&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1935"&gt;Building an app in 48 hours &amp;#8211; A Rails Rumble Case Study&lt;/a&gt;
Portland Ballroom 251&lt;br /&gt;
&lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2321"&gt;Josh Owens&lt;/a&gt; (Intridea, Inc/Web 2.0 Show Podcast), &lt;a href="http://en.oreilly.com/rails2008/public/schedule/speaker/2024"&gt;Chris Selmer&lt;/a&gt; (Intridea, Inc.)
So you want to build a Rails app quickly? Competitors in the Rails Rumble had 48 hours to design, develop, and deploy a complete application. We&#226;&#8364;&#8482;ll take you through the development processes of the winning four-man Tasty Planner team, and compare it with those of the one-man Your Pet Records team. We&#226;&#8364;&#8482;ll discuss techniques, short-cuts, helpers, and Rails plugins that helped speed development. &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/1935"&gt;Read more&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 28 May 2008 20:52:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:0ba193b0-24aa-467a-a485-9616d4296435</guid>
      <author>Justin Reagor</author>
      <link>http://blog.kineticweb.com/articles/2008/05/28/railsconf-2008-justins-schedule</link>
      <category>RailsConf</category>
      <category>Rails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Highrise API and tagging</title>
      <description>&lt;p&gt;Like &lt;a href="http://forum.37signals.com/highrise/forums/15/topics/1312"&gt;many&lt;/a&gt;, I was disappointed that the &lt;a href="http://www.highrisehq.com/"&gt;Highrise&lt;/a&gt; &lt;a href="http://developer.37signals.com/highrise/"&gt;&lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt; does not support tagging of people. However, I found a way to easily add the capability to the 37signals-supplied Ruby wrapper class, even if it is unsupported. I added a &lt;code&gt;#tag!&lt;/code&gt; instance method to the Person class and used a call directly to the site, not through the &lt;span class="caps"&gt;API&lt;/span&gt;.&lt;/p&gt;


&lt;pre&gt;
class Person &amp;lt; Subject
  ...
  def tag!(tag_name)
    `curl -s -d 'name=#{tag_name}' #{ENV['HIGHRISE_URL']}parties/#{id}/tags`
  end
end
&lt;/pre&gt;

	&lt;p&gt;The output is a bunch of javascript to update the page to reflect the change, but one can safely ignore this. The tag is added and everything works great. Not sure how well this would work on Windows, as the &lt;code&gt;curl&lt;/code&gt; command-line program is likely unavailable.&lt;/p&gt;


	&lt;p&gt;We use this method in our latest project to add appropriate tags to people as they are created. It helps us segment people added to Highrise for the project from the rest of our contacts in Highrise.&lt;/p&gt;</description>
      <pubDate>Mon, 18 Feb 2008 13:28:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:8162daad-bcb1-4b7f-a3df-e1c8c8a840e0</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2008/02/18/highrise-api-and-tagging</link>
      <category>highrise</category>
      <category>ruby</category>
      <category>Rails</category>
      <category>37signals</category>
    </item>
    <item>
      <title>Capistrano Twitter task</title>
      <description>&lt;p&gt;Justin had an idea that we should post to &lt;a href="http://www.twitter.com"&gt;Twitter&lt;/a&gt; whenever we deploy a new version of our apps to either a staging site or the production app. Turns out, this is really easy with the &lt;a href="http://twitter4r.rubyforge.org/"&gt;twitter4r gem&lt;/a&gt;. I used a twitter account that Justin created expressly for our internal notices and set its updates to be private. Then I created this task:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;desc&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;posts to twitter that something was deployed&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;span class="ident"&gt;task&lt;/span&gt; &lt;span class="symbol"&gt;:send_tweet&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;rubygems&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;gem&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;twitter4r&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;twitter&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;twitter/console&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;twitter&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Twitter&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Client&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;from_config&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;config/twitter.yml&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt;&lt;span class="ident"&gt;rails_env&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="ident"&gt;status&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;twitter&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;status&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:post&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;deployed &lt;span class="expr"&gt;#{application}&lt;/span&gt; to &lt;span class="expr"&gt;#{rails_env}&lt;/span&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;The twitter4r library loads a simple yaml file that contains the username and password of the twitter account to use. And one line of code posts the status update with the name of the app and the environment from previously-defined variables.&lt;/p&gt;


	&lt;p&gt;That&amp;#8217;s it! The great thing about using Twitter for this, as Justin pointed out, is that each one of us developers can consume this information how we choose: IM, Growl messages with &lt;a href="http://iconfactory.com/software/twitterrific"&gt;Twitterific&lt;/a&gt;, &lt;span class="caps"&gt;SMS&lt;/span&gt;, etc. So it&amp;#8217;s really just the syndication technology that we&amp;#8217;re taking advantage of.&lt;/p&gt;


	&lt;h2&gt;Update&lt;/h2&gt;


	&lt;p&gt;Chris&amp;#8217;s comment below prompted me to come up with a &lt;a href="http://blog.kineticweb.com/articles/2008/02/16/capistrano-twitter-task-take-2"&gt;new version&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 10 Feb 2008 10:37:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:c9889033-88a8-4c6a-a2cb-23b2bf7694c5</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2008/02/10/capistrano-twitter-task</link>
      <category>capistrano</category>
      <category>ruby</category>
      <category>twitter</category>
      <category>Rails</category>
    </item>
    <item>
      <title>Voicemail integration with Highrise</title>
      <description>&lt;p&gt;I&amp;#8217;ve often had trouble keeping track of my voicemail messages. Even though they get emailed to me, the emails don&amp;#8217;t have any info about who the messages are from and I have no way of keeping track of if I&amp;#8217;ve responded or if there&amp;#8217;s an action item.&lt;/p&gt;


	&lt;p&gt;So I wrote a simple little Rails app to help me integrate my voicemail message into Highrise, the 37signals product which I&amp;#8217;ve been trying, and liking, in recent weeks. Their provided &lt;span class="caps"&gt;REST&lt;/span&gt; web service &lt;span class="caps"&gt;API&lt;/span&gt; and accompanying Ruby wrapper made the whole thing way too easy. I have two models:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Person&lt;/li&gt;
		&lt;li&gt;Voicemail&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;The Person model holds a cached list of the names and Highrise ID&amp;#8217;s of the people in my Highrise account. I can update this through a simple link in the app anytime I need.&lt;/p&gt;


	&lt;p&gt;The voicemails get into the app by a simple little &amp;#8220;pipe to program&amp;#8221; I added on the mail server. Something like this:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;curl -u username:password --data-binary @- http://address.of.app/import&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;When an email message is received at the voicemail alias, the entire email is POSTed to the address above where it&amp;#8217;s consumed with a tiny controller action like like:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;Voicemail.import(request.raw_post)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;The &amp;#8216;import&amp;#8217; class method simply uses TMail to parse the message, pull off the attached &lt;span class="caps"&gt;WAV&lt;/span&gt; file, save it to the file system, and create a new Voicemail record.&lt;/p&gt;


	&lt;p&gt;The rest of the interface is simple &lt;span class="caps"&gt;CRUD&lt;/span&gt; stuff: A list of new voicemails that have come in with a link to delete and a link to save for each one. When I &amp;#8216;save&amp;#8217; it, I choose a Person from a drop down of all my Highrise contacts and enter a very short 1 line description of what they called about. A note is instantly posted to the Person&amp;#8217;s Highrise history with the time of the voicemail, the 1-line description, and a link to listen to the voicemail. If 37signals provided file upload capability through the &lt;span class="caps"&gt;API&lt;/span&gt;, I might just upload the file to Highrise. Or I might not since the &lt;span class="caps"&gt;WAV&lt;/span&gt;&amp;#8217;s would eat up my storage space.&lt;/p&gt;


	&lt;p&gt;I hope to expand this a bit in the near future with a nice interface&amp;#8212;perhaps autocomplete instead of a drop down for choosing the Person. And I think I&amp;#8217;ll add a way to optionally create a Task in Highrise related to the Note. It would be nice if Highrise color-coded the categories applied to tasks; that way, I could categorize all the voicemail follow-up tasks and color code them so they stood out in my task list. I&amp;#8217;ll have to submit that as a feature request.&lt;/p&gt;


	&lt;h2&gt;Update&lt;/h2&gt;


	&lt;p&gt;Here&amp;#8217;s a screenshot, per Jason&amp;#8217;s request. Click for a full sized version. As you can see, the interface is very modest.
&lt;a href="http://blog.kineticweb.com/files/voicemails_screenshot.png"&gt;&lt;img src="http://blog.kineticweb.com/files/voicemails_screenshot_sm.png" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;


Since the original posting, I changed a couple things:
	&lt;ul&gt;
	&lt;li&gt;I&amp;#8217;ve linked the person&amp;#8217;s name to their Highrise page&lt;/li&gt;
		&lt;li&gt;The little note icon on the left takes you to the note in Highrise that was created for this voicemail&lt;/li&gt;
	&lt;/ul&gt;</description>
      <pubDate>Fri, 01 Feb 2008 07:23:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:2820418f-8e1b-4e95-b021-a101549ef745</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2008/02/01/voicemail-integration-with-highrise</link>
      <category>Rails</category>
      <category>highrise</category>
      <category>37signals</category>
    </item>
  </channel>
</rss>
