This website uses cookies to better the user experience of its visitors. Where applicable, this website uses a cookie control system, allowing users to allow or disallow the use of cookies on their computer/device on their first visit to the website. This complies with recent legislative requirements for websites to obtain explicit consent from users before leaving behind or reading files such as cookies on a user’s computer/device. To learn more click Cookie Policy.

Privacy preference center

Cookies are small files saved to a user’s computer/device hard drive that track, save, and store information about the user’s interactions and website use. They allow a website, through its server, to provide users with a tailored experience within the site. Users are advised to take necessary steps within their web browser security settings to block all cookies from this website and its external serving vendors if they wish to deny the use and saving of cookies from this website to their computer’s/device’s hard drive. To learn more click Cookie Policy.

Manage consent preferences

These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
Cookies list
Name _rg_session
Provider rubygarage.org
Retention period 2 days
Type First party
Category Necessary
Description The website session cookie is set by the server to maintain the user's session state across different pages of the website. This cookie is essential for functionalities such as login persistence, ensuring a seamless and consistent user experience. The session cookie does not store personal data and is typically deleted when the browser is closed, enhancing privacy and security.
Name m
Provider m.stripe.com
Retention period 1 year 1 month
Type Third party
Category Necessary
Description The m cookie is set by Stripe and is used to help assess the risk associated with attempted transactions on the website. This cookie plays a critical role in fraud detection by identifying and analyzing patterns of behavior to distinguish between legitimate users and potentially fraudulent activity. It enhances the security of online transactions, ensuring that only authorized payments are processed while minimizing the risk of fraud.
Name __cf_bm
Provider .pipedrive.com
Retention period 1 hour
Type Third party
Category Necessary
Description The __cf_bm cookie is set by Cloudflare to support Cloudflare Bot Management. This cookie helps to identify and filter requests from bots, enhancing the security and performance of the website. By distinguishing between legitimate users and automated traffic, it ensures that the site remains protected from malicious bots and potential attacks. This functionality is crucial for maintaining the integrity and reliability of the site's operations.
Name _GRECAPTCHA
Provider .recaptcha.net
Retention period 6 months
Type Third party
Category Necessary
Description The _GRECAPTCHA cookie is set by Google reCAPTCHA to ensure that interactions with the website are from legitimate human users and not automated bots. This cookie helps protect forms, login pages, and other interactive elements from spam and abuse by analyzing user behavior. It is essential for the proper functioning of reCAPTCHA, providing a critical layer of security to maintain the integrity and reliability of the site's interactive features.
Name __cf_bm
Provider .calendly.com
Retention period 30 minutes
Type Third party
Category Necessary
Description The __cf_bm cookie is set by Cloudflare to distinguish between humans and bots. This cookie is beneficial for the website as it helps in making valid reports on the use of the website. By identifying and managing automated traffic, it ensures that analytics and performance metrics accurately reflect human user interactions, thereby enhancing site security and performance.
Name __cfruid
Provider .calendly.com
Retention period During session
Type Third party
Category Necessary
Description The __cfruid cookie is associated with websites using Cloudflare services. This cookie is used to identify trusted web traffic and enhance security. It helps Cloudflare manage and filter legitimate traffic from potentially harmful requests, thereby protecting the website from malicious activities such as DDoS attacks and ensuring reliable performance for genuine users.
Name OptanonConsent
Provider .calendly.com
Retention period 1 year
Type Third party
Category Necessary
Description The OptanonConsent cookie determines whether the visitor has accepted the cookie consent box, ensuring that the consent box will not be presented again upon re-entry to the site. This cookie helps maintain the user's consent preferences and compliance with privacy regulations by storing information about the categories of cookies the user has consented to and preventing unnecessary repetition of consent requests.
Name OptanonAlertBoxClosed
Provider .calendly.com
Retention period 1 year
Type Third party
Category Necessary
Description The OptanonAlertBoxClosed cookie is set after visitors have seen a cookie information notice and, in some cases, only when they actively close the notice. It ensures that the cookie consent message is not shown again to the user, enhancing the user experience by preventing repetitive notifications. This cookie helps manage user preferences and ensures compliance with privacy regulations by recording when the notice has been acknowledged.
Name referrer_user_id
Provider .calendly.com
Retention period 14 days
Type Third party
Category Necessary
Description The referrer_user_id cookie is set by Calendly to support the booking functionality on the website. This cookie helps track the source of referrals to the booking page, enabling Calendly to attribute bookings accurately and enhance the user experience by streamlining the scheduling process. It assists in managing user sessions and preferences during the booking workflow, ensuring efficient and reliable operation.
Name _calendly_session
Provider .calendly.com
Retention period 21 days
Type Third party
Category Necessary
Description The _calendly_session cookie is set by Calendly, a meeting scheduling tool, to enable the meeting scheduler to function within the website. This cookie facilitates the scheduling process by maintaining session information, allowing visitors to book meetings and add events to their calendars seamlessly. It ensures that the scheduling workflow operates smoothly, providing a consistent and reliable user experience.
Name _gat_UA-*
Provider rubygarage.org
Retention period 1 minute
Type First party
Category Analytics
Description The _gat_UA-* cookie is a pattern type cookie set by Google Analytics, where the pattern element in the name contains the unique identity number of the Google Analytics account or website it relates to. This cookie is a variation of the _gat cookie and is used to throttle the request rate, limiting the amount of data collected by Google Analytics on high traffic websites. It helps manage the volume of data recorded, ensuring efficient performance and accurate analytics reporting.
Name _ga
Provider rubygarage.org
Retention period 1 year 1 month 4 days
Type First party
Category Analytics
Description The _ga cookie is set by Google Analytics to calculate visitor, session, and campaign data for the site's analytics reports. It helps track how users interact with the website, providing insights into site usage and performance.
Name _ga_*
Provider rubygarage.org
Retention period 1 year 1 month 4 days
Type First party
Category Analytics
Description The _ga_* cookie is set by Google Analytics to store and count page views on the website. This cookie helps track the number of visits and interactions with the website, providing valuable data for performance and user behavior analysis. It belongs to the analytics category and plays a crucial role in generating detailed usage reports for site optimization.
Name _gid
Provider rubygarage.org
Retention period 1 day
Type First party
Category Analytics
Description The _gid cookie is set by Google Analytics to store information about how visitors use a website and to create an analytics report on the website's performance. This cookie collects data on visitor behavior, including pages visited, duration of the visit, and interactions with the website, helping site owners understand and improve user experience. It is part of the analytics category and typically expires after 24 hours.
Name _dc_gtm_UA-*
Provider rubygarage.org
Retention period 1 minute
Type First party
Category Analytics
Description The _dc_gtm_UA-* cookie is set by Google Analytics to help load the Google Analytics script tag via Google Tag Manager. This cookie facilitates the efficient loading of analytics tools, ensuring that data on user behavior and website performance is accurately collected and reported. It is categorized under analytics and assists in the seamless integration and functioning of Google Analytics on the website.

