Friday, 8 August 2014

Should we be teaching Primary School Children to Program Computers?

Of course we live in a world where computers are playing a very important part of everyday civilized life so it is important that children have some understanding of them.  But does that mean that that every child should be able to program them? Might it be just as important to teach them what is happening at the electronics level? Or to use word processing tools? Or graphic art packages? It is important to realise how fast technology is changing and existing I.T. style jobs may have become redundant within their lifetime. I am not going to enter this debate but to ask a far more profound question:

Should we teach children to “think like machines” or should we build machines that “think like people”?
Or is it already too late?

We all know of one case where a technological fix has become and established standard – with so many people taking it for granted that an alternative hardly gets a look in. The QWERTY keyboard dates from the 1870s and was devised to solve some technical problems that affected one particular design of early typewriter. Now so many millions (perhaps billions) of people have brains which have become adapted to this particular layout that no other layout is going to be economically acceptable. When there are two competing designs for a consumer product the successful one will be the first to reach a critical mass in term of the number of users. Some years ago there was a battle between VHS and Betamax tape formats – and while Betamax was technically the better of the two it lost out because of the way VHS marketed and was the first to achieve critical mass.

More recently social networking packages such as twitter and facebook are successful because they have a critical mass of users. In fact many people have tried to establish such packages – but it didn’t matter how good they were, they failed if they didn’t achieve enough users to make them a worthwhile means of social exchange. In fact the prize example of a technical fix solution we all take for granted is the World Wide Web. The web currently has about 3 billion users and about 50 billion web pages are indexed by google. But the Web, and the underlying Internet, started small and have grown over the years. There are many technical problems, including security and privacy issues, and these are address kludge after kludge. While it might be possible to design a technically far better system we a stuck with what we have for the same reason we are stuck with QWERTY – the user opposition to a change would make a move to a “better” system impractical. Humans are much more adaptable than computer systems – so is some cases it is easier to educate people to accept sub-optimal technology than to improve the technology.

So back to the question of teaching primary school children to program. Society is addicted to the power of the modern computer so children should find it beneficial to be able to “think computer.” But of course we are training children to think this way because computers are unable to “think human”.

If we ask why computers don’t “think human” the reason is quite simple – they were never designed to. People are naturally not very good at mathematics and even when trained are not very reliable calculators. Computers were originally designed to handle highly repetitive calculations fast and accurately because people were not able to do the task efficiently. For a computer to work there had to be someone to create the algorithm and then code it up to form a program, everything being reduced to strings on numbers, addressed numerically. For a task to be economical a program must be able to do the required task enough times to pay for the cost of programming and running the computer. Thus a task such as providing a hole in the wall cash machine which will be used billions of times is economical because it is more efficient for both the bank (less staff needed) and the user (less time queuing). In addition the approach is assumed to be the best possible approach because work by Turing has proved it to be a “universal machine” so that there is no point in looking for anything better.

If you look at the research behind computer technology you will find that for the first 25 years of so the only “human” related research was to design better procedural languages to program the computer and the first real look at the human interface was carried out at Xerox Parc – which effectively led to the design of windows software.  But if you look at this pioneering work it started from the assumption that the stored program computer was inherently alien to the human mind, and had to be hidden by layers of cleverly crafted software. They never questioned whether it was the best underlying technology if you wanted an electronic information processing system to work with humans. They took it for granted that an information processing machine must have a human-unfriendly “black box” at it centre and this “fact” is a fundamental understanding in the computer industry.

Of course there have been some large projects that have failed and they usually involve human users and messy real world data. In the NHS a comprehensive medical data base of patient records must allow for the fact that it has to deal with many different medical staff, with patients who may be vague about their symptoms and have several medical problems at once, many different diseases, where sometimes the symptoms are not well understood or change as a result of mutation, many diagnostic tests with new ones coming out every day, and many new medicines as well as long established ones. Such problems involve so many possible variations, including real time changes which could not be easily predicted that it is impractical, if not impossible, to predefine the algorithms for the task. Of course the human brain is naturally adapted to handling open-ended tasks – and the new-born infant has to build up a working mental model of the real world from nothing.

Perhaps what we want is a system which works like a human when faced with open-ended real world problems. 

In fact I stumbled on a possible answer by accident in 1967. What one needs is a different model and (the following wording has the benefit of hindsight) my way of simplifying the problem was to stand as far back from the problem as possible. My starting point was to assume that I wanted an algorithm which would process all possible open-ended tasks which humans can do. This would include tasks about which I knew nothing. I assumed the human users could name the entities relevant to their task and organise them (at least locally) into sets and partitions of sets. The algorithm needed to store these sets and compare them to make logical deductions by pattern recognition because ignorance of the task makes it impossible to a priori break the task into “rules” and “data.” Finally introducing recursion allows unlimited nesting of sets within sets so there is no upper limit to the depth of nesting of sets. The result was a proposal for a “white box” information processor – and the symbolic assembly language was CODIL. The approach is clearly novel - see Why using CODIL is completely different to programming a computer – it has been demonstrated on a wide range of applications and MicroCODIL attracted rave reviews.

So why did CODIL fail to attract the funding it needed? There were a number of factors (including the knock on effects of a family suicide) but one of the reason is very relevant to teaching primary school children programming. CODIL is optimised towards helping users to look for creative solutions to open ended information processing problems, while the stored program computer approach is more about finding precise solutions to closed problems (i.e. problems where the task can be exactly predefined). The two approaches are complementary but overlap – in that CODIL can tackle closed problems (but not necessarily efficiently) because closed problems are a proper subset of open problems. However the problem is that the stored program “got there first” – just like QWERTY and VHS – and got critical mass (and what a mass if you consider it in terms of cumulative investment) many years before CODIL was first thought of. Since 1967 the stored program computer approach is even more deeply ingrained in society. Our minds are all infected with “computer think” – and it is taken for granted that any automated information system must have at its heart a human incompatible black box. Open ended solutions no longer are respectable – if you are trying to pre-define a task and fail the problem is your incompetence and never that the task is too unpredictable to be pre-defined.

Ideally we would like our children to learn about thinking creatively about open problems and also have the skills necessary to tackle closed problems. What we really need are machines which “think like people” CODIL style to encourage children to think creatively about real world tasks which are hard to predefine. Concentrating on making sure that they all think like a computer is actually narrowing their view of the world.

Of course this is all wishful thinking. Any genuine human friendly white box solution will get nowhere until the investment in it is such that it can challenge the critical mass investment in the established computer market.  The limitation of the stored program computer, which was rushed onto the market with no thought of how humans think, are so deeply ingrained that they will probably be affecting society for as long as the QWERTY keyboard.

No comments:

Post a Comment