Network Programming
Webneurons.com

    Site written by
John Middlemas
 
Search CopyCode

Page Index A to Z

Main Pages
Original Posting
Original Site
Newsgroup Post
Web 3
Wrong Approach
XML

Reference
Contact us



The main goal of webneurons is to develop a better way of programming computers. Demonstration of a simple webneurons network. Also includes a minimal javascript XML parser of 37 lines.

What have programming languages got greatly in common?

1. Lines
2. Linear
3. They don't work very well
4. Not based on connections

What have the internet and the brain got greatly in common?

1. Network
2. Nonlinear
3. They do work very well
4. Based on connections

Could it be that the 50 year old line based strategy of programming languages was wrong from the start? Look at the section below on Line Model Programming to see where the line idea came from.

The problems of programming and artificial general intelligence (AGI) are essentially nonlinear, the brain for example is a highly nonlinear structure of connections and nodes. So rigid line based programming languages do not seem to be the best starting point.

It may well eventually be possible to program an AGI using conventional languages but how long will it take and is that an efficient route? For example programming in C++ is more efficient than programming in machine code although both can result in the same goal. Sure, it's possible to program anything using a turing machine but you will be old and grey before you've written a word processor. So tools do matter a lot and if they were right maybe we could get to AGI a lot quicker. The proposal here is that our current tools are not just wrong but very wrong indeed.

By definition intelligence comes from the brain so if you wish to develop AGI it seems wise to use the brain and connections as a starting point and to develop tools on that basis. Modern programming languages do not have such a basis, instead they force a sequential (non-parallel) and structured or object oriented programming approach, which results in strict constraints that are not present in the brain where the network has generous freedom to form and control connections, and millions of neurons process information in parallel. A neuron can have thousands of links to other neurons and such a system requires connection based and parallel programming tools.

Something is seriously wrong with software. Artificial intelligence was expected to have achieved much more than it has to date. Many large computer projects have been cancelled with losses of millions. Bugs are still endemic and pervasive. It's just not working as it was supposed to. All this suggests faults with the fundamental assumptions (axioms) of computer science, and sequential line based programming is one such axiom.


Line Model Programming

So why do we have line based sequential programming? It evolved from punch card control of textile looms in the 18th century, and the punch card Babbage Analytical Engine of the 19th century. This had a card by card machine code programming system with looping and branching, one line being equivalent to one card.

Punch cards led to the foundation of IBM's precursor in 1896, and cards were the primary input means until the 1950's. These systems used machine code programming and assembler which later led to high level languages like Fortran (IBM), Algol 60, and Cobol all of which therefore inherited the sequential axiom. So line based programming is simply derived from punch cards and is not a considered decision. Neither the workings of the brain, AI, nor massive neuron connectivity entered into it.

Having gained such a strong foothold the line system persists to this day, is taught in schools, and is unquestioned by programmers, yet it is not a necessary requirement. What works for reading, writing and punch cards may not be best for AGI or even general programming. All assumptions should now be re-examined carefully, especially since the design of programming languages was arbitrary.

There is no such sequential axiom and no lines in the way the brain works. In fact if a neuron is considered as a microscopic computer then millions of them may be operating in parallel at the same time, and each neuron can have thousands of connections to other neurons in a network fashion. So neither the operation nor structure of the brain is sequential. Threading has been added to some languages as an afterthought but his does not address the connection issue nor even the parallel issue since millions of threads are not an option due to overhead, and threads have not been designed to model neurons.

Subroutines, functions and procedures were added to languages early on but although having some node like similarity with neurons, plus parameters that do connect things, they cannot model highly complex and immense connection networks like the brain. Language design needs a complete rethink.

Another drawback is that code from javascript, java, php, c++ and the like ends up looking like jibberish to the average person so there are not many hands on the programming wheel. For example this bit of PHP looks quite unintelligible:-

$Box=array("","","");
$Box[0]=$array[$len-2];
$tld=$array[$len-1];
$dbDomain="$Box[0].$tld";
$dbDomain=strtolower($dbDomain);
.
.

This kind of mess is running the planet at present. The problem is mainly the lines.

All the languages use lines (like a book) and so get in a tangle and lost, but the internet uses links which is why it has succeeded. It broke the book model, but just for browsing. The use of a similar linking method can make a simple programming system that the public can actually use.


Webneurons - Link Model Programming

One idea is that programs are broken down into their smallest parts and each part is put on it's own webpage with unique url. In that way you can always get right into the part you are looking for or which someone else has told you about. Now there is plenty of space for comments and links to other parts unlike normal programs where comments are crammed in confusingly and connections with other parts are highly limited by the misdirected concepts of structured and object oriented programming.

By part we mean things like if, then, and else commands and other single line statements. The program flow can be controlled by linking the webpage parts. Groups of parts can be referenced as a block with defined entry and exit points so you don't see the detailed workings unless you want to.

This type of strategy has never been considered to our knowledge and there must be many different ways of doing it. Conventional programmers are entrenched in the book model and won't even listen to anything different. Neural networks have had some success and has similarities with this idea, but is not a programming system as such since the network has to be trained by example rather than programmed manually as do all conventional languages like PHP.


Controlling the Labyrinth

A labyrinth is what programming is though really, just like the brain, and the world wide web. To try and navigate and control a labyrinth with object oriented and structured programmimng is considered here to be an error.