How to Interview Your Ruby on Rails Developer

  • 175806 views
  • 13 min
  • Jan 05, 2020
Sviatoslav A.

Sviatoslav A.

Copywriter

Vlad V.

Vlad V.

Chief Executive Officer

Tags:

Share

We at RubyGarage want to share our knowledge about how to interview a Ruby on Rails developer. Since our main purpose is to sell great code, we require great coders.

This article will come in handy for you when you need to test a Ruby on Rails programmer but aren’t sure what questions to ask the Rails interviewee. You can consider this article as a guide for how to interview a Ruby on Rails programmer.

We’re not going to include all the questions you could ask, as that would take more than one article. For example, we decided to omit questions about code idioms and cunning expressions in Ruby. Also, we don’t want to give away all the questions which we might ask during an interview with a developer. We don't want a developer to simply look for answers on the Internet, as our main purpose is to ensure that we check the developer's grasp of the language and framework. We merely want to see how a Ruby software engineer expounds their knowledge of the domain.

Now let's chalk out the structure of a Ruby on Rails interview. The article will be divided into several parts since we usually check separate domains of knowledge. Here is the structure we typically use:

  • Ruby questions;
  • Ruby on Rails questions;
  • A pair programming task;
  • A home task.

Now it’s time to start asking questions to your Ruby on Rails developer to find out what they know!

