Jump to content

Coding by exception

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dtallcott (talk | contribs) at 07:06, 15 May 2014. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Coding by exception is an anti-pattern and an accidental complexity in which an exception is allowed and used to continue a software system. This anti-pattern can quickly degrade software in performance and maintainability.[1]

As a general rule, well designed software projects contain very few corner cases[2]. There are a variety of software development methodologies that purport to help engineers develop software that avoid these corner cases. They typically address dependency management issues. Design patterns are another tool for arriving at less of a 'one-off' solution.

Accidental Complexity

Accidental complexity is that complexity which arises in computer programs or the development process which is deemed not essential to the problem being solved. Coding by exception is an example of accidental complexity. Where this issue arises from poor planning or programming, some complexity is essential: essential complexity and unavoidable. Here is a list[3] of accidental complexities:

  • Blind Faith
  • Error Hiding
  • Hard Coding

See also

=References