November 27, 2003
Stopping spam with poetry

Okay, this is cool: Here's an innovative way to stop spam -- and hit spammers with an intriguing use of copyright law.
Habeas, an anti-spam corporation, has created a set of special "x-headers" that you insert into your outgoing mail. Essentially, it's a little watermark that indicates that your email is genuine and valid. ISPs can set up a simple filters that allow email through that includes these special x-headers.
But hold it -- couldn't the spammers themselves also put these x-headers into their junk mail, and thus get past the filters? Sure. Except here's the thing: The headers are written in the form of haiku -- a copyrightable art form. (That's an example you see above.) If a spammer copies one of Habeas' x-headers and uses it to send out millions of pieces of spam, they've just broken copyright law on a massive scale: They have illegally distributed copies of an artwork. Habeas can launch an enormous lawsuit against any spammer, and indeed, they've already successfully shut down a few.
As Habeas points on its web site:
Fighting spam with poetry and the law
The thing that makes The Habeas Warrant Mark so unique is that it is written as haiku, an ancient Japanese poetic form. Since our headers are actual works of art, Habeas can use the powerful legal tools available for copyright and trademark protection to prosecute violators.
I could not possibly love this more! Email servers spraying poetry across the Internet -- and using it to bust the most annoying advertising ever.
I've written pretty extensively in recent months about the peculiar literary appeal of auto-generated text, and about 'bots that write poems. But what really charms me is how the Internet is causing a strange, quiet revolution in the utility and prominence of poetry -- an otherwise neglected art form. Poetry, with its short, tight compression of expression, is perfectly suited to applications that need to send tiny bursts of text; and poetry's constant remixing and resampling of former literature makes it oddly 'bot-like in nature. Indeed, of all literary forms, poetry is the one closest to computer programming itself: An art form where compression, efficiency and elegance are highly prized.
Which is why it's probably no surprise that Habeas users have begun to write their own haiku and send them in to Habeas. You can read some examples here, including this one:
Dear old friends send mail.
As do incorporeal
robot pretenders.
-James Kobielus
Posted by Clive Thompson at November 27, 2003 01:34 PM
| TrackBack
That is an act of sheer genius.
So what happens if we find any piece of viagra-praising poop that can be cut up like it is a haiku, claim one of us wrote it - some robust poet - and GO THE BASTARDS WHEREVER THEY CAN BE FOUND.
Sorry, sorry, will take the tablet now..
Since the Heap has no definite rules as to where it will create space for you, there must be some way of figuring out where your new space is. And the answer is, simply enough, addressing. When you create new space in the heap to hold your data, you get back an address that tells you where your new space is, so your bits can move in. This address is called a Pointer, and it's really just a hexadecimal number that points to a location in the heap. Since it's really just a number, it can be stored quite nicely into a variable.
We can see an example of this in our code we've written so far. In each function's block, we declare variables that hold our data. When each function ends, the variables within are disposed of, and the space they were using is given back to the computer to use. The variables live in the blocks of conditionals and loops we write, but they don't cascade into functions we call, because those aren't sub-blocks, but different sections of code entirely. Every variable we've written has a well-defined lifetime of one function.
This variable is then used in various lines of code, holding values given it by variable assignments along the way. In the course of its life, a variable can hold any number of variables and be used in any number of different ways. This flexibility is built on the precept we just learned: a variable is really just a block of bits, and those bits can hold whatever data the program needs to remember. They can hold enough data to remember an integer from as low as -2,147,483,647 up to 2,147,483,647 (one less than plus or minus 2^31). They can remember one character of writing. They can keep a decimal number with a huge amount of precision and a giant range. They can hold a time accurate to the second in a range of centuries. A few bits is not to be scoffed at.
Our next line looks familiar, except it starts with an asterisk. Again, we're using the star operator, and noting that this variable we're working with is a pointer. If we didn't, the computer would try to put the results of the right hand side of this statement (which evaluates to 6) into the pointer, overriding the value we need in the pointer, which is an address. This way, the computer knows to put the data not in the pointer, but into the place the pointer points to, which is in the Heap. So after this line, our int is living happily in the Heap, storing a value of 6, and our pointer tells us where that data is living.
When Batman went home at the end of a night spent fighting crime, he put on a suit and tie and became Bruce Wayne. When Clark Kent saw a news story getting too hot, a phone booth hid his change into Superman. When you're programming, all the variables you juggle around are doing similar tricks as they present one face to you and a totally different one to the machine.
This variable is then used in various lines of code, holding values given it by variable assignments along the way. In the course of its life, a variable can hold any number of variables and be used in any number of different ways. This flexibility is built on the precept we just learned: a variable is really just a block of bits, and those bits can hold whatever data the program needs to remember. They can hold enough data to remember an integer from as low as -2,147,483,647 up to 2,147,483,647 (one less than plus or minus 2^31). They can remember one character of writing. They can keep a decimal number with a huge amount of precision and a giant range. They can hold a time accurate to the second in a range of centuries. A few bits is not to be scoffed at.
To address this issue, we turn to the second place to put variables, which is called the Heap. If you think of the Stack as a high-rise apartment building somewhere, variables as tenets and each level building atop the one before it, then the Heap is the suburban sprawl, every citizen finding a space for herself, each lot a different size and locations that can't be readily predictable. For all the simplicity offered by the Stack, the Heap seems positively chaotic, but the reality is that each just obeys its own rules.
These secret identities serve a variety of purposes, and they help us to understand how variables work. In this lesson, we'll be writing a little less code than we've done in previous articles, but we'll be taking a detailed look at how variables live and work.
We can see an example of this in our code we've written so far. In each function's block, we declare variables that hold our data. When each function ends, the variables within are disposed of, and the space they were using is given back to the computer to use. The variables live in the blocks of conditionals and loops we write, but they don't cascade into functions we call, because those aren't sub-blocks, but different sections of code entirely. Every variable we've written has a well-defined lifetime of one function.
But variables get one benefit people do not