Ask Ruby Questions to Test a Web Developer

Why do we ask Ruby-related questions to a Ruby on Rails developer? Because the Rails framework is written in Ruby. This means that when we write code for Ruby on Rails, we’re using Ruby. The main issue we encounter with Ruby on Rails programmers is actually that they don’t completely understand the basics – the programming language itself. We want to hire forward-thinking software engineers who will create high-quality code, and so we want to assess their Ruby competence.

Ruby questions to a Ruby on Rails developer

Our Ruby interview questions usually concern the Object Oriented Programming paradigm and object oriented design patterns. Class hierarchies, encapsulation, inheritance, and polymorphism are key concepts that every Ruby on Rails web developer should know well.

If a programmer correctly answers a list of questions similar to the ones below, then we move forward. Quality preparation for a job interview is important for a Ruby programmer. So if they can’t answer the following questions satisfactorily, then the interview is already over.

  • What is a class?
  • What is the difference between a class and a module?
  • What is an object?
  • How would you declare and use a constructor in Ruby?
  • How would you create getter and setter methods in Ruby?
  • Describe the difference between class and instance variables?
  • What are the three levels of method access control for classes and what do they signify?
  • What does ‘self’ mean?
  • Explain how (almost) everything is an object in Ruby.
  • Explain what singleton methods are. What is Eigenclass in Ruby?
  • Describe Ruby method lookup path.
  • Describe available Ruby callbacks. How can we use them in practice?
  • What is the difference between Proc and lambda?

The Second Series of Ruby Questions: Business Applications

Knowing the basics isn't enough to work for RubyGarage or for any other serious web development company. A programmer should also be able to explain how to write code for business applications. Since Rack is a very popular interface that makes it possible to develop an application in Ruby, we ask specific questions about it. Here are four possible questions and challenges:

  • What is Rack?
  • Explain the Rack application interface.
  • Write a simple Rack application.
  • How does Rack middleware works?

The Third Series of Ruby Questions: Ruby Gems

Ruby is a very popular programming language and it has a huge community of developers who create numerous helpful libraries. We at RubyGarage love gems because they simplify and accelerate the work process. Third-party code helps us develop web applications quickly and smoothly.

In this part of the Ruby on Rails interview, we want to learn how a Ruby web developer perceives the basic structure of a gem library. A programmer will use multiple gems when building applications on the job, which is why it’s important for us to see if the developer can read and comprehend code written by other programmers. The interviewee should also describe RubyGems, which is a special system to create, implement, and share gems.

We have built up a series of four questions about Ruby gems:

  • What is RubyGems? How does it work?
  • How can you build your own Ruby gem?
  • Explain the structure of a Ruby gem.
  • Can you give me some examples of your favorite gems besides Ruby on Rails?

Ruby on Rails Interview Questions

Now it's time to plunge into the world of the Rails framework. A qualified developer should be familiar with the Model-View-Controller approach to building applications. The series of Ruby on Rails interview questions for experienced programmers is divided into three groups. First, we ask some general questions related to the Rails framework. Second, we want to see what the developer knows about routing, controllers, and views – the main parts of any business application.

And finally, the ActiveRecord-related questions let us test how the programmer understands the Model part of an application. In order to work efficiently, a developer should write as little configuration code as possible when making ActiveRecord models. We ask about the conventions used for implementing such logic as well.

