Sunday, January 23, 2005

Shooting for the Middle: Amdahl and Zeno

Is there some sort of law that guarantees mediocrity; where natural selection chooses the best within guidelines rather than the best of species? Consider for a moment the law of diminishing returns. Within such a mindset, there might exist a demonstration of a diseconomy of scale, where the extra "effort" of producing and selecting only the "best and brightest" is not offset by the gain.

There is an analogy to such a diseconomy in computer science: Amdahl's Law (another resource here). Interestingly, according to Amdahl's law, the increased effort does not have a linear relationship to gain, but rather a sort of inverse geometric or even Fibonaccian one. That is, the effort to increase gain rises more quickly than the gain itself and, thus, we see diminishing returns.

An early exploration of this idea is Zeno's Paradox of Dichotomy (recently used as the basis for an experimental film by Robert Arnold). Essentially, in this paradox, one never reaches the end-point because of the infinite number of midpoints. I am presenting (possibly) a bit of an oversimplification, but one gets the point. However, if one takes, for example, Zeno's illustration of the tortoise and Achilles as a metaphor for natural selection, then one sees another way in which increased effort does not scale to increased gain. Essentially, the situation is fixed: we may "evolve" further, but we never quite catch the tortoise.

Of course, I am applying a literary structure to scientific theoretical models - a reversal of the typical modern relationship. This is a useful exercise for pondering, but not much else. As opposed to Amdahl's law, I cannot quantify or define; I cannot assert a Grand Theory relationship among Zeno, Amdahl, and Darwin. However, I can reflect upon the persistence of what we call mediocrity and wonder if, instead, mediocre is really best, if a bell/Gaussian curve is better than disruption.

Friday, January 21, 2005

Xanadu in Code - in disconnected fashion

I've been reading a bit about Ted Nelson and his project Xanadu. Nelson is a character who seems to flit in and out of public view, seemingly hard to nail down - much like his Xanadu project. Inasmuch as intertexuality supercedes the intratextual, xanalogical structure supercedes our ideas of the relationships between/among documents/texts. In a sense, Nelson is after the Urtext as formulated in the consciousness, the perfect original as planned based upon both background and future-planned; the portmanteau in the "telescoping" sense that Robert Withington used: the meanings "slide" into each other, are mutually - aye, symbiotically - dependent.

Shift.

There are several ways that texts can "link" - whether truly xanalogical or not. Xanadu looks primarily at how text link within the sense of the text itself, secondarily at how they link in terms of "relation". Intertextuality delves more into the latter, with a firm hold on the former. Deeper still, within the terms of our linguistic ability to express ourselves - a pressing out of the Whorfian walls - lies the ability to link texts at the/a linguistic level. That is, a translation of sorts, changing a text not only in terms of language, but also in terms of paradigm and intent. Such is the shift we see among "code poets", just take a gander at Perl Poetry, for example. There are several concepts at play here: linguistic innovation, reflection, and artistic expression.

Of the above concepts, I assume that the only one that might bear brief introduction is reflection. Thus, you might take a brief look, a google search, etc. Here is a starting point.

Anyway, years ago (2002), I translated a poem from Wang Chih-Huan, at least as already translated by Wai-Lim Yip: Heron Tower. As an exercise, I quickly translated the poem into Java code - compilable, the poem formed the main execution routine and output itself. The code itself is nothing great (really even that good), but the purpose wasn't the result as much as it was the method. Below is the code, for those interested:


//#######################################################################################
//## 11/6/2002 Robert Pratte, rpratte@acacia.nodezero.net
//## This is a translation of Wang Chih-huan's "Ascend the Heron Tower"
//## character based translation by Wai-Lim Yip:
//## white sun follow mountain end
//## yellow river enter sea flow
//## to exhaust thousand mile sight
//## again up one more level tower
//#######################################################################################

public class HeronTower
{
//========================================
// Class methods pertaining to movement
//========================================
public static String follows (String passedLine_)
{
return ("follows " + passedLine_);
}

public static String enters (String passedLine_)
{
return ("enters " + passedLine_);
}

public static void exhausts (String passedLine_)
{
System.out.println (passedLine_);
}

public static class ascend
{
static String movement = "ascend";

static void again (String passedLine_)
{
System.out.println (movement + " again the " + passedLine_);
}
}

//========================================
// Main - this builds and executes the poem
//========================================
public static void main (String args[])
{
PoemObject mountain = new PoemObject ( "mountain" );
PoemObject sea = new PoemObject ( "sea" );
PoemObject tower = new PoemObject ( "tower" );
PoemObject sun = new PoemObject ( "sun" );
PoemObject river = new PoemObject ( "river" );

int mile = 0;

try
{
//====================================
// Begin poem execution
//====================================
sun.white (follows (mountain.tops));

river.yellow (enters (sea.flowing));

while (mile < 1000)
{
mile++;
}
exhausts ("to see for " + mile + " miles...");

ascend.again (tower.stairs);
//====================================
// End poem execution
//====================================
} // end try

catch (Exception e)
{
System.out.println ("Error: " + e + "\n");
} // end catch
} // end main
} // end class

