The Twelve Days of Programming

ACT I

SCENE I. Rousillon. The COUNT's palace.

Enter BERTRAM, the COUNTESS of Rousillon, HELENA, and LAFEU, all in black

COUNTESS

In delivering my son from me, I bury a second husband.

BERTRAM

And I in going, madam, weep o'er my father's death
anew: but I must attend his majesty's command, to
whom I am now in ward, evermore in subjection.

LAFEU

You shall find of the king a husband, madam; you,
sir, a father. Though forsooth, you both shall find
a dark one.

COUNTESS

What hope is there of his majesty's amendment?

LAFEU

He hath abandoned his mathematicians, madam; under whose
practices he hath persecuted time with hope, and
finds no other advantage in his process but only the
losing of hope by time.

COUNTESS

This young gentleman had a father,--O, that
'had'! how sad a passage 'tis!--whose skill was
almost as great as his honesty; had it stretched so
far, t’would have made no-ops non-existent, and wait states
wither for lack of work. Would, for the king's sake,
he were living! This program of the king
would scorch the earth for speed of execution.

LAFEU

But in the son a second comes. And to that aim
is still the task subjected.

COUNTESS

He was famous, sir, in his profession, but so too
the mathematicians workwise gave kingly failure.

BERTRAM

What is it, my good lord, the algorithm languishes of?

LAFEU

A fistula, my lord, from whence time spent computing
extrudes to the world around, and fails to birth the numbers
so desperately required.

BERTRAM

My skills being secondary, yet still my king
shall have them in full. If this great leak
of stack and code may by my hands be patch-ed,
what craft I have my king, as a father’s need,
shall he have use of.

LAFEU

One codicil of your new task occurs to me to report,
good Bertram. The program, in speed and perfect accuracy,
in twelve short days must be complete.

COUNTESS

God's blessed mother! My cognizance of my dead husband’s
life and calling being small and empty,
still I know an imbecilic deadline when I hear one.

LAFEU

Your recognition, madam, get from us tears.
And yet the deadline stands: There will be but
twelve short days of programming, and not one day more.
In this the king is resolute.

COUNTESS

A poor manager it is who deems eyes’ brine
the speedy cure for scope creep. A blessing that
to this great project’s pursuance, no such season
comes from fair Helena. The tyranny of her sorrows takes
all livelihood from her cheek. My new loving husband
shall receive no help from her, for home shall fair Helena stay;

HELENA

My sorrow blots my life clock like a sodden cloak.
And by my homefire would I stay for weeks on end
in dour reflection, were I for my self alone to consider.
But my brother and indeed my king have desperate need
of what poor skills I bring to bear. A well jelled
team brings far more hope than one good man
who codes alone.

COUNTESS

With only my small hand to turn them, your dead father’s
homefires might burn out.

LAFEU

Moderate lamentation is the right of the dead,
excessive grief the enemy to the living.

HELENA

My eyes will dry in t sub one, but such abandonment
of my bold brother in his time of need
would surely push the end state of my tearflow
to some t sub two not less than twice the distance
from this, my initial time state, where the loss
of both beloved of my heart would surely be
a function hardly additive, but all more likely
exponential in my grief.

COUNTESS

Then do as you will, selfish girl, and consider not
the losing of my kin shall be additive to three
this morning.

BERTRAM

Madam, I desire your holy wishes.

COUNTESS

Go then and be blest, both Bertram and Helena.
Succeed thy father in manners, as in mind!
thy blood and virtue contend for empire in thee.
Love all, trust a few, do wrong to none.
Seek out all bugs and crush them.
Write code both tight and rigorous.
But go to and return, while I do until.

LAFEU

Come then with me, and start your labors, both.
A firstly step in bringing forth an answer must
attack our core data form, a rooted graph of dualing leaf
useful in speed but exploding in space and leaving
not a whit of heap for calculation ‘pon it.
So nary any common profile would not show
our time spent all collecting garbage.

BERTRAM

We join you now. Fair sister, take my hand. In pursuance
of this artificial goal from some false Gant chart,
obscene in its contrivance, we proceed. As brave Helena
will concur, with little need of further insight,
on the first day to program, the answer’s clear to me:
A partitioned paired tree.