From: Frank Spychalski Date: 2006-01-05T19:40:04+09:00 Subject: Re: How to learn 'the ruby way' Devin Mullins wrote: > I'm thinking the best way to do that is by posting examples (short, > repeatable code snippets for us to chew on). In general, it's usually > going to involve more functional constructs, and heavy use of > blocks. :) But that's not always the case. Usually, you'll get about > Six Ruby Ways. The problem here is how to find the useful example. If I don't know that something could be handled in a more elegant way, I don't know that this could be a good example... RevMike wrote: > But I've gone back and refactored the app 3 times! And I have > another refactoring planned. The app has only two classes. > > In my opinion, if you know how to do something in one way, make it > work. then go back and refactor over and over again, trying different > Ruby constructs, until you are comfortable with what you are doing. I think that's a pretty good tip. I'm working on a small Ruby on Rails application and every time I add new code I refactor a large portion of old code because nearly every day I find new and easier ways of doing something in Ruby... bye Frank