Suppose I described to you the following procedure (let’s call this statement 1):
Start with the sequence 1, 1.
Keep adding more numbers to the sequence,
always by summing the last two numbers.
If you started following this procedure, you’d gradually get a longer and longer sequence:
1 + 1 →2
1 1 + 2 →3
1 1 2 + 3 →5
1 1 2 3 + 5 →8
…
You might recognize this as the procedure for creating the sequence of Fibonacci numbers: 1, 1, 2, 3, 5, 8, 13 … a sequence that is very useful because it describes all kinds of things in nature, such as the way populations grow, the spiraling pattern on a sunflower, and the shapes of seashells and galaxies, to mention just a few.
If I just want the nth Fibonacci number, I might say things slightly differently (let’s call this statement 2):
If n is 1 or less, the answer is 1.
Otherwise,
add the (n-1)th and (n-2)th Fibonacci numbers.
I’m guessing that everyone reading this post will be able to understand the above statement just fine, after looking at it for a few moments.
Here is how I might convey the above statement to a computer (let’s call this statement 3):
fibonacci(n):
if n ≤ 1 then
1
else
fibonacci(n-1) + fibonacci(n-2)
Statement 3 – the one that looks like a computer program – is exactly the same as statement 2, except that writing it as a program makes it a little easier for a computer to read.
So here’s my question: Assuming we would like to put the power of programming into the hands of everybody (the way we already try to put the power of written language into everybody’s hands), would it be worthwhile to get millions of people to learn things like statement 3 – the one that looks like programming?
Or should we get both people and computers to understand statement 2 – ie: the same statement, except written out in English? Or should we work really really hard and try to figure out how to get computers to understand statement 1 – the one at the very top of this post?
Unfortunately, if you opt for choosing statement 1, you might have to wait a very long time. That kind of casual natural language description is fairly beyond what people have been able to get computers to understand. The reason is that even simple statements like “summing the last two numbers” tend to stump a computer. An inference that would seem immediately obvious to us humans, like the fact that we are referring to the last two numbers in the sequence, is incredibly difficult for a computer to work out. Computers lack our ability to figure things out from context.
I find myself wondering whether the big leap for most people would be going from statement 1 to statement 2, or going from statement 2 to statement 3. Whereas statement 1 just kind of assumes you can fill in the parts that are unsaid, statement 2 really spells things out in a way even a computer could understand. And that’s the leap that might be hard for people.
I suspect that the real hurdle might not be teaching people to read things that look like computer programming, but rather teaching people to think in a way that makes it possible to program – the kind of step-by-step way of thinking about a problem that makes it possible to get a computer to do our bidding.