Piratical Reads

pirate_freedom  strangertides

Apparently it is that time of year again.  It’s talk like a pirate day. 

Apropos of that, I’d like to recommend two good pirate books.  Pirate books, as a genre, have never seemed to quite catch on.  With Treasure Island they seem to have plateaued out, and pretty much just went underground after that.  Nevertheless, pirate books have caught the attention of some good writers willing to take the genre out for a spin.

Two of my favorites are Gene Wolfe’s Pirate Freedom and Tim Powers’ On Stranger Tides.  The first is a time travelling pirate story with Wolfe’s typically unreliable narrator, while the second revolves around Blackbeard, voodoo rituals, and Powers’ common concerns with Catholic teaching and the occult.  In the spirit of the day, I’m going to rip off some passages from these two fine novels.  From Pirate Freedom:

“What really happened was that they hollered for a parlay.  They swore they would not hurt anybody we sent to talk to them, but they would not send anybody out to talk to us.  there was a lot of jawing back and forth about that because nobody on their side could speak much French and Melind could not speak much Spanish.

“That was when I did one of the dumbest things I have ever done in my life.  I told him I spoke Spanish better than he did, and I would translate for him.  So before long Melind and I left our muskets and knives behind and went up the beach and into the edge of the rain forest to talk to them.

“There were two, a Spanish officer and a Spanish farmer. From what I saw, the officer had about ten soldiers and the farmer maybe a hundred other farmers.  Once they got us into the trees they grabbed us and searched us for weapons, and of course they found my money belt and kept the money.  Melind protested and I yelled my head off, but it did no good.  Before long they told us they would kill us both if we did not shut up about it.

“That was when I tried to jump them.  A farmer standing pretty near me had a big knife in his belt, with the handle sticking out.  I grabbed it and went for the Spanish officer.  I would have killed them all then and there if I could, and I have never hated anybody in my life the way I hated that guy.  That was my money, I had earned it with worry, hard work, and tough decisions, and they had sworn we would be okay if we left our weapons behind and came over.

“I got that officer in the side, before somebody hit me.  When I was conscious again (and feeling like something scraped off a shoe), my hands were tied behind me, and so were Melind’s.”

And from On Stranger Tides:

“‘Come on, devil,’ Blackbeard raged, a fearsome sight with his teeth and the whites of his mad eyes glittering in the glow of the smoldering match-cords woven into his man, ‘wave some more bushes in my face!‘  Not even waiting for the foreign loa’s response he waded straight into the primeval rain forest, shouting and whirling his cutlass.  ‘Coo yah, you quashie pattu-owl!‘ he bellowed, reverting almost entirely to what Shandy could now recognize as Jamaican mountain tribe patois.  ‘It takes more than one deggeh bungo duppy to scare off a tallowah hunsi kanzo!‘”

Shandy could hardly see Blackbeard now, though he saw the vines jumping and heard the chopping of the cutlass and the clatter and splash of wrecked verdure flying in all directions.  Crouched back and gripping his knife, Shandy had a moment to wonder if this maniacal raging was the only way Blackbeard allowed himself to vent fear — and then the giant pirate had burst back out of the jungle, some of his beard-trimming match-cords extinguished but his fury as awesome as before. 

Meatware

A Gibsonesque cyber-word, meatware refers, somewhat contemptuously, to those aspects of information processing that are neither software nor hardware.  Programming is a grueling mental activity, and there is a tendency among software programmers to, shall we say, not look after themselves.  There is an old adage that one should never trust a thin cook, and this might be extended to programmers also.  The most consummate technologists spend so much of their time in virtual worlds that their bodies often get neglected.  The state of their bodies becomes, consequently, an ironic badge of their devotion to their craft.

It has been said, mainly by its critics, that Modernism in philosophy since Descartes is distorted by the implicit assumption that object of philosophy is strictly rational, conscious, and intellectual.  This trend was turned back, somewhat, by Heidegger’s discussion of Mood in his masterpiece Being and Time.  Maurice Merleau-Ponty’s Phenomenology of Perception, which at times reads like a rewriting of Being and Time much as Sartre’s Being and Nothingness does, takes this battle further by placing himself within the heart of the intellectual tradition, Husserl’s Phenomenology, and emphasizing the point that all perception, all experience, occurs through the medium of our bodies.  This was, strangely enough, a revolutionary insight at the time.

Eventually Feminism (or at least certain branches of Feminist thought) took up this controversy and used it as a central template for understanding the misunderstandings between men and women.  Men misunderstand humanity as a primarily intellectual (and phallic) being.  Women, on the other hand, implicitly understand the role of the body in the same way that tides understand gravity.   It is an inescapable aspect of a woman’s existence, which the scholars of women’s issues tend to call “embodiment“.

