a footnote to the retreat of the mind

HelmsDeep

The latest Atlantic contains an article by Brian Christian on the annual Turing Test held in Brighton, England.  In order to pass the Turing Test (also known as the Loebner Prize) a computer program must be able to fool 30 percent of the people it interacts with that it is human.  In 2008, one program missed this goal by only one vote.

In the article, Christian quotes Douglas Hofstadter, the author of Godel, Escher, Bach, on the problem of ‘The Sentence.’   The Sentence is the perennial attempt to frame the all-important definition “The human being is the only animal that …”  We once thought this sentence could be completed with uses language, uses tools, does mathematics, or plays chess, only to be confounded each time by further discoveries about the natural and mechanical world.

‘Sometimes it seems,’ says Douglas Hofstadter […] ‘as though each new step towards AI, rather than producing something which everyone agrees is real intelligence, merely reveals what real intelligence is not.’  While at first this seems a consoling position – one that keeps our unique claim to thought intact – it does bear the uncomfortable appearance of a gradual retreat, like a medieval army withdrawing from the castle to the keep.  But the retreat can’t continue indefinitely.  Consider: if everything that we thought hinged on thinking turns out to not involve it, then … what is thinking?  It would seem to reduce to either an epiphenomenon – a kind of exhaust thrown off by the brain – or, worse, an illusion.  Where is the keep of our selfhood? [emphasis mine]

I have always been a fan of footnotes.  In complex academic works, it is usually the footnotes that contain the most fascinating insights.  They are, in a sense, the epiphenomena of the academic world. 

Stephen H. Voss has a fine translation of Descartes’s The Passions of the Soul, a work Descartes wrote for Princess Elizabeth of Bohemia years after separating the mind and the body in his Meditations on First Philosophy.  What comes out in this later work – and to which attention is drawn in Voss’s footnotes — is that the line between mind and body is not a geographical division like that between countries, but rather a kinesthetic separation between the inside and the outside.  In The Passions, Descartes even begins talking about the inner soul and the interior of the soul, further subdividing the line between self and world.

Concerning this, Voss writes in footnote 78:

Since the soul has no parts […], it is hard to see how to distinguish theoretically the interieur, let alone le plus interieur, of the soul from the rest of it.  As we intimated in note 27* in Part I, it is perhaps more reasonable to see such passages as signs of Descartes’s genuinely neo-Stoic attitude toward the world.  We have seen his focus successively narrow in this work: the body, the pineal gland, the soul, and now its ‘interior.’  A similar itinerary can be traced in the First Meditation: objects that are very small or far away, familiar nearby objects, the body and its senses, the soul and its reason.  And so can one more: examining ‘the great book of the world’ on military travels through several countries; Amsterdam, Leyden, and the isolated village of Egmond; and finally the palace in Stockholm.  What walled fastness can ever provide security? [emphasis mine]

I’ve always wondered if this kinesthetic problem of interiors and exteriors is related to the solution of using metalanguages to avoid problems of self-referentiality in logic.  In particular, I’m thinking of Douglas Hofstadter’s chapter in Godel, Escher, Bach describing Russell and Whitehead’s Principia Matematica,  called “Banishing Strange Loops”:

Russell and Whitehead did subscribe to this view [that self-reference is the root of all evil in logic], and accordingly, Principia Mathematica was a mammoth exercise in exorcising Strange Loops from logic, set theory, and number theory.  The idea of their system was basically this.  A set of the lowest ‘type’ could contain only ‘objects’ as members – not sets.  A set of the next type up could only contain objects, or sets of the lowest type.  In general, a set of a given type could only contain sets of lower type, or objects.  Every set would belong to a specific type.  Clearly, no set could contain itself because it would have to belong to a type higher than its own type […]  To all appearances, then, this theory of types, which we might also call the ‘theory of the abolition of Strange Loops’, successfully rids set theory of its paradoxes, but only at the cost of introducing an artificial-seeming hierarchy, and of disallowing the formation of certain kinds of sets…

This connection I am (less-than-tentatively) proposing, of course, only works if interior and exterior can be mapped to the notions of higher and lower level languages.  This is, however, how we typically think of the emergent self in evolutionary biology.  The highest part of the mind — the most selfish bit – is also the last to have developed in time, while the lizard brain, which the higher functions always seek to constrain, is also considered the part that is least ourselves – it is a mechanical, biological process, and when that lizard brain is in control, we are out of control.