//====================================
// Class for poem objects
//====================================
class PoemObject
{
public String tops;
public String stairs;
public String flowing;
public String baseObject;

PoemObject (String passedObject_)
{
//============================
// some of these words should
// "always" be modified
//============================
if (passedObject_ == "mountain") {
tops = passedObject_ + " tops";
} else if (passedObject_ == "sea") {
flowing = "flowing " + passedObject_;
} else if (passedObject_ == "tower") {
stairs = passedObject_ + " stairs";
} else {
baseObject = passedObject_;
}
}

public void white (String phrase_)
{
SceneColor color = new SceneColor ("white");
System.out.println (color.apply (baseObject + " " + phrase_));
}

public void yellow (String phrase_)
{
SceneColor color = new SceneColor ("yellow");
System.out.println (color.apply (baseObject + " " + phrase_));
}
} // end class

//====================================
// Class to "color" poem objects
//====================================
class SceneColor
{
public String instanceColor;

SceneColor (String passedColor_)
{
instanceColor = passedColor_;
}

public String apply (String passedLine_)
{
return (instanceColor + " " + passedLine_);
}
} // end class

Sunday, January 09, 2005

Conrad and Naipul

This morning I finished reading A Bend in the River, a somewhat haunting novel by V. S. Naipaul. The context in which I am reading it is more-or-less as a post-colonial response / complement to Joseph Conrad's short work Heart of Darkness. There are a few things that immediately spring to mind:

- Naipaul's work isn't really derived from - though it may be influenced by - Heart of Darkness. There is a recent work, though, that serves the purpose of contextualizing Conrad's work while simultaneously addressing the (liminally) colonial/post-colonial theme: Apocalypse Now.

- There is something in the book that - perhaps surprisingly - reminds me of F. Scott Fitzgerald's quixotic novel, The Great Gatsby. There is something in the similarity of aloof wealth approaching impending doom. Is the Jazz Age a manifestation of colonialism? An interesting question.....

- I am also reminded of Morroccan novelist Abdelhak Serhane's novel of the village whore, Messaouda. The pathos of the young African Arab/Muslim caught in a world defined by others reciprocates across these works.

Conversely, (among other works) I am also reading Scott Adam's 2002 work, Dilbert and the Way of the Weasel. In a way, it seems that, if one drills down deep enough, all of these works explore similar themes. Perhaps one can see such an assertion if one imagines these works as circles intersecting in the manner of a Venn diagram. Dilbert would, of course, also represent a far different way of approaching such issues.

Wednesday, January 05, 2005

Operating System Tribes

It occurs to me that, aside from the sort of brand attachment tribalism one sees, operating system choice is a modern sort of "cultural" shibboleth - something that not only separates users into various camps, but serves as an indicator for a way of thinking, speaking, and acting. Of course, (particularly if one is a fan of Richard Stallman) the choice can also be political.

Yet, with the implications of "choice" put aside, there is the (chicken-and-egg) question of influence. Consider the difference of working in the starkness of Plan 9 versus the lushness of OS X. Or how about the difference between Linux and *BSD users? The latter have often seemed (at least in discussion groups) a more mature and less "political" group. What of the people who enjoy working with Windows? What of the ones who like it enough (but maybe not Microsoft) to create their own version of it?

What are the lineages, the lines of derivation? The BSD versus Sys V Unix lines? The Apple kin, NextStep and BeOS, then their progeny and spin-offs: Zeta, OpenBeOs, OpenStep/GNUStep, and SkyOS, for example? What of the OS that won't die, AmigaOS?

Are these merely tools, chosen as the old adage goes? Or are Operating Systems akin to programming languages - bounding the limits of language and thought in a Whorfian manner, something I discussed previously? That there is a tribal quality to OS choice seems widely recognized, if only subconsciously. Thus, groups refer to themselves as "cultures" and indeed often have their own customs, "gods", legal documents, and even bits of language (tools, processes).

It seems that there is the possibility an interesting anthropological study here.

Sunday, January 02, 2005

Ben Dugan on Programming Languages

Today I read an older essay written by Benedict Dugan entitled Programming Languages. In this essay Dugan examines his department's (Computer Science at University of Washington) move from Ada to C/C++ as the language of choice in introductory programming courses. His examination leads him to question what constitutes the "best" language, what factors are important in language choice. He argues that "the decision to accept a given programming language is not necessarily based on what is the 'best' language for the job, but rather a wide variety of other factors" such as interdepartmental demands, student expectations, and pedagogical continuity.

