One way to order mixed up card decks...
I heard about one FORTRAN programmer who found a solution to mixed-up
card decks. Apparently, where he worked they used an extended version
of FORTRAN that allowed multiple statements on a line. After suffering
from having to sort a few thousand cards more than once after someone
dropped the card deck, he started using coloured cards for the job cards,
the first card in the programme, and the last card so he could find those
and position them correctly. On the remainder of the cards, he numbered
all of the cards and included a 'GO TO' to the next card in the deck on
every card that wasn't already an explicit 'GO TO'. No matter how the
cards were mixed up the programme would compile and work. Exactly how
inefficient the programme was didn't concern him as long as it worked.
Talk about spaghetti coding!
Date posted: 21st February 2000