What does the quote "An extra level of indirection solves every problem" mean? [closed]
Asked Answered
G

7

51

What does the quote "Level of Indirection solves every Problem" mean in Computer Science?

Goldeneye answered 13/11, 2008 at 22:47 Comment(3)
This sounds like a homework assignment.Theocracy
Still, it is a legitimate question.Rabbinate
@TT_standswithRussia, not for Stack Overflow it isn't.Subtract
J
85

Generally it means that by increasing the level of abstraction one can make the problem easier to understand/resolve.

Be careful with your abstractions though, the full quote at least as I heard it is, "You can solve every problem with another level of indirection, except for the problem of too many levels of indirection".

Jeniferjeniffer answered 13/11, 2008 at 22:54 Comment(6)
Good advice. I routinely work with highly abstract problems and like to describe abstraction as a big lever where you push on the small end: small changes result in large motions, but at the expense that you must push really hard.Weeks
That's not the full quote; it's a corrected version someone else came up with after the fact. It's right, though.Pero
I'm not sure "making the problem easier to understand" is the right interpretation.Hypogeum
Excellent answer.Corny
I think it is important to remember that this is not level of abstraction, this is level of indirection. They do not encourage to abstract entities, but to insert one extra step in the flow. Like fetching a pointer's value, we do not abstract raw memory to typed variable, but we require users to access the typed objects first (to implement the need extra logic, like validation), then from there, we let users to access the raw memory.Paragrapher
abstraction is not indirection, Butler Lampson is often misquoted in this way. The accurate quote is " "All problems in computer science can be solved by another level of indirection" (Butler Lampson) - it is an aphorism not intended to be taken precisely literally as a provable theorem.Testator
A
15

From the book Beautiful Code:

All problems in computer science can be solved by another level of indirection," is a famous quote attributed to Butler Lampson, the scientist who in 1972 envisioned the modern personal computer.

Although this is contradicted by Wikipedia who attributes the phrase to David Wheeler.

Aesir answered 7/7, 2009 at 12:57 Comment(1)
At the end of the chapter, the book mentions that Lampson attributes the quote to David Wheeler, so Wikipedia isn't really contradicting it, just following the indirection, if you will :), to the source.Shadow
U
7

It basically means that you should break your problem into smaller problems until the problems are easy to solve.

You break the problem into several layers :

  • routines that solve the problem
  • They call : routines that understand the problem space
  • They call : routines that do small steps (load a file, twiddle some bits, write an output).

The routines at the top (the problem solving ones) are indirected / abstracted from the actual means of solving the problem, making them more flexible to solve the same problem a slightly different way later.

Ugrian answered 14/11, 2008 at 1:38 Comment(0)
A
7

First we must understand what Adding Level of Indirection means.

Usually, Adding Level of Indirection means that we are able to provide an alternate way to solve a problem, ideally with some additional benefits. Other times, when nothing is currently working the indirection could be our only solution.

For example if the business need is, "We need to decide what size IP block to procure in order to provide IP addressing to all our sites."

The problem is that if we choose a block that is too small then we will need to get a bigger one. Not only must our administrator go get another block but the now an additional prefixes must be injected in our routing table to access my sites. That's extra time, cost and complexity. Is there a better way?

Today, an IP address means who you are when you login and where you are located.

LISP uses a level of indirection to solve the routing problem stated above.

It does so with some cost:

  • A new LISP capable server must now exist to map addresses to sites

  • Two namespaces are required (one for Location the other for ID)

And some additional benefits:

  • Eliminate the site renumbering when adding a new block

  • Reduction in size of routing tables

  • ISP can make changes (moving sites from one host to another)

  • Conserves IPV4 address space (locator address space not assigned to hosts)

  • With LISP an ISP can allocate fewer addresses per site

The image below shows the new layer of indirection:

enter image description here

LISP solves the problem by adding a new layer of indirection and simplifies some things, but is not altogether simpler. It's different and in many ways better.

Absolutism answered 20/4, 2017 at 16:21 Comment(2)
That is abstraction not indirection.Testator
"Abstraction" can be perceived as a level of indirection.Inerrant
R
4

Such a very important concept and so few answers here. Generally every problem presented can be solved not necessarily by direct code adjustments but applying some proxy (forget the pattern definition) in some form. The interception &| instrumentation of events is highly undervalued.

Retinoscopy answered 30/10, 2009 at 23:43 Comment(1)
Please, what do You mean by interception and/or instrumentation of events? What events? And how is it undervalued? Thanks.Collier
S
2

This quote is very broad in its implication. The key to understanding is to focus on the word 'problem'. Problem can be a programming issue/bug, translating a world entity to its equivalent computing component, cost associating with computing solution. Lets say you're trying to solve the issue with cost of developing something yourself, you may want to consider another experts to do the work for you much cheaper in time and money. This is another use of indirection

Steffens answered 14/12, 2016 at 13:33 Comment(0)
T
2

It originates from Bulter Lampson:

"All problems in computer science can be solved by another level of indirection"

It is clearly an aphorism and not intended to be taken literally. It is certainly not a provable theorem.

Testator answered 31/1, 2021 at 19:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.