Level of Indirection solves every Problem

2019-01-16 23:57发布

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

7条回答
一纸荒年 Trace。
2楼-- · 2019-01-17 00:21

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.

查看更多
等我变得足够好
3楼-- · 2019-01-17 00:28

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

查看更多
萌系小妹纸
4楼-- · 2019-01-17 00:35

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.

查看更多
我想做一个坏孩纸
5楼-- · 2019-01-17 00:37

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.

查看更多
不美不萌又怎样
6楼-- · 2019-01-17 00:40

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.

查看更多
Viruses.
7楼-- · 2019-01-17 00:43

Kevlin Henney's corollary is, "...except for the problem of too many layers of indirection".

查看更多
登录 后发表回答