Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor grammar changes for clarity

...

This chapter contains guidelines for defensive programming. Defensive programming is carefully guarded programming that helps you to construct reliable software by designing each component so it protects to protect itself as much as possible, for example, by checking that undocumented assumptions remain valid [Goodliffe 2006]. These guidelines look at address areas of the Java language that can help to constrain the effect of an error or help to recover from an error.

Content by Label
showLabelsfalse
max99
spaces@self
sorttitle
showSpacefalse
typepage
labels+defensive

...

  1. Essential for ensuring correctness of Java code;
  2. Specific, implementation-level java coding advice;
  3. Have a higher normative requirement than the defensive programming category.

...

Program understandability is the ease with which the program can be understood. That is, the ability to determine what a program does and how it works by reading its source code and accompanying documentation [Grubb 2013]. Another term used to describe this property of source code is readability. Understandable code is easier to maintain because software maintainers are less likely to introduce defects if the into code that is clear and comprehensible. Understandability helps in manual analysis of source code because it allows the auditor to more easily spot defects and vulnerabilities. 

The guidelines in this chapter are mainly stylistic in nature, and ; they will help a Java programmer to write code that it is clearer and more readable.

...

  1. Misconceptions about Java APIs and language features;
  2. Assumptions and ambiguity-laced programs;
  3. Situations in which the programmer wanted to do x but ended up doing y.

They deal with address areas where developers often make unwarranted assumptions about how Java works, or where ambiguities can easily be introduced.

...