Transposing Banner
I’ve lived on unix shells for a decent amount of time (I’d say about 1/4 my life, at this point, or 6 years, for those counting), and have occasionally been bored and started playing with the banner program. It’s pretty simple. You type “banner hello” and it gives you a big printout of the word “hello.” The problem is that it’s vertically aligned, so it looks like this:

Well, this kind of sucks for trying to make fun of people. So I’ve always wanted to fix it to where it puts out horizontal text, but have been too lazy, until today when I had some time at Lone Star Ruby Conf. Got a way to solve it? Click in to see my leet solution.
I imagine one of the reasons I put this off is that I didn’t have a big desire to write, say, a reverse or transpose method for an array. They’re not necessarily difficult, they’re just tedious and functions that would be cooler if they were part of the language. Enter Ruby (yay!).
So, with that teeny bit of code (19 lines for the methods, with spaces and comments), we get something cool like this:
Woot!
One downside of the current implementation is that lowercase letters don’t show up correctly, because heights vary on lowercase letters. Oh well. If I’m talking on a banner, I don’t mind shouting.
I’d be interested to see Java/C/BoutitBoutit solutions. Feel free to post them in the comments.