Ruby Interview Questions

830 ruby interview questions shared by candidates

You have a stream of unknown length of objects of unknown size (1B-1GB). You have a method getObj to retrieve one object at a time and no way to know in advance how many objects are present in the stream. Create a function to randomly return an element from the stream.
avatar

Python/Ruby Developer

Interviewed at AppNeta

3.8
Aug 1, 2015

You have a stream of unknown length of objects of unknown size (1B-1GB). You have a method getObj to retrieve one object at a time and no way to know in advance how many objects are present in the stream. Create a function to randomly return an element from the stream.

Coding challenge 1. Objective This program is designed to give you the opportunity to show off your skills and give us something we can talk about in your interview. What we want is an example of code you're proud of and want to talk about. The coding challenge should take you between three and seven hours, probably depending on how recently you've done something similar... 2. Challenge - Rate Limiter For this challenge, you'll start off by creating a new rails application. You can include any gems or other libraries you consider will be helpful but don’t use a gem for the rate limiting. Create a new controller, perhaps called "home", with an index method. This should return only the text string "ok". The challenge is to implement rate limiting on this route. Limit it such that a requester can only make 100 requests per hour. After the limit has been reached, return a 429 with the text "Rate limit exceeded. Try again in #{n} seconds". How you do this is up to you. Think about how easy your rate limiter will be to maintain and control. Write what you consider to be production-quality code, with comments and tests if and when you consider them necessary. When you've finished, send us the link to your repo on github. Good luck! P.s. Remember, we want to see code you are proud of :)
avatar

Senior Ruby On Rails Developer

Interviewed at Airtasker

2.9
Dec 3, 2017

Coding challenge 1. Objective This program is designed to give you the opportunity to show off your skills and give us something we can talk about in your interview. What we want is an example of code you're proud of and want to talk about. The coding challenge should take you between three and seven hours, probably depending on how recently you've done something similar... 2. Challenge - Rate Limiter For this challenge, you'll start off by creating a new rails application. You can include any gems or other libraries you consider will be helpful but don’t use a gem for the rate limiting. Create a new controller, perhaps called "home", with an index method. This should return only the text string "ok". The challenge is to implement rate limiting on this route. Limit it such that a requester can only make 100 requests per hour. After the limit has been reached, return a 429 with the text "Rate limit exceeded. Try again in #{n} seconds". How you do this is up to you. Think about how easy your rate limiter will be to maintain and control. Write what you consider to be production-quality code, with comments and tests if and when you consider them necessary. When you've finished, send us the link to your repo on github. Good luck! P.s. Remember, we want to see code you are proud of :)

Viewing 71 - 80 interview questions

Glassdoor has 830 interview questions and reports from Ruby interviews. Prepare for your interview. Get hired. Love your job.