I just discovered the what c# knowledge should I have? question and wondered about the same, but for Ruby. I consider Ruby to be my favorite programming language, and beyond learning the basics, at least what I've picked up from numerous Ruby on Rails projects and a few Ruby scripts, I've tried to learn from reading blogs like Gluttonous, O'Reilly Ruby, Ola Bini, and Polishing Ruby. I've also read in books like The Ruby Way.
However, I haven't felt fully prepared when being interviewed about my Ruby skills. I was asked once if I knew about closures and at first I responded that I didn't, but then I asked if the interviewer meant code blocks, like lambda and do
...end
, and he did. How did I go about 3 years of programming Ruby and trying to learn the language without learning that closures = code blocks?
So, my question to you is what knowledge should a Ruby programmer have of the Ruby language? What would you expect, as an interviewer for a Ruby position, me to know? Just list some topics, and I'll do the reading about them. Listing Ruby-specific tools like Ruby on Rails, Rake, Rack, etc. is good too, if you think that's necessary.
This is sort of from the top of my head; I'm sure I am missing a lot. Besides the things mentioned here, understanding programming and object-oriented programming in particular is a must, of course.
A few important language features:
[]
, []=
, ==
, +
, <<
, etc. on an object.collect
, inject
, join
, zip
, etc. where appropriate.attr_accessor
and friends, and how you can define them yourself.Module
and Object
).Hash
method argument as a substitute for named arguments (even if it's just because it's a common pattern).Some vital tools:
Some framework knowledge:
Ultimately, keep in mind that the above is "just knowledge", and not skills. It's probably easy to pick up most of this if you're not familiar with it.
You could probably fill in any gaps in knowledge you have due to being a real programmer and not an academic by reading The Ruby Programming Language by the creator of Ruby, Yukihiro Matsumoto. It covers a lot of obscure details, such as the vagaries of multiple assignment in different kinds of lambdas, and is relatively new, covering new semantics in Ruby 1.9.
A boss of mine once told me that a long-term programmer that he knew and trusted once turned to him and asked, "I forget... how many bits are in a byte?" The moral of the story wasn't that this guy was an idiot--it was that it's sometimes possible to write a fair bit of competent code over a long term and miss out on things that seem to others as though they should be elementary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With