Derek M Jones wrote: > 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. Your guess about what I mean is not germane, since I'm not the one claiming that understanding might not exist, and indeed sounds a little like a straw man, if you'll forgive my directness. As it happens, I would never claim that people can have *complete* knowledge of anything very much. However, since I certainly don't think that understanding is an all-or-nothing proposition, I don't see this as a problem. In something as complex as a computer system, *complete* knowledge of the semantics of a C program might oblige me to apprehend everything from its effect on the CPU's registers to the consequent changes in ambient temperature of the nearby power station's air, a potentially monumental task for even trivial programs. If I'm obliged to know *all* the details before I have *any* understanding, then of course program understanding doesn't exist. But that would be a pointless definition of understanding, so I'm going to ignore it. As it also happens, I think there exists the more useful notion of understanding as 'sufficient knowledge and insight', which is context- and task-dependent, and which is what I'd tend to use when talking about understanding of programs. Of course, I am not a psychologist, although I've seen one on T.V.. Consequently, I'm generally shackled to man-on-the-Clapham-omnibus-type views about what 'understanding' means, so I hope you'll forgive me if there's a more specialised version of this word that you're all using that I've missed the meaning of. > 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. So why do you think it might not exist? Are you really just claiming that the term may have different interpretations by different people, or in different circumstances, and so therefore is not a useful term? Are you bemoaning a rigorous definition we can all sign up to? Or something else? > > 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. On the contrary; I call myself a C programmer, and I believe I understand what this program does. As it happens, what it does is highly context- dependent, as you and Arthur van Leeuwen point out. The same program can do more than one thing -- I never said it couldn't (especially if I'm allowed to use compiler options to redefine all the symbols in the program, I could probably have it generating Fibonacci numbers in no time). However, it seems to me that you are defining 'understand this C program' as 'predict the consequences of compiling and running this C program in an unspecified environment, with no opportunity to find out more, and with an obligation to be 100% correct and 100% comprehensive.' As a corollary to my earlier remarks, this would be a pointless definition. Arthur seems to be doing the same thing here when he says: >Awww, shoot. And I really needed that coding job too. Note: there is much left >implicit and up to the compiler's implementation in that program. There is >no indication as to whether or not this will compile to a void or integer >main, and what the printf will exactly do is fully unclear as well (it might >open a 'console window' to print text in, such as on a Macintosh, or it >might simply write to the screen, or it might use an open device file and >write to that) . This is all true, but I don't believe it undermines Arthur's understanding of what the program does. It just means he has some issues to resolve before he can collapse the program's various possible run-time behaviours to a single one. I don't believe his understanding would appear out of nowhere when the last of a series of questions resolving the ambiguities of the compile- and run-time environments are answered. No matter what the fiddling details of the tools and the environment are, I would expect a C programmer to be able to claim that they understand what the program I showed does. It might reveal something about their experience if they weren't able to propose seventeen different execution scenarios, but I'd expect at least a couple, and for those to include the obvious trivial ones. I'd also expect them to be able to explain why there's so much potential variation in behaviour from such a simple program. It seems likely to me that you both *do* understand what the program does, since you're able to describe several things that would have an effect on what it did if executed. If I were to ask you to explain what it did, I wouldn't expect to you throw up your hands and say 'I have no idea, and I don't know how to proceed', which would connote lack of understanding. Instead, I would expect you to say "well, if we assume a hosted environment, and a fairly modern compiler, then it'll probably do *this*...if we have a pre-1989 compiler, it'll probably fail to compile because of *this*...", etc.. Does having doubts or requiring clarifications before a definitive answer can be given destroy understanding? I don't believe it does; I believe it merely incorporates ambiguity and uncertainty into it, such as *might* need to be resolved in certain circumstances. Perhaps this is forbidden by some tenet of psychology I'm unaware of; in which case please enlighten me. I hope this helps you to understand (sic) why I have trouble with the claim that program understanding might not exist. -- Frank Wales [[EMAIL PROTECTED]] - 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]
