Skip to content

One spot programming

January 18, 2011

I have been reading a piece written by Poul-Henning Kamp, Sir, Please Step Away from the ASR-33 (in the Communications of the ACM, 14/2010 Vol. 53 No.11) and his ideas re-ignited some of my ideas I gathered when I was working for a large engineering company many years ago. His ideas spoke about the tyranny of ASCII,  but my ideas was sparked when I was moving Delphi code to C++ and I had to document what the C++ now was doing.

I did not want to document things outside code, I wanted diagrams and other explanations all in one spot as well as the code itself. If I remember correctly Borland had something close to this idea but I wonder what happened to it.

I call this one-spot programming because all that anyone needs is found in one document, even the specification, graphical diagrams and other helpful comments to help the reader get a total and efficient grasp of what the product (code) is doing. One side effect is that it can relay its relationship with others components in the system etc.

Where as I was thinking of Word like document, I am now of the opinion that the best tool for this is a combination of LaTex plus your so-called programming code like say Java etc., all combined to one. We need a parser to segregate the LaTex code from the programming code. I think XML is the best tool to wrap and earmark which ones are for LaTex and which ones are for the compiler. The parser will take care of this funneling  and I am pretty sure with a bit more time, an online debugger can be integrated with your usual IDE for this too.

I wish I had funding for this, I can work on it and get it out in no time.

Any thoughts are of course welcome.

2 Comments leave one →
  1. scott m gardner permalink
    May 6, 2014 4:11 am

    Donald Knuth promoted something very much like this called “Literate Programming. It was derived from LaTex the documentation and code were intermixed. A processor would generate source code and documentation from the literate markup. It was pretty cool idea, and a decent implementation, but never gained traction.

    • May 6, 2014 9:26 am


      Thanks for your comment. I will still like to do it simply because it is a good idea but in my present situation it has to be full time. It has to be funded and becomes a day job for a while. My day job will distract me from this project :-).

      I also got this idea from a Product Data Management(PDM) software I worked on a long time ago. They do something like this already in engineering. You view a blue print – click on a part, the system tells you the dimensions, how to build it, where to source it and how much it will cost etc.

      We can have a marked PDF produced by the LaTex and that spells lots of possibilities, if you know what I mean 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: