Skip to content

Latest commit

 

History

History
80 lines (61 loc) · 4.62 KB

README.md

File metadata and controls

80 lines (61 loc) · 4.62 KB

Rails Interview Questions

I get a fair number of questions via Hacker Hours and elsewhere regarding what questions to use/expect in an interview for a Rails developer, so figured I would get it together in a tidy list. Pull requests welcome.

Tips

Interviewers

  • Personalize your list of questions.
  • Don't ask questions you don't know the answers to.
  • Mix trivia questions with open-ended ones.
  • Use Codr or a similar online collaborative text editor for doing coding challenges
    • Can be seen in real-time by remote team members
    • The unique URL with the solution can be easily sent around or added wherever you a tracking information about the candidate
  • About a third of the way through the interview, however you're feeling about the candidate (:+1:/:-1:), try and convince yourself otherwise.
    • This is to help yourself fight your own biases.

Interviewees

  • Don't study to the test. Not all of these questions will be used, and others will be asked that aren't covered here. Know your stuff.
  • Rails skills != CS skills
  • Know whether you are interviewing for a full-stack vs. backend-focused position.
  • Have code up on Github/Bitbucket/wherever - the more side projects you have to talk about, the better.
  • Be comfortable with some version control system.
  • Community awareness and resourcefulness can be as important as technical knowledge.

The Questions

General

  • What is a tree? What is a DAG?
  • Pseudo-code depth-first and breadth-first search.
  • Given a sorted array, what is the fastest way to find a element? What is the Big-O time to do so?
  • Explain how ajax works, hitting all parts of the stack. (@abestanway)

Ruby

  • What is the difference between a lambda, a block and a proc? [I have gotten this one at every Ruby interview I've been in]
  • How do you sort an Array of objects by a particular attribute? What is a better way to do sorting with ActiveRecord?
  • What are some of your favorite gems? What are their alternatives?
  • In Ruby, which is generally the better option: a recursive function or an iterative one?
  • What are #method_missing and #send? Why are they useful?
  • What are the various Ruby runtimes, and how are they different?

Rails

  • What is the general history of Rails?
  • What is new in Rails 4?
  • Explain the different pieces of Rails.
  • Walk through the flow of a request through Rails.
  • What are the different server options for running a Rails/Rack app?
  • Explain CSRF and how Rails combats it.
  • Explain mass-assignment vulnerability.
  • Why do some people say "Rails can't scale"?
  • What is Rack?
  • What is middleware? How does it compare to controller filters/actions?
  • Explain various forms of caching available in Rails.
  • What are some Ruby web server options?
  • How is something like 30.seconds.ago implemented? (c/o @harrisj)
  • On a scale of "I've heard of it" (0) to "I maintain it" (10), how would you rate your Rails proficiency?

Resources

(no particular order)


Creative Commons License
Rails Interview Questions by Aidan Feldman is licensed under a Creative Commons Attribution 3.0 Unported License.