binary encoder (2003)
This is a story that begins with some code I wrote and ends with a rejection.
First, the code. In high school, I wrote a little Mac OS X application that would encode text as binary. It had a window and textboxes and buttons and everything. You could type in “hello”, and it would output something like “0110100001100101011011000110110001101111”. You could also convert back from binary to the original text.
In hindsight, the implementation was pretty terrible. I couldn’t figure out how to read the last bit in a byte, so I masked
0xF instead and wrote a
switch statement to convert all possible hex digits. There was also a dropdown menu to choose little or big endian, which I now realize is meaningless for a sequence of individual bytes. Maybe it reversed the bits in each byte? Nonetheless, the program worked well enough, so I uploaded it to my website and sent the link to some friends.
At the time, almost everyone at my school used AOL Instant Messenger (AIM). Everyone wrote angsty profiles and away messages, with a mishmash of fonts and colors. Everyone stayed up chatting past 2 am because AIM was way more interesting than writing an essay about The Scarlet Letter or The Aeneid or whatever.1
So one of my friends2 used the program to encode a long message in binary. Then he sent it over AIM to a girl he liked and had her download my program to decode it.
And she sent back a message like this: “0110111001101111”
That was the rejection I mentioned at the beginning.