From Coding Cat:
Working on developing projects for my Intro to Programming class, I reminded myself of an article I read back in the early days of the PC. The article was in one of the first PC only magazines, and it was publishing the results of a contest the magazine sponsored. Preliminaries complete, here is what they did:
They challenged their readers to come up with the most useful BASIC programs they could using only a single line of code in the BASIC interpreter. With the colon instruction separator you could easily get twenty commands on a single line. And the winning submissions were brilliant. One was a screen saver-esk art program, a second was a working word processor, and the third was a full sub chase game. I wish I could share the article and results with this group, but my net search for mention of the article turned up nothing.
So, in the spirit of the early days of PC programming, here is my proposal to all of you:
The 50 Line Small Basic Challenge!
I proposed this challenge about three years ago as the "25 Line Challenge", and it was such a success that it spawned a competition to see who could squeeze the most complex code into the smallest space. The results were brilliant. It was quickly discovered that you could use the String and Stack based nature of the arrays to produce some startlingly compact, obfuscated and unreadable code. I think the best example was Rock-Paper Scissors reduced to three lines (importCode: CTB433-2)
This time, to keep it from spiraling out of control and losing its impact on learning, I am going to suggest we keep it simple: One command or assignment per line, and no crazy use of arrays or other structures simple to squeeze into the limit.
So… Give us your clever, entertaining, most creative best, just keep it readable, and keep it under fifty lines.
Thanks to...
Nonki Takahashi - For suggesting this blog idea!