Complements of the Season, and best wishes for a prosperous 2002.

A couple of definitions that appealed to me: -

Artificial Intelligence(AI): the science of how to get machines to do the things they do in movies. (Wallace Marshall).

And of course, if there's intelligence:-

Artificial Stupidity(AS) may be defined as the attempt by computer scientists to create computer programs capable of causing problems of a sort normally associated with human thought (Astro Teller).

I found these in "The Age of Spiritual Machines", which I've reviewed below

In this newsletter:-

Book Review - The Pragmatic Programmer

Book Review - The Age of Spiritual Machines

Nanotechnology

Hybrid Class Diagrams.

You are receiving this email because you are on my "IT Newsletter" mailing list. If you want to be removed, please just let me know by reply email. Feel free to pass this on, or suggest other names for my list. For previous newsletters, click here.

Regards,

Robert Barnes,
www.robertb.co.nz

Book Review - The Pragmatic Programmer. Andrew Hunt and David Thomas

* * *

The title "The Pragmatic Programmer" is very apt. Not a book written by a professor for teaching, this book is written by actual programmers to be read and used by actual programmers. There is a wealth of sound practical advice, and the authors have a gift for the memorable phrase or anecdote. I found this book to be a useful refresher, and well worth reading. The writing style is excellent - clear, entertaining, appropriate level of humour.

However I've given it only three stars. My favourite book on programming, "

The title "The Pragmatic Programmer" is very apt. Not a book written by a professor for teaching, this book is written by actual programmers to be read and used by actual programmers. There is a wealth of sound practical advice, and the authors have a gift for the memorable phrase or anecdote. I found this book to be a useful refresher, and well worth reading. The writing style is excellent - clear, entertaining, appropriate level of humour.

However I've given it only three stars. My favourite book on programming, "Code Complete" by Steve McConnell, is equally readable, but covers similar ground in far more depth. I make Code Complete required reading for my programming teams. The Pragmatic Programmer is only one of my "Suggestions for Further Reading".

Book Review - The Age of Spiritual Machines, by Ray Kurzweil

* * * *

Ray Kurzweil is a leading computer scientist. Just one of his impressive list of achievements - his company provides the technology for the leading continuous-speech recognition product. Somebody like this is worth listening to.

Kurzweil asks "What will the world be like when computers are more intelligent than humans?" His answers to this question are interesting, but the truly thought provoking material are the questions.

Kurzweil makes a convincing argument that machine intelligence will, quite soon, surpass ours. Consider: -

While computers are much faster than humans at easily definable tasks such as adding up a column of figures, they are woeful at tasks that a child finds easy - such as distinguishing a dog from a cat. But with neural nets and learning software, if we had enough computer power there seems nothing that a human intelligence can do that a computer couldn't do.
Moore's Law has been driving down the price/performance of computers so that they double in power about every 18 months. Most commentators think that Moore's law will continue to about 2020, when transistors will be so small that quantum effects will prevent their working. However Kurzweil argues that Moore's Law applied to silicon planes is just the current phase of an exponential curve from 1900, and that new technologies (several promising ones are discussed) will continue the trend well past 2020. By 2020 a $1000 computer should be capable of human-like levels of parallel processing and reasoning.
In the 1950's we had our first glimmerings of the structure of DNA, and dreamed of being able to read the genetic code. Today we can sequence a DNA strand - if not yet a routine process, it soon will be. Today we have a rudimentary ability to scan human brains and understand the neuron structure and the way that experience and learning is stored. Perhaps in another 50 years our ability to scan and understand brain structures will be similar to today's ability to understand DNA.

Combine all this and the next millennium may see us transferring our total experience into a computer by scanning our brain. Such a computer would know everything that we do and be capable of any human intellectual process, combined with a computer's ability to communicate and process vast amounts of data extremely rapidly. Will such a computer be conscious? It will be hard to argue that it isn't. By any definition, it will be much more intelligent that any human, or group of humans. One could argue that such a computer is truly a sentient being.