For navigation our approach would instead use modern website tools like unique urls, page titles and descriptions, hyperlinks, site A-Z page index, maps, categories, and keyword search. With the use of these, especially hyperlinks, the labyrinth suddenly becomes more manageable. Sadly, hyperlinking has not been utilised in programming systems yet the opportunity has been there for years.

For controlling the labyrinth there can be online methods to make new pages, link, delete, edit pages, and even create entire structures of linked webpages from templates. Programming options like conditional and logical operations can be selected from a library of pages. Most importantly of all, hyperlinks would be used to control program flow and to transfer data between pages and that would be the key idea.


In one Swoop

It could be that in one swoop database, spreadsheet, server, and even artificial intelligence applications would pop out of the hat under a single common umbrella i.e an active labyrinth of programmable webpages. Conventional programming is separate from the data and herein may be one problem. In our model the data is blended into the network of links, and the network IS the program, as it is in the brain.

Each junction of the labyrinth can contain data items parked there. A spreadsheet for example is a two two dimensional grid of links connecting boxes where data is stored and this fits nicely into our model. A database is a similar collection of two dimensional linked tables. Lastly artificial intelligence ought to be catered for since the brain is a three dimensional labyrinth network of tunnels and junctions caleed neurons.


Wiki Programming

Conventional programming lines are hidden from public view but they should be visible, open, and editable by the public like wikipedia is. Obviously there needs to be control but that shouldn't be such a problem. There are secure ways of identifying editors for more crucial areas of the system.

Compare the above PHP to a point and click graphical web based link programming system with zero jargon and no programming lines. That is the sort of thing that can set things off and might even lead to computer intelligence. Our brains use links (axons) not lines.

It seems that programming languages have gone badly wrong for 50 years.

Start Demo



Newsgroup posting - 21 May 1996. Using HTML extensions to allow web pages to become webneurons.

Our New Scientist ArticleOur New Scientist Article - A scan of the the article that appeared 6 July 1996 written by journalist Mark Ward. This article resulted from the newsgroup posting of 21 May 1996.

Original Site - Written in 1996. Emails and development around the idea of the 21 May posting.

Newsgroup Posting - 24 Feb 2000. Posting on webneurons to ai groups.

Web 3Web 3 - Hyperlinked software functions. A simple and distributed way to process web information. An email to Bill Thompson of the BBC.

Lines of code are the wrong approach - An email to Jason Larnier

Minimal Javascript Xml Parser - 38 line XML parser producing a resultant array of associative and normal arrays from the xml text input.

XML - XMLHttpRequest, Minimal javascript xml parser, and the Ajax system of xmlHttpRequest, DOM and style sheets, for adjusting web pages without reloading.

Java - Java is used to build the webneurons system. Apache and PHP are not needed since the system will include a server and the webneurons should replace PHP.

Firefox Mozilla Bugs - A few bugs I found and reported. History bug and incorrect window writing order.

TRANSCEND - These are the supplements I should be taking to live long enough to live forever!

Parallel Processing - An email to National Academies

Nodejs - An issue with the node js server I reported regarding client certificates and the requestCert option not working with Chrome and Firefox

The NETDEF Neural Net Programming Language - This could have quite a lot in common with webneurons. www.di.fc.ul.pt

Novamente - Artificial General Intelligence project. - www.novamente.net

At last they are getting there. IBM to build brain-like computers - news.bbc.co.uk

BBC NEWS | Technology | Artificial brain '10 years away' - Now they are really getting there but Javascript can easily be extended to code connected neuron objects and model the brain, you don't need neural nets, this is my idea 23 July 2009.news.bbc.co.uk

Working artificial nerve networks under development - www.sciencedaily.com

Connectionism - en.wikipedia.org


Brain neuron
Brain Neuron

Note the incoming smaller axon links to the brain neuron and the single outgoing larger dendrite link. The incoming links come from other neurons and the outgoing link may go to many other neurons. These links can be modelled by hyperlinks and the neuron itself can be modelled by a webpage. Information inside the neuron, e.g. memories, can also be modelled as data connected to the webpage. Hence the term Webneurons. A collection of linked webneurons can also take the place of normal computer programs and should be a lot easier to follow.

Computer model of the early universe (Click to enlarge)
Computer model of the early universe

I couldn't help noticing the similarity of this image model of the early universe and the brain. It looks like a collection of neurons (galaxies) and axons. How strange. This image was taken from a space.com article, "The Early Universe Was Spongy, Like Brain". Apparently the galaxies are linked by paths of extremely hot gas. This forms a network as you can see linking galaxies. It seems networks are everywhere, in the brain, in space, on the web, so why don't we use a programming language based on networks rather than lines?

The answer may be something like: history, tradition, lack of insight, the blind guides just don't want to let go of their precious line based myth. They've been educated with books and therefore think everything should be lines and sequential, structured so they say. However, neural network and brain simulation successes point to a more messy reality where link based programming may be a key.

Neural networks are superior for certain applications but are not a general purpose programming language. It therefore seems clear we should replace C++, java, php etc with a new language that can both create and manage neural nets, yet is also general purpose. One magic ingredient may be node to node linking built directly into the language. At the end of the day it's all just a spongy interconnected mess rather than the conventional structured programming model.

Site structure created by John Middlemas Site written by John Middlemas