<?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>Robby on Rails: Tag graeme</title>
    <link>http://www.robbyonrails.com/articles/tag/graeme</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>thoughts.sort_by{|t| t[:topic]}.collect </description>
    <item>
      <title>Heading to Portland for RailsConf... by foot</title>
      <description>&lt;p&gt;Yay! It&amp;#8217;s almost conference time&amp;#8230; and I&amp;#8217;m almost completely thrilled!&lt;/p&gt;


	&lt;p&gt;Why am I not more thrilled? Well, mainly because RailsConf is being hosted here in Portland, which means that I don&amp;#8217;t get to travel by train like we did last year via &lt;a href="http://www.robbyonrails.com/articles/2006/06/27/the-argon-express"&gt;The Argon Express&lt;/a&gt;. (ah&amp;#8230; the memories)&lt;/p&gt;


	&lt;p&gt;One perk of being here already&amp;#8230; is that I get to act as a tour guide to visitors. For example, earlier today&amp;#8230; &lt;a href="http://blog.hasmanythrough.com/"&gt;Josh Susser&lt;/a&gt; (hasmanyjosh) joined &lt;a href="http://blog.imperialdune.com"&gt;Graeme&lt;/a&gt; and I for lunch in downtown Portland, OR. It was exciting to hear about how he and &lt;a href="http://blog.hasmanythrough.com/2007/4/10/who-are-these-guys"&gt;his fellow Rubyists&lt;/a&gt; at &lt;a href="http://www.powerset.com/"&gt;Powerset&lt;/a&gt; are using Ruby and Rails for various projects. John also spent a few minutes introducing us to &lt;a href="http://merb.rubyforge.org/"&gt;Merb&lt;/a&gt;, which some people think will become popular in near future. We&amp;#8217;re expecting more visitors to come by the offices over the next few days.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/robbyrussell/501303710/" title="Photo Sharing"&gt;&lt;img src="http://farm1.static.flickr.com/203/501303710_c2b7badeec.jpg" width="500" height="333" alt="Josh Susser and Graeme Nelson" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;If you&amp;#8217;re in Portland already (Wednesday)... you might head over to the Lucky Lab for a game of &lt;a href="http://portlandwerewolf.com/"&gt;Werewolf&lt;/a&gt;, which I believe &lt;a href="http://michaelbuffington.com/"&gt;Michael Buffington&lt;/a&gt; is organizing the event. I&amp;#8217;m going to try to make it&amp;#8230; maybe I&amp;#8217;ll see you there!&lt;/p&gt;


	&lt;h2&gt;Flickr Group&lt;/h2&gt;


	&lt;p&gt;I created a flickr group named &lt;a href="http://flickr.com/groups/railsconf2007/pool/"&gt;RailsConf 2007&lt;/a&gt;, and started to use the tag &lt;strong&gt;railsconf2007&lt;/strong&gt; for flickr photos. I look forward to seeing all your photos from the event!&lt;/p&gt;


	&lt;h2&gt;&lt;span class="caps"&gt;IRC&lt;/span&gt; Channel&lt;/h2&gt;


	&lt;p&gt;As of this afternoon, there are almost 20 people hanging out in &lt;code&gt;#railsconf&lt;/code&gt; on freenode. Stop by and introduce yourself!&lt;/p&gt;


	&lt;h2&gt;Portland Revealed&lt;/h2&gt;


	&lt;p&gt;If you haven&amp;#8217;t already &lt;a href="http://feeds.feedburner.com/planetargon"&gt;subscribed to our feed&lt;/a&gt;, you might have missed that the &lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt; team has been posting &lt;a href="http://blog.planetargon.com/portland-revealed"&gt;several articles&lt;/a&gt; about things to do, see, and drink in Portland during your visit to &lt;a href="http://www.railsconf.org"&gt;RailsConf&lt;/a&gt;. Here are a few that we&amp;#8217;ve posted so far.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://blog.planetargon.com/2007/5/10/portland-revealed-episode-2-beertown"&gt;Portland Revealed: Episode 2: Beertown&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.planetargon.com/2007/5/11/portland-revealed-episode-3-get-outdoors"&gt;Portland Revealed: Episode 3: Get outdoors&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.planetargon.com/2007/5/16/portland-revealed-episode-4-stay-awake-during-railsconf"&gt;Portland Revealed: Episode 4: Stay Awake During RailsConf&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.planetargon.com/2007/5/16/portland-revealed-episode-5-places-to-work"&gt;Portland Revealed: Episode 5: Places to Work&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;More coming soon!&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;You can also peak around &lt;a href="http://goseeoregon.com/place/36913-Portland"&gt;GoSeeOregon&lt;/a&gt; (a Rails application!) to find places around town to go see.&lt;/p&gt;