It can’t be said that software programmers really learned anything from the insights of Feminism other than the fact that they would prefer to have very little to do with the body.  If there is such a thing as human nature, software programming tends to distort it and encourage anti-social behaviors such as distractedness, obsessiveness and self-medication.  Exemplary programmers need not be exemplary human beings, and perhaps ought not to be, to Aristotle’s dismay.

Stephen Dubner at Our Daily Bleg suggests an economic explanation for the rise in American obesity.  He suggests that the elimination of outhouses and dramatic improvements in indoor plumbing may have led to the rapid increase in median weight.  Our improved ability to vacate our own waste, he avers, has lowered the inconvenience of indulging in the gastronomic pastime, and so we do.  It depends, I imagine, on whether one seeks answers in the superstructure or in the base. 

Vanity Fair, on the other hand, has a series of articles currently online which may provide a glimpse at what the unhealthy have to look forward to.  Though not himself a programmer, Christopher Hitchens has drunk, smoked and eaten himself to the point that he can be mistaken for one.  At 58, he attempts to turn back the clock of desultory living with a check-in at a spa, and writes about it. 

The articles are accompanied by illustrative photos which highlight this cautionary tale about the importance of maintaining your meatware.

Ten Questions for the Candidates

obama_mccain

We all want our candidates to answer more questions, but it’s hard to figure out what we really want to know from them.  Sometimes it seems like we want to gauge their knowledge of world affairs — and so they are asked social studies questions — “What is the capital of the Republic of Georgia?”  Sometimes we want to know about their experience — and so they are asked what they would do in a certain situation.  Ultimately we want to know if they are smart “like us” or in the least “like us” and so odd questions will be thrown into various debates such as “Who is your favorite philosopher?” and “Which is your favorite book of the Bible?”

These questions typically misfire.  Very few politicians are like Adlai Stevenson.  Whatever it is that makes them good at what they do, which typically involves raising money and cutting backroom deals, we simply don’t have questions for.  Lacking the right questions, on the other hand, may be considered as license to ask any question.  Here are some of mine:

1. How do you celebrate June 16th?

2. What memories do madeleines evoke for you?

3. Do you typically take the road less traveled, or the other one?

4. Would you explain the difference between the ‘ontic’ and the ‘ontological’, and how this distinction affects your daily life?

5. Can Virtue be taught?

6. How many wives of Henry the Eighth can you name?  and which ones bore future rulers of England?

7. Explain the difference between descriptivist and prescriptivist grammar, and apply the difference to something that has nothing to do with grammar.

8. Describe at least five of Martin Luther’s 95 tenets; expand on any you strongly agree or disagree with.

9. Explain the difference between the Ptolemaic and Copernican systems of the world, and why it matters.

10.  Besides beds, what was the chief source of income at Peter Coffin’s Inn?

 

Coincidentally, these ten questions also capture the ten main categories of knowledge that our presidential candidates are expected to exemplify or demonstrate some expertise in, namely:

1. Patriotism 2. Historical knowledge 3. Experience 4. Wonkiness 5. Family values 6. Foreign Affairs 7. Rhetorical skill 8. Faith 9. Science 10. Economics

Eco in Atlanta

umberto-eco

In my basement, lying next to a moldy unused Italian grammar, I have an dusty Italian copy of Umberto Eco’s Name of the Rose, an accusatory symbol of my unfulfilled ambitions.  In October, I’ll have an opportunity to do something with this volume — get it signed by the author.

Umberto Eco will be coming to Emory University at the beginning of October (the 5th through the 7th) to deliver three lectures.   Eco is a fascinating philosopher, literary theorist and author.  I expect the lectures and readings he is planning at Emory to be as entertaining as his writings.  I might even get a chance to ask some questions about authorial intent.  If you are in Atlanta, be sure to save the date.

Reflection

reflection

Like may others, I recently received the fateful email notifying me that Lutz Roeder will be giving up his work on .NET Reflector, the brilliant and essential tool he developed to peer into the internal implementation of .NET assemblies.  Of course the whole idea of reflecting into an assembly is cheating a bit, since one of the principles of OO design is that we don’t care about implementations, only about contracts.  It gets worse, since one of the main reasons for using .NET Reflector is to reverse engineer someone else’s (particularly Microsoft’s) code.  Yet it is the perfect tool when one is good at reading code and simply needs to know how to do something special — something that cannot be explained, but must be seen.

