3 Aug 2010 00:51
Re: comments from an experienced programmer on ruby docs
Roger Pack <rogerdpack2 <at> gmail.com>
2010-08-02 22:51:25 GMT
2010-08-02 22:51:25 GMT
Might suggest adding info to the ruby wikibook: http://en.wikibooks.org/wiki/Ruby_Programming On Wed, Jul 28, 2010 at 12:41 PM, <travis.ml-ruby-doc <at> subspacefield.org> wrote: > > Hey there, I am learning ruby for my hard drive backup project: > > http://www.subspacefield.org/security/hdb/ > > Ruby is a cool language, but the documentation is a little hard to > read. Many people use the term "Foo#whatever" with the assumption > that one knows what it means - I originally assumed it was an instance > method, but now believe it is a class method. Since it's a special > character, you can't really search google for it easily. > > Regarding http://rubylearning.com/: the formatting of the text boxes > is awful, since at least on my computer, it requires manually scrolling > every one, effectively peering at the program through a tiny viewport. > The content, however, is very good. > > One thing that needs discussion is how everything except ints and > floats (and perhaps some other types) are passed by reference. I got > really bit by passing strings into constructors, and the constructor > later modified the string, and that changed the value of the thing I > passed in. This is true for arrays as well, and any user-defined > objects. Since this is a change from how many other scripting > languages work, you should point it out a little better (it is hinted > at). In essence, you'll want to dup any parameter before modifying it > (unless again it is an integer or float). I assume these are the(Continue reading)
RSS Feed