I guess I am on a nostalgia kick. Earlier this week I found a link to an Text Ascii Art Generator over on Doug Peterson’s Doug – Off The Record blog. This site lets you enter text and have it reproduced in ASCII art similar to the sample below.
There are a large selection of fonts to choose from. I picked one that was as similar to a project I did 30 some years ago to show you. Doing this sort of thing as well as more complex art and images was quite the thing back in the early days of computers. You know back before we had laser printers and could generate photo quality graphics cheaply and easily. There are all sorts of ways to generate these messages of course. The hard way which is more efficient and the easy way which doesn’t scale well are two of them.
One can easily create a set of statements that draw each line of the text that makes up a message and that is fairly easy to do. One usually draws the message on a piece of graph paper and uses that template to create the statements leaving blank spaces and entering characters as appropriate. As I said though that doesn’t scale well. Better is to create a more complex program that knows how to draw each character and how to line things up across the page so things come out right.
Of course moving down the page is easier than across. Back in the old line printer days I wrote a program that generated huge banners for the line printer. I had a long, complicated, tricky to debug print statement for each letter. I could easy vary the characters that were used to fill in the letters – yea me. But really that didn’t scale all that well either and it took me for ever to get all 26 letters (UPPERCASE only) and ten digits. I tended to add letters as I needed them for specific messages. I had a box full of punch cards when I was done.
The more correct way would be to encode the bits needed for each letter and have a general purpose routine that would take that code as input. Much less code to debug and much easier to scale to add characters or create whole new fonts. The web site I linked to has a link to information about FIGlet Fonts and AOL Macro Fonts which are a couple of ways to encode font sets for ASCII art. There are more of course.
I think that having students create their own encoding and writing their own programs for drawing the characters would make an interesting set of projects though. It would give them some exposure to thinking about that sort of thing and hopefully understanding that it could lead to other sorts of information storing. It should also help them understand more about fonts in general. Starting with the difference between proportional and non-proportional (fixed pitch) fonts. Maybe you could even let them discover that for themselves.
What do you think? Would students find this interesting today or is it just too old? A lot of students seem to like throwback games so maybe this would appeal to them. Let me know if you try it.