</description>
      <pubDate>Wed, 16 May 2007 17:21:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:e1585866-bb5d-4c99-a689-8810eaed92df</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/05/16/heading-to-portland-for-railsconf-by-foot</link>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>railsconf</category>
      <category>railsconf 2007</category>
      <category>portland</category>
      <category>hasmanyjosh</category>
      <category>graeme</category>
      <category>planetargon</category>
    </item>
    <item>
      <title>Q&amp;amp;A: ActiveRecord Observers and You</title>
      <description>&lt;p&gt;Yesterday, I wrote a short post titled, &lt;a href="http://www.robbyonrails.com/articles/2007/04/27/observers-big-and-small"&gt;Observers Big and Small&lt;/a&gt;, about using Observers in your Rails applications.&lt;/p&gt;


	&lt;p&gt;The following questions were raised in the comments.&lt;/p&gt;


	&lt;h2&gt;When should I use an Observer?&lt;/h2&gt;


	&lt;p&gt;&lt;a href="http://www.last100meters.com/"&gt;Eric Allam&lt;/a&gt; asks&amp;#8230;&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&lt;em&gt;&amp;#8220;Why not just use ActiveRecord callback hooks instead of Observers? Are Observers more powerful or is it just a matter of preference?&amp;#8221;&lt;/em&gt;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;Eric, this is an excellent question. I&amp;#8217;d say that a majority of the time, using the &lt;a href="http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html"&gt;ActiveRecord callbacks&lt;/a&gt; in your models is going to work for your situation. However, there are times that you want the same methods to be called through callbacks. For example, let&amp;#8217;s take a recent problem that we used an observer to solve.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://blog.imperialdune.com/"&gt;Graeme&lt;/a&gt; is working on implementing &lt;a href="http://rubyforge.org/projects/ferret"&gt;Ferret&lt;/a&gt; into a project that we&amp;#8217;re developing for a client. With the use of Ferret, we can index and later search through content over several objects into a format that makes sense for our implementation goals. Each time an object is created and updated, we have to update our Ferret indexes to reflect these changes. The most obvious location that we can call our indexing methods is in each models&amp;#8217; callbacks, but this violates the &lt;span class="caps"&gt;DRY&lt;/span&gt;[1] principle. So, we created an Observer, which &lt;em&gt;observes&lt;/em&gt; each of the models that need these methods to be called. In fact, as far as we&amp;#8217;re concerned, the fact that we&amp;#8217;re indexing some of its data, is none of its business. We only want our models to be concerned with that they&amp;#8217;re designed to be concerned about. We may opt to change our indexing solution in the future and we&amp;#8217;d just need to rethink that at the Observer level and not change anything about the business logic in our models.&lt;/p&gt;


	&lt;p&gt;This is the sort of scenario when using an Observer makes great sense in your application.&lt;/p&gt;


	&lt;h2&gt;Logging from an Observer&lt;/h2&gt;


	&lt;p&gt;Adam R. asks&amp;#8230;&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&lt;em&gt;&amp;#8220;I&amp;#8217;d also like the ability to use the logger from within an observer, but that’s another issue.&amp;#8221;&lt;/em&gt;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;I assume that you are referring to the &lt;code&gt;logger&lt;/code&gt; method? I always forget to even use that method. I do know that the following works just fine in an Observer.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
class IndexObserver &amp;lt; ActiveRecord::Observer
  observer Article, Editorial, BlogPost, ClassifiedAd

  def after_save(model)
    RAILS_DEFAULT_LOGGER.warn("Every single day. Every word you say. Every game you play. Every night you stay. I'll be watching you.")
    # execute something fun
  end
end  
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This will output to your log file without any problem.&lt;/p&gt;


	&lt;p&gt;This reminded me of when I used to want to &lt;a href="http://www.robbyonrails.com/articles/2006/01/25/rails-logger-and-those-pesky-tests"&gt;log from Unit Tests&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;(few minutes later)&lt;/p&gt;


	&lt;p&gt;Okay, I just attempted to use &lt;code&gt;logger&lt;/code&gt; from an Observer and you&amp;#8217;re right&amp;#8230; it doesn&amp;#8217;t currently work. There is a simple fix though, just extend ActiveRecord::Observer to add a &lt;code&gt;logger&lt;/code&gt; method like so and require it in &lt;code&gt;config/environment.rb&lt;/code&gt; (much like I did in with unit tests).&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
