One Quote That Changed How I Think About Code
DHH's Philosophy on Human-First Programming
Full disclosure: This post was written by a human (me), polished by an AI (it fixed my grammar and made me sound smarter), then reviewed by me again (to make sure the AI didn't make me sound too smart). Any remaining errors are 100% organic, artisanal, human-made mistakes.
"If the human doesn't need additional characters, we're not putting them in because it'd be nicer to parse for the computer."
— DHH on Ruby's design philosophy
Why This Quote Matters
This single sentence captures a radical stance: code exists for humans first, machines second. The computer will figure it out. Your syntax highlighting will figure it out. The parser will figure it out. But the human reading the code at 3 AM trying to fix a production bug? They need all the help they can get.
Most programming languages are designed the opposite way. They add characters to make parsing unambiguous, even when those characters add nothing for human readers. Ruby chose differently.
The Contrast in Practice
# Machine-friendly syntax (Java, C++, etc.)
if (user.isActive()) {
sendEmail(user.getEmail());
}
for (int i = 0; i < 5; i++) {
System.out.println("Hello");
}
DateTime date = DateTime.now().minusDays(5);
# Human-friendly syntax (Ruby)
if user.active?
send_email user.email
end
5.times { puts "Hello" }
date = 5.days.agoEvery semicolon, every parenthesis that isn't strictly necessary, every verbose method call—these are concessions to the machine. Ruby minimizes them. The result is code that reads almost like English.
The Implications
Reading Trumps Writing
Code is read far more than it's written. Optimizing for writing speed (more explicit syntax, more compiler help) often makes reading harder. Ruby optimizes for the common case: reading and understanding.
Context Matters
Humans understand context. We don't need getUser() when useris obvious from context. We don't need explicit type annotations when the type is clear from usage. Languages that trust context enable cleaner code.
Trust the Reader
Every unnecessary character is the language saying "I don't trust you to understand this." Minimal syntax says "I trust you're a capable programmer who can follow along."
Applying the Principle
Even if you're not using Ruby, you can apply this principle:
- Remove unnecessary syntax: If your language allows optional semicolons or parentheses, consider omitting them when it aids readability.
- Name things clearly: Good names eliminate the need for comments and type annotations.
- Question verbosity: Every line of boilerplate is noise for human readers. Minimize it.
- Optimize for the reader: When you're unsure, ask "will this be clear to someone reading it later?"
The Human-First Philosophy
This quote changed how I evaluate languages, libraries, and my own code. The question isn't "is this syntactically correct?" but "does this communicate clearly to a human reader?"
Computers are infinitely patient. They'll parse whatever syntax you give them. Humans are not. They need code that's clear, concise, and considerate of their cognitive load.
Write code for humans. The computer will figure it out.
Every unnecessary character is a tiny tax on everyone who reads your code. Over thousands of files and years of maintenance, those taxes add up. Be kind to future readers—including yourself.
Related Articles
Code as Poetry: The Aesthetics of Ruby
Why does `5.days.ago` feel so satisfying? DHH explains how Ruby's philosophy of removing 'line noise' creates code that reads like natural language. An exploration of beauty in programming.
Why Programmer Happiness Should Be Your #1 Design Metric
Matz designed Ruby with one radical idea: programmer happiness as the primary goal. Learn why this philosophy produces better code, happier teams, and more sustainable projects than languages designed around machine efficiency or corporate control.
Trusting Programmers: The Revolutionary Idea Behind Ruby
Java's sandbox approach vs. Ruby's sharp knives philosophy. Why treating developers like adults produces better code, the hidden costs of 'protecting' programmers from themselves, and building a culture of responsibility.