Ruby on Rails interview questions

Top Ruby on Rails Interview Questions

  • What is ActiveJob? When should we use it?
  • What is Asset Pipeline?
  • Explain the difference between Page, Action, Fragment, Low-Level, SQL caching types.
  • What is a Rails engine?

Routing, Controllers, and Views

  • Provide an example of RESTful routing and controller.
  • Describe CRUD verbs and actions.
  • How should you test routes?
  • How should you use filters in controllers?
  • What are Strong Parameters?
  • What do we need to test in controllers?
  • How should you use content_for and yield?
  • How should you use nested layouts?

Active Record

  • Explain the Active Record pattern.
  • What is Object-Relational Mapping?
  • Describe Active Record conventions.
  • Explain the Migrations mechanism.
  • Describe types of associations in Active Record.
  • What is Scopes? How should you use it?
  • Explain the difference between optimistic and pessimistic locking.

Ruby on Rails Questions: Security

We at RubyGarage know that a good application must be secure. We only hire programmers with a deep understanding of what types of attacks can be unleashed against a Ruby on Rails app. Besides possible attacks, a developer should also know everything about existing methods of protection. We want to see that a developer knows when to use such methods and what means of protection are good for what situations. As you will see in the suggested list of questions, we may be interested in not only Ruby on Rails security, but also in general web security concepts, such as the use of HTTPS instead of HTTP.

  • Explain what is a sessions mechanism. How does it work?
  • Describe cross-site request forgery, cross-site scripting, session hijacking, and session fixation attacks.
  • What is the difference between SQL Injection and CSS Injection?
  • How should you store secure data such as a password?
  • Why do we need to use HTTPS instead of HTTP?

Questions About Automated Tests in Ruby on Rails

Writing code for production without automated tests is a bad approach to web development – especially when we code in Ruby, because the language itself expects web developers to write tests. Automated testing in Ruby on Rails helps reduce the workload for the Quality Assurance team, and this will greatly improve the workflow.

Our developers always create automated tests, which is why we demand our interviewees to understand automated testing. All Ruby web developers must have a clear view of why to use automated tests, when to write them, and what types of tests exist. On top of understanding testing methods, every Ruby on Rails developer should know how to create a testing case and should be familiar with testing guidelines and best practices.

Here are some questions we might ask a Ruby on Rails developer about testing:

  • What is unit testing (in classical terms)?
  • What is the primary technique for writing a test?
  • What are your favorite tools for writing unit tests?
  • What are your favorite tools for writing feature tests?

Ask the Ruby on Rails Programmer About Refactoring

We’ll also ask some Ruby on Rails questions related to code refactoring, because refactoring is an important step during the development of any application. Refactoring means that developers brush up the code they have already written to make it cleaner and more efficient. We want our Rails programmers to write high-quality code that is maintainable and expandable. When refactoring, RubyGarage programmers have to maintain a proper code structure and enhance the application’s performance without changing the behavior of the code.

If a developer knows how to reach high-level performance, then the team will be able to improve the application faster in the future according to the client's changing requests. The next series of Ruby on Rails interview questions will help you gauge a developer's ability to write elegant code. Don’t forget that these question can be altered to focus on your own primary development concerns:

  • What is a code smell?
  • What are your favorite tools to find code smells and potential bugs?
  • Why should you avoid fat controllers?
  • Why should you avoid fat models?
  • Explain extract Value, Service, Form, View, Query, and Policy Objects techniques.

Give a Pair Programming Task

The next part of our Ruby on Rails interview always involves testing a programmer’s skills while paired with our senior web developer. We explain to the interviewee that this is necessary to unleash their mind. It doesn’t matter whether the interview is held online via Hangouts or Skype or whether it’s in-person, as we simply ask the interviewee to share their screen and start solving a task.

