Software entropy is the idea that
software eventually rots as it is changed if sufficient care is not taken to maintain coherence with product design and established design principles. The common usage is only tangentially related to
entropy
Entropy is a scientific concept, as well as a measurable physical property, that is most commonly associated with a state of disorder, randomness, or uncertainty. The term and the concept are used in diverse fields, from classical thermodyna ...
as defined in
classical thermodynamics and
statistical physics
Statistical physics is a branch of physics that evolved from a foundation of statistical mechanics, which uses methods of probability theory and statistics, and particularly the mathematical tools for dealing with large populations and approxi ...
.
Another aspect can be found in what is perceived to be a decay in the quality of otherwise static software that is the result of the inevitable changes to its environment, that often occur as operating systems and other components are upgraded or retired.
History
A work on
software engineering
Software engineering is a systematic engineering approach to software development.
A software engineer is a person who applies the principles of software engineering to design, develop, maintain, test, and evaluate computer software. The term ' ...
by
Ivar Jacobson et al, in 1992 describes software entropy as follows:
:''The
second law of thermodynamics
The second law of thermodynamics is a physical law based on universal experience concerning heat and energy interconversions. One simple statement of the law is that heat always moves from hotter objects to colder objects (or "downhill"), unles ...
, in principle, states that a
closed system
A closed system is a natural physical system that does not allow transfer of matter in or out of the system, although — in contexts such as physics, chemistry or engineering — the transfer of energy (''e.g.'' as work or heat) is allowed.
In ...
's
disorder
Disorder may refer to randomness, non-order, or no intelligible pattern.
Disorder may also refer to:
Healthcare
* Disorder (medicine), a functional abnormality or disturbance
* Mental disorder or psychological disorder, a psychological pattern ...
cannot be reduced, it can only remain unchanged or increase. A measure of this disorder is
entropy
Entropy is a scientific concept, as well as a measurable physical property, that is most commonly associated with a state of disorder, randomness, or uncertainty. The term and the concept are used in diverse fields, from classical thermodyna ...
. This law also seems plausible for
software system
A software system is a system of intercommunicating components based on software forming part of a computer system (a combination of hardware and software). It "consists of a number of separate programs, configuration files, which are used to s ...
s; as a system is modified, its disorder, or entropy, tends to increase. This is known as software entropy.''
:Within
software development
Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications, frameworks, or other software components. Software development inv ...
, there are similar theories; see Lehman (1985), who suggested a number of laws, of which two were, basically, as follows:
:# A
computer program
A computer program is a sequence or set of instructions in a programming language for a computer to execute. Computer programs are one component of software, which also includes documentation and other intangible components.
A computer progra ...
that is used will be modified
:# When a program is modified, its
complexity
Complexity characterises the behaviour of a system or model whose components interact in multiple ways and follow local rules, leading to nonlinearity, randomness, collective dynamics, hierarchy, and emergence.
The term is generally used to c ...
will increase, provided that one does not actively work against this.
In 1999, Andrew Hunt and David Thomas use
fixing broken windows as a metaphor for avoiding software entropy in software development.
Relation to information theory
Software source code is information
The purpose of writing software is to
encode domain
Domain may refer to:
Mathematics
*Domain of a function, the set of input values for which the (total) function is defined
** Domain of definition of a partial function
**Natural domain of a partial function
**Domain of holomorphy of a function
*Do ...
and
design
A design is a plan or specification for the construction of an object or system or for the implementation of an activity or process or the result of that plan or specification in the form of a prototype, product, or process. The verb ''to design'' ...
knowledge, in source form(s) that can be translated to executable destination format(s). As such, to the extent that the source is a coherent, noise free encoding of the relevant knowledge sets, its entropy may be considered to be low. After initial development and acceptance, the code enters the maintenance phase of the
software lifecycle, where it may be allowed to accumulate defects (noise), represented by divergence from those knowledge sets (domain and software design principles), and thereby increase the entropy of the software.
Relation to complexity
While there are known correlations (see
software complexity Programming complexity (or software complexity) is a term that includes many properties of a piece of software, all of which affect internal interactions. According to several commentators, there is a distinction between the terms complex and compli ...
), there is no direct relationship between
software complexity Programming complexity (or software complexity) is a term that includes many properties of a piece of software, all of which affect internal interactions. According to several commentators, there is a distinction between the terms complex and compli ...
and software entropy. Any two pieces of software, with equivalent complexity levels, can exist at different levels of entropy or rot. Even a very simple program, can suffer high levels of entropy as it passes through the hands of multiple developers.
Avoidance
The process of
code refactoring
In computer programming and software design, code refactoring is the process of restructuring existing computer code—changing the '' factoring''—without changing its external behavior. Refactoring is intended to improve the design, structu ...
can result in stepwise reductions in software entropy.
See also
*
Feature creep
*
Software bloat
*
Software brittleness
*
Software rot
*
Fail-fast programming pattern to reduce software entropy
*
Algorithmic information theory
Algorithmic information theory (AIT) is a branch of theoretical computer science that concerns itself with the relationship between computation and information of computably generated objects (as opposed to stochastically generated), such as st ...
References
Metaphors
Software metrics
Software quality
Software engineering terminology
Software maintenance
{{software-eng-stub