Frank,

>Well, I'm not sure what Derek means when he makes the statement:
>
>   I am beginning to think that program understanding does not exist.
>
>since I don't see why we can't understand some programs.

What do you mean by understand?  I would guess you would claim that
people can have complete knowledge of the semantics of a program.

I would say that there are levels to this understanding.  Programmers
have declarative knowledge about a program within their applications
domain and to a certain level of language (computer) expertise.

They might claim to understand a program to their level of expertise.
Which is almost true by definition.

'Program understanding' is really a relative term, not an absolute one.

>   For example,
>hands up those who call themselves C programmers who don't understand
>this C program:

Well, my hand is up and so should yours be.  Having written a C compiler and
library, represented the UK on the ISO C standards committee for six years
(now retired) and worked in C applications checking for eight years and read
the C standard cover to cover more times than I can remember, I could do
little else than claim not to have a complete understanding of any C program
(experience has taught me there is always somebody who knows something
I don't).

>   main()
>   {
>     printf("Hello world.\n");
>   }

This program contains a number of assumptions and constructions that
could cause a compiler to reject it (very few compilers would reject this
program and these constructs may have been used in the interest of
brevity, not lack of language knowledge). I shall just skim the highlights.

    o You are assuming what is known as a hosted environment.
        C also supports a freestanding environment, which need not
        contain a library, hence the call to printf could cause the
        compilation to fail to link.

    o You are assuming that the return value of the program is not used
       (there is no explicit return from main).

    o You are assuming (I think) that the character sequence Hello World. will
        appear.  The sequence .dlroW olleH would also be valid, the standard
        says the direction of printing is locale specific.

    o The first line, main(), is a common idiom, but technically incorrect in
       at potentially three areas (return type, name and parameter 
declaration).
       All rather obscure stuff unless you happen to be working in certain
       environments.

>(Those with their hands in the air: you're fired.)

Programmers with an awareness of their own limitations are
hard to find, you will have no trouble finding much better jobs.


derek

--
Derek M Jones                                            tel: +44 (0) 1252 
520 667
Knowledge Software Ltd                            mailto:[EMAIL PROTECTED]
Applications Standards Conformance Testing   http://www.knosof.co.uk



- Automatic footer for [EMAIL PROTECTED] ----------------------------------
To unsubscribe from this list, mail [EMAIL PROTECTED]  unsubscribe discuss
To join the announcements list, mail [EMAIL PROTECTED] subscribe announce
To receive a help file, mail [EMAIL PROTECTED]         help
This list is archived at http://www.mail-archive.com/discuss%40ppig.org/
If you have any problems or questions, please mail [EMAIL PROTECTED]

Reply via email to