Wednesday Jun 24, 2009
Today's Page Hits: 215
Wednesday Jun 24, 2009
This well deserved a seperate blog post. If someone ever asks me, what was my most memorable moment at JavaOne – it would be this one. A student getting to sit down and chat face to face with a geek god is nothing that happens everyday. James Gosling is a really down to earth person. First he gave 80 students a tour of the best technology being demoed at the Pavilion and the same evening he invited students to have a Q&A session with him asking him whatever they want to ask about his life and work, and so we did.
I have captured the entire conversation in this video over here. And if you just want to see a short clip, here’s a JavaOne Minute made around it:
Here’s a transcript of our entire conversation:
Student: I have a good question for you I think. So when you were developing Java, what influence did other languages which were popular at the time on what you made Java
James Gosling: Huge.. huge.. you can find bits and pieces of doesn't different languages in there. The syntax is like C++, mostly because I wanted to trick a bunch of C++ programmers into using.. smalltalk. I mean there was basically an act of subversion to do that. You know, and, the smalltalk crowd never really got performance. So the way that the object model works is somewhat different. It's all about performance. Some of the object model comes from Simula. I used to maintain. I used to maintain a Simula compiler.
Student: Are there things that you see now, that you think you should have done back then?
James Gosling: If I could go back in time and give myself a period of 3-4 years to do stuff, you know if I could get a little time bubble off of the side of the timeline, there's a huge pile of stuff I would do. Generics should have been in the runtime model. But time is a funny thing, you don't get to do that, right. You know, once I had a long fight with Bill Joy about this- Ok Bill we could sit around for another 2-3 years and nail a bunch of these issues.. and by that time who will care.. or.. we've got this opening.. let's just do it now and get the hell out there and at some point you just gotta decide whether you're going to get out there or just sit there polishing. Yea, some of the things I would have loved to have, but.. I wouldn't given up those features in exchange for.. time. But unfortunately, the evil twin of having released a product is that your life gets consumed by it.. one of the 2 things happens.. either it fails miserably or you get the life sucked out of you.. because its a success.. and then you've got a gazzilion people using it. It's really hard to chose. You can't really decide if you want to change such software. I mean like, someone inside Coca Cola says lets change the formula for Coca Cola.. but they'll be like.. Not really. So as long as we don't make changes that break the NASDAQ or the Chicago Board Options Exchange, it's fine. We've got some spectacular Java apps out there. Almost every stock exchange on the planet runs a Java app. We don't get to break them. Every financial transaction system on the planet is a Java app. We don't get to break 'em either. On one hand, you know, that's like a millstone around our neck, and on the other hand, it's kinda cool. Student: Would there by any change in Java in the future which could possibly harm its past legacy, like as we see with the modularization happening with Project Jigsaw. James Gosling: Right, so there's breakage at different levels. Like at the language level, I don't think we'll ever break everything. Fortunately its a 2 level language. There's a Java virtual machine and the language itself. If we ever felt that there was something so compelling, we wouldn't break it, we would just call it a new language. There's some pretty interesting languages that run on the JVM, like Scala, and that's all goodness, instead of breakage. The libraries get to be kind of an interesting deal. There are things that we can do because we can partition the namespace. Classloaders can load different versions of effectively the same class. It actually works pretty well. You know, there's 2 things that I would love to break.. but not so much that it'd be worth the carnage. One of the sad things is that when you've got 6 million professional developers out there, who code everyday. Even at the Mythical man-month rate of 3 lines a day.. 6 million developers.. thats a lot of code. And its been that rate for well over a decade. And it's amazing how much some of that stuff people are still running. The numbers are pretty big. The problem is still pretty big.
Student: Is there a core team? Do people contribute and oversee that? How does the model actually work?
James Gosling: Actually, it's none of the above. It's all broken down into different subgroups that have responsibilities of their own. Within Java SE, there's a group that just does the VM, just does HotSpot. There's a group of people that just does the compiler and one which just does the graphics stuff. That's wrapped up in the Java SE group. And there's kind of a coherence mechanism. But's sort of like business teams who look at the feature lists and make sure that all the stuff is put together. Some companies like Apple, they have chinese walls between their teams, and they're not allowed to talk to each other and they're really not allowed to talk to each other. You know, at the cafeteria, people are talking about stuff like basketwall because they can't talk to each other about work with their coworkers. We do exactly the opposite, right. We have all kinds of different teams and we do all sorts of things to get them to cross-polinate. In some companies, there are architects and then there are developers. Na, we don't do that. Pretty much all developers are fully responsible for some piecce or the other and that sort of bundles up. We've got less experienced folks and more experienced folks. It's a fairly different model than what most companies do.
Student: Where'd the name come from?
James Gosling: Where'd the name come from? There's no interesting story about the name. There was just this other project and it became clear that doing a programming languagish thing was required. And I really wanted to do just the lower levels and didn't wanna do the whole compiler or anything like that. But since I was the only one who had made compilers before, so that was my part of the project. And you know I was sitting at the office, staring at the window. And while I was staring, there was an Oak tree outside, so Oak it was. Incredibly non-creative. I just needed a name, any name. If you think hard about it, it just sucks up too much time. By the time we got to 95 when we were about to release it, couldn't use that name, cuz the lawyers said there were so many conflicts and if we tried to launch a compiler named Oak, we'd get sued by a half a douzen different companies. Somebody tried to come up with clever names and intelligent names. And every clever or intelligent name was already taken so you had to come up with something kind of goofy.. umm and this whole thing came to a point when the number one thing stopping us from shipping was that we didn't have a name. We had this great meeting where they said things like "How does make you feel?". What makes you excited? Java? What else makes you excited? What is it about? It's about the web. Well, Silk then. So what happened was that we ended up with a list of dozen names, ordered them from top to bottom, handed them all to the lawyers. So whatever was it on the top, that's the one we'd go with, no more discussion on that. Java was number four in the list. Number one which I hated, but since it was being done like a democracy and the one which most people liked, I don't know why they liked it, was Silk. The lawyers said naaaah.. Forget what number 2 was, number 3 was my favorite, which is Lyric. Would have loved calling it Lyric, I think Lyric would have worked really really well. The problem was that it was already taken. There was some programming language used for control systems for submarines or something called Lyric.
Student: What features you'd like to add if you had the time (asked second time in a different way by a different student).
James Gosling: Well one thing is closures. I am a big fan of type inferencing and the recurrent syntax is really based around the way C does it. So I would do a lot more type inferencing. Make things a lot simpler. There's bits of Scala that I would pick up. I'm a big fan of functional languages. I'm more of a fan of functional langauges because of you know in multi-threaded systems there's all kind of techniques for mapping functional programs to thousands of threads. Sun makes machines that will easily support tens of thousands of threads and huge address space. We actually have one machine which 230 or so CPU's, its a strange number of CPU's. People use that for massive protein coding to various sorts of simulations and it's very popular in the stock trading crowd. Things about the object-model, or different approaches to object oriented programming with delegations. It's more like a research project. There are different ways of handling concurrency and multi-threading. I mean in every app that anyone writes, you really have to think well about multi-threading. Fortunately, for enterprise apps it works out pretty well, cuz all the framework does all the multi threading for you, but that isn't gonna scale.. well.. it will scale well in that particular problem domain. Any other question?
Student: Yea I've got a question. Why are the first few characters of a compiled Java file CAFEBABE?
James Gosling: Well there were 2 of them. CAFEBABE and CAFEDEAD. CAFEDEAD was picked up because around the corner from my office was a small cafe that we ate lunch at everyday. One of it's claims to fame was that the greatful dead before they were famous used to play there all the time. You know, when Jerry died, a little shrine appeared on the wall. At some point when we ate lunch, we refered to the place as CAFEDEAD. Somebody observed that, you know that's a hex number! That's a funny joke. So we used that for the object file format. And I needed one for the class file format, cuz originally the magic number had been ASCII string /bin/0. And that made a class file executable on unix. Problem was that it didnt make it executable on anything other than unix. So, when I first went .. nooo I need to worry about the Windows and Mac too. And grep was your friend.. so.. find something next to CAFEDEAD.. and so.. CAFEB.. umm CAFEBABE was just something that was weird enough to appeal my twisted self.
Student: How do you think about the JavaFX technology?
James Gosling: JavaFX is I think, incredibly cool. Its a totally different technology. 10-15 years ago, the effects that we used to do with Java were just stupid, we couldn't do it. None of the graphics accelerators were that fast enough to do all this stuff. Taking an image and then rotating it and then putting that little drop shadow behind it. You couldn't do it. But now it's what everybody wants to do.
Student: James, do you have something to tell our student audience watching this session?
James Gosling: You know the important thing for me is to have fun. I can't do a good job unless I'm having fun. One of the nice things about software development is that you can do anything with it. You can write applications that do art, you can do applications that do banking. You can sort of mix-match and have a good time. And just, you know, screw around at it for hours. Things like writing games is a good thing to do.
Student: What's the next big thing you're going to do?
James Gosling: Umm.. Dinner, Sleep.. getting the Java store really launched..
Thank You so much James for your time
This is part of a series of blog posts on my JavaOne 2009 experience..
simply great , i wish i were there , its great to talk face -to-face to a geek.
Posted by tushar on July 01, 2009 at 06:27 PM IST #