Interview: from tractors to techies
VNU Business Publications, publisher of PC Dealer, regularly runs online chats with industry heavyweights as part of its online VNUnet service. James Gosling, creator of Java, spoke to Robert Jaques.
Q
Hello and welcome to VNUnet's chat with James Gosling. James, can you tell us how you came into programming?
A I started programming when I was about 13. A friend of my dad took me on A tour of a local university and I thought it was really cool, so after that I started sneaking back in.
The IT department had IBMs and a couple of PDPA machines, so the first machine that I learnt to properly program was a PDPA in assembly code.
I used to break combination locks on doors, and I became really good at standing nonchalantly in hallways and watching people punching in their key sequences. That was the first time I actually started hacking.
Q What was the main programming language back then?
A The dominant language when I was younger was assembly. On the IBM mainframe, the choice was Fortran or Cobol. On the PDPA, the only realistic one was assembler code, although there was Focal - now long gone and forgotten.
Q Would you say assembly language was a baptism of fire?
A Baptism by fire doesn't begin to describe how difficult that development process was. I thought of it as being outrageously cool. My family were farmers, and my view of dealing with devices was fixing tractors and combines. Computers were so way cooler than that.
I thought of fixing tractors and writing code as very similar. I like to build things, with wood, steel, or computer code.
One of the attractions of building things out of computer code was that my family didn't have much money, so I was building things out of scrap.
When I first became interested in electronics, I couldn't afford to buy things like transistors or connectors.
I built a relatively small computer out of relays once, which came from the rubbish left behind in an office.
Computers offered a place where I could build really complex things for free. I could build extremely complicated computer software without having to go to the store for nails and wood.
Q Assembly is now used for viruses. Did you program any?
A I have actually written hundreds of thousands of lines of assembly code. I view the whole virus thing as a complete waste of time. The notion of a virus is something fairly unique to the PC platform. In the system for which I wrote assembly code, viruses weren't even a concept.
Q How do you feel that performance problems associated with Java will be tackled in the future?
A There have certainly been performance issues with Java. We've been working really hard on them. The primary way in which we have attacked the problem is with advanced virtual machines. The performance has been getting very nice.
There is still some way to go before it rivals C, but the 1.3 beta release that came out recently, when run on Intel, beat C on some benchmarks.
We're slower on others. If you look at the pure execution speed of pieces of Java code, they're very good.
We tend to have trouble where our APIs are more sophisticated than people are used to. One area where we've had performance issues is graphics.
Our graphics API is very sophisticated, but what it achieves can be at some cost. We're working on performance. These are hard areas to optimise.
Q Do you see Java performing better than compiled language?
A Java is not actually an interpreted language, it's not the language that's interpreted. You can implement C with an interpreter, and you can implement Java with a compiler.
The first versions of Java were pure interpreters. Interpreters are much more portable - that's what we were aiming for with the first release.
But we didn't want to get into a situation where we stuck with Java being used only an interpreter, so we're currently moving away from that.
The way most compilers work today, they don't have a traditional compiler, but they're not interpreted either. They use a just-in-time compiler, which operates as the application is running.
When the binary lands on the machine, it's transformed into machine code.
The problem is that the code has to be translated, but it also has the advantage of knowing exactly what computer it is running on, and what the application is doing at any moment in time.
In the PC world, people often build applications to run on the X86 architecture, but every chip is different. You have to optimise for each chip differently.
Developers in the PC sector work for the lowest common denominator, which means that people cannot take advantage of the latest instruction. Just-in-time compilers take care of these things automatically. Just-in-time optimises according to how the computer program is actually behaving, as opposed to how the normal static compiler would guess the application is working.
Q Is Java on the client still alive and kicking? Is Sun Microsystems still investing here? How is performance?
A Java on the client side is very much alive. There are two areas - applets in browsers, and applets on desktops. Writing of ordinary desktop applications is very healthy at the moment. However, the two main browsers have basically fallen apart as deployment platforms. We're currently working very hard to fix this problem.
Q Are these virtual machines still optimised for multiple platforms then or is there the fear of a Microsoft-style advantage?
A We're making sure that there aren't any platform-specific advantages.
If something looks like it will, we make sure it's available everywhere.
Rather than going for a lowest common denominator system, we're pushing for a greatest common denominator system.
Q So what is your opinion on the various Java Rad tools, J in particular?
A J isn't a Java application development platform. The development platforms that I've played recently with have been quite nice, though.
Q If there is such a thing as the post-PC era, do you also consider the concept of 'thinternet' technologies, such as set-top boxes and internet-ready PDAs, to be intrinsic to this model?
A I wouldn't consider set-top boxes and so on to be intrinsic to the Java model. They're nodes that live on a network. There are many other ways you can build a network.
Q So how do you feel about different Java versions coming out now, with companies such as Microsoft bastardising the standard? Do you feel you have sufficient momentum to field proprietary versions of Java?
A People issue a lot of press releases about things such as Hewlett Packard's corruption of the Java platform, but it's hard to go out there and find one of these HPs. The reality doesn't seem to match. This is a competitive world, and people will always take pot shots. We just deal with them as they come.
Q Can we anticipate Sun Microsystems releasing Java as open source?
A It's unlikely that we will go totally open source in the way some people use that phrase, but we're pretty close to it. The main issue for us is that one of the real strengths of Java is that it is a very strong cross-platform. We try to make it as free as possible but still enforce interoperability.
We have almost totally given over development of APIs to the community.
There's an established process where people get to contribute and agree.
Q There has been some recent friction between open source camps and Sun Microsystems - will that get any better? Given that open source projects such as Linux seem to be the only way to compete with MS, doesn't Java eventually have to become an open source project? What's your stance on Java in relation to open source? It's one of the reasons Linux is successful - do you see this as a future possibility?
A We'd like to deal with the problem of Java not working on Linux. It's a somewhat complex problem. The interoperability problems with Linux are just horrible. You have to be excruciatingly careful, because all the different flavours of Linux are all slightly different.
Q Can you project a time when these problems will be resolved?
A It's hard to tell when those problems will be resolved. The Linux community has got itself into a bit of a pickle. I think it could have been avoided, but it's now going to take time, and it'll be a painful thing for it. It's going to go from being a bunch of hobbyists having a good time, to developing vital applications. The road may be a little bumpy.
Q Is Java a platform or language?
A It's what you want it to be. It's a complex issue. Java itself is just a language. But languages are the intellectual way we view the universe.
When a developer writes a Java program, suppose they want to open a file, they use an API. From the developer's point of view Java is a platform.
Q Isn't it pretty late to retrofit a pretty decent collection class hierarchy in JDK1.2? Do you ever regret Java's typing or lack of higher order functions as you design stuff such as collections?
A It's late to be doing collection classes. Java had some early on.
The world would be better if we'd come up with collection classes sooner, but on the priority list they didn't make it until a year ago.
The problem with higher order functions is that it was, and to some extent still is, an open topic of research. While I like the idea of that, six or seven years ago it wasn't obvious which system would make sense. All the packages had problems, usually performance. The situation has become somewhat better today. Some kind of higher order function will probably arise, but it's going to take a while.
Q Is there space for a greatest common denominator when the reality is that the vast majority of developers are writing for the Windows platform and want tools that enable them to build the best possible Windows applications?
A We would like to ensure you can build the best possible Windows apps in Java, but we're also trying to make sure that when you build that Windows application, it also runs on Mac or Linux. If you want to optimise totally for one platform, there are things on our to-do list that we need to get to. At least these days the to-do list is pretty small.
Q How did Java come into being?
A Java started out as part of the Green project. While we were building this system, partially in C++, we started to have serious problems.
Because I had written various compilers, I got the job of dealing with the tools problem. I started out by trying to do a C++ compiler to fix the problem, but I ended up needing to use a completely different language.
It's important to understand that this was all part of a much larger project. It was very much a blue-collar language for people who were actually building something. A tool to get a job done, rather than an academic project.
Q Is Java the world's greatest language?
A I'm not sure it is the world's greatest programming language, you'd have to say in what way it was the greatest. There are always issues and there are other languages that are nice for other different things.
Q Do you think then that Java certification is worth more than a MSCE certification?
A I have no idea. I guess the only way to answer that is to take a look at job opportunities and salary ranges. An interesting article I read recently compared the salaries of Java programmers and Microsoft developers, mostly Visual Basic development. The Java developers' salaries were dramatically higher.
Q Where do you see Java in five to 10 years? Will it still stand up there as a main development language?
A I think Java will do pretty well during the next five years, but nevertheless, there are still a number of things that we would like to do to help it over that time scale.
However, I do think that it would be a bad thing for the world if we're using Java in 30 years. Somebody, whether me or someone else, will invent the next language. We'll move on.
Q People are religious in their fervour for Java. What do you say to them?
A I'm glad they're happy. There are different flavours of religious fervour and some get out of control, but most people are pretty balanced about it.
Q What do you do to relax?
A I code to relax.
Q So what do you do at work then?
A The Mr Java Poster thing - interviews and stuff like that.
Q Time for one more question - what's your favourite film?
A I couldn't answer that. I have a lots of DVDs, laserdiscs and so on.
I couldn't name just one. OK, I'll give the universally trite answer of Casablanca.
A MINUTE IN THE LIFE OF JAMES GOSLING- James Gosling was born in Canada.
- He graduated with a BSc in computer science from the University of Calgary in 1977 after becoming interested in computers when he toured the university's campus as a 13-year-old.
- He attended Carnegie Mellon University in Pittsburgh, US, where he graduated with a masters, and PhD degree.
- In 1984, upon completion of his doctorate, he joined Sun Microsystem's distributed computing division. His first project at the vendor was the NeWs windows system.
- Before joining Sun, Gosling built a multiprocessor version of UNIX, the original Andrew window system and toolkit and several compilers and mail systems. He also built the original Unix Emacs and helped build a satellite data system.
- One of his all-time favourite books is, rather surprisingly, Barbarians led by Bill Gates: How the World's Richest Corporation Wields Its Power.
- In 1998, he famously opened the JavaOne conference by hurling a pie at a stage hand wearing a Bill Gates mask.
This imitated an earlier incident that happened in Belgium where a prankster threw a pie at the real Microsoft boss.
- Gosling loves cooking.
- His alma mater, the University of Calgary, has conferred an honorary degree on him in the hope that "other students will be inspired to emulate his diligence, persistence and technical excellence".
- On Gosling's homepage, he describes himself rather modestly as a guy who works at JavaSoft doing odd jobs.