Sponsored Link •
Yukihiro Matsumoto, the creator of the Ruby language, talks with Bill Venners about becoming a better programmer through reading code, learning languages, focusing on fundamentals, being lazy, and considering interfaces.
Yukihiro Matsumoto, or "Matz," as he is known online, is the creator of the Ruby programming language. Ruby is an object-oriented language suitable for writing day to day scripts as well as full-scale applications. Matz began work on Ruby back in 1993, because he wanted a language that made him productive while being fun to use. Initially popular in Japan, Ruby has been finding its way into the hearts of programmers all over the world.
On September 24, 2003, Bill Venners met with Yukihiro Matsumoto at the JAOO conference in Aarhus, Denmark. In this interview, which is being published in multiple installments on Artima.com, Yukihiro Matsumoto discusses Ruby's design philosopy, the features of the Ruby language, and becoming a better programmer.
Bill Venners: In an interview with CIPS Connections, you said, "I read a bunch of open source software source code, for example, Perl, Python, and many flavors of Lisp interpreter. I know they were needed to write Ruby." What benefit do you think programmers can derive from reading source code?
Yukihiro Matsumoto: Programmers can get a lot of benefit from reading source code. You can't simply tell people how to be good programmers. You can offer them some principles of good programming. You can describe some good design experiences you've had. But you can't give them a real knowledge of how to be a good programmer. I believe the best way for that knowledge to be obtained is by reading code. Writing code can certainly help people become good programmers, but reading good code is much better.
Bill Venners: Why?
Yukihiro Matsumoto: Because being a good programmer is a matter of experience. Code is an expression of the thoughts, attitudes, and ideas of the programmer. By reading code, you can not only figure out what particular task the programmers were trying to accomplish and understand how they did it, but you can also gain insight into how they were thinking. This is the reason that reading code makes programmers better.
And besides that, if you want to know how to accomplish something in code, you can open a computer science textbook. The textbook will explain the algorithm. But if you want to understand the algorithm very quickly, reading code is the best way. Moreover, you can execute code that implements theh algorithm. You can use a debugger to watch the code as it performs the algorithm. And this is much better than just reading a textbook.
Bill Venners: In the CIPS Connection interview, you gave ten tips for programmers. One of them was, "Learn more than one programming language, preferably many different styles, like scripting, object-oriented, functional, logic, etc." What is the benefit of learning multiple programming languages?
Yukihiro Matsumoto: Every language or system has its own culture. In the background of every language or system are some central ideas. Most of these ideas are good, but they are different. By learning many languages and systems, you get exposed to different ideas—and that enhances your point of view.
If you don't know Prolog, for example, you may not know the power of goal directed programming—programming by describing the problem to solve through specifying rules to apply. This is a very interesting concept. It is a very different way of thinking. And if you don't know Prolog, or the predicate logic, it's very difficult to discover this way of thinking by yourself. Knowing other systems and paradigms expands the world inside your brain. That's why I advise learning multiple languages.