From my vantage, it seems equally important to define how one is approaching programming languages; that is, whether they are to be viewed as a tool (i.e., a 20 oz. claw hammer is better suited to some purposes versus a 15 oz. ball-peen), a dialect (as writers may use certain affectations of speech to demonstrate regional affiliation, etc.), a framework (interpreting a text from a structuralist perspective versus a marxist one), etc. Dugan appears to (implicitly) choose the "tool" approach, stating, "Given the huge variety of languages to choose from, why and how do we chose [sp] the ones we do?" However, in the third section of his essay, "So, Why does this Bother me?", he moves toward a framework-based approach. That is, by examining the criteria for determining the "right" language through the dialectic of functional requirements (the first section of his essay) and idealistic ones (the second portion of his essay), he presents the underlying structure of language-choice. As he writes, "what is important is to understand what is driving us to accept and use certain programming languages."

Early on, Dugan points to the relationship between thought and language, using Dykstra's comments on FORTRAN as an example. Essentially, this is a linguistically deterministic view of programming languages, whereby Dugan shifts language choice outside the mere range of tool-usage, into a more Whorfian universe. The students' ability to interpret and function within their world (of code) is determined by what tools they are given, what synaptic mappings are provided for.

Yet, while Dugan returns to a broader view of language in the second portion of his essay, the first portion focuses on pragmatic rationales. Thus, students want to learn C because it "is a dominant industry language" and the department wants to teach C because it is used "in all of [the] higher level courses." The idea of teaching C because it is the dominant industry language echoes the sentiment that we teach Edited American English in classrooms because it is the standard language of business and power. These sentiments are widely accepted because we can readily see the results - the premises and conclusion to the argument appear to be quantifiable, thus we never ask the question whether the approach lends itself to creation. That is, we are unconcerned (to some degree) whether this is an approach that fosters a mastery of the universe, in the Whorfian sense, because we view successful participation in the status quo as mastery itself.

Conversely, Dugan sees teaching C across all course levels as limiting because "it will lead to the creation of programmers and designers whose vision and capabilities are constrained by the fact that they have become comfortable with only one language, one paradigm of programming." Essentially, this is the liberal-arts approach to learning as derived from scholasticism, whereby students should be able to derive solutions based upon their own authority (in turn, derived from broad study). Whorf is stood upon his head here, as a single language becomes insufficient to describe and understand the universe. Unfortunately, Dugan fails to bring this argument into the essay in any convincing fashion; the way in which he addresses this problem suffers through contradiction with much of the rest of the essay, particularly the second part.

In the second portion of the essay, "A Digression: What should programming languages be used for?", Dugan "present[s] [his] view of programming languages," that they are "ideologically laden technological artifacts." Again echoing Dykstra, he writes, "[Programming languages] are value laden because depending upon their structure, they can act as either the barrier between, or the conduit for, giving the public control and access of computer systems and all that entails." No longer tools for shaping and manipulating the world, programming languages - and this is what separates Dykstra-ian from Whorfian interpretation in this context - intrinsically dictate the exchange between individual and experience, a sort of phenomenological filter. Paraphrasing Alan Kay, Dugan adds, "Knowing or not knowing the language quite literally translates (at some level) into having power or not. Programming langauges - if they are 'done right'... - will become communications media which will amplify the human potential for creativity and understanding." There are several subjective premises here, that is the semantics of: "human potential", "creativity", "understanding", and - importantly - "done right". Using the examples of Lisp and Smalltalk, Dugan asserts that the designers of these languages "hoped to create a language which was greater than itself, embodied a new design philosophy, was widely accessible, and most importantly, would foster (rather than hinder) the creative processes of the human mind." This is the ideal state, but also one abstracted from the rather utilitarian perspective of using a language in order to participate in the status quo dialogue. Instead, languages are chosen based upon their liberal potential; that is, their ability to free oneself from constraints rather than to participate in them.

Rather as an extension of this idea of breaking free of constraints, Dugan looks to the history of rationalism, particularly the criticism of Max Horkheimer. Borrowing from Saussure's concept of the sign, Horkheimer claims that "[c]oncepts have been reduced to summaries of the characteristics that several specimens have in common...[c]oncepts have become 'streamlined,' rationalized, labor-saving devices...thinking itself [has] been reduced to the level of industrial processes...in short, made part and parcel of production." Again we see that as society pushes for quantifiable premises, as we view the resultant participation in status quo as a worthy goal (something that Althusser sees as the real function of education - the ideology of the status quo is maintained through education). Thus, "[t]he logical and frightening conclusion of this process, Horkheimer maintains, is the mechanization of knowledge and the very processes of thought themselves." Dugan sees this trend towards the mechanization of knowledge at play within the push toward certain programming tools and paradigms (specifically the move towards a C-based computer science curriculum).

I would add that our focus on efficiency is not to be underestimated, either. Non-efficient paradigms (the verbosity and demands of Ada or the complexity of poetry) are tossed out because they foster inefficiency at some point in the exchange. Ada is inefficient in that its demands for explicitness create a rather lengthy and redundant text. Poetry, where (in contrast to a programming language such as Ada) meanings are tightly packed and devices such as metonymy and metaphor abstract intention and increase depth, is expensive to parse. Yet, while poetry is increasingly ignored in curricula, I would doubt that many would refute its value. Thus, our focus on efficiency may prevent us from identifying the most valuable solutions.