Author Mightyerick (Works) is fine with any constructive edits you wish to make to this literary work.

program sadstory;

using erick, novelas, imagination, doom, shortstory, pascallib, codetemplates;

{$ Bring data.connect=10}

compile with data.

var programmer: new (_programmer);

buggyprogram:new (_programdef);



label TRY_AGAIN;


writeln ('It is a sad story about someone who was programming, found a horrible bug... and died');

with programmer do


programming.create_new_code(buggyprogram, new instance);


if not programming.started then programming.start else programming.debug;


while not ((programming.compilable and program.value(test_on)) do





{IT IS TERRIBLE: A minimal error in CODE_TEMPLATE_CONST can transform this loop into a Hopeless Endless Radical Do-Nothing Loop. This story would never get an end};

No Error


writeln("It is OK. The program is running");



writeln("There is a bug. Please try again");

if random(6)=1 then kill(this);

{A self-reference. Each time the programmer fails, there is a likelihood of killing himself due to mental pressure}

if programming.limit_date=TRUE then kill(this);

{If the program remains buggy until the limit date, the programmer kills himself}



truck.smash (programmer);

{Even if the programmer finds the bug, a truck smashes him shortly after, killing him immediatly. Note truck was never initialized, there is a likelihood of getting a Null-Pointer-Operation, destroying the program}

truck.smash (programmer);

{Just to be sure. Indeed, referencing an already destroyed object will crash the program}


{Anyway, there is a very low likelihood of this porgram getting the last end. It could crash at any moment before due to the void references}

{As you see, it is a really sad story. There is not "halt(1)" reference, so if the programmer dies and the program still references him, it will get a null-pointer operation error. May be the program just hangs, may be it is closed by the operating system, may be the system itself fails (It was very usual using Windows 98), may be the program just begins to perform random harmful things onto disk (I got that when using a program I downloaded from the net. Beat me, it was horrible), or may be it just freezes and/or begins to show random output (the most probable way)}

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.