|

 
|
| | Name : | Scott Hunsaker | Organization : | Hart Intercivic | Post Date : | 9/30/2005 |
| Section : | .20.5 | Page no. : | 5-8 | Line no.: | | Comment : | 127 II 5 p 5-8 5.4.2.a
All parameters shall either be
validated for type and range on
entry into each unit or the unit
comments shall explicitly
identify the type and range for
the reference of the
programmer and tester.
Validation may be performed
implicitly by the compiler or
explicitly by the programmer;
Design and coding practices
shall prevent methods from
exhibiting undesirable behavior
due to erroneous input
parameter values. Validation
may be performed implicitly by
the compiler or explicitly by the
programmer when the validity
of the input range cannot be
guaranteed;
"If you check data passed as
parameters in every
conceivable way in every
conceivable place, your
program will be fat and slow.
What's worse, the additional
code needed for defensive
programming adds complexity
to the software. … Think about
where you need to be
defensive, and set your
defensive programming
priorities accordingly."
[McConnell 5.6] | |
|
|