While many terms in computer science are drawn from other scientific fields, reflection appears not to be.  Instead, it is derived from the philosophical “reflective” tradition, and is a synonym for looking inward: introspection.  Reflection and introspection are not exactly the same thing, however.  This is a bit of subjective interpretation, of course, but it seems to me that unlike introspection, which is merely a turning inward, reflection tends to involve a stepping outside of oneself and peering at oneself.  In reflection, there is a moment of stopping and stepping back; the “I” who looks back on oneself is a cold and appraising self, cool and objective as a mirror.

Metaphors pass oddly between the world of philosophy and the world of computer science, often giving rise to peculiar reversals.  When concepts such as memory and CPU’s were being developed, the developers of these concepts drew their metaphors from the workings of the human mind.  The persistent storage of a computer is like the human faculty of memory, and so it was called “memory”.  The CPU works like the processing of the mind, and so we called it the central processing unit, sitting in the shell of the computer like a homunculus viewing a theater across which data is streamed.  Originally it was the mind that was the given, while the computer was modeled upon it.  Within a generation, the flow of metaphors has been reversed, and it is not uncommon find arguments about the computational nature of the brain based on analogies with the workings of computers.  Isn’t it odd that we remember things, just like computers remember things?

The ancient Skeptics had the concept of epoche to describe this peculiar attitude of stepping back from the world, but it wasn’t until Descartes that this philosophical notion became associated with the metaphor of optics.  In a letter to Arnauld from 1648, Descartes writes:

“We make a distinction between direct and reflective thoughts corresponding to the distinction we make between direct and reflective vision, one depending on the first impact of the rays and the other on the second.”

This form of reflective thought, in turn, also turns up in at an essential turning point in Descartes’ discussion of his Method, when he realizes that his moment of self-awareness is logically dependent on something higher:

“In the next place, from reflecting on the circumstance that I doubted, and that consequently my being was not wholly perfect, (for I clearly saw that it was a greater perfection to know than to doubt,) I was led to inquire whence I had learned to think of something more perfect than myself;”

Descartes uses the metaphor in several places in the Discourse on Method.  In each case, it is as if, after doing something, for instance doubting, he is looking out the corner of his eye at a mirror to see what he looks like when he is doing it, like an angler trying to perfect his cast or an orator attempting to improve his hand gestures.  In each case, what one sees is not quite what one expects to see; what one does is not quite what one thought one was doing.  The act of reflection provides a different view of ourselves from what we might observe from introspection alone.  For Descartes, it is always a matter of finding out what one is “really” doing, rather than what one thinks one is doing.

This notion of philosophical “true sight” through reflection is carried forward, on the other side of the channel, by Locke.  In his Essay Concerning Human Understanding, Locke writes:

“This source of ideas every man has wholly in himself; and though it be not sense, as having nothing to do with external objects, yet it is very like it, and might properly enough be called internal sense. But as I call the other Sensation, so I call this REFLECTION, the ideas it affords being such only as the mind gets by reflecting on its own operations within itself. By reflection then, in the following part of this discourse, I would be understood to mean, that notice which the mind takes of its own operations, and the manner of them, by reason whereof there come to be ideas of these operations in the understanding.”

Within a century, reflection becomes so ingrained in philosophical thought, if not identified with it, that Kant is able to talk of “transcendental reflection”:

“Reflection (reflexio) is not occupied about objects themselves, for the purpose of directly obtaining conceptions of them, but is that state of the mind in which we set ourselves to discover the subjective conditions under which we obtain conceptions.

“The act whereby I compare my representations with the faculty of cognition which originates them, and whereby I distinguish whether they are compared with each other as belonging to the pure understanding or to sensuous intuition, I term transcendental reflection.”

In the 20th century, the reflective tradition takes a peculiar turn.  While the phenomenologists continued to use it as the central engine of their philosophizing, Wilfred Sellars began his attack on “the myth of the given” upon which phenomenological reflection depended.  From an epistemological viewpoint, Sellars questions the implicit assumption that we, as thinking individuals, have any privileged access to our own mental states. Instead, Sellars posits that what we actually have is not clear vision of our internal mental states, but rather a culturally mediated “folk psychology” of mind that we use to describe those mental states.  In one fell swoop, Sellars sweeps away the Cartesian tradition of self-understanding that informs the cogito ergo sum.

In a sense, however, this isn’t truly a reversal of the reflective tradition but merely a refinement.  Sellars and his contemporary heirs, such as the Churchlands and Daniel Dennett, certainly provided a devastating blow to the reliability of philosophical introspection.  The Cartesian project, however, was not one of introspection, nor is the later phenomenological project.  The “given” was always assumed to be unreliable in some way, which is why philosophical “reflection” is required to analyze and correct the “given.”  All that Sellars does is to move the venue of philosophical reflection from the armchair to the laboratory, where it no doubt belongs.

