From: Ara.T.Howard@... Date: 2004-09-01T07:15:33+09:00 Subject: Re: Ruby for system administration On Wed, 1 Sep 2004, Robert Nesius wrote: > Now that I've read the rest of the thread and added a few comments, I'd say > if your friend is the only person responsible for his box(s) no big deal. > But if he is part of a larger team, and he is the only ruby scripter around, > he should not use ruby at all. Because after he's gone, it is going to be > difficult for anyone to fix/change/maintain his code. He should use > whatever the group uses, and in most places that is perl. i wrote a very large database system for tracking meteorlogical metadata. it was in alpha when i left for another job, there were no docs. a friend (perl guru) of mine took over the project. he used to ping me with comments like "there are no docs - so how can do XXX?". i would say - "read the source". eventually he did and then sent me this: Hi Ara, After looking through pds.rb to learn about how to install a changed format, I just wanted to say this is some pretty nice programming on your part. It looks like it's written to make sense rather than to impress. Coding, like music, is so much nicer without excessive use of heavy metal licks. Hey, what does the ``<< self'' syntax mean here? module PDS class << self # assumes $pgconn is connected to correct db def pgconn raise 'NO CONNECTION FOUND ($pgconn)!' unless $pgconn $pgconn end end .... Thanks, R now, this was pretty straightforward ruby so the compliment is truely aimed at ruby, not me. the point being, after a few lessons in things like 'what does class << self mean' he did fine. and that's all without docs. in summary i think that 90% of the ruby code out there is more readable than perl code - even to perl coders! consider how you would feel if someone made the same argument you are making when perl was the new alternative to doing everything in sh! > Heretic, I know. :) The point is he works in a group and other people will > have to maintain his code after he's moved on to other groups or duties > within his group, if he's the only ruby scripter, he's causing a problem. > If he's the only ruby scripter but he's going to train his colleagues on how > to write/maintain ruby, that's ok then. yeah - we are in agreement here then and that is the path i have taken. i will say that any __decent__ perl programmer (understands closures, references, OO perl, interface polymorphism, etc.) should be able to pick up ruby in under 24 hours or one complete program - whichever comes first. kind regards. -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | A flower falls, even though we love it; | and a weed grows, even though we do not love it. | --Dogen ===============================================================================