From: Chad Perrin Date: 2012-05-05T02:22:27+09:00 Subject: Re: From Python to Ruby On Sat, May 05, 2012 at 01:25:24AM +0900, Massimiliano Tomassoli wrote: > Hi everyone! > > I've been studying Python for a month or two but I didn't like it. I did > some interesting things with it, though: I added some form of currying, > pipelining and, eventually, code blocks. > The reaction of the Python community wasn't very positive, to put it > mildly, and I was accused of trying to ruin Python. Finally, someone > told me to go to my OMG-RUBYCODEBLOCKS-FRIENDS and I understood what was > happening. > I would never have expected such a reaction, really. > > I decided to follow the kindly-put invitation and here I am! > I've read a few articles about Ruby and hey... I like it pretty much. > It reminds me of Perl (which I learned before Python) but is much > cleaner. It is much more flexible than Python and you can even build > DSLs! > > Python's community hate DSLs, by the way. > Python is very high-level and yet, while using it, I began to miss many > of the C++ capabilities that let you bend its syntax and do incredible > things like those in the Boost libraries. > I think that dynamic languages can do much more without all that noise > (C++ templates are very hard to maintain). So, it's a pity when a > language such as Python lacks many features just for the fear that they > are misused or abused. > > Anyway, a friend of mine suggested that I pick up "The well-grounded > Rubyist" and then "Metaprogramming Ruby". > What do you think of them? I have not read The Well-Grounded Rubyist, so I can't really comment on it. I'll comment on Metaprogramming Ruby along with others, with URIs for articles where I've reviewed them (to varying levels of detail) before this. The following five books were very briefly reviewed here: http://blogs.techrepublic.com.com/programming-and-development/?p=3886 * Everyday Scripting With Ruby is an excellent introduction to the language for people with an at least passing familiarity with programming. * Metaprogramming Ruby is a fantastic introduction to metaprogramming with Ruby, but you might want to have a more basic book about Ruby on hand before tackling this book. Unlike many books organized the way this book was organized (see Ruby Best Practices), this thing is eminently suitable to just picking it up and reading it straight through from beginning to end. It also stands up to re-reading and use as a reference when grasping for ideas on how to do something. * Programming Ruby is pretty comprehensive. It is a bit dry by the standards of most Ruby books, but pretty engaging by the standards of most other languages' popular books, and the wealth of knowledge buried in it is invaluable. It is definitely not for people new to programming. * Ruby Best Practices is a great book for expanding your knowledge of Ruby some time after you've got a little bit of Ruby time under your belt, and it's great for jumping around in it to read the parts that happen to interest you Right Now. It conveys some real sense of how real, talented Rubyists write code, as a means of imparting an appreciation for good Ruby code on the reader. * The Ruby Way is a cookbook that contains so many examples of how to accomplish basic tasks that one might be able to build a career as a professional Rubyist on just reproducing the snippets contained in it and tying them together into programs (maybe). The best thing about it, though, is the way it uses these recipes to illustrate idiomatic Ruby coding styles. Five other books were also reviewed there, though I tried to pick out a selection that I thought would be most relevant to the sense I have of what you want/need based on what you've said here. The following two books were reviewed here: http://blogstrapping.com/?page=2011.194.11.46.40 * Eloquent Ruby is a great book for both people new to Ruby with at least a passing familiarity with programming *and* for people who have been writing code in Ruby for a while and want to make sure they haven't missed anything important. * The Book of Ruby is a terrible book that tries to teach the reader bad habits, includes code formatted in such a way that it is fairly difficult to read, and explains things in a kind of haphazard manner prone to digressions on irrelevancy and generally fails to do a very good job of teaching people how to program well in Ruby. I hope that helps. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]