Death: A Terminal Experience

A program being executed, self terminating on encountering an non-viable condition is a typical scenario in Perl programs. The death sentence can deliver information about the departed application to the user as justification and demand appropriate resolution for the subsequent reincarnation.

Now I know my code fails more often than it succeeds, and it is for this reason I am planning an alternative wake for the programmed parting of my future terminal applications. As a once-in-a-run-time event, death might be more elaborately delivered, something to be celebrated. The last words of a dying application softens the developers ensuing grief, while encouraging resuscitation with an appropriately delivered injection of code.

Imagine my code being transformed from:-

do_something_risky() or die "you evil monster $!";

into

get_away_with_it() or deathSentence($!)

producing something like this on the terminal:-

death.png

I know such distraction wastes time, there are probably many more error trapping and diagnostic tools available. These may be absorbed over time...I am not really an expert. But I am collecting a series of reasonably uncontroversial, hopefully humorous "epitaphs"...

Leave a comment

About Saif

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