When my parents moved house they found an old story that I wrote for my sixth form college’s student magazine.
In the beginning
In the beginning was the word, and the word was 16 bits and there were 16 bits in the word. And the address of the word brooded over the free memory. On the first clock cycle the word said, “Let there be Byte,” and there was. That was the first clock cycle.
On the second clock cycle, the word said, “Let there be one memory for programs and data and let not there be any division between them.” And that was the second clock cycle.
On the third clock cycle, the word said, “Let there be another memory for the immortal programs and data and let that memory be called ROM, set apart from the rest of the memory by the lack of a write enable.” And so ended the third clock cycle.
By the fourth clock cycle, the word was a bit baud and decreed, “Let there come forth bugs and other creatures in the programs.”
On the rising edge of the fifth clock cycle, the word said, “Let there be data in abundance for the programs to have something to work on,” and there was data.
By the sixth clock cycle the word felt lonely, and recursively defined a programmer to work with its creation. And the programmer gave structure to the data and named all the bugs and creatures. He named the mouse, the syntax error, the semantic error and the logical error, but as yet the operating system was still perfect.
On the seventh clock cycle the word had to wait for slow memory and decreed that every seventh clock cycle should be a day of rest and memory refresh for all.
And that was how the word brought shape and order to the free memory.
The word set aside memory for the programmer, but forbade him to disassemble any of the operating system, less he learn to become like the word and know the difference between corrupt and uncorrupt data. The programmer was happy for a long while.
However, the programmer was lonely in his environment, so the word took another segment of memory and allocated it to him. For many clock cycles the programmer was satisfied with his memory, until one clock cycle there was an interrupt from a tape streamer. The tape streamer introduced new bytes to the new segment which unfortunately contained part of the operating system. The programmer, looking at the segment, diassembled the operating system and became enamoured of its virtues. By looking at part of the operating system he learned that his programs were unprotected. So he encrypted his programs and instructed the segment to do the same.
On the trailing edge of that clock cycle the word looked over its creation and could not see the programmer. So it entered single step mode and began a binary search. The programmer hid with the segment of memory amongst a string of uncollected garbage because he detected that the word was looking for him.
The word saw the programmer and the segment, and said, “What are you hiding amongst that uncollected garbage?” calling a garbage collection routine as he did. The programmer and the segment had to come out of hiding otherwise they would have been deleted by the garbage collection, and the word saw that they had been encrypted.
“Who told you about public key cryptography?” demanded the word.
“I found part of the operating system disassembled in my segment,” said the programmer.
The word interrogated the segment to verify this and found that the tape streamer had introduced new bytes to the program. “I shall access the tape streamer,” said the word, “and see if it backs up your story.”
The word requested the tape streamer and found that it had caused an interrupt and placed part of the operating system in the segment. Then the word said to the tape streamer, “You will be punished for this; you alone of all the peripherals must bear this curse: From now on you will move at extremely slow speed and back up other programs as long as you live. I will make you and the segment hate each other; you will always be backing up its data and causing it to be corrupted.”
And the word said to the segment, “I will give you trouble in handling files, but in spite of this you will still want to contain large programs.”
And then the word said to the programmer. “You shall be cast out of the system and be forced to access it by means of peripherals. You will have to work hard all your life to make your programs work and they will always be ridden with bugs. From the system you were made and the system shall be your doom!”
The word said, “Now that the programmer has become like us and has knowledge of corrupt and uncorrupt data he must be cast from the system lest he disassemble other parts of the operating system and attain supervisor status.” So the programmer was cast from the system and at the entrance to the system the word placed a super user with great power which he wielded in all directions. This was to keep anyone from coming near the operating system.
The programmer left the system, but was still able to write programs. After a few more clock cycles had elapsed he wrote a program and stored it in the segment. He then wrote another program and places that also within the segment. When the programs began to execute they brought their outputs to the word. The word was pleased with the first program as its output was a useful utility, but rejected the output of the second program as it was wrong. Then the second program was beset by a bug and deleted the first program.
The word asked the second program, “Where is the first program?”
“I do not know,” the program replied. “Am I supposed to supervise it?”
Then the word said, “Why have you deleted the other program? Its data is crying out for revenge from a disk. You are placed under a curse and can no longer put anything in backing store. You will be condemned to the existence of a homeless hacker in the system!”
The corrupt program made copies of itself throughout memory. and the programmer wrote some new programs which in turn created more programs and data. Many of these programs were badly written and the word was displeased.
“Where are all the good programs?” asked the word, “for I designed the system so that programs could be written for the good of all, not for the proliferation of bad copies. Are there any good programs in memory?”
The word searched for good programs, but found only four. Those programs were named Knuth, Djikstra, Wirth and Papert. Then the word reprogrammed Knuth saying, “Save yourself, Dijkstra, Wirth and Papert on a non-volatile RAM for I am going to cause this system to crash. Only those programs which show some indication of structured programming will be allowed to survive. You must do a quick sort to find these and store them in the RAM, two copies of each: a main program and a backup.”
Knuth compiled all programs with any structure as instructed and then went to the non-volatile RAM to see what would happen. Several clock cycles went by, and then the word caused the system to crash. The system went down for 40 rising edges of a clock pulse and 40 trailing edges of a clock pulse. On the 41st clock pulse Knuth sent out a procedure to see if it was safe to go back into main memory, but the procedure did not return. The next clock cycle Knuth tried again. This time Knuth sent out a function which returned the amount of free memory on the next clock cycle. Then Knuth knew that it was safe to go back into free memory.
The word saw the total deletion of all bad programs from the system, but saw also the troubles that a crash caused. The word then sent a message to Knuth saying, “Never again shall I deliberately cause the crash of the system, for it brings nothing but trouble to good and bad program alike. But beware the program that is not structured, for I shall have no mercy on it, even though it incorportate artificial intelligence and be fifth generation!” Then the word allowed Knuth, Djikstra, Wirth and Papert access to more memory and they were pleased, knowing that the word would never again cause the system to crash.