Skip to content

Instantly share code, notes, and snippets.

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

class CommunitiesController < ApplicationController
# ...
def show
@community = Community.find(params[:id])
@users = @community.users
@ressources = Ressource.paginate(:page => params[:page], :per_page => 5)
end
# Simple 16 step drum machine experiment with Node and CoffeeScript
# by Peter Cooper - @peterc
#
# Inspired by Giles Bowkett's screencast at
# http://gilesbowkett.blogspot.com/2012/02/making-music-with-javascript-is-easy.html
#
# Screencast demo of this code at http://www.youtube.com/watch?v=qWKkEaKL6DQ
#
# Required:
# node, npm and coffee-script installed
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('http://localhost');
socket.on('midi', function (data) {
console.log(data);
});
</script>
# --- parameters to be set in ./data/java_args.txt ---
# -Xms256m -Xmx256m # Heap at least 256 MB
# -Djna.library.path="/ruby-processing/library/gsvideo/library/gstreamer/win" # optional for future video extension...
require "jrMidiVsynth22" # class JRmidi for basic MIDI I/O in JRuby, adapt your MIDI-ports here if necessary
SETTINGS = "visualSynthSettings14" # contains changable settings for "which function to call" by modifier-keys
# === helper functions === (map internal representation of layers to external for "print-out"
class Range
def inspect_plus_one
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {