ITworld.com
  Search  
ITworld Home Page ITworld Webcasts ITworld White Papers ITworld Newsletters ITworld News ITworld Topics Careers ITworld Voices ITwhirled Changing the way you view IT

ODF - The Future of Literate Programming?

ITworld.com, Ebusiness in the Enterprise 11/29/2005

Sean McGrath, ITworld.com

Software, the sages tell us, should be written primarily for other humans to read and only incidentally for machines to read. I could not agree more. However, as most developers will tell you, project plans are not famous for leaving sufficient time to create documentation. Not only that, but as many software project planners will tell you, developers tend not to queue up to cut good documentation. A deadly embrace forms. Developers, keen to move on to the next thing rather than document the current thing, push the project plan forward as hard as the project planner, sidestepping the documentation question. Comments such as "there is documentation, it is fine.", "the code is simple" or "anyone could pick it up in a day" reverberate around the status meetings.

I have been both the developer and the project planner in this embrace so I know how it works. In the defense of the planners, they have to go on what they are told about the documentation for the system. They cannot be expected to adjudicate on the quality of technical documentation. In defense of the developers, creating documentation is boring to most of their ilk and yes, at the time the code was written, it appeared simple and it appeared that anybody could pick it up in a day.

This problem is, of course, a well worn path. The reason I am walking it is that I suspect a fork in the road is coming. Let me explain. One obvious way to promote good documentation is to make it easier to create the stuff in the first place. A key requirement is to ensure that the documentation and the computer code 'live' in the same place so that they remain 'in synch' with each other. A classic system that does this is Don Knuth's CWEB system for so-called literate programming [1].

Classically, a literate programming system combines a programming language like C with a typesetting language like TeX. To create documentation, you filter the code out of the source files. To compile the programs, you filter the documentation out of the source files.

Now here is the problem. Typesetting languages like TeX extract a price for their great power. A price denominated in a currency called complexity. Using TeX is not a matter of firing up a standard WYSIWYG editor, typing stuff, drawing pictures, creating tables and so on. You need to understand TeX notation to create TeX. On the other hand, you need to know nothing about word processor notations to create word processor documents...

Which brings me to the 'what if' question. What if we leveraged the fact that there is now a non-proprietary standard XML representation for richly formatted office documents called ODF[2]. What if we used ODF compatible tools like OpenOffice[3] to write our programs? How would we extract the lines of code to feed to our compilers? We could just use paragraph styles that indicate �feed this to the compiler�.

For documentation, an embarrassment of riches would then be instantly available. We could use level heading to split up the code/documentation into hierarchical chunks. We could generate tables of contents from these level headings. We could insert pictures wherever we need them along with tables, cross references, index entries and so on. Heck we could even embed spreadsheets, photographs taken of white-boards at planning meetings, the whole shebang.

WYSIWYG literate programming with ODF? I do not see why not.

[1] http://www.literateprogramming.com/
[2] http://en.wikipedia.org/wiki/OpenDocument
[3] http://www.openoffice.org

On this topic

 

 

Sean McGrath is CTO of Propylon. He is an internationally acknowledged authority on XML and related standards. He served as an invited expert to the W3C's Expert Group that defined XML in 1998. He is the author of three books on markup languages published by Prentice Hall. Visit his site at: http://seanmcgrath.blogspot.com.

Read more of Sean McGrath's ITworld.com columns here.




Sponsored Links

Understanding VPN Technology Choices
Knowing the VPN options can help a manager work more effectively with available technologies.
IMPROVE YOUR SUPPORT EFFICIENCY
WebEx lets you remotely control, configure and install applications and updates more efficiently.
SOLVE SUPPORT ISSUES on the First Call!
REMOTELY CONTROL AND CONFIGURE SYSTEMS. Easily install applications, updates. All from your Desktop!
TAKE CONTROL OF REMOTE COMPUTERS
Support, configure and install applications and updates remotely for greater efficiency.
Sony Entry-Level Data Projectors With HDMI!
Universally Seen As The Perfect Choice For Education & Business. Bright, Stylish, Easy To Use!
» Buy a link now

Advertisements
Sponsored links
KODAK i1400 Series Scanners stand up to the challenge
Top 5 Reasons to Combine App Performance and Security
Bring harmony to your mix of UNIX-Linux-Windows computing environments
Locate Hidden Software on business PCs with this free tool
 Home   Application Development  Programming process  Documentation Development
www.itworld.com    open.itworld.com     security.itworld.com     smallbusiness.itworld.com
storage.itworld.com     utilitycomputing.itworld.com     wireless.itworld.com

 
Contact Us   About Us   Privacy Policy    Terms of Service   Reprints  

CIO   Computerworld   CSO   GamePro   Games.net   Industry Standard   Infoworld   ITworld  
JavaWorld   LinuxWorld  MacUser   Macworld   Network World   PC World   Playlist  

DEMO   IDG Connect   IDG Knowledge Hub   IDG TechNetwork   IDG World Expo  

Copyright © Computerworld, Inc. All rights reserved

Reproduction in whole or in part in any form or medium without express written permission of Computerworld Inc. is prohibited. Computerworld and Computerworld.com and the respective logos are trademarks of International Data Group Inc.