Coding In My Sleep.

Well, it happened.

For some reason, while I was dreaming, I wanted to build a square out of random passages from Lorem Ipsum text. Something like this:

S Q U A R E S
Q           Q
U           U
A           A
R           R
E           E
S Q U A R E S

I wanted it to be 64 characters across and 64 characters tall.

So I started plotting it out. Get the length of the string. Start each passage at a random somewhere between character 0 and strlen(LoremIpsum)-64. Do that four times. Write a loop so that the vertical text can be drawn one letter a time in a line. Then print the horizontal text as is. Offset them all by one characer so that they make the square.

It happened. I wrote a small and functionally useless program in my sleep.

Andrew

Andrew is a web developer by day.He has played drums nearly all his life, creates music whenever possible, and plays too many video games.
He has worked as a level designer for a small online video game, as the grim reaper in a haunted house, and traded web design for concert tickets and tattoos.He can be sometimes found performing improvised comedy or stage magic in the south side of Austin, Texas.

Latest posts by Andrew (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *

I hope you're better at pre-algebra than the bots that keep hitting this blog.

*