<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.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 RailsConf07</title>
    <link>http://blog.kineticweb.com/articles/tag/railsconf07</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Musings from a Ruby on Rails development team</description>
    <item>
      <title>Skinny Controller, Fat Model</title>
      <description>&lt;p&gt;One of my favorite talks from RailsConf was by the team behind &lt;a href="http://www.therailsway.com"&gt;The Rails Way&lt;/a&gt;. Now back from the road trip and settled in, they have updated their site with some more details about one of the ideas they pushed: Controllers should be simple, basic, and generally have a lot less code then most of us use now. Most of your logic should end up in the model.&lt;/p&gt;


There&amp;#8217;s many reasons for this but the three I like the most:
	&lt;ol&gt;
	&lt;li&gt;It forces you to write code that more easily reused. Limits your temptation to copy/paste from one controller action to another.&lt;/li&gt;
		&lt;li&gt;Your templates can become more details. @order.total instead of @total (which would have to be mapped to something logic in the controller.)&lt;/li&gt;
		&lt;li&gt;The code is more easily tested. You can programmatically   access the results of the methods in your model without having to munge &lt;span class="caps"&gt;HTML&lt;/span&gt; output from a controller.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;&lt;a href="http://www.therailsway.com/2007/6/1/railsconf-recap-skinny-controllers"&gt;Their post&lt;/a&gt; has all the details and code samples.&lt;/p&gt;</description>
      <pubDate>Fri, 01 Jun 2007 21:07:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:f3c58e79-0490-4bc0-ab0a-7fbcd88131ff</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2007/06/01/skinny-controller-fat-model</link>
      <category>Rails</category>
      <category>TDD</category>
      <category>RailsConf</category>
      <category>RailsConf07</category>
      <trackback:ping>http://blog.kineticweb.com/articles/trackback/36</trackback:ping>
    </item>
    <item>
      <title>RailsConf Wrap Up</title>
      <description>&lt;p&gt;Here&amp;#8217;s a wrap up of all my posts from RailsConf 2007. (The ones with actual useful substance, that is.)&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://blog.kineticweb.com/articles/2007/05/17/drying-up-views"&gt;DRYing up Views&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.kineticweb.com/articles/2007/05/18/rails-2-0-details-from-dhhs-keynote"&gt;Rails 2.0 details from &lt;span class="caps"&gt;DHH&lt;/span&gt;&amp;#8217;s Keynote&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.kineticweb.com/articles/2007/05/18/clean-code"&gt;Clean Code&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.kineticweb.com/articles/2007/05/18/adding-tests-to-legacy-rails-apps"&gt;Adding tests to legacy rails apps&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.kineticweb.com/articles/2007/05/18/reading-code"&gt;Reading code&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.kineticweb.com/articles/2007/05/19/business-of-rails"&gt;Business of Rails&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.kineticweb.com/articles/2007/05/20/splunk"&gt;Splunk&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.kineticweb.com/articles/2007/05/21/dealing-with-designers"&gt;Dealing with Designers&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.kineticweb.com/articles/2007/05/21/javascript-fu"&gt;Javascript Fu&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.kineticweb.com/articles/2007/05/21/the-rails-way"&gt;The Rails Way&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;All in all, it was a fantastic convention. As can be expected, some presentations were better then others. Suggestions for next year include:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;Better descriptions of the sessions and of the speaker&amp;#8217;s experience.&lt;/li&gt;
		&lt;li&gt;Perhaps repeating some sessions at multiple times.&lt;/li&gt;
		&lt;li&gt;Better planning of expected attendance at each session so proper room size could be selected.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;There&amp;#8217;s a number of talks I didn&amp;#8217;t get to see that I really wanted to. In the coming days, I hope to find their presenting materials online to see if there&amp;#8217;s anything I can glean.&lt;/p&gt;</description>
      <pubDate>Tue, 22 May 2007 07:24:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:04038886-a9f3-4900-9608-3ec0dad3ee39</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2007/05/22/railsconf-wrap-up</link>
      <category>RailsConf</category>
      <category>RailsConf07</category>
    </item>
    <item>
      <title>The Rails Way</title>
      <description>&lt;p&gt;Sunday&amp;#8217;s morning keynote at RailsConf was by Jamis Buck and Michael Koziarrski, both committers to the Rails core. The format was quite useful: a series of short code reviews from a variety of submitters to their website, &lt;a href="http://www.therailsway.com"&gt;The Rails Way&lt;/a&gt;.&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;Jamis asked for a show of hands for who had read his &#8220;Skinny Controller / Fat Model&#8221; article. I, ashamedly, have not, but I intend to. I&amp;#8217;ve heard the &#8220;fat model&#8221; concept more and have been trying to emphasize putting as much as makes sense into the Model, and less into the controller.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;ol&gt;
	&lt;li&gt;They mentioned how you can override the &lt;code&gt;#to_param&lt;/code&gt; method on an ActiveRecorded descendant in order to control what is used as the &#8220;id&#8221; string when building a &lt;span class="caps"&gt;URL&lt;/span&gt; in Rails. This would work perfectly with the pretty URLs I have been trying to use more and more.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;ol&gt;
	&lt;li&gt;Jamis stresses how we should all strive to make our code &#8220;intention revealing&#8221;.  One of the beauties of Ruby is the flexibility and expressiveness it allows you. Wherever possible, we should structure our code to be readable and even self-documenting. And where our code does not clearly reveal our intentions, we should document liberally with comments.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;ol&gt;
	&lt;li&gt;&lt;code&gt;#with_options&lt;/code&gt; seems to be a pretty slick little method that I have to try. It&amp;#8217;s a method on Object that allows you to prevent repeating the same options on a series of method calls.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;ol&gt;
	&lt;li&gt;Many people forget to actually use the ActiveRecord associations they setup. For instance, instead of &lt;code&gt;People.find(:all, :conditions =&amp;gt; [&#8220;company_id = ?&#8221;, 99])&lt;/code&gt; one can do something like &lt;code&gt;@company.people&lt;/code&gt; which can make your code much more readable and DRYer, too.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;ol&gt;
	&lt;li&gt;And finally, they showed a code example that used the &lt;code&gt;#returning&lt;/code&gt; method wrapped around several lines of code in a method that was to return something. Even after an explanation, I didn&amp;#8217;t quite get how this worked. So that&amp;#8217;s something to investigate.&lt;/li&gt;
	&lt;/ol&gt;</description>
      <pubDate>Mon, 21 May 2007 11:01:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:c2663f49-3271-4ab6-ac1e-dd5e17221516</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2007/05/21/the-rails-way</link>
      <category>Rails</category>
      <category>ruby</category>
      <category>RailsConf</category>
      <category>RailsConf07</category>
    </item>
    <item>
      <title>Javascript Fu</title>
      <description>&lt;p&gt;Londoner Dan Webb, creator of the UJS4Rails.com website with plugins for Unobtrusive Javascript, presented about some tips and tricks for dealing with Javascript in Rails. He revealed that he&amp;#8217;s not maintaining the Unobtrusive Javascript plugin but instead has been focusing his free cycles on an extension to Prototype called LowPro.&lt;/p&gt;


	&lt;p&gt;I actually had a bit of a hard time following much of the technical nitty gritty of this talk. Mostly because my Javascript skillz are lacking. But also because it was packed as hell and pretty uncomfortable to sit still.&lt;/p&gt;


	&lt;p&gt;Dan did stress that we should all do a better job of making sure our Rails apps at least still function when Javascript is not available. He presented an example of an acquaintance who was unable to use any site using the standard &lt;span class="caps"&gt;AJAX&lt;/span&gt; frameworks because they all used the &lt;code&gt;eval&lt;/code&gt; function of Javascript which the corporate security nazis frown upon.&lt;/p&gt;


	&lt;p&gt;His recommendation was to think about how your app can work, albeit with reduced functionality, when Javascript is not available to the user. One should build their app without any AJAXishy features at first, and then layer on the Javascript, &lt;span class="caps"&gt;AJAX&lt;/span&gt;, and &#8220;interface sheen&#8221; as he called it. I agree, although I think a decision about how much functionality to provide fo non-javascript-enabled browsers needs to be carefully considered in the context of the project at hand.&lt;/p&gt;</description>
      <pubDate>Mon, 21 May 2007 10:56:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:886d46d3-93fe-4f90-985a-0e9107892276</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2007/05/21/javascript-fu</link>
      <category>Javascript</category>
      <category>AJAX</category>
      <category>RailsConf</category>
      <category>RailsConf07</category>
    </item>
    <item>
      <title>Dealing with Designers</title>
      <description>&lt;p&gt;Well known blogger Amy Hoy presented about interaction between designers and developers. She claims to be both a designer and a developer and chatted about the processes that she and others use to successfully integrate the work of coders and artists. My take-away points:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;Teaching your designer about Rails, even just a little bit, can go a long way to a successful working relationship. Get them comfortable with what they will expect to see in View templates when reviewing erb (or haml, etc.) templates created by the Rails developers.&lt;/li&gt;
		&lt;li&gt;Have the designer use subversion (or &lt;span class="caps"&gt;CVS&lt;/span&gt;, in our case&amp;#8230;. for now). If the designer is using &lt;span class="caps"&gt;OS X&lt;/span&gt; (as most are), it won&amp;#8217;t take more than a half hour lesson to educate them as to the virtues of source code control and the how-to of checking out, checking in, updating, etc.&lt;/li&gt;
		&lt;li&gt;Design cannot be an afterthought. Get the designer involved &lt;strong&gt;early&lt;/strong&gt; in the process so that their perspective can be incorporated into the decision making process as much as possible.&lt;/li&gt;
		&lt;li&gt;Use wireframes to mock up the pages of your site. The wireframes can start as simple as napkin sketches, but should ultimately be fleshed out in some kind of box/text format. This is far quicker then any kind of direct-to-Photoshop process. &lt;/li&gt;
		&lt;li&gt;There are several &#8220;hand off&#8221; points that can be utilized to switch the process from designer to developer. This was sort of a no-brainer. Obviously, some designers can handle &lt;span class="caps"&gt;HTML&lt;/span&gt;, others can&amp;#8217;t, and the process of cutting Photoshop files down to &lt;span class="caps"&gt;HTML&lt;/span&gt; and &lt;span class="caps"&gt;CSS&lt;/span&gt; can either be handled by the developers or designers. I would love to find a really good designer that embraces &lt;span class="caps"&gt;XHTML&lt;/span&gt;/CSS as much as I&amp;#8217;d like them to. But until that point, I think we&amp;#8217;ll stick to doing the HTMLification ourselves.&lt;/li&gt;
	&lt;/ol&gt;</description>
      <pubDate>Mon, 21 May 2007 10:54:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:be88038b-1394-4f9e-841a-e9ca989be5da</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2007/05/21/dealing-with-designers</link>
      <category>Business</category>
      <category>design</category>
      <category>RailsConf</category>
      <category>RailsConf07</category>
    </item>
    <item>
      <title>Splunk</title>
      <description>&lt;p&gt;A talk yesterday entitled &amp;#8220;Leveraging the IT Community&amp;#8221; talked mostly about a service called &lt;a href="http://www.splunk.com"&gt;Splunk&lt;/a&gt;. It&amp;#8217;s an application that runs locally on your network and gobbles up log files into one big central management interface. You can search through log files with handle AJAXish web based interface and trace events as they move from one level of software to another. It&amp;#8217;s pretty neat.&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s available free for users processing less than 500 MB of log files a day (which doesn&amp;#8217;t seem like very much).&lt;/p&gt;


	&lt;p&gt;The &amp;#8220;community&amp;#8221; part of this is essentially a Wiki/form/blog/social networking website that can hook into Splunk and allow you to post and view information about log file events that you encounter.&lt;/p&gt;


	&lt;p&gt;My reactions to this are summarized here:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;First of all, the talk was pretty much a pitch for this product. I still thought it was interesting, but this wasn&amp;#8217;t a sponsored talk and therefore should have presented other info besides just a pitch for Splunk.&lt;/li&gt;
		&lt;li&gt;The product seems like a neat idea, but what about Google? Why wouldn&amp;#8217;t I just use Google to search for other people with the same problem?&lt;/li&gt;
		&lt;li&gt;Why limit this to just log files? Seems like that&amp;#8217;s only one part of troubleshooting any IT problem. Places like ExpertS-exChange.com provide a way for people to find out about anything IT problem, not just log files. (shitty site, I know, example only)&lt;/li&gt;
	&lt;/ol&gt;</description>
      <pubDate>Sun, 20 May 2007 11:47:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:1127565e-cc89-4dfb-8c9e-ddf055df285b</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2007/05/20/splunk</link>
      <category>RailsConf</category>
      <category>RailsConf07</category>
    </item>
    <item>
      <title>Business of Rails</title>
      <description>&lt;p&gt;The theme of the first two talks I attended at RailsConf today was more business-y and less technical. There was a chat called &amp;#8220;Teascript: A Homesteader&amp;#8217;s Story&amp;#8221; and one called &amp;#8220;The Business of Rails&amp;#8221;.&lt;/p&gt;


	&lt;p&gt;The former was a case study by a developer who decided to make his own niche web app and start selling a service around it. The content was interesting, however the talk itself was frustrating as he took all manner of questions all the time and there were zillions of interruptions with dull questions.&lt;/p&gt;


Some interesting points I took away:
	&lt;ol&gt;
	&lt;li&gt;Get the idea out there fast and start getting feedback. This has always been my view, as opposed to bottling it up fearing that someone will steel your idea.&lt;/li&gt;
		&lt;li&gt;Read 37 Signals book, &lt;em&gt;Getting Real&lt;/em&gt;. Apparently this is the bible of developing web apps the Rails way. I was ashamed when a show of hands indicated nearly everyone had read this book except me.&lt;/li&gt;
		&lt;li&gt;Start small. The speaker discussed the benefits of starting your application small with only essential features to get it out there. I&amp;#8217;ve been thinking more and more this is the way to go so I was glad to hear this point.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;The latter was a panel discussion with open questions from the audience and a panel of owners of Rails development shops large and small. This one was a bit dry because a lot of it was about how to quit your job and take the plunge. Which I did 6 years ago now.&lt;/p&gt;</description>
      <pubDate>Sat, 19 May 2007 16:21:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:c6fa418f-9111-4f6b-81bb-d77d39037936</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2007/05/19/business-of-rails</link>
      <category>RailsConf</category>
      <category>RailsConf07</category>
      <category>Business</category>
    </item>
    <item>
      <title>Reading code</title>
      <description>&lt;p&gt;Believe it or not there was actually a talk about how to read code. There&amp;#8217;s more to it then I realized and there were some interesting handy tips presented, although there wasn&amp;#8217;t as much actual substance to this talk as I had envisioned. Here&amp;#8217;s some tips:&lt;/p&gt;


	&lt;p&gt;When reading ruby or Rails code beginners often might not even know where to start. Here&amp;#8217;s a pretty good track to follow:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;Read the &lt;span class="caps"&gt;URL&lt;/span&gt; of the page in question. In simple apps that aren&amp;#8217;t using fancy routes, the &lt;span class="caps"&gt;URL&lt;/span&gt; will tell you the action/controller.&lt;/li&gt;
		&lt;li&gt;Check out the routes.rb file for any fancy route configurations to find the controller/action.&lt;/li&gt;
		&lt;li&gt;Open the controller and find the method. Read through it.&lt;/li&gt;
		&lt;li&gt;Look for any filters on the controller. Usually declared at the top. Find them and see if there is stuff running before or after your method.&lt;/li&gt;
		&lt;li&gt;See what methods on the model are invoked and read through the model method.&lt;/li&gt;
		&lt;li&gt;Look for callbacks on the model. Stuff like before_create can add functionality that you might not have realized was there.&lt;/li&gt;
		&lt;li&gt;Application controller and application helper files often contain other stuff you should look through before doing any spelunking.&lt;/li&gt;
		&lt;li&gt;Seek out observers. Often declared in environment.rb and residing in the models folder, these are callbacks that often attach themselves to multiple models.&lt;/li&gt;
		&lt;li&gt;Plugins and libraries in /lib are good to look at, too.&lt;/li&gt;
	&lt;/ol&gt;


Some other tidbits about finding the method you&amp;#8217;re looking for:
	&lt;ol&gt;
	&lt;li&gt;Check for normally defined methods&lt;/li&gt;
		&lt;li&gt;Find any method_missing implementation&lt;/li&gt;
		&lt;li&gt;Grep through files for any metaprogramming like define_method.&lt;/li&gt;
	&lt;/ol&gt;</description>
      <pubDate>Fri, 18 May 2007 19:12:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:6280eb26-4bc8-4f0c-ae90-cdbd95ef7ed2</guid>
      <author>Colin A. Bartlett</author>
      <link>http://blog.kineticweb.com/articles/2007/05/18/reading-code</link>
      <category>Rails</category>
      <category>ruby</category>
      <category>RailsConf</category>
      <category>RailsConf07</category>
    </item>
  </channel>
</rss>
