From: sto.mar@... Date: 2012-08-25T22:29:11+09:00 Subject: Re: A Ruby Book (free to use) Am 22.08.2012 08:10, schrieb Karthikeyan A k: > Hello people, I have written a book on Ruby programming language. > Download it from here http://is.gd/r2012 Though appreciating the effort that was put into this, I would not recommend this at the moment as a good starting point for beginners. There is still a lot of work to be done. I only browsed a couple of pages and I found: - a wrong algorithm (on p. 32) # finds the greatest of three numbers a,b,c = 3,7,5 if a > b and a > c puts "a = #{a} is greatest" elsif b > c and b > a puts "b = #{b} is greatest" else puts "c = #{c} is greatest" end Now try that with a,b,c = 4,4,3 ! => c = 3 is greatest - doubtful simplifications and half-truths: "The p is a kind of short form for puts." (p. 33) "Note that if we use else with unless we must terminate the unless block with an end command." (p. 34) - antipatterns (unless...else) (on p. 34): unless age < 18 or age > 35 p "You can enter Armed forces" else p "You cannot enter Army. You are either too young or too old" end This highly confusing usage of unless finds its counterpart in sentences like "Let say that one is not a major and is considered a child unless he or she is less than 18 years old." (Which is wrong, by the way.) - a programming style (indentations, ...) that does not follow the highly reasonable style widely established in the Ruby community (see above examples) --