A Short Story: The {Eulogy}

The {Eulogy}

Seven words. All I could show for the forty-three minutes that had passed since the eleventh hour of the day were seven words. I write multi-threaded machine-learning algorithms with ease; the ability to write in languages that are not computational, however, eludes me. I was attempting to write a eulogy which I was to deliver that evening for my dearly departed Beatrice, yet by noon, I had written practically nothing. I had avoided writing the eulogy for over a week, and now four hours were all that remained before I would have to depart for the funeral. I grew pensive; I had calculated that if my rate of word production were to continue, I would have only thirty five words prepared by four o’ clock — a mere trifle for the lady that continues to be, even more so in death, the unrequited love of my life.

I had spent the majority of my years concealing my love for Beatrice. She had died young — not long after having celebrated her twenty-seventh year on this mortal coil — and I had had the pleasure of sharing intimacies with her that only propinquity through time and the implausibility of carnal relations make possible. Thus, finding the right words to do her memory justice without revealing the full depth of my feelings was proving especially difficult. I hoped that something other than my own inadequacies were at fault and apportioned blame to my keyboard. I swapped it for my mother’s in the next room, but on the basis of my writing all of twelve words in the subsequent hour, I concluded that a keyboard accustomed to writing human code is no better at forming sentences than another accustomed to writing computer code.

All I could show for the 103 minutes that had passed since the eleventh hour of the day were now nineteen words. Vaguely in search of inspiration, I did as procrastinators do: I experimented with fonts, I corrected my posture, I fiddled with curtains, I rearranged the room. Twenty-eight minutes later: still nothing had been added to nineteen words.

Soon enough, twenty-eight minutes ticked over to twenty-nine, and what was innocuously and inertly even became indivisibly and intrepidly odd. Nineteen words of trite eulogising were still nineteen words, but they had now become fifty-seven letters, seven spaces, three commas, two line-breaks and two full stops. The unflinching starkness of the idle computer screen had flipped my mind: I could no longer perceive words, only the arbitrary characters they consisted of. Grief was no longer a word imbued with meaning; instead, it was a seemingly haphazard arrangement of characters that consisted of a g followed by an r, an i, an e and an f, all of which stood together as arbitrarily as would a t followed by a k, a p, a % and an x. Nothing on the screen had changed; something significant inside my head had.

Although we tend to conceive of all things in their own customary aspect, we are not beholden to conceiving of any one thing in any one aspect. A tiger, for instance, is customarily nothing more than a tiger: it prowls, it entrances, it hunts, it kills. From another aspect, however, a tiger is a not-quite-infinite collection of atoms organised into interrelated molecular arrangements that constitute the entirety of perhaps the most magnificent and majestic of sublunary creations. After twenty-nine minutes of benumbed inactivity, I had come to see language as a grand set of elemental particles arranged to form a metaphorical tiger as graceful, alluring and deadly as any of its corporeal particulars out in the wild. In this new light, the g, the r, the i, the e and the f were but five linguistic atoms forming a lexical molecule that is part of the literary tiger known as English. The molecular bonding of a t, a k, a p, a % and an x, on the other hand, formed the basis of mutant cells in a beast not meant for this earth.

Such alchemical thoughts turned my mother’s dormant keyboard into a linguistic periodic table. Sitting there were all the signs of any import, the very building blocks of any possible permutation of the English language, and perhaps to demonstrate the veracity of my conceptual meanderings, tapping away before me were the countless keystrokes that would generate literature of the highest order. As if it were a Pianola player piano, I was privy to the pitta-patta-pitta that on my mother’s keyboard produces Joyce rewritten in Shakespearean English, another new-and-improved translation of Madame Bovary or Sappho’s lost poetry. In the form of keystrokes, I was beholding apocryphal histories of the future, crackpot scientific theories of the past and the nature of God that I once thought ineffable. Alas, although I could see the keystrokes, my computer screen was recording nothing. I bashed away at the keyboard in an attempt to capture at least some skerrick of these literary confabulations, but to no avail: my fingers were no match for the touch-typing hand of literature’s masterful and ethereal scrivener.

