overly cautious or properly paranoid?

This is largely dependant upon the degree to which you control/trust
the author of the calling code.

If you are writing a service routine that can be called by anything
written by anyone, then you must be absolutely paranoid in every way
that you can think of!

If you are coding to an IBM documented API, then you usually (BUT NOT
ALWAYS!) can rely upon the fact that that that API will never change
in an incompatible way. (In other words, you still have to be paranoid.)

If you are coding for an API that you yourself will be writing, then
the degree of paranoia depends upon how much you can trust your
future (70 year old?) self.

For myself, I am a very paranoid programmer, and I can't begin to
tell you how many times that has saved my ass over the decades.



In programming, paranoia is a good thing!
Dave Cole



At 8/11/2010 10:07 AM, McKown, John wrote:
This is just curiousity on my part. I was thinking about standard
parameter passing in z/OS. That's where R1 points to a list of
fullwords containing address of parameters, with the last address
having the high order bit set and all previous addresses having the
high order bit unset. So I was wondering the following:

1) do you check to make sure that R1 actually points to a fullword
boundry. I.e. bits 30&31 are '0'b? Is this necessary or not? If R1
doesn't point to a fullword boundry, is that actually an error? That
is, do you feel that a proper parameter list must be fullword aligned?

2) do you always verify bit 0 of every fullword in the list of
addresses to make sure that you get the expected number of
parameters? What do you do if you get too few or too many?

John McKown
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-691-6183 cell
[email protected] * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential
or proprietary information. If you are not the intended recipient,
please contact the sender by reply e-mail and destroy all copies of
the original message. HealthMarkets(r) is the brand name for
products underwritten and issued by the insurance subsidiaries of
HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r),
Mid-West National Life Insurance Company of TennesseeSM and The MEGA
Life and Health Insurance Company.SM

Dave Cole              REPLY TO: [email protected]
ColeSoft Marketing     WEB PAGE: http://www.colesoft.com
736 Fox Hollow Road    VOICE:    540-456-8536
Afton, VA 22920        FAX:      540-456-6658

Reply via email to