From: Mohit Sindhwani Date: 2007-09-22T14:59:15+09:00 Subject: Re: I am new to Ruby and I could use some expert advice as t 7stud -- wrote: > Gavin Kistner wrote: > >> Programming languages are a personal choice. There's no need to argue >> about which is 'better' or 'worse'. You must decide for yourself what >> you need to get done, what language(s) allow you to accomplish those >> goals, and which you personally prefer. >> > > Agreed. However, I learn a new languages because I think it will help > me write better programs. Ruby gets a lot of hype as part of ROR, but > everything I read leads me to believe that Ruby is just too slow to be > practical. > > I think "slow to be practical" is very relative, again. It helps me get my program done extremely quickly (I don't know Python - so I can't compare with it, but it is certainly quicker than getting it done in assembly, C, C++ or Java) and it stays out of my way. Ruby scripts are not part of my main job but it helps a lot in things like data manipulation where I would use a combination of tools in the past. For a lot of the work I do, Ruby is used for internal consumption. Every minute saved in programming is a bonus there since internal consumption is very technically a cost. At the same time, we are happy to let a program run for an extra 30 seconds or even 2 minutes if it's a one-off. If it's part of a pipeline, we can usually optimize it to meet the needs of the pipeline. For example, we found that using the base csv classes were much slower than using line.split(',') and since out files were extremely predictable, we could easily switch. In other cases, we do a C extension or just hook it up to call a C executable to preprocess the data, etc. I think Ruby is a powerful tool in a heterogeneous environment. It's not the answer for every problem - but it does play really well with others. Again, I believe we should use the best tools for the job and there are many things that I would not/ cannot do in Ruby. Cheers, Mohit. 9/22/2007 | 1:59 PM.