Frustration and the fabulous do not freely mix. My visions subsided as quickly as my agitation grew, and the only vestiges of my frenzied tapping were 1001 letters, ninety-two spaces, seventeen commas, fourteen semi-colons, eight line breaks, four quotation marks, three question marks, two dashes and not a single word from the English language that I could recognise. I had beheld untold literary treasures, yet all I had managed to record was a nonsensical collection of characters not even a madman would claim as his own.

The eulogy that would dutifully honour my beloved’s memory was, alas, still no closer to being written in time for my oration at her funeral. Others with more commonplace minds would perhaps have eked out something commensurately commonplace in whatever time remained and sensibly disregarded similar literary psychoses as diversionary. I, however, am possessed of a mind that programs computers. In the form of keystrokes, I had seen an ordinary keyboard churn out literature of genius, and my predilection for programming had me mulling over how this could be recreated and captured. Instead of wrangling with human code, I planned to write what comes naturally to me and develop computer code that would programmatically assemble a eulogy for my Beatrice as dazzling as any in literature’s history. It is the holy grail, the philosopher’s stone, El Dorado; so too is my computer, which can do in a second the work of thousands in a year. My pipe dream was standing on the shoulders of another pipe dream, but one that had been made real. In that, I took solace.

I began programming with zeal. I wrote in Lisp — how else to write a program of such awesome scope than with a functional programming language of such brevity? — and the first cut of my program generated a file of no more than 10,000 characters, all randomly selected and all randomly terminated on a full stop. As expected, the file was gibberish. I tinkered: I made vowels more likely to appear; I practically eradicated obscurer characters such as curly brackets; I introduced paragraph breaks and I allowed for text to be italicised. All of this, however, was the rudimentary prelude to the much more complicated task of incorporating distribution statistics for each letter of the alphabet into the program, so that a q, when rarely selected, would almost certainly be followed by a u. I was plunging headlong into developing an algorithmic representation of each letter’s relationship to itself, its twenty-five neighbours and the punctuation marks that feature in any sentence worthy of the name. Even though I was well aware of how complex the project would be, as I surveyed the great variety of possible and probable combinations, I could do nothing to beat back the dismay engulfing me upon surmising that I too was likely to have passed away before having developed a program that would somewhere approach the semi-structured malleability of the English language.

Be that as it may, I persevered with my endeavours for some two hours. Although I could not claim that my program had generated anything one would call literature, distinct progress had been made: an n often followed an i, no word ended with a j, an a would often stand alone, and from the inauspicious beginnings of “oly$PcC+!oa <Q* ll?pH”, I had managed to produce “Nasper, cart tulo jammalikire, a teaef nolt caflow”.

All the same, I knew no funeral address would come of my programmatic endeavours by the time my Beatrice would be laid to rest, and I now had only fifty-five minutes in which to compose a eulogy. I could waste no more time on whimsy and switched over to my word processor. Once again I was face to face with my literary trial; once again I failed to assemble a set of characters for my beloved Beatrice in the conventional manner.

Beatrice was born on the 2nd of April, 1975. A fresh batch of literary idleness had my mind again wandering from the task at hand as it began to ponder the essence of that date as a number. 020475 equates to 20,475, and in that form Beatrice’s date of birth became my calculator’s plaything as I endeavoured to unearth the properties of this most sanctified of numbers. I came to learn that the number is divisible by 3 and 6,325; 5 and 4,095; 7 and 2,925; 9 and 2,275; 13 and 1,575; 15 and 1,365; 21 and 975; 25 and 819; 35 and 585; 39 and 525. This meant that 20,475 had at least 20 factors – a remarkable feat for an odd number of not so large a size.

To prove that this number really was extraordinary, I tried to find factors for 311,299, the largest number anyone can be represented by according to their date of birth. I was astounded: not a single figure could I find that would divide evenly into the largest numerical representation of a calendar year. 311,299 is a forlorn and introverted loner of a prime number. By contrast, my beloved’s numerical form, 20,475, although less than a tenth the size of 311,299, is an attractive and gregarious marvel that abounds with fellow numbers seeking its association.

