{{short description|General principle for managing complexity through abstraction}} The '''fundamental theorem of software engineering''' is a humorous observation, credited variously to Roger Needham<ref name="Wulf1981"/> or David Wheeler,<ref name="Lampson1993"/> to the effect that:
{{quote|Any problem in computer science can be solved with another level of indirection.<ref name="Lampson1993"/>}}
This is not a theorem in the sense of a mathematical theorem that can be proven; rather, it is a general principle for managing complexity through abstraction.
The theorem is often expanded by the humorous clause "...except for the problem of too many levels of indirection", referring to the fact that too many abstractions may create intrinsic complexity issues of their own. For example, the use of protocol layering in computer networks, which today is ubiquitous, has been criticized in ways that are typical of more general disadvantages of abstraction.<ref name="Wakeman1992"/> Here, the adding of extra levels of indirection may cause higher layers to duplicate the functionality of lower layers, leading to inefficiency; and functionality at one layer may need data present only at another layer, which fundamentally violates the goal of separation into different layers.
==Origins== Wulf (1981)<ref name="Wulf1981"/> attributes the observation that all problems in computer science can be solved by "one more layer of indirection" to Roger Needham. This witticism was repeated by other authors, such as Black (1985).<ref name="Black1985"/>{{rp|183}} Butler Lampson, in his Turing Award lecture for 1992, repeats the observation but credits it to Needham's Cambridge colleague David Wheeler instead.<ref name="Lampson1993"/> None of these sources yet refers to the observation by any particular name.
Abrahams (2005),<ref name="Abrahams2005"/> while tracing the observation itself back only as far as Lampson, credits Andrew Koenig with the invention of the name "Fundamental Theorem of Software Engineering".
==References== <references> <ref name="Abrahams2005">{{cite book |author1=Dave Abrahams |author2=Aleksey Gurtovoy |title=C++ Template Metaprogramming |year=2005 |publisher=Addison-Wesley |page=13 |url=https://archive.org/details/ctemplatemetapro0000abra/page/13 |quote=''We can solve any problem by introducing an extra level of indirection. —Butler Lampson.'' Lampson's idea is so universal in programming that Andrew Koenig is fond of calling it "the Fundamental Theorem of Software Engineering" (FTSE).}}</ref>
<ref name="Black1985">{{cite journal |title=Supporting Distributed Applications: Experience with Eden |author=Andrew P. Black |journal=ACM SIGOPS Operating System Review |volume=19 |number=5 |pages=181–193 |year=1985 |doi=10.1145/323627.323646 |url=https://web.cecs.pdx.edu/~black/publications/Eden%20Experience%20SOSP.pdf |access-date=2026-04-02 |quote=that universal panacea, an extra level of indirection}}</ref>
<ref name="Lampson1993">{{cite web |url=https://bwlampson.site/Slides/TuringLecture.htm |title=Principles for Computer System Design |author=Butler Lampson |date=1993-02-17 |doi=10.1145/1283920.2159562 |quote=Any problem in computer science can be solved with another level of indirection (Wheeler).}}</ref>
<ref name="Wakeman1992">{{cite journal |author1=I. Wakeman |author2=J. Crowcroft |author3=Z. Wang |author4=D. Sirovica |date=January 1992 |title=Is Layering Harmful? |journal=IEEE Network |pages=20–24 |doi=10.1109/65.120719 |s2cid=6631446}}</ref>
<ref name="Wulf1981">{{cite book |title=HYDRA/C.mmp: An Experimental Computer System |author1=William A. Wulf |author2=Roy Levin |author3=Samuel P. Harbison |publisher=McGraw-Hill |year=1981 |isbn=0-07-072120-3 |page=279 |url=https://archive.org/details/bitsavers_cmuhydrac.xperimentalComputerSystem1981_13819802/page/279 |quote=Revoking privilege in a capability system is more difficult than in an "access list" system. Roger Needham, however, once observed that "this, like all other problems in Computer Science, can be solved by one more level of indirection."}}</ref> </references>
Category:Software engineering folklore