From: bcoleman@hayes.com (Bill Coleman)
Newsgroups: comp.sys.mac.advocacy
Subject: Re: 7.1 vs. OS/2 and Windows NT
Date: 15 Oct 92 19:06:05 EDT
Organization: Hayes Microcomputer Products, Norcross, GA

In article <1992Oct14.234816.19447@leland.Stanford.EDU>, kocks@jessica.stanford.edu (Peter Kocks) writes:
> In article <6182.2ad988cb@hayes.com> bcoleman@hayes.com (Bill Coleman) writes:
>>You didn't include the rest of my posting. I pointed out that memory protection
>>is useful for the DEVELOPER, who expects to have frequent crashes. Memory
>>protection may or may not help to target the actual bugs. 
> 
> Excuse me?  Memory protection "may not help" to target bugs?  You must
> be totally dreaming, or you never programmed in C.  

Well, I've programmed professionally for 10 years. Assembler, Pascal, C,
Object Pascal, even a bit of C++.

Not all bugs are found by memory protection. That's what I meant.

> Ever leak a little memory?  

That's an excellent example. If you forget to malloc, you may get a
memory protection fault, maybe not.

If you forget to free, you won't get a memory protection fault.

There's a lot more errors involved here than just access violations. There's
tons of ways a program can have bugs without actually crashing. Or it can
crash without ever generating an access violation. Memory protection
certainly doesn't help in these cases.

> I used to program my mac ci in c and every once in a while I
> would mess (by accident) with the a region of memory that I was not
> supposed to be in.  The ci would crash. I would wait 1 minute while
> rebooting and then I would carefully trace the execution of the
> program until just before the crash.  

Go back and look at my postings. Memory protection is certainly a valued
item for developers. It isn't as valued for regular users. That's what I
said.

You sound like you are a developer. You'd find memory protection more
valuable than a user. 

>>The USERs apps shouldn't crash. Period.
> 
> Agree. Totally.  

Amen! Halleluja!

> To get to the point where a program does not crash comes much faster 
> and at less cost when you have memory protection.

When the DEVELOPER has memory protection, it might help to find certain
bugs, true. But having memory protection is no guarantee of bugless
software.

> This is a clear benefit to the user.  New programs arrive faster and
> at lower cost.

Personally, I don't spend most of my time chasing down bugs that 
(would) cause access violations. There's a lot of bugs, so the 
transferred benefit to the user has to be averaged out over a number of
bugs.

>>I disagree. System 7 wasn't delayed by bugs. It was delayed because it had
>>few bugs. It had few bugs because it was so outrageously tested. That testing
>>effort took a lot of time, not fixing tons of bugs.
> 
> And you mean to tell me that none of those few bugs caused the mac to
> crash because of a memory problem?  I highly doubt it.  

I didn't say that.

I'd guess that the percentage of access violation-type bugs was extremely
small. Perhaps 1% of the total debugging time, if that much.

Of course, I don't have the figures. Perhaps one of the blue meanies can
fill us in with actual data.

> Even if the mac did not crash, would you still claim that the bug was 
> not related to a memory problem?  None of the bugs were memory related?  

I never claimed that.

> Every c programmer at Apple is perfect and does not have any run away
> pointers? Get real.

I never said that.

Of course, even if you have a run away pointer, there's no guarantee that
using it will cause an access violation.

> Also, why did system 7 need to be "outrageously" tested?  Perhaps
> because in the Mac when a bug occurs, the system crashes.

No, it needed to be outrageously tested because it made a number of
fundamental enhancements to the Mac OS. May bugs which were dancing
around since before System 6 were quashed in System 7. Apple wanted
System 7 to be rock solid so people would be encouraged to switch.

They also wanted System 7 to last a long time. So the fewer bugs, the
better. They did an excellent job, IMHO.

> Memory protection certainly does not substitute for a stable system.
> Applications should not crash.   Unfortunatley, they sometimes do --
> even on a Mac.  

Sad to say, but true.

-- 
Bill Coleman, AA4LR                ! CIS: 76067,2327    AppleLink: D1958
Principal Software Engineer        ! Packet Radio: AA4LR @ W4QO
Hayes Microcomputer Products, Inc. ! UUCP: uunet!hayes!bcoleman
POB 105203 Atlanta, GA 30348 USA   ! Internet: bcoleman%hayes@uunet.uu.net
Disclaimer: "My employer doesn't pay me to have opinions."
Quote: "The same light shines on vineyards that makes deserts." -Steve Hackett.