As a general goal, I'd also add 'Make things smaller' to that list.
It's a nice target that you can add a concrete goal around (eg. no
more than X lines per file) if you really want to track it, and has a
number of benefits. I find that small things are easier to understand,
and easier to add tests around later if you need to.

Some quick examples that come to mind from what I'm working on:
* Large controllers can be split up into multiple controllers, and
this can be done without changing your routing at all.
* Large models can have logic broken out into Modules and mixed in.

- Nick

On Wed, Oct 12, 2011 at 9:06 AM, Michael Pearson <[email protected]> wrote:
> Hi,
> We have a large Rails 2.3.x codebase, mostly written by a developer without
> prior experience with Rails who has since left the company.
> What I'm trying to do is put together a list of things to look out for and
> continually improve, specific to Rails 2.x.
> Most of the below seems to be about removing code duplication and fixing Law
> of Demeter violations:
>
> use flay to identify code duplication
> remove all instances of raw SQL outside of app/models by using model methods
> and named scopes
> ensure controllers aren't calling other controllers directly
> create crudify-like base class for controllers generated using
> script/generate scaffold
> parse logs to identify unused controllers
>
> Notably not on this list is unit or integration testing. The code is not at
> the point where this can be performed effectively.
> Any Rails-istas have any tips for other things to look out for? This list is
> intended as things to fix while we're working on bugfixes or new features
> rather than trying to perform a ground-up rewrite.
> Also, are there any tools that can replay a log and perform code coverage
> analysis in Ruby? Has anybody adapted rspec's coverage tools to do this?
> --
> Michael Pearson
> The Bon Scotts; http://www.thebonscotts.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby or Rails Oceania" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rails-oceania?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to