I’ve recently been helping interview some ruby/rails developers. I searched the web for some inspiration but I could not find any example questions that had real depth to them. I like my questions to be a point of discussion rather than one word answers. Most importantly I want a wide enough scope to let those talented individuals shine through. So here are some of the questions I’ve been trying out recently.
1. You are getting the chance to fly in the worlds first unmanned Airplane who’s systems are written only in ruby. Would you fly in it? Explain your reasoning
2. Ruby is great and everything but its nothing more than a prototyping language. Its just too hacky and dynamic for any real production system. Why bother with its messy Perl lineage and the lack of internationalisation support when you could just use Python? Discuss.
3. Ruby takes a unique approach to the problem of multiple inheritance. Explain ruby’s approach and the strengths and weaknesses of it.
4. Do you think adding behaviour to the builtin core Ruby classes is a good idea? Can you give some examples to backup your opinion.
5. Explain why in ruby nil.object_id is equal to 4. (Rather nasty question, really asking about C)
>> nil.object_id => 4
6. Twitter(http://www.twitter.com) is a website built on Ruby on rails. It is a
“Social networking and microblogging service utilising instant messaging, SMS or a web interface.”
Why do you think twitter (http://www.twitter.com) used Ruby on Rails?
Do you think it was a good decision?
7. Explain what ‘has_many’ is and what happens when it is run.
class Monkey < ActiveRecord::Base has_many :bananas end
8. Given a simple website focused on a REST model and produced solely by using script/generate scaffold. Explain what happens in the rails application when a user submits a form with a POST request to: ‘/images/1’. State any assumptions you make.
9. If each language was represented as a person what type of person would each be and why?