Monday, September 17, 2007

Code is data is code (yet again!)

Right, I have previously described the distinction between code and data as purely convenience. In reality, there isn't a difference. However, we can get much more convenient than simply code/data, and most rigorously specified software solutions do. I have held up configuration data and reference data as more obvious examples of the crossover between data and code. However, these convenience names are also excellent examples of why the course-grained data/code split is fundamentally useless.

Let me also here, bring in several strands of computer systems development. Firstly, the user's mental model vs the system model. Logical model vs data model. Ref data, Config and business information.

I'll deal with this over the next few weeks.. first:

Config: the stuff in the code that needs to be changed for each deployment or machine.
Ref data: the libraries of the language that users use, but these libs will grow and change from time to time during the system's lifetime.
Logical model: the raw structure of the language of the user.
Physical model: how the computer implements the logical model.

Documentation is a whole 'nother can of worms here - layers of proof that the models above are accurately generated. Variously these are artifacts to show that that the user's language is understood and interpreted correctly such that the physical model cn always support the user.

How much easier if we always generated systems on the basis of writing a computer language.. Because a computer language is someone's implementation of a programmer's mental model (by a programmer) there is a necessity of rigor that often lacks in lesser systems.