from Hacker News

New to Ruby? Tips for the new Rubyist.

by kaiwren on 6/5/12, 1:11 PM with 64 comments

  • by tseabrooks on 6/5/12, 2:35 PM

    I'm in the middle of picking up Ruby primarily because there was a GitHub project I wanted to fork and modify for my purposes that happened to be written in Ruby.The biggest problem I found is that the Ruby (or maybe the Rails?) community by and large provides shit instructions on how to get something running. I checked out a handful of projects and they all said things like, "Just deploy the normal what you deploy a rails app" and the like. Likewise, googling had almost universally bad / outdated information. Eventually I ended up with Passenger who had awesome instructions.

    I finally pushed through but I suspect just getting things running is a big enough PITA to deter new people from participating in Ruby land. Even if Hannson says it's a myth.

  • by why-el on 6/5/12, 1:59 PM

    I would like to get some advice from experienced Ruby hackers. Currently I am picking up Ruby through rails, which I am assuming is fairly common. I want to know the downsides to this and what people did to supplement their ruby knowledge beyond Rails. I eventually would like to write my own gems, contribute to open source, and so forth. I am absolutely not satisfied with just consuming Rails.
  • by msluyter on 6/5/12, 3:57 PM

    I really enjoyed working through the Ruby Koans (http://rubykoans.com/). They're especially nice because you can work on them offline, so I finished them while on a flight to the U.K. I'm considering writing up some "advanced ruby koans," with more in depth examples delving deeper into the standard library and whatnot.
  • by danso on 6/5/12, 5:20 PM

    I think it's wrong to judge Zed's Learn Ruby the Hard Way too harshly as the OP does...yes, it's a straight port from the Python version, but both versions focus on teaching programming to non-programmers, which is a concept that can be largely language and idiom agnostic...at least between Python and Ruby.
  • by vidarh on 6/5/12, 3:53 PM

    His summary of the object hierarchy of Ruby is probably more confusing than elucidating to most Ruby beginners, since he doesn't make it very clear that he's dealing with the distinction between instances and classes (which are themselves instances of Class).

    From the description it seems like he doesn't quite get the distinction himself, and one of the later examples is broken:

    "Array.new.methods - Object.methods" should read "Array.new.methods - Object.new.methods". Otherwise he's in fact subtracting the methods available on an error instance from the methods available on an instance of Class, not the methods available on a generic object..

  • by rjsamson on 6/5/12, 1:58 PM

    Its great to see metaprogramming listed here - it is a term that tends to frighten beginners a lot more than it should. Understanding some of the basic metaprogramming concepts and features early will go a long way to helping you become a better Rubyist.
  • by xyzzyb on 6/5/12, 3:39 PM

    Shameless plug: I collected a bunch of resources for learning Ruby, Rails, and general programming on Rake Routes a couple months ago: http://rakeroutes.com/blog/learning-ruby-rails-and-programmi...

    On the article, I strongly disagree that vim requires plugins to be viable for Ruby development. The Janus plugin should especially be carefully considered as it wraps up a lot of magic that could prevent the new vim user from effectively learning vim itself.

  • by cicloid on 6/5/12, 1:43 PM

    Also material like Ruby Rogues podcast ( http://rubyrogues.com/ ) contain great episodes to give a newcomer a tour of the ecosystem.
  • by christiangenco on 6/5/12, 2:08 PM

    > (infinite loops are almost always written using the loop do..end construct though. but how often do you write infinite loops anyway?)

    `while true` usually does it for me.

  • by snorkel on 6/5/12, 3:40 PM

    Empty string is true. Who here hasn't banged their head over that one?
  • by sparknlaunch on 6/5/12, 3:40 PM

    Uh, another good post on sharing the joy/pain of learning Ruby. Thanks for sharing.

    I have spent the past three weeks getting my head into Ruby (on the hopeful way to understanding Rails). With so many different languages and stacks, it makes the early stages extremely daunting for a beginner.

    I have found comfort in the following resources:

    1) The only website I found that actually visualized how everything sits together: http://techiferous.com/2010/07/roadmap-for-learning-rails/

    2) I persevered with a Ruby programming book: Beginning Ruby: From Novice to Professional (by Peter Cooper)

    3) Spent a few days on a zero install Ruby tutorial: http://tryruby.org

    I plan to write some blog posts on the journey however may wait until I get passed the basics before sharing too much.

  • by tferris on 6/5/12, 2:59 PM

    OT and hijacking this thread:

    1. Who is actually new to Ruby?

    (After Ruby or rather the popular RoR is there almost for a decade everyone should have made some experiences with Ruby, so I am wondering if there are many new Rubiest)

    2. What new language/stack did you start to learn recently?

    (for me: Node.js)