Some thought experiments: what if we replaced a person's failing brain with such a computer, having scanned their brain first. How does this differ from things we do now, such as cochlea implants? Would this person be any less human? Would they be superhuman?

Now imagine that the person's body fails, so we electronically transfer the machine intelligence to another person whose brain was destroyed but has a good body. Is this Fred (brain) or Joe (body). Or Joeline? What if there's no available body, so we (temporarily?) store Fred's mind just in a computer. In fact, do we need a body? Would pulling the plug be murder? Does it make any difference if there's a backup?

Kurzweil is not Orwell, and this book is not 1984 revisited. Relatively little time is spent speculating on possible scenarios. Instead, the emphasis is on the inevitability of the trends, and the options that will become available.

I found this a fascinating read, and I'll be pondering the implications for a long time. There is an excellent list of web links at the rear of the book, which I am currently browsing through.

Nanotechnology

Nanotechnology, the technology of creating materials atom by atom, is one of the possible successors to silicon wafers discussed by Kurzweil. A recent Scientific American article describes some research in which scientists have begun to assemble simple logic circuits from tiny electronic elements. It's early days yet, and it will be a long time before we see the first useful nanocomputer, but the promise is there.

Hybrid Class Diagrams.

Without Object Oriented (OO) Programming, the complexities of dealing with event-oriented programming in a GUI environment can be overwhelming. However OO must be used wisely. For some problems the OO approach just adds overhead, complexity, and cost. For other problems, an OO approach is the only one that will work.

OO must be wisely used - when used by developers who lack a real understanding of the principles of sound programming practice, OO will only make a bad situation worse. I find it horrifying that books such as Fowler's "Refactoring" purport to teach program simplification with NO discussion of these principles. I agree with the principle of refactoring (rewriting code to make it simpler), but unless one starts with agreed principles and objectives, code "improvements" are only one opinion against another. A skilled developer must understand the principles underlying both modular and OO programming, and be able to combine techniques as necessary. OO is no panacea, and a sound Entity-Relational (E-R) model with modular programming will beat a poor OO design every time.

In 2000 I taught a class on "Information Systems Engineering", which was intended to give business-oriented students a taste of the key concepts of building IT systems. The course included topics on Systems Architectures, Structured Design, and Database and Data Modelling, before finishing up with Event and Object-Oriented Programming. By teaching the concepts of procedural structure (structured programming, module coupling and cohesion), and data structure (data modeling, normalization) before approaching OO, I hoped to help my students develop the necessary broad understanding of development principles.

On reaching the OO topics we encountered a difficulty. Authors such as Booch, Rumbaugh, Fowler, etc present OO techniques and the Unified Modeling Language (UML) as if this is the starting point, and nothing that went before is acknowledged. Using different terminology and a different approach, it is difficult to combine the OO and ER approaches. Yet this was what we had to do unless the last third of the course was to treat OO as a completely separate topic, unrelated to the concepts advanced by Constantine and Myers, Codd and Date.

To solve this problem we developed a tool that we called a "Hybrid Class Diagram". The principle is simple enough. Imagine a conventional E-R diagram with Entities and Relationships. Simple entities are shown with clear boxes: these are normal tables, the relationship is a join with keys, and SQL rules apply. Relationships might be shown E-R style (crows feet, explicit cardinality), or class-diagram style in which the arrow points from the many (child) to the one (parent). Encapsulated-object entities are shaded: the relationships may again be 1:1, 1:M, or more complex, but the operations are not SQL-defined but depend on the methods provided by the encapsulated. The following is an example of a simple hybrid class diagram.

An example definition of a system using UML with this technique is here. Follow the link "Object Definition Template".

This technique worked well within the classroom. I'd be interested in feedback: is this useful in the real world. Have other authors found similar issues with the combination of E-R and OO techniques, and how do they solve it? Email me, or click here to join an on-line discussion.

 

Regards, Robert.
www.robertb.co.nz. (025) 592 702