# lib/observer_extensions.rb
class ActiveRecord::Observer
  def logger
    RAILS_DEFAULT_LOGGER
  end
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This will give you a solution to that problem.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
class FooObserver &amp;lt; ActiveRecord::Observer
  observer Foo

  def after_save(model)
    logger.warn("I wonder if the #{address.class} knows that I've been watching it all along?")
  end
end  
&lt;/code&gt;&lt;/pre&gt;

	&lt;h2&gt;Observers Spy for Us&lt;/h2&gt;


	&lt;p&gt;Most often, I look at Observers as being the guys that I hire to spy on my models. I don&amp;#8217;t want my models to know that they&amp;#8217;re being spied on and I&amp;#8217;d like to keep it that way. They don&amp;#8217;t solve all of our problems and it&amp;#8217;s easy to overuse them. However, I have found several cases that they made a lot of sense and most of those cases have been where we&amp;#8217;ve had the same things occurring in our model&amp;#8217;s callbacks.&lt;/p&gt;


	&lt;p&gt;If you have other questions related to Observers, feel free to let me know. If you&amp;#8217;re already using Observers, perhaps you could post a comment and/or blog post response with an example of when and how you use Observers in your Rails applications.&lt;/p&gt;


	&lt;h3&gt;Related Posts&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2007/04/27/observers-big-and-small"&gt;Observers Big and Small&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2006/02/27/where-did-my-observer-go"&gt;Where did my Observer go?&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://tom-eric.info/archive/2006/10/30/observers-in-ruby-on-rails"&gt;Observers in Ruby on Rails&lt;/a&gt;, Tom Eric&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p id="fn1"&gt;&lt;sup&gt;1&lt;/sup&gt; Don&amp;#8217;t Repeat Yourself&lt;/p&gt;
</description>
      <pubDate>Sat, 28 Apr 2007 17:28:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:587732a9-50fb-476d-b46a-1c10d29c3559</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/04/28/q-a-activerecord-observers-and-you</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>activerecord</category>
      <category>observers</category>
      <category>patterns</category>
      <category>q</category>
      <category>a</category>
      <category>logging</category>
      <category>ferret</category>
      <category>graeme</category>
      <category>DRY</category>
    </item>
    <item>
      <title>Do Your Views in Ruby on Rails need a cleaning service?</title>
      <description>&lt;p&gt;I&amp;#8217;ve been working on a project with &lt;a href="http://blog.imperialdune.com/"&gt;Graeme&lt;/a&gt;, and we&amp;#8217;re spending some time cleaning up some &lt;span class="caps"&gt;RHTML&lt;/span&gt; views.&lt;/p&gt;


	&lt;p&gt;He posted an article earlier, titled, &lt;a href="http://blog.imperialdune.com/2007/3/27/dirty-views-clean-them-up"&gt;Dirty Views? Clean them up!&lt;/a&gt;, where he asks the following.&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&amp;#8220;I am also looking for more information on best practices with views in Rails. There doesn’t seem to be much information on the subject.&amp;#8221;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;We&amp;#8217;re starting to re-evaluate how we approach our views and are curious what other teams are doing&amp;#8230; especially if you have a team thats approx 1/2 designers&amp;#8230; 1/2 developers per project. We&amp;#8217;ll be reviewing some of the other options for the View layer over the coming week(s) and welcome any suggestions/insight to this area of Rails&amp;#8230; head over to &lt;a href="http://blog.imperialdune.com/"&gt;Graeme&amp;#8217;s blog&lt;/a&gt; and share your thoughts. :-)&lt;/p&gt;
