Old-School UNIX Script: .profile

Many years ago I managed numerous SGI UNIX workstations of various vintages (Indigo, O2, Octane, Origin, etc.). I wanted to be at home when I logged into any of the machines, and the user home directory was on an NFS share my .profile was always available, but I had to deal with the various capabilities of each particular computer and the different ways in which I would log in. So, I created a .profile script that would add features as they were available. Below is that old login script.

From the Office of the Ex-Vice President

This is the text of a letter sent to my grandfather in October of 1973. The envelope had a return address of "The Office of the Ex-Vice President, Mr. Spiro T. Agnew, Washington, D.C.," but the letter was signed by Bob Haldeman of The New Republican Society. My grandfather, a Republican, has been dead for many years, and no one else had any further insight into the letter. Here it is exactly reproduced:

The Holocaust

The holocaust is largely remembered simply as Germany’s attempt to systemically eliminate the Jews, but this summary view does great injustice to the truly awful situation. The convenient, abbreviated version of history pits the malevolent Germans against the helpless Jews while casting everyone else in the European theatre as saviors. Thought the Germans were indeed the main antagonists, they were certainly not alone; even the allied powers were in some regards accessories to the crimes against humanity. Though these crimes targeted primarily Jews, they only accounted for approximately half of the over 11 million people systematically murdered by the Nazis and their supporters. Of the Second World War’s 30 to 50 million civilian casualties, the Jews represented 10 to 20 percent. This is not an attempt to marginalize the plight of the Jews, rather it is an attempt to show that narrow views of World War II history marginalize the deaths of over 25 million civilians and insulate the victors from responsibility. The holocaust should more accurately be summarized as the period when the world allowed fanatics to systematically eliminate tens of millions of defenseless people.

Another Cost Saving Idea

Any company who is considering changing their inventory scanning system should investigate the use of smart phones for scanning. There are numerous smart phone applications now that enable the built-in camera to read barcodes; Delicious Library has been doing this on the Mac for a while. Compared to the specialized handheld scanning equipment, smart phones are cheap and can be used for multiple tasks. They are lower cost with higher utility, win - win.

There could obviously be costs associated with acquiring software for a smart phone that interfaces with corporate systems, such as ERP systems, but there are alway software or configuration costs associated with implementing scanning solutions. If a company had followed my recommendation to switch their applications over to a web-based strategy (and they employed professionals who develop software based upon existing web standards) then minimal effort would be required to optimize those applications for the smaller smart phone screen.

In the past, business technology has been adopted by consumers, now consumer technology should be adopted by business.

Back to the Front

When one of the late twentieth century’s most belligerent nations unveiled to the world its proposal for an imprudent war in the near east there was one prominent nation who vehemently opposed it. The belligerent nation’s reprobate politicians were so distressed by the rebuff that they sought to remove the dissident nation’s name from their lexicon. The supposed statesmen went so far as to suggest that their nations most well know food be renamed in order to demonstrate their displeasure. As most Americans would remember French fries were to be renamed freedom fries. In retrospect it is easy to understand why France had reservations about the Americans’ proposed expedition, but at the time the rhetoric was quite effective and yet the French firmly opposed the adventure.

After taking a trip, primarily in France, along the Western front of the Great War it becomes easier to understand why they would have reservations about instigating a war. As Stephen O’Shea said, “A French hamlet might not have a water tower, a baker, or even a store, but it will always have a list of the dead chiseled in stone.” It is conceivable that if America had more lists of the dead chiseled in stone it might be less militaristic. A nation that retains the scars of a terrible mechanized war that occurred nearly one hundred years ago has good reason to pause before embarking upon another conflict. An attentive walk along the Western Front, even a figurative one, should be prerequisite to embarking upon modern mechanized war.

SAP ABAP, Variable Variables

I was modifying an ABAP program for a migration project and came across a section of code that was initially puzzling to me. I couldn't figure out why the previous developer was filling variables with field names and then assigning those variables to field symbols, until I noticed the parentheses surrounding the variable name in the assign statement. The previous developer create a variable to hold the name of a field (another variable), he then used the ASSIGN keyword to assign the parenthesized variable it to a field symbol. Field symbols are a type of memory pointer, so the field symbol pointed to the memory location specified by the value of the variable.

The History and Memory of the Vietnam War

In many ways the memory of the Vietnam War drastically diverges from the actual history of the war. Frequently these differences are propagated by the government, media, or society out of ignorance, contempt, or both. One of the most prominent examples of this is the Tonkin Gulf incident which lead to a resolution with the same name and the escalation of hostilities in the area. The United States government was responsible for starting the incident, but that was not know to the public until long after the war ended. There were social organizations, such as the National League of POW/MIA Families, that would create an alternate view of history to serve their own purposes. Later it was the media, through movies such as Rambo, that would foster a memory of the Vietnam war that was not supported by evidence. The biggest shame of these divergences is that people must expend time and energy setting the facts straight, time and energy that could be better used for exploring the real issues that the nation is or was attempting to solve.

JavaScript Binary Expression Tree

I am working on a personal project that requires a JavaScript expression evaluation engine, so I started by designing class that would evaluate mathematical expressions off of which I could build. The first step takes the user supplied string and parses it into an array of operands and operators, which has a performance of O(n) for the number of characters. Next, the array is turned into a binary tree, which has a performance of O(n) for the number of operands and operators. The binary tree is balanced based upon the weights of the operators in order to get the correct order of operations, which has a performance of O(log n). Finally, the expression that the tree represents can be evaluated and that performs in O(log n).

Most of the code is shown after the jump.