Re: More Mac like handling of OS raised exceptions
Re: More Mac like handling of OS raised exceptions
- Subject: Re: More Mac like handling of OS raised exceptions
- From: Greg Hurrell <email@hidden>
- Date: Wed, 17 May 2006 01:30:23 +0200
El 16/05/2006, a las 20:14, Scott Ellsworth escribió:
On May 16, 2006, at 10:46 AM, Lon Giese wrote:
I am a one man programmer on a project that is massive, truly
massive... So to cope I am using the 90-10 rule, 10% of your code
is executed 90% of the time... I realize I could check the
pointer is not out of bounds on every read and many languages do
just that like Basic, But 99.999% of reads are not out of bounds
so I am writing a lot of code that will almost never be executed
or almost never take the failed condition branch...
I have been a part of several projects like this, and I almost
always found good error handling to pay for itself in maintenance.
If my code did not crash, or at least warned me when it was about
to do something bad, then I was able to find and fix problems quickly.
I'd agree with that and go even further. It's not just about writing
code with adequate error and bounds checking. It's also about
investing time writing unit tests. Surprisingly, time spent writing
unit tests helps you to finish "massive, truly massive" projects
faster even if you are only a "one man programmer". Basically, you
lose time writing them, but you gain time because bugs are found and
fixed sooner and you development cycle (build-test-fix) is quicker
and more effective. You end up shipping a higher quality product
sooner because you spend less time tracking down hard-to-locate bugs.
And also those error checks, bounds checks, and unit tests give you
the confidence to write code faster, refactor more boldly etc.
Cheers,
Greg
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden