CompuServe Thread

#ObjectOriented

4 messages in this thread
#48198From: Greg Comeau@Comeau CmptgSep 19, 1995 5:47 PM
>I don't know whoever said it first, but I consider it >true: EVERY more or less big program contains several errors. Number of errors alone is of course inconclusive of anything, but in general I'll buy that. And no doubt EVERY more or less small program containsseveral errors. In a way, this is one of the roots of what this thread has been about. How can we go about expressing our designs, and their subsequent implementations, and their maintenance, reuse, etc, so as to reduce that reality, and make it more flexible. >Most of the time this is no problem for a program but, as far I am concerned >it is a problem if you are speaking about a programming language! Not sure I understand. Unless we're talking about throw away apps, or stochastic'y apps, I always consider an error a problem. I agree in some facets a weight can be put on things (say the difference between an malfunctioning ATM bank machine vs a malfunctioning pacemaker) but still, I'd make the effort for both of them. >The one thing no theory I know of takes into account are just plain, human >typing errors. Even if I didn't want it, bringing up this fact, has forced me >to ridiculize a few professors at a small university here in Brussels. The >reactions showed that people understood what I was saying but I was embarrassed >in their place. I consider there to be an arsenal of such things, and typos are certainly in there. In the grand scheme of things, I don't consider them to actually be of the highest priority (but they do have some priority and hence are not discarded). Again, things like the universe can made some things even less at the top too. For instance, typed languages, and/or language that force you to declare things (this doesn't cause the problem to go away, and in some way even artificially disguises — perhaps this was your point — but to the professional, a help not a hindrance or constant issue). And so on.
#48236From: Bart Van BockstaeleSep 20, 1995 10:24 PM
>>I agree in some facets a weight can be put on things (say the difference between an malfunctioning ATM bank machine vs a malfunctioning pacemaker) but still, I'd make the effort for both of them.<< Agreed. What I meant is that, very often, you have an error that will never be seen during the useable life of the program. When I made the calculation library for my accounting package, there was a typing error in the division routine. I found a way around this before I discovered the bug. Therefore, there was an error in the program and yet, the program behaved correctly. The error was this: moveq.l #0,d0 moveq.l #0,d0 it had to be: moveq.l #0,d0 moveq.l #0,d1 For a reason that still deludes me I only found this error more than a year after having written the routine when I was looking for something else. And yes, I also always do the best I can to avoid errors. Bart Van Bockstaele at 100574.2352@compuserve.com … On AutoPilot and Amiga all the way from Belgium NOT from Mars!…
#48253From: Greg Comeau@Comeau CmptgSep 21, 1995 11:54 AM
>What I meant is that, very often, you have an error that will never be >seen during the useable life of the program. This implies "dead code" which IMO does belong there in the first place then. This is part of what unit testing and other instrumentation should expose. Although I wouldn't go so far as to say dead code is an error, it is certainly not correct to leave it (in many cases) even if it "does the right thing" (whatever that could possibly mean then). > When I made the calculation >library for my accounting package, there was a typing error in the division >routine. I found a way around this before I discovered the bug. Therefore, >there was an error in the program and yet, the program behaved correctly. This implies you meant "seen" and in "doesn't surface". Nonetheless, the problem and error is real and something as simple as adding another line of code can cause this "harmless thing" to wreak havoc. I lump this kind of situation into a term I call `good garbage' 😉 >For a reason that still deludes me I only found this error more than a year >after having written the routine when I was looking for something else. Sure, it happens ("…hey!, how could this possibly have…").
#48379From: Bart Van BockstaeleOct 1, 1995 5:18 AM
>>This implies "dead code"<< Not necessarily. What do you think of an error style: 400 * 400 = 28928? This is an error I remember I ran across years ago. And yet, 40*40 = 1600. This was an overflow error not mentioned by the compiler. Bart Van Bockstaele at 100574.2352@compuserve.com … On AutoPilot and Amiga all the way from Belgium NOT from Mars!…