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.
- Personalize your list of questions.
- Don't ask questions you don't know the answers to.
- Mix trivia questions with open-ended ones.
- 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.
- 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?
- 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
#send? Why are they useful?
- What is the general history of Rails?
- 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.
(no particular order)
- @darcyclarke's Frontend Interview Questions (inspiration for this repo)
- Open Letter: Rails Interview Prep from my blog
- Ruby Koans
- Project Euler
- Flatiron School Prework and background