#34 Yukihiro “Matz” Matsumoto: Ruby Inventor
初出：Software Design 2012年2月号（2012年1月18日発売）
Developer Martin Fowler once came up with an axiom to express the relationship between the the inventor of Ruby and the community that his language spawned. MINSWAN: Matz is Nice, so we are nice. Yukihiro “Matz” Matsumoto, who is not only nice, but sports an ironic sense of humor, has taken that idea the next step: defining “nice” in a Ruby method.
def nice brave && passionate && honest && respective end
Of course, niceness can be hard to enforce, especially in a community that has grown from one Ruby user in 1993 to over a million.. But as an ideal, niceness has helped define the language as being more than just lines of code. And that’s important, not just for Ruby, but to the industry itself. As Ruby on Rails inventor David Heinemeier Hansson has noted, a friendly culture is imperative for widening the talent pool. Software development needs artists, designers and other creative people who may not be willing to do battle with alpha geeks.
Since 2007, Matz has been a fellow at the Rakuten Institute of Technology. Last July, he took on a second title: as chief architect of Ruby at Heroku, which is now a subsidiary of salesforce.
- How did you come to invent Ruby?
I grew up in Yonago, which is in Tottori prefecture, and started programming when I was 15. My father bought me a Sharp pocket computer which ran BASIC, though only about 400 lines of code, so the environment was very limited. I started reading books and magazines, imagining what I could do with a bigger computer. One day I bought a book on Pascal and learned about the language, which I could see enabled things that BASIC couldn’t do--like recursion, named procedures, and local variables. I came to realize that there are tons of programming languages, each with its own way of enhancing the power of programmers. I began to dream about making my own. Each language has its inventor, so I thought--why not me?
- You thought about this even while you were in high school.
Yeah. Thirty years ago while I was in high school. I didn’t have the knowledge, experience or ability to implement my language. So instead, I created a kind of “dream” programming language on paper. But it was just a dream. After I graduated from the University of Tsukuba, I worked as a programmer, making job-assigned programs. Then in 1993, the bubble economy crashed in Japan, so my assigned project was cancelled. Fortunately I wasn’t fired, but I had no assigned job. I had spare time and had a computer on my desktop so I thought it was about time to start implementing my own pet programming language. I wrote Ruby in C.
- Did you write Ruby out of inspiration for what was possible, or out of frustration for what other languages lacked?
My original motivation was just to create a programming language. So unlike other designers, I had no particular goal or problem to solve. I just wanted to do it. But at the time I started developing Ruby, one of colleagues introduced me to Perl, which is an interesting and convenient tool for scripting. I had been a shell programmer for a long time, and I thought that Perl is pretty good for scripting. But as a language geek, I thought that Perl wasn’t really a beautiful programming language. So I took Perl and chopped it into pieces and reorganized the features in an object-oriented way using class libraries. So in a way, the design of Ruby was accidental, like my encounter with Perl.
- Looking back, do you think Web developers have been surprised how well an object-oriented language can work for them?
Back in the 90s, I was told that Ruby was too good to be a scripting language. People had their minds made up that object-oriented programming is for only bigger systems, and that has turned out not to be true: it’s good for smaller systems, as well. The same thing could happen to the development of the Web, itself. The original Web was written in CGI, which is very simple and primitive. But as the Web system grows bigger and more complex, object-oriented programming makes more and more sense.
- You have long spoken about making developers happy. I think you must be the only language inventor to have that as a stated goal.
Ruby was not designed by a company. It was just my hobby, and the original intention was just to make myself happy doing what I was doing: writing a lot of UNIX-based shell scripts and other small programs. My whole career has been under UNIX. I love programming, but it has two sides. It can be creative, but it can also be a burden, and I wanted to remove as much of the burden as I could. In designing Ruby, I tried to remove my burden. But many programmers all over the world have felt the same way. I guess that is one of the reasons they feel happy programming in Ruby.
- What is it about your design of Ruby that made you happy?
It’s quite difficult to describe clearly, but maybe one of the reasons is the conciseness of the code. Before programmers write code, they first imagine what they want a computer to do. And then they usually go on to describe that functionality in detail. But in that process, what they first imagined starts to disappear. Whereas in Ruby, I think the actual program is closer to the original inspiration. It’s closer to what was first conceived in your mind.
- You not only talk about programmer happiness, but about the importance of being nice.
The Ruby movement has two sides. One is about the language syntax and functionality. The other is about the relationship between people. I do think the community is helped when people are nice to each other. Niceness promotes the whole ecosystem, the contributed libraries, Ruby on Rails, the RubyGems package system. I think all of these develop from a certain kind of relationship between human beings. So we have a well-developed technical side and a social side. One of the attractions of the Ruby language is that we have both.
- For that reason, Ruby may attract people who don’
t consider themselves hard-core programmers. And more women.
I guess so. Women, yes, but we are not that successful yet. We are seeing a lot of women at our conferences, much more than in the past. But there are still too few in our community, so we have to achieve more.
- You are a member of the Church of Latter Day Saints, whose members are famous for being nice. Is there something of your religion that you’
ve brought to the Ruby culture?
I have been LDS since I was a child and long before I started Ruby. It’s an integral part of me. I believe as a Christian that I should try to be nice to other people, and that’s my influence and attitude toward the community. But there’s something else. Japan is not really a Christian country, so being a Christian in Japan is being very much a part of a minority. And LDS is even smaller. So I have been a minority within a minority all my life. Ruby is of course also a minority. I’m quite comfortable with that. I guess it’s part of my nature.
- In your presentations, you mention a book, “From Java to Ruby.”
The book, by Bruce Tate, was written about the adoption of new technology. Java and Ruby are only examples of this, but they are good ones. Java is a mainstream technology and Ruby is a new technology--and the two present a classic case of an innovator’s dilemma. If you stay in the mainstream technology forever, you will eventually die like a dinosaur. But unfortunately, you cannot always tell which technology will survive. If you bet on the wrong technology. you will also die. The book presents a strategy for picking new technologies that will put you ahead, not behind. Ruby is a good example, but there are other new languages, as well, like Scala and Clojure, which is a LISP-like language.
- Do you think part of Ruby adoption is generational? Will the younger people bring Ruby into business?
Younger people have less legacy, so they are better able to adopt new technologies. That same is true in bigger companies. If you have large, legacy systems, it’s very difficult adopting new technology. But the small start-up can easily make the jump.
- But sometimes, small companies become larger ones. Twitter has been a famous Ruby shop, but it is now shifting away because of performance issues.
The traffic carried by Twitter has become gigantic--and we are not yet able to handle it. We are trying to improve Ruby performance. Unfortunately, Twitter grows faster than our improvements.
- You are also working on a mobile dialect.
It’s really an embeddable environment. Embedded programming is quite big in Japan, with both mobile devices and robotics projects. But the current Ruby implementation is basically designed for UNIX environments, so there’s a gap we want to fill. Currently, many embedded projects use a programming language from Brazil called Lua, which has a quite good API implementation for embedded environments. It has been used, for example, in game consoles. But Lua is not really object-oriented, and for many programmers, Lua is not as enjoyable as Ruby. If we could provide a Ruby dialect that is suitable for an embeddable environment, we can make embedding programmers happier. That’s the motivation for starting embedding lightweight implementation of Ruby, which we call mruby.
- You have Ruby conferences around the world. Have you seen any difference in how people are using the language?
As Ruby programmers, we are very similar all over the world. But business-wise, we are a little bit different from country to country. In the United States and Europe, Ruby is mostly driven by small companies--start-ups that are very technology-centric. But in Japan, surprisingly, Ruby is gradually being adopted by the bigger companies, as well as by system integrators who contract with those companies. They are adopting Ruby because, often, their whole system is moving to the Web, and in developing for the Web, Ruby is very productive. Many Ruby programmers visit Japan, see how Ruby is used here, and are surprised at the size of the companies adopting the language.
- Your association with Heroku seems like a nice home for you in the United States. How did it come about?
In May 2011, I met in Japan with [salesforce.
com CEO] Marc Benioff. He really believes that Ruby will be important to next-generation cloud computing, and he wanted to help accelerate the development of Ruby. So he so said he wanted to hire me. I thought it was a joke. But the next week, a staff member from Salesforce contacted me about when I wanted to start working with them, so I realized Marc was very serious. My paycheck now comes from Salesforce and my position is with Heroku. Effectively, they are sponsoring my work.
- Ruby allows you to write concise code--and concision was a hallmark of Steve Jobs’ design. Were you influenced by him?
I don’t think so. I think there’s a difference between conciseness and simplicity. Jobs tried to make products that were so simple, that many people can use them. And many people have come to love the way Apple products are designed. But Ruby is not that way. The whole goal of Ruby is to make the written program in Ruby very concise--but Ruby is not the easiest or simplest programming language.
Apple tries to remove diversity; they want the customization options to be as limited as possible. You can see this if you open up the system configuration in an iPhone or iPad. The choices are very small. But my attitude toward diversity is the opposite. I want to maximize the room for customization. Apple wants Apple users to fit into the Apple way. I want Ruby to fit into the diverse needs of Ruby programmers. In that sense we are totally opposite.
- Does that mean you use an Android phone?