Project

General

Profile

The problem with conventional code listings

Added by monsonite 6 months ago

Jean Claude,

I have always thought that part of our problem with productivity whilst coding is the old fashioned way we treat the screen as effectively a line-printer listing. We are constantly scrolling up and down looking for the routine we wish to edit.

A partial solution came in the late 1980's with the "folding editor" - that Inmos/Meiko made available with their Occam language. Large blocks of code could be reduced to a single line, just the name of their function and the parameters. In this way we could tuck away the reams of detail and just cut to the wider picture.

Now that many of us develop code on wide screen monitors (27" or so) - there is no reason whatsoever why our code window should be so myopic. We should use the whole width and thus area of the screen to convey the underlying meaning of the application that we are trying to code.

An analogy of this is the London Underground map - an Iconic image from the early 1930's. Imagine if all we had to navigate a large metro transport system, was a long alphabetical list of the stations, and the names of the streets they were accessed from. It would be a nightmare - but no less of a daunting task than coding in a modern IDE.

So by using colour to represent the lines, with equi-spaced ticks for the stations and the full area of the map - geographically stretched or squeezed so that the whole of the Greater London area could be surveyed in a single glance - made the Underground far less confusing - especially to visiting tourists.

So why don't we do this with code? And why don't we develop code that can map itself - after all, code is merely a journey of jumps and calls between different areas of memory. Let's use the power of the modern computer to make tracking our way through complex applications a whole lot easier.

So now we have touch screen monitors - so why not use the capacitive touch screen to allow us to interact with the code? A double tap to execute the particular block of code, a swipe to expand the code to show more detail? And let's use a powerful interactive language, to make this all a lot easier.

It should be possible for the screen editor to decompile the source code listing and produce a map that shows how the various blocks of code are interconnected, the various dependencies and it should be possible to step through the "mapping" so as to see the route taken by the code. As humans, with origins of nomadic navigational skills we are particularly sensitised to the spacial arrangements, and location of objects - making it easier to remember how things are connected in the wider territory.

A picture may paint a thousand words, but when your working in Forth, a thousand words can create a very revealing picture.

regards

Ken