:: computer, lisp

Three approaches to solving problems on computers.

When faced with a computational problem there are three common approaches:

  1. write a program to solve the problem;
  2. write a tool to solve the problem and other problems of the same kind;
  3. write a programming language in which you can then write tools which solve problems of the same, and other, kinds.

Most people start by doing the first. Bradshaw’s corollory to Greenspun’s tenth law states:

  1. for problems of size , then, regardless of the initial approach, the final result is as if the third approach had been taken, even if this is not understood by the people solving the problem;
  2. there is a problem size above which it is most efficient to take the third approach from the beginning;
  3. .

What this means is that, if you have a sufficiently large problem (\(s \ge s_1\)) to solve then, whatever your intentions, you will inevitably end up creating a programming language as part of the solution. And there is a range of problems smaller than this (\(s \in (s_0, s_1)\)) for which the quickest way to solve the problem is to design and implement a programming language.

So, when approaching a problem, it is important to understand the values of & and how they compare to . These values are hard to discover: a good trick is to start with a platform which makes very small and always take the third approach.