Amazing Programming Code

Jorge Castro
Cook php
Published in
4 min readJan 8, 2019

Is this code is a masterpiece or madness, or both? (It is about talking of code and cyber-archeology).

It is the original image of the publication.

How I can create a random maze using programming?

What is a maze anyways?. A maze is a group of “walls” and “passages” where only one passage leads to the exit. Usually, you put it inside a minotaur (they love maze) but not this time :-(.
So, the challenge is to create a maze. Easy?. Well… not really. The maze is not just random walls, it must have an exit, not two, not zero but a one.

History

1972 — Back in 1972, Jack Hauber and S. J. Garland created a code that generates a maze. We are talking in the time where 32 kilobytes of ram was a lot of RAM (now my smartphone has 3gb of RAM, and it is old, it is 3'145'728 KB, or about 9.8 million percent higher), and some computers even lacked screen but a printer. The original code ran with 8 kilobytes of ram using an EduSystem 20.

The name of the program was called AMAZING (pun intent).

It is an Edusystem and short pants

The result looks like this one.

From the book of Creative Computing, somebody tried to complete the maze.

With this program, you could create random maze that it’s unique, with different dimensions and it has a single answer.

1973 — Later, it was published in a book (by DEC) called 101 Basic Computer Games (1973, first version). The book was a bit popular but it presented a detail, it wasn’t compatible with all machines but only for Digital Equipment Company hardware. Back in the 70’s DEC was a big thing. However, it was purchased by COMPAQ and COMPAQ was purchased by Hewlett Packard, also knows as HP.

1978 — And, 5 years later (1978), Creative Computing (it was an old computer magazine that ran from 74–85) published a new version of it. It lacks comments, but it ran in modern machines (and not only in DEC machines). It was written in a book called Basic Computer Games that you could read it here ( https://www.atariarchives.org/basicgames/index.php )

The code is this one:

Question: Can I run the code using a modern machine?

And the answer is, YES.

  • First, you must download PC-BASIC https://robhagemans.github.io/pcbasic/ (it’s for free)
  • Second, you must save the previous code (amazing.bas) inside the user folder.
  • Then, install PC basic and run the next command:

load “amazing.bas”
run

It’s alive!

Analyzing the code (headache ensured)

If you look with details, the code is old-school, it has lots of GOTO and IF, and PRINT and a FOR and, oh way, more GOTO! And this GOTO goes to 1010 and other goes to 730. IT IS MADNESS! (and not Sparta)

Now, question: Can somebody understand what is it doing? What is the logic behind this code?. I don’t and I tried, I swear it, I tried.

It is a mess, however, it works (and efficiently in only 140 lines of code). I don’t know if the code is based on ingenuity or genius or madness.

1992- “Luckily”, I found an old post (1992) when somebody recovered an old copy of code. It is apparently the original (1972) code. I don’t think this version will work (however, the new version works!).

Ok, we aren’t so lucky after all. It is a code hard as nail but it is still amazing that somebody created it with practically a typewriter.

Additional Note

In the line 150 (of the original code), it says

Category: DEMONS****

WHAT? (note: It explains everything)

Also, Some people, for example (https://github.com/xpsurgery/amazing , https://social.technet.microsoft.com/wiki/contents/articles/16400.basic-computer-games-small-basic-edition-amazing.aspx and https://github.com/chezzwizz/Amazing) tried to refactoring this code. Their result is better than the original however, it is still hard to understand how it works.

Maybe the original author could talk about it, so let’s find Jack Hauber

But, what I found it was:

  • Jack Jauber of Windsor (like the ties), Connecticut.
  • He studied in Loomis School (the name Loomis rings me).
  • And nothing more. Shame.

And about what about “S. J. Garland”? Now, it is a book (it’s a dead end).

--

--