</description>
      <pubDate>Tue, 27 Mar 2007 21:55:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:81794704-13ac-465b-8862-82e0188e844e</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/03/27/do-your-views-in-ruby-on-rails-need-a-cleaning-service</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>views</category>
      <category>DRY</category>
      <category>rails</category>
      <category>rubyonrails</category>
      <category>best</category>
      <category>practices</category>
      <category>graeme</category>
      <category>design</category>
      <category>interface</category>
      <category>development</category>
    </item>
    <item>
      <title>Meet... Chris, Graeme., and Gary</title>
      <description>&lt;p&gt;Okay, this is a little overdue&amp;#8230; but better late than never! ;-)&lt;/p&gt;


	&lt;p&gt;We&amp;#8217;ve had several new people start with &lt;a href="http://www.planetargon.com"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;&lt;/a&gt; over the past few months. Some of them are blogging about their experience of working with &lt;a href="http://www.rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt; and being a part of our team. I wanted to quickly introduce you to a few of them and their blogs, which I hope that you consider subscribing to.&lt;/p&gt;


	&lt;h2&gt;Chris&lt;/h2&gt;


	&lt;p&gt;&lt;a href="http://flickr.com/photos/gary_blessington/403127674/"&gt;&lt;img src="http://farm1.static.flickr.com/151/403127674_8449784bae_m.jpg" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;For quite some time, we&amp;#8217;ve been needing more design assistance, so late last year&amp;#8230; we hired &lt;strong&gt;Chris Griffin&lt;/strong&gt;, who moved here last year from Florida. He&amp;#8217;s our new User Interface Designer and gets to work within the Rails environment everyday with the rest of us. It seems that &lt;a href="http://blog.brightredglow.com"&gt;Brian&lt;/a&gt; and Chris worked over the weekend to get &lt;a href="http://chriszgriffin.com/"&gt;his new blog&lt;/a&gt; up. Chris is &lt;em&gt;self-proclaimed genius&lt;/em&gt;. I suggest that you keep an eye on his blog&amp;#8230; because I&amp;#8217;m sure it&amp;#8217;s going to be a pretty active one. Chris joining our team marks a pivotal point in our teams evolution as we continue to place more emphasis in our Design and Development process on the User Experience.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://chriszgriffin.com/"&gt;http://chriszgriffin.com/&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Graeme&lt;/h2&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/planetargon/405995782/" title="Photo Sharing"&gt;&lt;img src="http://farm1.static.flickr.com/136/405995782_0e67147aee_m.jpg" width="240" height="160" alt="Graeme Nelson" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Our newest hire is &lt;strong&gt;Graeme Nelson&lt;/strong&gt;, who recently moved to Portland from Seattle. He just joined our Design and Development team and if you&amp;#8217;ve been reading the Rails-related blogs, you might have seen his blog already. He&amp;#8217;s been blogging a lot about using &lt;a href="http://blog.imperialdune.com/2007/2/26/rspec-ing-rails-controllers"&gt;RSpec with Rails&lt;/a&gt; and other fun things. He&amp;#8217;s been contracting with us since the start of the year and I&amp;#8217;m really excited that &lt;a href="http://blog.imperialdune.com/2007/2/17/announcement"&gt;he&amp;#8217;s accepted a job offer&lt;/a&gt; and joined the team!&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://blog.imperialdune.com/"&gt;http://blog.imperialdune.com/&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Gary&lt;/h2&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/robbyrussell/336808358/" title="Photo Sharing"&gt;&lt;img src="http://farm1.static.flickr.com/152/336808358_07b5cf3236_m.jpg" width="240" height="160" alt="Gary eats sushi" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Last&amp;#8230; but not least is &lt;strong&gt;Gary Blessington&lt;/strong&gt;. I believe that I first offered Gary a job with &lt;a href="http://www.planetargon.com"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;&lt;/a&gt; about 2 1/2 years ago when we were still focused on &lt;span class="caps"&gt;PHP&lt;/span&gt;/PostgreSQL&amp;#8230;. but &lt;span class="caps"&gt;PHP&lt;/span&gt; apparently wasn&amp;#8217;t enough of a catalyst. Gary and I previously worked together at Imark Communications several years ago, when I first started doing web development. He was the senior developer on the team and was an important mentor during my early days of developing in a professional environment. Late last year, he hung up his .NET tool belt to become our Design and Development Director. He started blogging earlier this year and is sharing his experience of &lt;a href="http://garyblessington.us/2007/2/26/rails-adoption"&gt;switching from .NET to Ruby on Rails&lt;/a&gt;.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://garyblessington.us/"&gt;http://garyblessington.us/&lt;/a&gt;.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I&amp;#8217;ll introduce the others as they start blogging and such. :-)&lt;/p&gt;
</description>
      <pubDate>Mon, 26 Feb 2007 11:01:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:0db478a3-00e3-4679-a5d2-8b8f648bca0c</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/02/26/meet-chris-graeme-and-gary</link>
      <category>Business</category>
      <category>PLANET ARGON</category>
      <category>planetargon</category>
      <category>team</category>
      <category>gary</category>
      <category>chris</category>
      <category>graeme</category>
      <category>blogging</category>
    </item>
  </channel>
</rss>
