Re:Happy Birthday, Ruby
by jhbadger on Thursday January 10, 2019 @11:53AM
(#18875389)
Python already existed when Ruby came out and before rails was a thing. I understand you don't care for the language but the main reason for its creation was to have a completely object-oriented (in the Smalltalk sense) scripting language which python just isn't. Personally, I like a language where everything is classes and methods and I don't have to remember to use a function rather than a method to get (for example) the length of arrays as I have to do in python
[ Parent
| on HN ]
Re:Happy Birthday, Ruby
by mywrathacademia on Thursday January 10, 2019 @06:38PM
(#18879605)
I'm learning Java and was surprised to read your comment about ruby being completely object oriented. I always assumed ruby was very similar to Python. I would be interested in learning ruby especially if it is easier for someone with an object oriented background in Java. So, how difficult would coming from Java to Ruby be? And what books or MOOCs would you recommend for the transition?
Yes, everything -- even integers --- are objects in Ruby -- you can say 5.methods and Ruby will respond with a list of methods integers know. I think the best way to learn Ruby is Dave Thomas' classic "Pickaxe Book". This describes pure Ruby, as it predates Rails (not that I have anything against Rails, but a lot of people confuse Rails with Ruby which is a mistake). There is an updated version of the book for sale for Ruby 2.X, but the original is free at http://ruby-doc.com/docs/ProgrammingRuby/ and because most of the changes between versions are minor, it would serve nicely to learn current Ruby.
Re:Happy Birthday, Ruby
by mywrathacademia on Friday January 11, 2019 @06:48PM
(#18888343)
That's amazing. With integers being objects it's even more object oriented than Java. That's great to hear. The book you linked does I assume no prior programming experience? If so, I would prefer not going over what I already know from Java since both are strongly object oriented. I also hear MHartl's tutorial is good. Would you recommend it fir learning Ruby?
Re:Happy Birthday, Ruby
by dbattaglia on Thursday January 10, 2019 @09:54PM
(#18880644)
> And what books or MOOCs would you recommend for the transition?
I enjoyed “Eloquent Ruby” when I needed to learn Ruby for my previous job. Highly recommend it.