A more fundamental attack on the reflective tradition came from Italy approximately 200 hundred years before Sellars.  Giambattista Vico saw the danger of the Cartesian tradition of philosophical reflection as lying in its undermining of the given of cultural institutions.  A professor of oratory and law, Vico believed that common understanding held a society together, and that the dissolution of civilizations occurred not when those institutions no longer held, but rather when we begin to doubt that they even exist.  On the face of it, it sounds like the rather annoying contemporary arguments against “cultural relativism”, but is actually a bit different.  Vico’s argument is rather that we all live in a world of myths and metaphors that help us to regulate our lives, and in fact contribute to what makes us human, and able to communicate with one another.  In the 1730 edition of the New Science, Vico writes:

“Because, unlike in the time of the barbarism of sense, the barbarism of reflection pays attention only to the words and not to the spirit of the laws and regulations; even worse, whatever might have been claimed in these empty sounds of words is believed to be just.  In this way the barbarism of reflection claims to recognize and know the just, what the regulations and laws intend, and endeavors to defraud them through the superstition of words.”

For Vico, the reflective tradition breaks down those civil bonds by presenting man as a rational man who can navigate the world of social institutions as an individual, the solitary cogito who sees clearly, and cooly, the world as it is.

This begets the natural question, does reflection really provide us with true sight, or does it merely dissociate ourselves from our inner lives in such a way that we only see what we want to see?  In computer science of course (not that this should be any guide to philosophy) the latter is the case.  Reflection is accomplished by publishing metadata about a code library which may or may not be true.  It does not allow us to view the code as it really is, but rather provides us a mediated view of the code, which is then associated with the code.  We assume it is reliable, but there is no way of really knowing until something goes wrong.

Styling the Validator Callout Extender

The Validator Callout Extender is one of the controls included in the Ajax Control Toolkit.  It allows one to replace the normal appearance of an asp.net validation control with an attractive cutout.  For instance:

This is a required field.

A common problem concerns how to restyle the callout to give it a custom appearance.  The documentation for this control makes it clear that the default CSS class may be overridden in order to change the appearance of the callout. The Callout Extender has a CssClass property which may be set to a custom style.  Unfortunately, the documentation also includes an apparent error.  According to the documentation for the Validation Callout Extender:

If your CssClass does not provide values for any of those then it falls back to the default value.

This turns out not to be true.  Instead, one must override all the nested classes of the Callout Extender in order to get a reasonably good looking callout.  If any of the nested classes are not overridden, once a value has been assigned to the CssClass property, no style is applied to the nested style.

Consequently, in order to do something as simple as setting the back-color of the callout to Blue, the custom style will end up looking like this:

    <style type="text/css">
        .customCalloutStyle div, .customCalloutStyle td
        {
            border: solid 1px Black;
            background-color: Blue;
        }
        .customCalloutStyle .ajax__validatorcallout_popup_table
        {
            display: none;
            border: none;
            background-color: transparent;
            padding: 0px;
        }
        .customCalloutStyle .ajax__validatorcallout_popup_table_row
        {
            vertical-align: top;
            height: 100%;
            background-color: transparent;
            padding: 0px;
        }
        .customCalloutStyle .ajax__validatorcallout_callout_cell
        {
            width: 20px;
            height: 100%;
            text-align: right;
            vertical-align: top;
            border: none;
            background-color: transparent;
            padding: 0px;
        }
        .customCalloutStyle .ajax__validatorcallout_callout_table
        {
            height: 100%;
            border: none;
            background-color: transparent;
            padding: 0px;
        }
        .customCalloutStyle .ajax__validatorcallout_callout_table_row
        {
            background-color: transparent;
            padding: 0px;
        }
        .customCalloutStyle .ajax__validatorcallout_callout_arrow_cell
        {
            padding: 8px 0px 0px 0px;
            text-align: right;
            vertical-align: top;
            font-size: 1px;
            border: none;
            background-color: transparent;
        }
        .customCalloutStyle .ajax__validatorcallout_callout_arrow_cell .ajax__validatorcallout_innerdiv
        {
            font-size: 1px;
            position: relative;
            left: 1px;
            border-bottom: none;
            border-right: none;
            border-left: none;
            width: 15px;
            background-color: transparent;
            padding: 0px;
        }
        .customCalloutStyle .ajax__validatorcallout_callout_arrow_cell .ajax__validatorcallout_innerdiv div
        {
            height: 1px;
            overflow: hidden;
            border-top: none;
            border-bottom: none;
            border-right: none;
            padding: 0px;
            margin-left: auto;
        }
        .customCalloutStyle .ajax__validatorcallout_error_message_cell
        {
            font-family: Verdana;
            font-size: 10px;
            padding: 5px;
            border-right: none;
            border-left: none;
            width: 100%;
        }
        .customCalloutStyle .ajax__validatorcallout_icon_cell
        {
            width: 20px;
            padding: 5px;
            border-right: none;
        }
        .customCalloutStyle .ajax__validatorcallout_close_button_cell
        {
            vertical-align: top;
            padding: 0px;
            text-align: right;
            border-left: none;
        }
        .customCalloutStyle .ajax__validatorcallout_close_button_cell .ajax__validatorcallout_innerdiv
        {
            border: none;
            text-align: center;
            width: 10px;
            padding: 2px;
            cursor: pointer;
        }
    </style>