*footnote 27: A pervasive Cartesian conviction is that what is far away can deceive, while what is close at hand can give security.  That is true not only of epistemic security (in addition to the present passage, see Meditations 1 and 3: AT VII, 18 and 37: CSM II, 12-13 and 27; and a. 1 above), but also of emotional security (see Discourse, Part 3: AT VI, 25-27: CSM I, 123-124; and aa 147-148 below).

A UI Design Pattern Love Song

Much has been written about the MVC but never, I believe, a love song … so here you go: a love song to the Model-View-Controller. 

This small experiment in erotic didacticism is sung to Some Enchanted Evening from Rogers and Hammerstein’s South Pacific.  I have embedded a video of Ezio Pinza and Mary Martin singing the original in case you need some help with the tune.

Some enchanted evening
You may see a pattern,
you may see a pattern
Across a crowded room
And somehow you know,
You know even then
That somewhere you’ll see it
Again and again.

Model-View-Controller
Someone may be coding
You may hear him coding
Across a crowded room
And night after night,
As strange as it seems
The shape of that pattern
Will drift through your dreams.

Who can explain it?
Who can tell you why?
Fools give you reasons,
Wise men never try.

Model-View-Controller
First it has a model,
Yes it has a model
To represent your store,
It’s your data store
Your persistence layer
Where all of your data
Is written and saved.

Model-View-Controller
Has a presentation,
And that presentation
Of state is called a View.
A view of your store
On your GUI layer
It’s bound to your model
And registers change.

Model-View-Controller
Third has a controller
That facilitates
Changes to model state
On your model layer
In response to acts
That come from your user
With keyboard or mouse.

Once you understand it,
Never let it go.
Once you understand it,
Never let it go!

Using statements with unknown types

I recently came across some interesting code in Juval Löwy’s Programming WCF Services and wanted to share.  It’s simply something I had never run across before:

 

            IMyContract proxy = new MyContractClient();

            using (proxy as IDisposable)

            {

                proxy.MyMethod();

            }

 

The first thing to notice is that the proxy object is instantiated outside of the using block.  I don’t think I’ve ever actually tried this, but it is perfectly permissible (if not recommended).  I used a dissembler to look at the IL this generates, and it is pretty much the same as instantiating the proxy object inside of the using brackets.  The main difference is that in this case, the scope of the proxy object extends beyond the using block.

Within the using brackets, this code casts the proxy object to the IDisposable interface so the Dispose method will be available.  Since a Using Block is basically syntactic sugar for a try-catch-finally structure that calls an object’s Dispose method in the finally block, the equivalent try-catch-finally block would look like this:

 

            IMyContract proxy = new MyContractClient();

            try

            {

                proxy.MyMethod();

            }

            finally

            {

                ((IDisposable)proxy).Dispose();

            }

 

However, Juval’s using statement does one additional thing.  It also checks to see if the proxy object even implements the IDisposable interface.  If it does, then the Dispose method is called on it.  If it does not, then nothing happens in the finally block.  The equivalent full blown code, then, would actually look something like this:

 

            IMyContract proxy = new MyContractClient();

            try

            {

                proxy.MyMethod();

            }

            finally

            {

                IDisposable disposable = proxy as IDisposable;

                if (disposable != null)

                {

                    disposable.Dispose();

                }

 

            }

 

… and we’ve condensed it to this …

 

            IMyContract proxy = new MyContractClient();

            using (proxy as IDisposable)

            {

                proxy.MyMethod();

            }

 

It’s probably not something that will come up too often, but if you have a situation in which you do not know whether an object implements IDisposable or not, but still want to implement a using block for readability and good coding practice, this is how you would go about doing it.  

Besides Juval’s proxy example, I can imagine it coming in handy when dealing with collections in which you don’t necessarily know whether all of the members of the collection implement IDisposable, for instance:

 

            foreach(IDog dog in myDogsCollection)

            {

                using (dog as IDisposable)

                {

                    dog.Bark();

                }

            }

 

It also just looks really cool.  h/t to Bill Ryan for pointing this out to me.