![]() |
|
JavaOne Keynote with James Gosling and Ronald Hughes
On Tuesday morning, June 5th, 2001, James Gosling, the founder of Java, invited several industry luminaries to present interesting technologies to the Java community at the opening keynote. His final guest was Ronald Hughes, CEO of VisiComp, presenting VisiVue and Runtime Software Visualization. A transcription of the presentation follows. You can view the keynote in RealVideo format in either a low-bandwidth format for 56k connections or a high-bandwidth format. Fast forward to 1:19:00 to see the 8-minute VisiVue presentation. (You will need the RealPlayer plug-in.)
James: I'd like to call up another guy who's having way too much fun, Ronald Hughes from VisiComp, he's gonna show us sort of, trees, and software visualization? So, what's software visualization? Ronald: "Runtime software visualization" is the ability to observe the inner workings of any Java program while it's running. And some people when they first see this say, "Oh, that's a class browser or a modelling tool" because we show boxes and arrows but it's actually something completely different. This is a runtime tool that shows yuou the inner machinery of your Java program. James: This actually runs in parallel with your application to give you a picture of it. Ronald: That's right. If we could have computer 4 up on the screen, please Isaac Sparrow is going to help me demonstrate a tool that we've written called "VisiVue". James: So a little aside, I want to ask you, How do you like developing on a Mac? Ronald: I like it a lot. I've been doing it for a number of years now. We're not a Mac shop. We believe in write once run anywhere and my engineers do their development on whatever platform they want (Ed: and Windows) so we've got all kinds of systems. And I've been using a mac for a while, so I've been using that. It's been painful for years to develop Java applications on a Mac and last year a lot of people were probably here when Steve Jobs said that he knew it was painful and it was gonna get better and I felt like he was talking to me, because I felt that pain. And it's a lot better now. 'Much improved. James: Yeah, they really got OS X really rocking. So what's happening on the screen here? We see these trees happening and there are all these lines bopping around and things flashing, so, tell me. Ronald: Yeah, what's happening there is Isaac Sparrow is demonstrating a trivial application called WordCount and WordCount is just a simple program that tabulates the occurrences of words in a text file. Ronald: But we're running it under VisiVue and so at the same time that wordcount is running we're actually seeing what it's doing on the inside. Ronald: On the right hand side of the screen we see a number of boxes, connected by arrows. Each one of those boxes represents an object. It's not a class, but rather it's an instance of a class. At the top of each of those boxes you can see the name of the class. and so if you scroll around a little bit there, Isaac, you'll see that we're creating a bunch of tree nodes. Each one of these boxes is an instance of a tree node. And below the name of the class in the box you can see the name of the variables and the value of each particular variable at that point in time. Ronald: On the left hand side of the screen we're looking at the same thing but it's zoomed out so you can see the overall structure of the data as it's being created and maintained and manipulated by whatever the program's doing, in this case WordCount. James: Right, so this isn't power point slides or somebody's ADFL, this is actually... Ronald: Oh no. James: This is somebody's application actually running and... Ronald: If you wanted to see the inside of your application If you ever ran a program and wondered "What is it doing?" this is a picture of it, this is showing you what it's doing on the inside. James: For any of you who've been around for a long time, there's a lot of really interesting work that's been done over the years in this kind of stuff, and I first saw something like this at Brown University from some folks who were doing some very cool stuff. The problem was that it was kind of sticky, kind of a prototype- it was all in sort of Pascal and you had to instrument your program because they didn't have proper reflection and it looked great, but it tasted a little funny. This is actually real. Ronald: Yes. And Java has helped with this. I don't believe that it would be possible to do this kind of thing in an antequated language like Cobol or c++ or Fortran. The strong typing that Java provides and the introspection capabilities make it possible for a visualization program to be able to know enough about what's going on at runtime and to be able to show it. James: So does this thing only do trees? Ronald: No, it'll actually draw whatever data structure the program under observation is creating. I have another example here. This is kind of a variation on a theme. This is a different implementation of the same word counting program. Ronald: Here on the left-hand side we have an array of 32 lists and then we've got a number of items that are being attached to each one of the lists. Ronald: Most programmers will recognize this almost immediately as a simple hash table, or hash map. James: Yeah, one that's not behaving really well. Ronald: It's not. There's a problem with this hash table. How many people recognize there's a problem with this hashing algorithm? You may notice that where we like to see a nice, sort of uniform distribution of nodes across all the different buckets, we're seeing a disproportionate number being put in the last one. Zoom out a little bit more, Isaac. And you can see that we're getting a lot on that last chain. Ronald: And the programmer who wrote this program took a look at it running under VisiVue and immediately said, "I think I have a bug in my hashing function," and went straight to the source code, the hashing function was five lines long and he found one character, a little clerical error, where he was ORing things together instead of exclusive ORing like he had in mind, and fixed the bug and then verified it under VisiVue." James: So can you look at this and you showed me something where you twisted it around and see things stretched out... Ronald: Yes, you can rearrange the panes, you can put one above the other for instance and some data structures build left to right some from top-down and you can make adjustments to those sorts of things. Ronald: We also have some work in progress, I can't show it today, but we're doing some things to help you visualize the execution, the threads. This is showing you the data and generally when you want to look at the internal mechanisms of a program you want to look at one of two things, or both of them in perhaps different panes. You want to look at the data, which is what this is showing you, or you want to look at the execution and we're working on that. We're working on ways to provide that information to the user in a visual way. James: One of the things I found really appealing about this is if you write something like a hash table package, you usually have a specification for it and like you put things in and you pull things out and if the QA department had taken this hash table package and tested it they would have said, "It's great." Ronald: Yes, this particular program, this buggy Hashtable, if you give it the same words as input as the tree implementation, you get the same output. So the QA peoiple generally at that point, they say, "This is fine, let's ship it." it's only if you run this program under something like VisiVue that you can actually see that there's a problem with it. You guys probably have bugs in your code today- not that you wrote, the guy in the cubicle next to you. But they're in there and you don't even know about them. You only find out about them when the customer calls up. James: Thanks a lot, Ron. |
|||
|
|
|
|
|
|