What is the purpose of a pair programming test? First of all, it gives us a look into the developer's line of thinking. Once a Ruby on Rails programmer gets the task, they should suggest some methods or means to resolve it. A pair programming task is very similar to a discussion, as our senior web developer helps the interviewee understand what solution might be not only workable, but best. Secondly, the pair programming tasks helps us determine a developer’s ability to work in a team. Below is an example of the tasks we might give during a Ruby on Rails interview.

Binary Gap

A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N. For example, the number 9 has binary representation 1001 and contains a binary gap of length 2. The number 529 has binary representation 1000010001 and contains two binary gaps: one of length 4 and one of length 3. The number 20 has binary representation 10100 and contains one binary gap of length 1. The number 15 has binary representation 1111 and has no binary gaps.

Write a function def binary_gap(n) that, given a positive integer N, returns the length of its longest binary gap. The function should return 0 if N doesn’t contain a binary gap.

For example, if N = 1041, the function should return 5, because N has binary representation 10000010001 and its longest binary gap is 5.

Assume that:

  • N is an integer within the range [1..2,147,483,647].

Complexity:

  • expected worst-case time complexity is O(log(N));
  • expected worst-case space complexity is O(1).

Home Task for a Ruby on Rails Developer

This is the last task that we give to the interviewee. We want to figure out if a Rails developer is able to use multiple technologies for both frontend and backend web development. An interviewee should have a good grasp of many frontend tools, including the JavaScript programming language, its frameworks and libraries. Proficient knowledge of a markup language and stylesheets is definitely a must. We further include tasks to test a developer’s ability to write autotests using tools such as RSpec, Capybara, and similar.

The home task can vary. For example, we may ask a Rails developer to implement a task with React, Ember, or Backbone instead of Angular. The particular task we give may depend on a particular project on which the Rails developer will work if hired.

Once a developer resolves our home task and we check the result, we can know for sure if this programmer is ready to work with us or not. This programming task, to be completed solely by a job seeker, is very valuable to verify his or her skills.

Task Definition

I'm passionate about productivity. I want to manage my tasks and projects more effectively. I need a simple tool that helps me control my task flow.

Functional Requirements:

  • I want to be able to sign in/sign up by email/password or Facebook;
  • I want to be able to create/update/delete projects;
  • I want to be able to add tasks to my project;
  • I want to be able to update/delete tasks;
  • I want to be able to prioritise tasks within a project;
  • I want to be able to set a deadline for my task;
  • I want to be able to mark a task as 'done';
  • I want to be able to add comments to my tasks;
  • I want to be able to delete comments;
  • I want to be able to attach files to comments.

Technical Requirements

  • It should be a WEB application:
    • For the client side, use HTML5, CSS3, Bootstrap, JavaScript, AngularJS, and jQuery;
    • For the server side, use Ruby on Rails.
  • It should have client side and server side validation;
  • It should work like a single-page WEB application and should use AJAX technology (load and submit data without reloading a page);
  • It should have a user authentication solution. The user should only have access to his/her own projects and tasks (Devise, Cancancan);
  • It should have automated tests for all functionality (models - RSpec, controllers - RSpec, acceptance/functional tests - RSpec + Capybara);

The result should be similar to the one in the screenshot below:

Home task for a Ruby on Rails developer

To Sum Up

There are many more Ruby on Rails interview questions that we might ask a programmer before we hire them. Our purpose was to show you how our interviews are organized at RubyGarage. The questions we ask are designed to analyze a programmer’s skills as fully as possible. Ask the right questions to your Ruby on Rails developers to make sure you hire a programmer who will be a great asset for your team!

CONTENTS

Tags:

Authors:

Sviatoslav A.

Sviatoslav A.

Copywriter

Vlad V.

Vlad V.

Chief Executive Officer

Rate this article!

Nay
So-so
Not bad
Good
Wow
29 rating, average 4.72 out of 5

Share article with

Comments (1)
Mai Truong Giang
Mai Truong Giang over 6 years ago
Thank for sharing!
Reply

Subscribe via email and know it all first!