Programming as if People Mattered

Peter Cooper recently asked: ‘How has Ruby blown or stretched your mind?’

Just for fun, here’s my answer. It’s not a feature of the language that is so important. It’s the attitude. Ruby’s creator Yukihiro Matsumoto expressed it in this year 2000 interview. My favorite excerpts are below.

Design Policy of Ruby

For me, the purpose of life is, at least partly, to have joy. Programmers often feel joy when they can concentrate on the creative side of programming, so Ruby is designed to make programmers happy. I consider a programming language as a user interface, so it should follow the principles of user interface [design].

Ruby is the first programming language that I’ve seen that was explicitly designed to make people happy. Other languages focus on machines, abstractions, or ideals like efficiency, universality, or safety. Ruby is optimized for happiness. Other qualities matter, but only because achieving them makes us happy. You might say that Ruby is for “programming as if people mattered”.

Principle of Conciseness

I want computers to be my servants, not my masters. Thus, I’d like to give them orders quickly. A good servant should do a lot of work with a short order.

Why waste anyone’s time? Life is too short as it is. People have complex lives full of obligations. Often they have a lot of expert knowledge, too, and can’t afford to push that knowledge aside to make room for programming language esoterica. And few of us have the luxury of spending long stretches of time programming. To succeed, we need to be able to get our heads quickly around our problems and their solutions. I’ve found that one of the best ways for me to understand a computer program is to write it as concisely as possible. Ruby gives me plenty of ways to do that. Also, because Ruby can be interactive, I can talk with my programs directly, asking them questions and getting a clearer idea of what’s happening while they run.

Principle of Consistency

As with uniform object treatment, as stated before, a small set of rules covers the whole Ruby language. Ruby is a relatively simple language, but it’s not too simple. I’ve tried to follow the principle of “least surprise.” Ruby is not too unique, so a programmer with basic knowledge of programming languages can learn it very quickly.

If you’re a comedian or making a film, surprise is good. But when you’re producing software, surprises aren’t funny and the excitement they generate won’t win any awards. All the little surprises that send us off digging through manuals, forums, and source code keep us from solving the problems that matter.

Principle of Flexibility

Because languages are meant to express thought, a language should not restrict human thought, but should help it. Ruby consists of an unchangeable small core (that is, syntax) and arbitrary extensible class libraries. Because most things are done in libraries, you can treat user-defined classes and objects just as you treat built-in ones.

Programming is a creative and expressive process; the medium that we use directly influences our results. Ruby has the flexibility to allow ideas to be expressed and changed quickly and to allow abstractions to be created that look like any of the common Ruby components.

Ruby is a great design language for software. Ideas that might require paragraphs of description can be expressed in a few lines of Ruby. Those few lines can be tested, reviewed, pushed, pulled, and then directly converted into compiled code if performance constraints call for it.

Programming is incredibly less stressful in Ruby because of these principles.
No kidding. No more fussing with whitespace. No more waiting for programs to recompile, relink, and load. No more wondering what’s going on inside a mute, dumb program. All with a lot less typing. Someday something better will appear, but right now Ruby is the best way I’ve found to express the form of creativity that is programming.

Here’s one more quote, this time from the longshoreman philosopher Eric Hoffer:

The best reason for loving others is still that they love us. —Eric Hoffer, The Passionate State of Mind
That’s not just true about people, I think it applies for programming languages too. With Ruby sending so much love our way, how could we not give some back?

Comment on this post ↓

Leave a Comment (sign in with Twitter)