Ruby Typing Speed Test
Ruby reads like English but types like nothing else: `@` instance variables, `:symbols`, pipe-delimited block parameters, and `#{}` interpolation. These drills train the punctuation hiding inside Ruby's famous readability.
The Punctuation Behind Ruby's Elegance
Blocks are Ruby's core idiom, and their parameters live between pipes: `users.each { |u| puts u.name }` requires two Shift-backslash reaches per block β a key most typists never use. Symbols prefix identifiers with a colon (`:admin`, `role:`), instance variables with `@`, and globals with `$`, so sigils appear at word boundaries throughout real code.
String interpolation wraps expressions in `#{}` β pound, brace, brace β inside double quotes, and the symbol-to-proc shortcut `(&:name)` stacks ampersand and colon. Method names ending in `?` and `!` (`passed?`, `save!`) put punctuation at identifier ends, and `do |x| ... end` alternates words with pipes. Ruby's minimal braces don't mean minimal symbols β they're just different ones.
Key Drills for Ruby:
- Pipes around parameters: Block params need `|x|` β drill the pipe pair until blocks open without hesitation.
- Colon-prefix symbols: `:symbol` and `key:` forms are everywhere. The colon should feel natural on both sides of a word.
- Interpolate in one motion: `#{}` is three symbols typed as one gesture inside strings. Chunk it.
Sample Drill: Blocks, Map & Select
Enumerable chains with blocks and symbol-to-proc.
admins = users.select { |u| u.role == :admin }
names = admins.map(&:name).sort
names.each_with_index do |name, i|
puts "#{i + 1}. #{name}"
endThe Symbols That Slow You Down
The keystrokes below are where Ruby typing speed is won or lost. Key positions shown for QWERTY β the pattern transfers to any layout, just on different physical keys.
| Symbol | Used For | Keys | How to Drill It |
|---|---|---|---|
| |x| | Block params | Shift+Backslash twice | Two of the farthest reaches on the board, per block. `each { |u| }` lives or dies on this pair. |
| :sym | Symbol | : as Shift+Semicolon, then word | Symbols prefix identifiers with colons β and keyword arguments end with them (`role:`). Both directions. |
| #{} | Interpolation | # as Shift+3, then {} as Shift+[ and Shift+] | Three symbols inside quotes, in fixed order: pound-brace-expression-brace. Type as one gesture. |
| @ | Instance variable | Shift+2 | `@name`, `@count` β sigils at word starts throughout classes. Shift-2 reflexively. |
| &: | Symbol-to-proc | & as Shift+7, then : as Shift+Semicolon | The `(&:name)` shortcut stacks two shifted symbols β ampersand then colon β mid-argument. |
| ? ! | Predicate / bang endings | ? as Shift+Slash, ! as Shift+1 | Ruby ends method names with punctuation (`passed?`, `save!`). Word-ending question marks are unique to Ruby. |
Common Ruby Typing Mistakes
- βReaching for the pipe pair slowly β block-heavy Ruby is untypable until `|x|` is one motion.
- βForgetting the closing brace of `#{}` β the interpolation should be chunked, not spelled.
- βDropping `?` or `!` from method names at speed; Ruby treats them as part of the identifier.
What's a Good Ruby Typing Speed?
Ruby's words are short but its sigils are many: 30β45 WPM is solid working speed, and 50+ WPM with 96%+ accuracy is excellent. Enumerable chains (`map { |x| x.to_s }`) are the ideal benchmark drill.