Free Newsletters
Technology & Business Daily

InfoWorld
Log-in | Register
STRATEGIC DEVELOPER  

Exploring the deep structure of code

Move over, text editors; here comes a new programming paradigm

By Jon Udell  
January 14, 2005
 

It’s been a while since I’ve written code in Java. This week, however, I updated my installation of Eclipse, dusted off an old Java program, and saw that ancient artifact in a whole new way.

Free IT resource

Open Source Business Conference (OSBC) May 22-23, 2007

Sponsored by OSBC

Free IT resource

Virtualization Insights from Top Experts - Learn how virtualization gets real!

Sponsored by Dell

Now, I’ve never been an IDE kind of guy. It’s always been Emacs for me, and in InfoWorld circles, I’m not alone in that preference. Both Chad Dickerson and Maggie Biggs have also made the case for the no-frills approach. At the end of the day, programming still comes down to pushing lines of code around in text files, and until we change that paradigm, code editors built to push lines of code around in text files are going to be hard to beat.

Eclipse 3.0 doesn’t complete the paradigm shift, but its powerful refactoring tools hint at things to come. For starters, the ability to rename a method globally, across all of a project’s Java files as well as its unit tests, is convenient. Yet, that’s really just a fancy search-and-replace. More impressive is the ability to restructure code. Eclipse can, for example, convert a code fragment into a method and a call to that method, or it can promote and demote class members within a class hierarchy.

This transformational magic requires some actual analysis of the code. Under the covers, Eclipse maintains an AST (abstract syntax tree) — the deep structure (as linguist Noam Chomsky would say) that underlies the surface structure that we write, read, and edit as lines of Java code. With Eclipse, you begin to get the feeling that you’re working directly with the AST and that the Java text is only a convenient way to visualize it.

It’s still only an illusion, though. When you check your project back into the repository, you’re checking in lines of code, not an AST. The refactoring that you did will be visible to the rest of the project team as line-oriented diffs, not as tree transformations.

At one time or another, every programmer has imagined what it would be like to work directly with the deep structure of code. Some of the best minds in the business are working to make that happen. The legendary Charles Simonyi, who left Microsoft a couple of years ago to pursue his vision of “intentional programming,” says deep structure is at the core of the toolset that his new company, Intentional Software, is building. Sergey Dmitriev shares Simonyi’s vision, and his company — JetBrains, creator of the IntelliJ IDEA Java IDE — wants to do something similar with its next-generation toolset.

These projects are still under wraps, but another champion of deep structure is working out in the open. Jonathan Edwards, currently a visiting engineer with the Massachusetts Institute of Technology’s Software Design Group, has built a prototype system that he is demonstrating in a screencast.

There are big ideas at work here. In Edwards’ prototype, programming, testing, and debugging are just different ways of interacting with a program’s tree structure. Edwards’ 2004 OOPSLA paper, “Example Centric Programming ”, explores one of the benefits of this arrangement: The examples — or “use cases” — that drive program design are worked out in the context of the living and evolving program.

We’ve all heard stuff like this before. I may yet go to my grave without Emacs ever having been pried from my cold dead fingers. It’s worth pondering, now and then, though, what we could do with tools that didn’t think of programs as strings of text.





 


 
Jon Udell is lead analyst and blogger in chief at the InfoWorld Test Center.

  More of Jon Udell's column
  Jon Udell's Weblog

Newsletter Check out all of our free newsletters!
Enter e-mail address:




 

TOP NEWS:


»  Four quick tips for choosing an IM security product
71 percent of businesses will invest in real-time messaging this year. If you're one of them, be sure to protect your enterprise

»  Forrester analysts ID hot IT jobs
Research group finds 16 IT roles with a promising future

»  Nvidia claims 10 hours of HD video on Tegra chip
The Tegra 600 and 650 can be used with hard disk drives and are designed partly for mobile Internet devices

»  Database vendors add Google's MapReduce
Greenplum and Aster Data Systems will support Google's programming technique, developed for parallel processing of large data sets across commodity hardware

