Beware of Geeks bearing Grifts

Every year we “welcome” a new bunch of trainees into our department. Young, intelligent and enthusiastic, their psyche and physique have yet to be shaped to accommodate cynical scepticism, efficient laziness, and an integument thickened by years of abuse into something that offers natural protection from radiation emanating from the monitors they will stare at all day playing Solitaire.

One such fellow, let’s call him Nik the Greek, came up to me with that sickening joie de vivre characteristic of youth, and proceeded to reveal how eager he was to demonstrate his enormous intellectual assets. I would have raised an eyebrow, had I the energy to do so. But been there, done that. I was once his age I suspect, though either I can’t remember or have developed a block to my memories as an act of self-preservation.

“I can program in Perl!” he said. “What do you think of this idea, that will transform all our disorganised operations into something cohesive and integrated and replace all of the old, legacy, clunky, cruft cluttering everything up.”

By cruft, I knew he meant me. Thank goodness, I thought, someone here to finally put me out of my misery.

“Sounds exciting, Nik,” I said through inwardly gritted teeth, “do show all.”

“Here is an NDA you will have to sign first.” This nutcase was almost well prepared.

I duly signed the papers.

“I have created a Super Manager; a task segmenting, randomising, redistributing and self-re-synchronising algorithm for heteregenously competent processor architectures”

“A manager, eh?” I mumbled, failing at my feeble effort at feigning comprehension, “Random allocation? Heteregenous competence? What on earth are you taking about?”. Sounded vaguely like our management to be fair.

“LISTEN,” frustration bringing out a maniacal demon in the otherwise mild- mannered Nik, “Suppose we have a number of jobs to do, let’s say 4. Suppose each job has any arbitrary number of component operations, say 13. Operations are completed by processors. A system with multiple mixed hardware resources each with different processing power have to handle these operations , each with different processing needs and priorities. My manager randomly rearranges all the operations of all the jobs, and distributes them to available hardware processing resources. The processors have no way of knowing in advance what the computational needs or priorities are of any set of operations that will be allocated to them. Operations may depend on other operations, but in the end all jobs have to be completed, each with their component operations completed in order”

“Ingenious,”, I felt obliged to say, “and you have an algorithm that does this?”

“Well it does get stuck sometimes, and whole process randomisation and redistribution has to start again, but hey this is emerging technology!”

“Replace ‘jobs’ with ‘suits’, ‘operations’ with ‘cards’ and you have a computer that can play Solitaire”, as the realisation of my imminent redundancy hit me; the cruft that I am will soon be replaced by an algorithm.

Perl already has modules that can represent Games::Cards in a very comprehensive manner, play and analyse solitaire , in its various forms. Tk Interfaces are available. It would be nice to do so as part of the PerlayStation Games Console, as I continue to learn modern Perl OOP myself. So once again I am trying out Object::Pad, in developing a simple set of modules that will allow Decks and Cards to be handled and displayed, possibly animated interactively in a Terminal Window. This will not enter CPAN as there are already the well established and mature modules mentioned above but merely be a path to more experiments. Shlomi Fish comments that “a solver ( … ) is too CPU intensive to be adequately done using perl5”. But hey, if Nik the Greek can do it…

Leave a comment

About Saif

user-pic An Orthopaedic Surgeon, A Tissue Engineering Scientist, Lecturer, (and Hobbyist Programmer, Electronics Engineer and Roboticist)