A picture may be worth a thousand words, or a million lines of code, according to James Gosling, one of Sun Microsystems's top engineers.
Based on a theory that software code might be better represented as an image rather than as millions of lines of text, the Sun vice president and research fellow has embarked on a research project that eventually could change the way developers edit code.
During an interview in advance of the JavaOne developer conference in San Francisco next week, Gosling offered some details of a research group he is leading at Sun Labs, called Jackpot, which he said is "nosing around a bunch of issues," including an idea to build Java development tools that can visualize software code.
The industry guru has developed software tools for what he characterized as "an embarrassingly large number of years" and is now expanding his pursuits with some futuristic programming concepts. One tool he created more than 20 years ago, based on technology developed by free software expert Richard Stallman, called Emacs (Editing MACroS), is still one of the most popular tools for editing Unix applications, Gosling said.
Emacs has been a model for other development tools that followed it, but Gosling is hoping to surpass that work with a new project he has undertaken with the Jackpot team. Instead of editing code in the form of text, as it is typically done, Gosling is working on a way to allow code to be edited as a visual model.
"Simply put, when you have very large pieces of software, most of the tools look at the individual lines of code as text," Gosling said. "It is often extremely powerful to look not at individual pieces of code but at a system as a whole."
The way Gosling and his researchers propose doing that is through a technique that looks at an application's code as a model, not unlike the ball-and-stick models that scientists use to visualize molecular structures.
The idea behind this approach is that if developers needed to make changes to an application they wouldn't have to go through individual lines of code and edit them. Instead, simply changing the shape of the model would automatically change the code it represents.
"When you have large systems, it becomes almost impossible to make even very simple changes," not to mention updating a software application to a new version or optimizing it for a certain microprocessor architecture, Gosling said. His editing concept, which is currently in prototype form, could greatly ease the process for developers.
Like Palo Alto, California-based Sun's recent Java tool releases that allow developers to program applications for wireless devices, or add Web services capabilities to software, Gosling's project will be designed to work inside the open source IDE (Integrated Developement Environment) called NetBeans. That "shell" allows developers to integrate various tools, such as compilers and debuggers from various vendors, into a single environment. It is similar to an IDE called Eclipse, under development at IBM.
Gosling said the code modeling tool is still far from becoming a NetBeans component. The same is true with other projects being pursued by the Jackpot research team.
"If it had a time frame, it wouldn't be a labs project," he said.
However, he hopes the new concept can make developers' lives easier.
"If we decide that there's actually some good ideas in there, we'll put it to work."