Guide: Things You Shouldn't Be Doing In Rails

Posted by kev Wed, 30 Aug 2006 05:32:00 GMT

Koz recently checked code into core that kicks and screams all the way home if you’re using deprecated methods or instance variables. In honor of this I’ve decided to give you a list of things I still see over and over in Rails code that you really shouldn’t be doing anymore. Really. Trust me on this.

Update: There’s been enough controversy over this article that I’ve responded.

Read more...

Posted in ,  | 89 comments

See Me at RubyConf 2006

Posted by kev Wed, 19 Jul 2006 16:13:00 GMT

Yes, I will in fact be speaking at RubyConf this fall. Cool huh? My talk, “Life After mkmf” will cover the development and use of my Summer of Code project, mkrf.

If you’ve ever been frustrated by the problem of bending mkmf to you will and retaining your wits, you should see my talk.

To those who have noticed my weekly guides have come to a halt:

Sorry about that. They’ll resume as soon as I can find some time for them. In the meantime, know that there is other writing going on that I’ll talk more about later.

Posted in , ,  | 1 comment

Weigh In: Patches, Plugins and Proposed Enhancements

Posted by kev Mon, 05 Jun 2006 06:43:00 GMT

This week’s guide is going to be a little different.

On the rails-core mailing list, in what started as a discussion the issue of the growing number of Scriptaculous/Prototype tickets and especially enhancement requests, we’ve begun talking about the removal of the “enhancement” category on trac tickets.

The problem is that generally half or more of the tickets that come through the Rails bug tracking system are enhancement requests. With 13 people able to commit and a handful of others actively dealing with tickets being reported, enhancement requests will in general never be acted on. This means there are new tickets every day ruining that delicate signal vs noise ratio.

For a while the standard line for enhancements has been “make it a plugin and see where it goes”. This may not always be the proper response but when dealing with the deluge it is at the very least the easiest and a plugin is usually the simplest way to see feature X in Rails.

So here’s the guide part: we could use an alternate viewpoint. The rails-core list is significantly biased: people who care to speak up there are comfortable writing patches and plugins. I expect a good portion of you watching my feed and visiting my blog haven’t written patches for Rails and haven’t written your own plugin. Do you think keeping the enhancement category is worthwhile?

The real question here isn’t whether Rails should accept new features. Patches for new enhancements would be considered but enhancement tickets sans a patch would not.

I’d like to make this an open dialog. Please, speak your mind. And careful with that submit button. Apparently my comments are a bit wonky and it tends to result in double posting. I’ll try to fix it as soon as I can.

Next week we’ll return to our regularly scheduled practical guides.

Posted in , ,  | 15 comments

More Guide Ideas

Posted by kev Thu, 01 Jun 2006 04:54:00 GMT

The guides seem to be doing well. My next guide is scheduled for Monday the 5th. If you’ve got an idea or a question, please send it my way.

kevin dot clark at gmail dot com

Include “[idea]” in the subject line.

Posted in ,

Guide: Test Driven RJS with ARTS

Posted by kev Mon, 29 May 2006 17:51:00 GMT

RJS is really a pain to debug. When things aren’t working right, they often don’t show up on the page at all. These truths make testing RJS especially important.

When researching for this article, I looked into the rjs_assertions plugin, but was generally unhappy with the offerings. rjs_assertions isn’t complete and the syntax felt cryptic.

So, I rolled my own. I’m calling the plugin ARTS: Another RJS Testing System, and the number one goal is to make an easily understandable syntax for testing RJS templates.

This guide is going to be broken into two parts: the installation and usage of the plugin, and using the plugin to test drive ajax interactions.

This isn’t an introduction to RJS. For background reading on the topic, see Rails RJS Templates by Cody Fauser and Rick Olson’s post on Rails Weenie.

Read more...

Posted in , ,  | 25 comments

Guide: Environments in Rails 1.1

Posted by kev Mon, 22 May 2006 08:29:00 GMT

It’s been a while since I’ve written about environments in Rails, so when one of you wrote in asking for a guide to environments I decided it was time to practice what I preach and update my own documentation. So, here we go. Environments in Ruby on Rails 1.1 coming right up.

As an aside before we get started, I am doing weekly guides now, so if you have a question or an idea for a guide, please send me an email at kevin dot clark at gmail dot com with [idea] in the subject.

Lets get started.

Update: I’ve gotten a good response so far (and is’s only 9:30 in the morning), so if you like it, digg it.

Read more...

Posted in ,  | 3 comments

Link: Distributed Ruby Guide

Posted by kev Sat, 20 May 2006 17:55:00 GMT

With _why’s recent announcement of the Drb Renaissance, I figured it was time to finally get my feet wet and learn about using Distributed Ruby.

Fortunately, Chad Fowler author of the fantastic Rails Recipes, has done my work for me.

Go check out his guide for an excellent quick read on the essentials of Drb.

Posted in , ,

Weekly Guides Update

Posted by kev Sat, 20 May 2006 00:24:00 GMT

I’ve gotten a few good suggestions for guides so far. If you take a look at my original post, I actually said that the first guide would be out a week from Monday but so many people have asked for one sooner that I’ll do my best to hack one up for you this weekend.

On that note, if you’ve got questions big or small, please send them in. Overall I haven’t had many suggestions. If you’d like to get a question answered or to learn more about a part of Rails, please do write in.

kevin dot clark at gmail dot com

Posted in