views:

897

answers:

5

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

+9  A: 

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".

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.
BCS
That's not the full quote; it's a corrected version someone else came up with after the fact. It's right, though.
Mason Wheeler
A: 

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.

Tom Leys
+2  A: 

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.

mikelong
A: 

It would be remiss of me not to mention my new blog: www.levelofindirection.com Of course I also have www.extralevelofindirection.com What that one does is left as an exercise for the reader.

Phil Nash
A: 

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.

Xepoch