From: Dave Aronson Date: 2011-11-13T09:25:23+09:00 Subject: Re: Share stories about using Ruby outside of pet projects On Sat, Nov 12, 2011 at 01:21, Kevin wrote: > i would appreciate it > if those of you who have had the opportunity to use Ruby in the course > of your employment might share some of the things you did, problems > you faced and general gotchas. I've used it on two jobs. At Comcast, I did some trivial parsing of CSV and XML files, plus a small RoR app to let my manager automagically fill in holes in a spreadsheet of the risk levels of various projects, broken down by various aspects. At Rosetta Stone, I modified an existing RoR app to add a couple pages to a site engine, and to pass a few additional variables along to the JavaScript that embedded (and passed the info along to) our main programs in Flash. But now that I'm "between positions" I'm hoping to do a lot more with Ruby at work, especially RoR.... Problems and gotchas: not really much, especially at Comcast since the alternative was to do it in Perl. Other gotchas I've found in Ruby: mainly the way assigning a variable in Ruby, inside a method, that you might THINK is one of the data members, is actually creating a method-local variable. Example: class Foo def initialize @bar = 3 end def methhead bar = 5 end end Calling methhead will NOT assign the data member 5 -- you have to say @bar or self.bar. Classic easy mistake, but many other languages at least warn you about such "shadowing". -Dave -- LOOKING FOR WORK! What: Ruby (on/off Rails), Python, other modern languages. Where: Northern Virginia, Washington DC (near Orange Line), and remote work. See: davearonson.com (main) * codosaur.us (code) * dare2xl.com (excellence). Specialization is for insects. (Heinlein) - Have Pun, Will Babble! (Aronson)