Re: Coding from Scratch: Jaron Lanier

From: Gordon Worley (redbird@rbisland.cx)
Date: Sun Jan 26 2003 - 16:58:16 MST


On Saturday, January 25, 2003, at 10:26 PM, Michael Roy Ames wrote:

> I think this is what Lanier was getting at in his comments: creating
> interfaces that are:
>
> a) self configuring and
> b) self recognising
>
> So that programs could be assembled like building blocks with generic
> interfaces, rather than as gestalt crystals.

While all of this is true, look at what happens when you write, say, a
C program.

1.) Write a bit of C code into a file.
2.) Send that file to a compiler.
3.) You find out if your code was grammatically correct or not. If
not, you go back to step 1.
4.) Test your program, debug.

Steps 3 and 4 are where a lot of problems come in. For example,

if (a == b)

is correct code but

fi (a == b)

will completely prevent your program from compiling. A simple typo of
this sort puts your program out of commission. Biologically this is
like putting a nerve a few nanometers off of where it's supposed to be,
yet to the compiler this is a fatal error.

This is just a simple example, though. You have further problems like
this:

//...
if (i && i->x)
//...

will not crash if i == NULL, but

//...
if (i & i->x)
//...

will crash if i == NULL. But the compiler doesn't say anything. Of
course, we'd expect the program to not crash but a typo can, once
again, cause a difficult to track error. What we'd expect is for the
program not to crash even if we make a typo, so it would be smart
enough to know that NULL->x doesn't exist either (some languages handle
this by treating the null pointer as pointing to a special null object).

HTML is a good example of the direction programming should be heading.
For example, if I forget to type a closing tag for a block element the
rendering engine is smart enough to figure out that the block element
ended or, if it can't, will still display the information, though in a
fashion that may not have been expected. HTML fails gracefully and
still gets the job done, displaying information to the user. Of
course, you can cause HTML errors that result in serious problems, but
usually this involves screwing up something pretty seriously. A typo
won't cause big problems, but giving the wrong values to several
attributes may culminate in serious problems (misshapen tables,
images). HTML isn't perfect and it can be hard to track down errors in
your code, but it does do some good things that C, Java, and the
plethora of other languages never even come close to.

--
Gordon Worley                      "It requires a very unusual mind
http://www.rbisland.cx/               to undertake the analysis of
redbird@rbisland.cx                           the obvious."
PGP:  0xBBD3B003                        --Alfred North Whitehead


This archive was generated by hypermail 2.1.5 : Wed Jul 17 2013 - 04:00:41 MDT