This will give you the following change in appearance:

This is a required field.

In order to play with the nested classes in order to customize the look of the callout, it would be useful to know what the HTML for the Validator Callout actually looks like.  Unfortunately, the callout is generated using client script, making it impossible to simply peek at the source in order to figure out what the markup looks like.  After about an hour of reading through the behavior class for the Callout Extender, I was finally able to come up with this:

        <table id="_popupTable" cellpadding="0" cellspacing="0" border="0" class="customCalloutStyle">
            <tbody>
                <tr class="ajax__validatorcallout_popup_table_row">
                    <td class="ajax__validatorcallout_callout_cell">
                        <table width="200px" cellpadding="0" cellspacing="0" border="0" 
                            class="ajax__validatorcallout_callout_table">
                            <tbody>
                                <tr class="ajax__validatorcallout_callout_table_row">
                                    <td class="ajax__validatorcallout_callout_arrow_cell">
                                        <div class="ajax__validatorcallout_innerdiv">
                                            <div style="width: 14px">
                                            </div>
                                            <div style="width: 13px">
                                            </div>
                                            <div style="width: 12px">
                                            </div>
                                            <div style="width: 11px">
                                            </div>
                                            <div style="width: 10px">
                                            </div>
                                            <div style="width: 9px">
                                            </div>
                                            <div style="width: 8px">
                                            </div>
                                            <div style="width: 7px">
                                            </div>
                                            <div style="width: 6px">
                                            </div>
                                            <div style="width: 5px">
                                            </div>
                                            <div style="width: 4px">
                                            </div>
                                            <div style="width: 3px">
                                            </div>
                                            <div style="width: 2px">
                                            </div>
                                            <div style="width: 1px">
                                            </div>
                                        </div>
                                    </td>
                                    <td class="ajax__validatorcallout_icon_cell">
                                        <img alt="" border="0" src="alert-large.gif" />
                                    </td>
                                    <td class="ajax__validatorcallout_error_message_cell">
                                        This is a required field.
                                    </td>
                                    <td class="ajax__validatorcallout_close_button_cell">
                                        <div class="ajax__validatorcallout_innerdiv">
                                            <img alt="" border="0" src="close.gif" />
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
 

This probably isn’t completely correct, but it’s pretty close.  If you want to try to write your own custom style for the Validator Callout Extender, just copy the markup above, as well as the CSS class above that, into your favorite WYSIWYG editor and have at it.  At a minimum, you should be able to customize the colors either to match your site design (the default background color is Chiffon Yellow, after all), or to indicate different sorts of validation errors.

One question I’ve seen on the ASP.NET Forums concerns whether it is possible to switch the arrow that flies off the left side of the callout to the right.  Unfortunately, the arrow is actually coded into the HTML generated by the Validator Callout, and is not controlled by CSS styles.  It would be nice to see this as a feature of future releases of the Ajax Control Toolkit.

CSLA Light Preview Drop

Rocky Lhotka recently announced a pre-release drop for CSLA Light (the less filling version of CSLA 3.6).  Silverlight raises special problems for creating tiered applications.  CSLA Light tries to fill this problem domain by providing a framework for building bindable objects that know how to interact with Silverlight.  This is the sort of solution that will allow us to do more than simply build cool games with Silverlight, since the real promise of Silverlight is the ability to write business applications that are also RIA’s.

One of the few alternatives to CSLA Light that I’ve seen is Shawn Wildermuth’s work integrating Astoria with Silverlight.  I’m keeping an eye on both of these technologies to see how line-of-business Silverlight applications will shape up over the next year.