From: Zach Dennis Date: 2004-09-16T03:54:35+09:00 Subject: Re: Ex-Perl coders: Howz it feel to convert to Ruby? Chris wrote: > Peter Hickman wrote: > >> Being a long time Perl programmer I tend to reach for Perl when I >> have a problem to solve. Mainly because I can just grab a module off >> CPAN and hack something up. >> >> However whenever I want to write a simulation (population models, >> music generators etc.) I go straight for Ruby. >> >> I can hack something up pretty quick in Perl, but I stand a better >> chance of maintaining it in Ruby so I get it to work in Perl and then >> take the design over to Ruby. >> > > Interesting, and I think I can/could continue to relate to this. As > already stated, I can usually whack out a concise, tight solution in > Perl in just a little bit of time. I'm anxious to see if I can get to > that place in Ruby and what that would look like. This sounds like > Ruby might be more suited to "bigger" tasks and Perl to the small > ones. I'm sure others will jump in here momentarily and dispute this... > > -ceo I'm not a hardcore perl user. I learned perl and ruby at the same time. After a few months I dropped Perl and went with Ruby. A coworker of mine uses Perl a heck of a lot (and refuses to try Ruby...ignorance..arghh) and we did a test one day. We both wrote a script to parse out Flash ActionScript code. In one hour I was done with the requirements we had came up with. About an hour later he was finished. He even stated that my code looked cleaner then his, and mine was about 60 lines less of code. Although his code did run about 4 seconds faster per 1000 files of about 200 lines of code. On another note I think that Perl coders like Perl because if they have a specific problem they can write up a script start to finish relatively quick to solve it. Where Perl lacks here is that if that problem changes or evolves (which they often do) and the requirements change, perl coders don't go refactor their code...they just start a whole new script and rewrite it, which works for small scripts and small problems, but not for larger ones. Perhaps this is how it should be interpreted when you say "sounds like Ruby might be more suited to "bigger" tasks and Perl to the small ones", because I would think more Ruby programmers refactor their code instead of doing a rewrite everytime a requirement changes. (Assuming that the requirement change is a month or two or more after the initial script was written). Zach