Q & A
java.sun.com: Tell us about your background. Kawaguchi: I grew up in Tokyo and knew nothing about computers until my mother bought a laptop for her use when I was in the seventh grade. That computer eventually became practically mine. It ran BASIC, so I wrote many games. But it wasn't very powerful and had a nonstandard architecture, so after about a year, I wanted another desktop computer. It cost around $5000, so it took me quite a while to convince my parents. By then, I had joined the computer club in my junior high school and learned x86 assembly, C, and C++ more or less by myself. JSC: What made you want to be a programmer? Kawaguchi: I started selling shareware in high school and realized that it's really easy to make money writing programs. All I needed to start a business was computers and a few other geeks like myself, and there was no risk involved. Throughout my college years, I worked with a handful of friends. Eventually, we rented a place near the college and practically lived there. It was a lot of fun. JSC: How did you come to the United States? Kawaguchi: I was actually born in the U.S., and probably because of this, my mother insisted that I study abroad (meaning the United States). This instilled in me the idea of coming to the U.S. Then as a side project at Swift, the company my friends and I started while we were in college, I wrote a small program in the Java language, which validated XML with a language called RELAX, the predecessor of RELAX NG. Jon Bosak at Sun noticed it and offered me a job, which sounded like a great opportunity. I think it's OK to say this now -- that was my first Java program. At that time, Swift was a Microsoft-only shop, so my friends were very surprised that I decided to work for Sun. JSC: What was your first experience with a Java program like? Kawaguchi: Initially, I actually wasn't particularly impressed. It was a fairly simple program to begin with, and I had had a lot of experience in C++, so I had already used standard collection libraries, the string representation, auto pointers, and so on, and all I needed to do was find equivalent Java concepts. It was pretty easy. I later realized that if you try a new language and immediately get the same productivity as with the old one, then you can become much more productive with the new one, since you'll become more efficient over time with it. That's exactly what happened to me -- I'm much more productive using the Java language than C++. JSC: What led you to work on Relax NG and schema languages? Kawaguchi: I wrote a bachelor's thesis about XML edit distance computation, and my thesis adviser suggested that I present it at a conference. In a train on the way back, I sat with Makoto Murata, who was working on a schema language called RELAX. He showed me all the mathematical theory that backed up his schema language. The elegance of it intrigued me. He then suggested that I write a validator for it, which I eventually did, as I said before. And then a year later, James Clark wrote another schema language called TREX. I didn't understand the algorithm, so I was hand-executing his program. I drew many circles and arrows on many papers, and eventually, from a seemingly anarchic mess of objects and references, I saw the beautifully elegant rules that governed them emerge. I decided then that Newton must have felt the same way when he saw the falling apple. That feeling of awe is probably what keeps me working on schema languages. JSC: Can you say more about the experience of awe you have felt working on schema languages? When do you feel awe? Are you often taken with the beauty and elegance of software? Kawaguchi: It's difficult to explain, but if I look at the code or learn an algorithm, I can tell if it's stinky, so-so, good, or excellent. Sometimes a piece of software does great stuff in a stinky way, or does it the other way around, which is much harder. JSC: What is your impression about the future of service-oriented architecture (SOA), which RELAX NG contributes to? Kawaguchi: In the world of SOA, the contract between components is more important than ever, and that contract is defined in terms of an XML document. That means you'll need some kind of schema language to describe what XML documents you produce or consume. Therefore, it becomes more important to have a good schema language. If what takes an hour with XML Schema can be done in 10 minutes with RELAX NG, then you have to ask yourself why you are using XML Schema. So I think RELAX NG has a future. We in the RELAX NG community need to provide a good tooling story that makes people more productive. JSC: Do you still program in other languages? Kawaguchi: I still enjoy programming in C++. In my opinion, it's the Ferrari of programming languages. You can add layers and layers of abstractions with virtually no runtime cost, and with one mistake, everything crashes. It's really fun as a hobby. I also program in .NET. I wrote a game called FreeTrain. Many people participated in the project, and I had great fun. .NET is a great platform to program on, because it makes me very productive. But above all, I like the Java language. You can get many good tools, good libraries, and good application servers for free -- and those things make you incredibly productive. Being a "real" C++ programmer for many years, I can tell you that garbage collection is a great idea. And there are many good building blocks in the core library. Work Style Differences Between Japan and the United States JSC: Do you notice a difference between the culture of software development in Japan and in the United States? Kawaguchi: The most noticeable difference is that Japanese engineers wear suits to work, which is unthinkable here in the U.S. The other big change is that everyone has a cubicle, at least here at Sun. It's good that you have your own big quiet space, but it makes it harder to collaborate with other people. In Japan, everyone sits around a big table, and if you have a question, you can talk to the person across the table. Maybe they don't know the answer, but often someone else around the table does and will jump into the conversation. It really is efficient. That's what's normal in Japan. Here in the U.S., you have to walk down to someone else's office. Programming Projects JSC: If you could wave a magic wand and get people to join you in a programming project, what would it be? Kawaguchi: I think the Stapler project has a very useful idea in it, so it would be nice to get people interested in that project. The com4j project could also use some help. And the profiler project is looking for more help. Today, many of the good profilers are not free, and we could really use some good free profilers that aren't inherently tied to an IDE (integrated development environment). And then there's the txw project. It's a really small, neat XML-writing library. I started this as a by-product of the JAXB RI (reference implementation), but I think this is a generally useful library. I would like to write schema compilers from XML Schema Definition (XSD) and Document Type Definition (DTD) for it, but I haven't had a chance to. Finally, of course, the JAXB project needs more folks -- there are a lot of good ideas for plug-ins, but not many people are willing to write them. The good thing about the JAXB project is that, because it's very popular, any plug-in you write will get almost immediate attention from many people. If anyone is interested in any of these or in my other projects, please let me know. Feeling Stumped? Work on Something Else JSC: What do you do when you're stuck? Kawaguchi: I like working on multiple things in parallel so that when I get stuck with one, I can work on something else. Drawing on paper helps clarify my thoughts, as does thinking about the problem while driving home -- which is probably dangerous, but I can't help it! JSC: What basic software problem would you like to solve? Kawaguchi: My passion is to make fellow developers more productive. I've done enough C++ programming in a previous life to realize that people, without knowing it, can waste an incredible amount of time on unimportant things, like memory deallocation. I enjoy writing software that makes people productive. By the same token, I hate the APIs, frameworks, and technologies that don't make me productive. JSC: What is the biggest challenge you face in writing software? Kawaguchi: For hobby projects, often the most difficult challenge is to try not to do everything. I like coding so much that I tend to implement everything by myself. But you can't and shouldn't fight battles on all fronts, so you have to choose your fights. Resisting this temptation to do everything turns out to be the biggest challenge for me in writing software. Writing Code JSC: Can you describe the process of writing code? Kawaguchi: Mostly, I just start typing into the IDE and let the code flow from my fingers. Sometimes I stop and draw pictures mentally or on paper, and that helps me decide how to proceed. When a problem is more complex, I outline a solution and start noting the pros and cons. Once I'm done writing, I look at those notes and start writing an outline of a revised solution. I repeat this process until I feel comfortable. I found that plain old paper is best for doing this, and this worked great when I was a student because I did it in history class, English class, and so on, where I didn't have a computer in front of me. JSC: Do you have a favorite book on Java technology? Kawaguchi: The Java language is so easy that when I started writing in it, I found what I needed to know on the Internet. The computer book that I love the most is The Psychology of Computer Programming by Gerald M. Weinberg. Despite being more than 30 years old, it's still very relevant today. I bought this book once, lent it to a friend, never got it back, then bought another one, lost it, and I'm thinking about buying it again. It's really that good! See Also
Kohsuke Kawaguchi's home page
| |||||||||
|
| ||||||||||||