»  Network management: Tips for managing costs
New technologies, changing requirements, and ongoing equipment maintenance and upgrades cost money, but there are ways to manage expenses

»  EMC targets SMBs, branch offices with new low-end storage
Celerra NX4 highlights include thin provisioning, snapshot technology for data recovery and backups, and Web-based console for management of storage volumes




Keeping the E-Mail Flowing
Traditional exchange and recovery solutions are not only complicated, but very expensive. Learn from the experts how to implement Continuous Application Protection (CAP) and save yourself the complications and cost of traditional exchange and recovery solutions. Sponsored by AppAssure

»  Click here to view this Webcast
  The Path to Enterprise Security
This is your comprehensive guide to Enterprise Security. In it you'll find solutions to the most pressing security threats facing you and your company. Learn the latest on insider threats and how to effectively minimize risk within your organization. Sponsored by Nokia

»  Click here to download now

- Special Advertising Partners -
WHITE PAPERS
 

» Technology White Papers Library

Technology White Papers by Topic

Technology White Papers E-mail Alert

Find out when the latest white paper is available:
 
 
INFOWORLD MARKETPLACE
 
» BUY A LINK NOW
 

FIND PRODUCTS AND COMPANIES
» COMPLETE PRODUCT GUIDE



TECHNOLOGY INDEX
• Applications
• Application Development
• Security
• Networking
• Wireless
• Platforms
• Hardware
• Data Management
• Storage
• Web Services
• Business
• Telecom
• Professional Services
• Standards

TECH WATCH 


What's the 411 on GOOG-411?
Just as Google has become synonymous with "performing a Web search," 411 is understood to mean "information" -- as in "what's the 411?" I was thus surprised to discover, from a billboard, no less, that the king of search is taking on the ...

Apple HTML source reveals 'iPhone Extreme'
"This one's a stretch..." reports AppleInsider. Um, yeah. Reporting on HTML code sightings of product names could be called a stretch, but iPhone Extreme has a ring to it. Now, that sounds like the product Apple should have released first, rather ...

COLUMNISTS

Unified under law
Ephraim Schwartz's Column and Blog (InfoWorld) - In the litigious world we live in, deploying a unified communications platform in your enterprise could...
» MORE COLUMNISTS

MORE INFOWORLD BLOGS


Open Sources 
Product Management
When I joined MySQL four years ago, there was quite a lot of debate about product management. We didn't actually have ...

Zero Day 
Botnet herders tending smaller flocks
New research backs up the theory that botnet operators are keeping their networks smaller in a continued effort to keep ...



• Advice Line
• Database Underground
• The Deep End
• Enterprise Mac
• Geeks in Paradise
• Grid Meter
• The Gripe Line
• InfoWorld Daily
• Inside IT
• IT Troubleshooter
• ITXtreme
• Open Sources
• ProdBlog
• Real World SOA
• Reality Check
• Security Adviser
• SMB IT
• The Storage Network
• Tech Watch
• Virtualization Report
• Zero Day

ADVERTISEMENT


RESOURCE CENTERadvertisement 

GOVERNMENT IT & POLICY
'If you don't go after the network, you're never going to stop these guys. Never.'
From the State Department, All the News for Inquiring Minds
TechPresident, the Internet Citizenry's New Consensus Taker



Sponsored Technology Links

 
 
 HOME  NEWS  BLOGS  PODCASTS  VIDEOS  TECHNOLOGIES  TEST CENTER  EVENTS  CAREERS   About | Advertise | Awards | RSS | Contact Us 

Copyright © 2008, Reprints, Permissions, Licensing, IDG Network, Privacy Policy, Terms of Service.
All Rights reserved. InfoWorld is a leading publisher of technology information and product reviews on topics including viruses,
phishing, worms, firewalls, security, servers, storage, networking, wireless, databases, and web services.

CIO :: ComputerWorld :: CSO :: Demo :: GamePro :: Games.net :: IDG Connect :: IDG World Expo
Industry Standard :: IT World :: JavaWorld :: LinuxWorld :: MacUser :: Macworld :: Network World :: PC World :: Playlist