Programmes vs Data [was: Re: [plug] Community Seminars]

James Devenish devenish at guild.uwa.edu.au
Sat Jun 19 17:10:09 WST 2004


Bernd Felsche wrote:
> Try to explain the difference between program and data.
> Should be easy if you're in a library.

A quick question: what is the purpose of the library for the mum-and-dad
simplification?

> Stored programmes are data. I never intended to draw an arificial
> boundary that excludes programmes from being data.

Okay, acknowledged.

Bernd Felsche wrote:
> Programmes are run; data are stored.
> HTML is *never* a programme. Nor are TeX and Docbook, strictly speaking.
> Just because it's written in a language, doesn't make it a programme.
> A program is something that the system executes "directly";
> data are what programs use.

The above statements neither seem to satisfy the mum-and-dad thread
nor Cameron's thread, which is why I am still pursuing this.

> Read the original which has the full explanatory paragraph:

> 	Bash, Perl, Python, Java, Basic, etc are intepreted by
> 	programmes that are designed to give those languages wide
> 	access to the machine's facilities. That's different to
> 	languages such as TeX, HTML, PostScript, OO.o etc where the
> 	application program is designed for a particular task; not
> 	one of system control but solely the control of the
> 	application's functions.

Okay, the paragraph directly above draws a distinction between Bash
scripts or Java (for example) and TeX files (for example). The paragraph
says that Java (bytecode?) is "interpreted by [a programme]" without
saying that it "is a programe". So it doesn't seem to exactly clarify
your statement that 'A program is something that the system executes
"directly"; data are what programs use', except to imply that all the
above are not programmes. (You later addressed Java by referring to
"its CPU".) But you also went on to say:

> Which data are programmes? Naturally those which can be executed by
> the processor to produce a programmed outcome; bugs notwithstanding.

Given that you said that Java (bytecode) is "interpreted" and runs
directly on "its CPU", I presume you are declaring that Java bytecode
is a "programme"? I'm happy with that, but I didn't realise your 'full
explanatory paragraph' was saying that.

> The object was to draw a *simple* distinction between what executes,
> and what's used by a running programme to determine how it behaves.

To get back to the mum-and-data issue: I'm aware of the simplification
where a "data file" just sits there until you have some kind of
"programme" that can use it (i.e. an "application" is a necessary and
sufficient container in which you use data file). But this distinction
seems blurred when the "application" is intentionally made to appear to
be "the OS". E.g. MP3 files. In some version of Windows, you can play
these directly from the "folder"/"explorer" windows -- the appearance is
that they run "by themselves" and you don't need to open an
"application". Yet, we also hear about MP3 format exploits where
malicious "programmes" can be aroused by playing music. I realise this
might come under your heading of "bugs".

What about e-mail messages, web content, installation packages, Word
macros, etc.? These are all 'data files'. In the case of e-mail, web and
Word, they are are clearly part of an "application" and should only
behave within "the application's functions". Yet, because of "bugs", we
must continually admonish users that these "data" can be malicious and
do rampant nasty things outside the scope of the applications. Since I
would not expect to often make the distinction between something that
"is a programme" and something that "is like a programme", I would
simply talk about those things as "programmes". Yet, they don't fit the
criterion that programmes can be made distinct from data because they
are "designed to give those languages wide access to the machine's
facilities". It just seems that we need to tell people that programmes
can be hidden inside "data", even though the "data" can only be used
when they are opened with "applications". That seems to make things "not
so simple" but I guess we were just thinking of this to different levels
of approximation -- "opening an application to use your data" as opposed
to "what is a programme and what is data".





More information about the plug mailing list