Please enable JavaScript.
Coggle requires JavaScript to display documents.
pay attention to the following (Floating Point (Avoid additions and…
pay attention to the following
integer
Check for integer division
Check for integer overflow
Check for overflow in intermediate results
Floating Point
Avoid additions and subtractions on numbers that have greatly different magnitudes
Avoid equality comparisons
Anticipate rounding errors
Check language and library support for specific data types
Characters and Strings
Avoid magic characters and strings (use named constant instead)
Watch for off-by-one errors
Know how your language and environment support Unicode
If you need to support multiple languages, use Unicode
Boolean
Use boolean variables to simplify complicated tests
Create your own boolean type, if necessary
Enumerated Types
Use enumerated types for readability
Use enumerated types for modifiability
Use enumerated types as an alternative to boolean variables
Named Constants
Use named constants in data declarations (array)
Avoid literals, even “safe” ones !!
Use named constants consistently
Arrays
Make sure that all array indexes are within the bounds of the array
Consider using containers instead of arrays
Check the end points of arrays