15.

F-P

Factory Method design pattern

A design pattern that allows for the creation of new instances of a class via a static method. Factory methods are useful for performing complex initialization of an object (e.g., constructing a List from its String representation).

Fictitious Implementation

A bug pattern caused by a would-be implementation of an interface that fails to satisfy the entirety of the interface's specification.

Generic types

Types parameterized with variables that can be instantiated in particular contexts. When generic types are added to Java, it will be possible to perform much more precise static checking over a program.

Impostor Type

A bug pattern caused by distinguishing conceptually different types of data with ad hoc tags rather than static types.

Incremental development

A programming practice in which software is specified, implemented, and tested in very small steps. These steps incrementally approach a larger programming goal.

Inline testing

A means of testing in which tests are inserted directly into the program code that they check, and are run during execution of that code.

Invariant

A program property that holds throughout the program's execution. Some methods include declared invariants which are checked before and after each execution of the method.

Iteration

A traversal over the components of a data structure.

Liar View

A bug pattern caused by a view of a data structure that misrepresents the data structure's state.

Method overloading

The use of a single name for more than one method within a single class. Each method of the same name must have a distinct signature.

Mediator design pattern

A pattern that provides a single object that encapsulates how a set of related objects interact.

Method overriding

The redefinition of a method in a subclass.

Mixin

A class parameterized by its superclass. Adding mixins to a language provides much of the same power as multiple inheritance, without the disadvantages. There are many different proposals for adding mixins to Java.

Model

One of the three types of components in a Model-View-Controller architecture. A model maintains the underlying state of the program.

Mutator (a.k.a., setter)

A method whose sole purpose is to modify the state of the receiver.

Model-View-Controller (MVC)architecture

An architecture for GUI programs based on three types of component. The controller is responsible for setting up communication between the model and its view(s).

Null Flag

A bug pattern caused by the signaling of an exceptional condition by passing null as the return value of a method.

Orphaned Thread

A bug pattern that occurs when one thread in a multi-threaded program waits on a thread that has unexpectedly died.

Pair programming

A method of software development in which two people sit at the same machine and work together to write code. Typically, one member deals with the low-level aspects of the process, such as typing, while the other considers high-level aspects of the program (and also helps to spot low-level bugs).

Parametric polymorphism

A type system in which types may contain variables to instantiate depending on context.

See also Generic types.

Parsing

Reading program input and transforming it into an internal representation. Any program that accepts input, no matter how simple, should parse it in order to catch mistakes in the input as quickly as possible.

Pattern

Christopher Alexander, who coined the term pattern language, identifies three components of a pattern: a context in which the pattern applies, a system of forces describing the pattern's problems or goals, and a solution, a plan that balances this system of forces (or solves the problem) within the context. These three components respectively correspond to the symptoms, causes, and cures/preventions of each bug pattern presented in this book.

Perpetual refactoring

A method of software development in which all code is improved at will by whatever programmer is working with it at any given time. Perpetual refactoring works best in the context of a unit test suite that can ensure that important program invariants are not violated.

Persuasive programming

A programming practice in which assertions are placed into the program to help ensure that the operations performed will not signal errors.

Point of control

A part of a program that determines some aspect of program functionality. When the same functionality has more than one point of control, bugs are more easily introduced.

See also Rogue Tile.

Polymorphism

A language feature in which the same code can behave differently depending on context. There are two kinds of polymorphism: inheritance polymorphism (achieved through subclassing) and parametric polymorphism (achieved through generic types). Currently, parametric polymorphism is not available in Java.

Postcondition

An assertion stipulating that a certain condition should hold upon exiting a method.

Precondition

An assertion stipulating that a certain condition should hold before a method is called.



Bug Patterns in Java
Bug Patterns In Java
ISBN: 1590590619
EAN: 2147483647
Year: N/A
Pages: 95
Authors: Eric Allen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net