I had discovered what I would say at the funeral by way of a calculator. Whilst I consider myself a Romeo at heart, my version of the lovelorn Montague could never express himself like Shakespeare’s upon meeting Juliet’s lifeless body. I speak in mathematics, not iambic pentameter, and after such a drawn-out process, I was exceptionally relieved to have found something that spoke of my lady’s everlasting brilliance as only the timeless nature of mathematics could. Nevertheless, I had to write about numbers in words, so the thirty-seven minutes I had left to craft the eulogy still remained a daunting prospect. And as a programmer of computers, much more inclined to bits and bytes as opposed to syntax and grammar, the valence of Beatrice’s date of birth suggested another possibility much more to the liking of my procedural mind.

Literary minds imbue certain words with certain colours and suppose they possess properties not ordinarily perceivable to the untrained or untalented; musical minds do much the same with notes and chords. Analogously, mathematical minds find numbers have their own individual characters, a certain few of which possess talismanic qualities that can be employed in the service of resolving problems. 20,475, a number I freely admit I had not extensively considered before, became that talisman, that harbinger of light into the darkest corners of benighted ignorance and confusion. And as confusion was certainly the only thing I had programmatically assembled until then, I concluded that if 20,475 were to be interpolated into my program’s workings, it would come to produce the text that I was scheduled to deliver at the funeral. Only a short hop then had me supposing that if my program were to generate 20,475 files of text, that last collection of characters, the 20,475th, would acclaim Beatrice’s much cherished memory better than any other collection of characters possibly could.

The unexpected heat and humidity of the late April day augured well for the success of so improbable a venture. I was merging numerical mysticism with algorithmic rigour in a way that harkened back to Pythagorean times, and I garnered strength from knowing that I was pursuing a course blazed long ago by the genius of the ancients. With the illustrious example of the Hellenes as my guide, I made some final changes to my program and executed it. 20,475 files of randomly curated text were being created, and after seventeen minutes of operation, my computer came to rest with only ninety-seven seconds remaining before I was to depart for Beatrice’s interment. Steeped in hubris, I opened the fateful file feeling as if the success of my programmatic exploits had already been foretold. But like the prognostications of the oracles of times long past, interpretation and prophecy were shown once more to be natural bedfellows, for instead of finding myself with the text that would make even Beatrice’s sworn enemies pay tribute to her exalted memory, my disbelieving eyes read three times over exactly the same collection of characters that you are now reading.

Git Blame: List a Particular Author’s Files Across a Code Base

My goal: to have git tell me which files across the breadth of our current code base have lines of code in them that are attributed to a particular author.

My googling for a script came up with bubkes, so I decided to write my own and share that on the internet. No doubt there’s a better way of doing this, and no doubt there’s a better bash script possible (my bash scripting skills are rudimentary at best), but what I did does do the job.

Here’s the bash script:


matchGitBlame() {

	if [[ "$1" == *$2* ]]
		local count=`grep -o "$2" <<< "$1" | wc -l`

		if [ $count -gt 0 ]
			echo "$count : $2 : $3"

files=`find . -type f`

for file in $files
	blame=`git blame $file`
	matchGitBlame "$blame" "$name" "$file"
	matchGitBlame "$blame" "$name2" "$file"

If you execute the script like so (the script works with one or two author names as attributes):
./blame-script.sh authorName1 authorName2 > blame-script-results.txt && sort blame-script-results.txt -rVo blame-script-results.txt

you should find in the file named blame-script-results.txt something like the following:

180 : authorName1 : ./Breadcrumb.java
43 : authorName1 : ./ManagementTrail.java
41 : authorName1 : ./DashboardTrail.java
24 : authorName2 : ./NavigationTabsPanel.java
17 : authorName1 : ./DropDownMenuPanel.java
5 : authorName2 : ./ManageReportDropDownMenuPanel.java
1 : authorName1 : ./CrumbItem.java