← codetypingtest

Ruby typing test

Ruby was designed to be pleasant to read, and it's pleasant to type too: no semicolons, few parentheses and blocks that close with end. The symbols you meet are Ruby's own: |i| block parameters, :value symbols, << for appending and question marks in method names like nil?.

Start the Ruby typing test

What you'll type in Ruby

Example: FizzBuzz in Ruby

No braces or semicolons in sight: puts, elsif and end do all the work.

(1..15).each do |i|
  if i % 15 == 0
    puts "FizzBuzz"
  elsif i % 3 == 0
    puts "Fizz"
  elsif i % 5 == 0
    puts "Buzz"
  else
    puts i
  end
end

Type this program now

Tips for typing Ruby faster

All 20 Ruby programs

Every program is real, working Ruby. Choose one to start typing it straight away.

Beginner

Intermediate

Advanced

Expert

How the test works

The timer starts on your first key and stops once every character is right. Press Enter for a new line and the indentation is filled in for you. A wrong key shows in red and counts as a mistake; press Backspace to go back and fix it. Your best time for each program is saved in your browser. Read more about how speed and accuracy are calculated, or get tips for typing code faster.

Other languages