Straight into the Horse’s Mouth

Saturday 21 April 2012, 1:39 pm   ///////  

My word-palindrome writing project (being undertaken as @nickmofo) has been boosted by Christian proselytizing, by Bök’s page. I am delighted to be featured in Christian Bök’s post on Harriet as an instance of conceptual writing on Twitter – named, in fact, right after @Horse_ebooks.

This makes it particularly apt that Christian describes my writing as potential poetic “fodder.” Why not treat this feed of texts as the gift horse that keeps on giving? Please, feel free to make the tweets of @nickmofo into your chew toy.

Palindrome “Sagas”

Saturday 24 March 2012, 12:12 pm   ///////  

Marty Markowitz, borough president of Brooklyn, said his borough was “the heart of America” in welcoming the 35th Annual American Crossword Puzzle Tournament. My heart was certainly in Brooklyn last weekend, both literally and figuratively. I was there to participate in the First Annual World Palindrome Championship on Friday and, on Saturday, to visit Big Reality, a wonderful, scruffy art show that included some of my work. More on Big Reality soon; here’s a belated note about the WPC.

I made into New York in time to meet at Jon Agee’s sister’s house in Brooklyn with him and several other palindromists who would be competing that evening. (Agee is a cartoonist whose books include Go Hang a Salami! I’m a Lasagna Hog! and Palindromania!) The other competitors included a fellow academic, John Connett, who is professor of Biostatistics at the University of Minnesota and an extremely prolific producer of sentence-length palindromes. Martin Clear, another author of many, many sentence-length palindromes, came from Australia. Barry Duncan, a Somerville resident and thus practically my neighbor, also joined us. Another competitor was Mark Saltveit, editor of The Palindromist and a stand-up comedian. And Douglas Fink, who won a celebrity palindrome contest with his now-famous entry “Lisa Bonet ate no basil,” was the audience contestant selected to join us.

I met Barry and Doug later that day, and had a great time sitting around and discussing palindromes with the others over lunch. We had plenty to talk about. It was interesting to see that we also had different perspectives, interests, and terms associated with the art. Jon thought “Er, eh – where?” was a good palindrome, probably in part because he was imagining how to illustrate it or frame it in a cartoon in a funny way. The others generally thought this one was bogus. A sentence was the desired outcome for most of us, while I was a fan (and writer) of longer palindromes. And, as we found out that night, the audience had their own tropisms and aesthetics when it comes to palindromes.

We had 75 minutes to write up to three palindromes that we’d read to the crowd, which was to vote for their two favorite. There were three possible constraints given: Use X and Z; Refer to events in the news in the past year; or refer to the crossword tournament itself. Here’s what I came up with, using the first constraint:

The Millennium Falcon Rescue

by Nick Montfort

Wow, sagas … Solo’s deed, civic deed.

Eye dewed, a doom-mood.

A pop.

Sis sees redder rotator.

Radar sees racecar X.

Oho! Ore-zero level sees reviver!

Solo’s deified!

Solo’s reviver sees level: ore-zero.

Oho: X, racecar, sees radar.

Rotator, redder, sees sis.

Pop a doom-mood!

A dewed eye.

Deed, civic deed.

Solo’s sagas: wow.

All of the results (and the text of the palindromes) are up on The Palindromist site – take a look!

Mark Saltveit became champ with a short palindrome about acrobatic Yak sex. John Connett got 2nd, Jon Agee 3rd, and yours truly 4th.

Which is the longest?

In mine, I count 54 words, 237 letters, and 327 characters. If “doom-mood” and the like are single words, we’d have 50 words. Mark says on The Palindromist site that it’s 57 words long; I’m not sure how the counting was done there.

In Barry’s, the only other possible contender, I count 70 words (as does Mark), 184 letters, and 311 characters. Some of those words are “7” and have no letters in them, as you’ll note if you check out the results page.

So, they’re both the longest: Barry’s has the most words, while mine has the most letters and characters.

It’s a sort of odd comparison, because the constraint I used (employ only palindromic words, counting things like “ore-zero” as words) let me reframe the problem as that of constructing a word palindrome with a restricted vocabulary. Of course, you should be very very impressed anyway, with my general cleverness and so on, but I think Barry chose a more difficult feat at the level of letter-by-letter construction.

Does length matter?

Yes. A palindrome should be the right length. 2002 words is a good length if you’re trying to write a palindromic postmodern novel. For a snappy statement, a short sentence is a good length. I think some of the best palindromes are longer than a sentence and much shorter than 2002. My last edits to “The Millennium Falcon Rescue” were to cut several words (an even number, of course), and maybe I should have cut more? And, should I revise this one, I might cut the word that was included for the sake of the Z.

What about those palindromists?

The most interesting thing about this event, for me, was a gathering focused on palindrome-writing. Kids know what palindromes are, the form of writing has been around for more than a thousand years, many people have palindromes memorized, and there are a handful of famous books … but as I see it there hasn’t even been a community of palindrome-writers, discussing writing methods, coming up with common terms and concepts, sharing poetic and aesthetic ideas.

Well, perhaps there has been, in the Bletchley Park codebreakers. But I only learned about them because I met Mark, who is one of the people researching the origins of famous palindromes. And that was, due to wartime security, a very secretive group.

It was great having the Championship hosted by Will Shortz at the American Crossword Puzzle Tournament, with many puzzle-solver and -constructors who are interested in formal engagements with language. Of course, palindrome events would fit will at other sorts of gatherings that are focused on poetry and writing, too.

Whether or not we have another championship (which would be great), it would be nice to have another summit of some sort and to build a community of practice around this longstanding practice. Particularly if we can get someone named Tim to join us: Tim must summit!

Word Palindomes Dog Me. Dawg, Palindromes! Word!

Thursday 16 February 2012, 6:43 pm   ////  

Mark J. Nelson has posted a very nice note about word-unit palindromes, mentioning that I have been tweeting palindromes-by-word as “@nickmofo” recently.

Nelson points out the paucity of such palindromes in the printed (and digital) record, and the lack of discussion about these. There are a few famous palindromes of this sort, including one that he mentions, “You can cage a swallow, can’t you, but you can’t swallow a cage, can you?” Another fairly well-known one is “King, are you glad you are king?” and another is “So patient a doctor to doctor a patient so.”

Without trying to add too much to this helpful discussion, I’ll note here that some of my tweets are meant to be amusing references to and reworkings of these more famous (for certain values of “famous”) word-unit palindromes:

You can mind a fashion, can’t you, but you can’t fashion a mind, can you?
(Oct 28, 2011)

You can touch my bear, can’t you, but you can’t bear my touch, can you?
(Oct 25, 2011)

Mister President, are you glad you are president, mister?
(Nov 28, 2011)

So stiff a doctor to doctor a stiff so.
(Nov 27, 2011)

In case some of my palindromes seem more inscrutable than others, I’ll also note that my output includes tweets that pertain to things I saw (a VCR chained to a fence near MIT) and events that I attended (a poetry reading by Doug Nufer).

Holocaust Museum

Thursday 5 January 2012, 3:36 pm   //////  

Radical Books of 2011, 5/10

Robert Fitterman, Holocaust Museum

Holocaust Museum, Robert Fitterman, Veer Books, 9781907088346

Here is an extraordinary list, a simple and straightforwardly organized book of metadata (in this case, photo captions) that gives a very detached view of the 20th Century’s most unthinkable occurrence. What is fascinating is that while the book comments on some of the tropes of memorials, Holocaust museums, and records of trauma in general – enumeration, detachment, clear identification and humanization of individuals – it nevertheless becomes an effective testimony of the Holocaust and of how it was inextricably involved with ordinary life and events and histories, beyond the horrors that were ordered and organized:

A German-Jewish family poses outdoors for a family portrait with their dog. [Photograph #69297]

The book is conceptual, but seems to be as far from a conceptual joke as is possible. Unlike much conceptual writing that begins with appropriation, it demands to be read entire. This is in many ways a simple book, and in many ways an extremely complex engagement with history, memory, and writing.

Found Poems

Wednesday 4 January 2012, 1:00 pm   //////  

Radical Books of 2011, 4/10

Bern Porter, Found Poems

Found Poems, Bern Porter, new edition of a 1972 Something Else Press book, 9780982264591

Perhaps this exquisite collection of punctuation, numbers, and occasional letters recalls to the modern reader the idea of “uncreative writing” as described by Kenneth Goldsmith. I see it more as an example of subtractive writing: Creating new texts by erasure, or by cutting out text from advertisements, tables of technical information, and other ordinary but rich veins that can be mined for fragments of language. Each page can also be seen as a degenerate collage, a single clipping of text juxtaposed with nothing else (except what’s on the facing page). Porter, who was a publisher of radical writing and hoarded paper, never owned a phone or a computer. The book is, one might say, a real find, worth re-reading by anyone who seriously turns to contemporary poetry and conceptual writing, or indeed anyone fascinated with ordinary words locked in ads, fliers, and other everyday texts. At least do check out the fine related resources on UbuWeb’s Bern Porter page.

The Sounds of Little C

Sunday 9 October 2011, 3:01 pm   /////  

A group of sonic and code explorers has been discovering excellent super-short C programs that, piped to an 8-bit audio device, generate music. Here’s the first video and a second video with sounds and code.

Here’s the code for one example, “Lost in Space,” from video #2:

main(t){
for(t=0;;t++)putchar(
((t*(t>>8|t>>9)&46&t>>8))^(t&t>>13|t<<6)
);}

If you are also a righteous Ubuntu user, you can paste that into a file (let’s call it “lost_in_space.c”) and compile it with:

% gcc lost_in_space.c -o lost_in_space

Then, pipe it (or pretend to pipe it, using padsp, since recent versions of Ubuntu don’t have /dev/dsp) to your audio device using:

% ./lost_in_space | padsp tee /dev/dsp > /dev/null

Thanks to Andrew Stern for tipping me off about this one.

Technically Speaking

Wednesday 14 September 2011, 9:41 pm   ///  

COMPUTER world hacked Mitnick

Digital being apprehended and N.C., It wasn’t five years in prison,

vid-like “A video friend)

Ghost in wizardry

Hacker attuned

recounts are one engineering”

cat-and-computer-to willingly provide

the online con his unknowing targets

Selections from an American Way book review

Wow, Game Mag. Wow.

Friday 9 September 2011, 3:55 pm   //////  

I keep hearing about this Believer article about palindromes – actually, it’s mostly an article exposing a particular palindromist to readers’ chortles. The article signals no awareness of the palindrome as a literary form, but I appreciate it pointing me to Mr. Duncan’s “A Greenward Palindrome,” written for my local eco-boutique and charming in its topicality.

A community of practice is a set of people who do the same type of work (writing, art, game development, etc.) and who are at least aware of one another and have some interaction with one another. Poets constitute a community of practice, for instance, or at least several significantly interlocking communities of practice. Poets are aware that there are other poets. They read each others’ work. Sometimes they hate one another, which shows that they care.

Electronic literature authors are literary migrants to the computer, not always of the same genre or movement, and are less established as a single community of practice. But thanks to organizations like the Electronic Literature Organization and events like the E-Poetry festival and the ELO conference, many of them do get to meet each other, talk to each other, and learn about each others’ work and interests. Some specific sorts of practice, such as poetry generation, have much less community around them, of course; but others, such as interactive fiction, have a great deal of healthy community.

Palindromists, I would venture, do not constitute a community of practice. They mostly don’t know each other and aren’t aware of each others’ work, despite the efforts of people like Mark Saltveit, editor of the magazine The Palindromist. Duncan describes palindrome authors as “practicing the invisible craft.” When thinking of the short, canoncial palindromes that have circulated without attribution, this designation makes sense. But in other cases, it doesn’t.

For instance, there are plenty of palindrome books in print for those who look. Here are three from a single press, Spineless Books: 2002: A Palindrome Story by Nick Montfort and William Gillespie, I’d Revere Verdi: Palindromes for the Serious Music Lover by Jane Z. Smith and Barbara Thorburn, and the sublime Drawn Inward and Other Poems by Mike J. Maguire, which contains:

Same Nice Cinemas

Same nice cinemas,
same nice cafe.

We talk late.

We face cinemas.
Same nice cinemas.

There are several palindromes of literary interest online, too – my and William’s 2002 is just one, alongside “Dammit I’m Mad” by Demetri Martin and “The Big One” by Will Helston.

From reading that recent article, one would guess that palindromists aren’t a community of practice because palindrome writing isn’t a practice, but a pathology. The truth is that palindromes make for difficult reading, difficult writing, and unique engagements with language that have been savored by Edgar Allan Poe, Vladimir Nabokov, Harry Mathews, and Georges Perec. So, for those who want to take a break from gawking at personal quirks to read some brilliant texts, read a few of the many palindromes that are out there – works of writing that will wow you coming and going.

NAFTA Party

Wednesday 11 May 2011, 10:06 pm   /////  
A collaborative story by Jesse Ashcraft-Johnson, Eleanor Crummé, Alex Ghaben, Cisco Gonzales, Ray Gonzalez, Boling Jiang, Nick Montfort, Shannon Moran, Kirsten Paredes, Carter Rice, Tyler Wagner, and Jia Zhu

“Mr. President, can you summarize the events of the G-6 conference?”

“First, a bunch of world leaders surrendered their favorite prostitutes. Then, we all yelled ‘Yeehaw!'” That was what George H. W. Bush thought, anyway, as he delivered a quick straight answer to the question.

“Mr. President, what was your holiday message to the troops?”

“I told the boys: either step up to the challenge or there will be no Christmas presents this year.”

When the photo-op smiles fell away, there was a moment of hesitation between Bush, Canadian Prime Minister Mulroney and Mexican President Salinas. The prepared statements about NAFTA were left on the podium, the talking points and teleprompters left in the press room with the reporters. Music swelled outside closed doors. “Well — either we dance or we lose ourselves in emerging global markets!” Bush blurted out, the twang in his voice inviting them to the hoedown.

Whiskey heavy on his breath, Bush turned to Salinas and elbowed him playfully. “Were you tutoring someone last night in long division? Either that was a very short 18-year-old or you might want to go see a priest. I hear they’re good with that sort of thing.”

He felt Mulroney’s eyes on him and turned abruptly. “Do you have a staring problem, boy? You’re looking at me like a damn homosexual. Either you face me like a man or spend the night. I’ll pound you ’till you’re tender.”

Mulroney flashed a smile, then started. A SWAT team was scaling the White House wall. “Look!” he said, gripping President Bush’s hand. “Either monkeys are flying out of your butt, or we should really rethink what we told the police last night. Maybe that anonymous call to the FBI tip line about hiding little boys in the attic wasn’t such a great idea.”

As their hands touched, Bush remembered the secret NAFTA initiation ceremony of the previous night.

Salinas had been pouring shots of tequila for a while. Stumbling up on top of the table, Bush called for attention and announced: “In order to promote unity, we must remove all barriers to our freedom. That includes our clothing.” Salinas nodded gravely, adding, “we must be pure and unfettered in body as well as soul.” There were noises of confusion from the others gathered there. “Hey, I’m from Texas, bitches. This is how we roll. Go big or go home!” Mulroney reached deep into his pants and pulled out a 12-ounce bottle of maple syrup. “Big enough for you, Bush?” he shouted as he chugged it down with a giant sucking sound.

One thing led to another. In the darkness, having slipped past the Secret Service, they ended up joining hands while riding bicycles naked down Pennsylvania Avenue.

Bush was snapped out of his reverie by the arrival of the NAFTA treasurer who had come to brief the world leaders, who were inebriated once again, on the state of the budget.

“First, take off your clothes,” Bush told him. “Then we’ll talk … “

Records of Oulipolooza

Monday 4 April 2011, 5:38 pm   /////  

Video and audio of Oulipolooza, a festive tribute to the Oulipo in which I participated, is now online. The event was held on March 15, 2011 at the Kelly Writers House at Penn and was organized by Michelle Taransky and Sarah Arkebauer. Speakers were:

KATIE PRICE
LOUIS BURY
JEAN-MICHEL RABATÉ
GERALD PRINCE
and NICK MONTFORT

It was quite an honor to be part of this group, which included one of my Ph.D. advisors – Gerry Prince. I may have been the least distinguished Oulipo scholar among these speakers, but I tried to make up for that by being the only one to wear a party hat.

March 15 in Philadelphia: OuLiPoLooZa

Wednesday 9 March 2011, 6:35 pm   //////  

[An announcement from Penn's Kelly Writers House:]

We’re pulling out all the constraints for our OULIPOLOOZA next Tuesday, March 15, at 7:00 pm. Organized by our own Sarah Arkebauer (C’11) and Michelle Taransky, this celebration of all things Oulipo will feature five experts and aficionados talking about the “Ouvroir de littérature potentielle,” the highly-influential French school of avant garde poetry. The evening will be rounded out by the launching “An Oulipolooza,” a collection of new Oulipian writing, and a constraint-inspired reception. This is one celebration you should not A Void!

The Kelly Writers House presents

OULIPOLOOZA a celebration of potential literature

featuring

KATIE PRICE
LOUIS BURY
JEAN-MICHEL RABATÉ
GERALD PRINCE
and NICK MONTFORT

Tuesday, March 15, at 7:00 PM in the Arts Café
Kelly Writers House | 3805 Locust Walk, Philadelphia, PA
No registration required – this event is free & open to the public

Come help us celebrate the continuing potential of literatures by attending the OULIPOLOOZA, a Kelly Writers House-style celebration of all things Oulipo. The OuLiPo, or “Ouvroir de littérature potentielle” (workshop of potential literature), is a group of experimental French poets founded in 1960, devoted to exploring the potential of literature, language and freedom through the lenses of different constraints. Oulipolooza will include readings about the Oulipo by five experts and aficionados, a reception full of Oulipo-inspired foods, and the launch of “An Oulipolooza”: a collection of oulipian texts.

KATIE L. PRICE is a Ph.D. candidate in the University of Pennsylvania’s English Department completing her dissertation, tentatively titled “‘The Tangential Point': Pataphysical Practice in Post-War Poetry.” She is also an associate editor for Electronic Poetry Center, co-coordinator of the Poetry & Poetics graduate group, and will teach a course in the fall entitled Poetry, Technology, Gender and Globalization.

LOUIS BURY teaches literature at New York University, is a part-time professional poker player, and is completing a constraint-based dissertation about constraint-based writing, titled Exercises in Criticism, at the Graduate Center of the City University of New York.

JEAN-MICHEL RABATÉ is Vartan Gregorian Professor in the Humanities at the University of Pennsylvania.  Co-founder and curator of Slought Foundation, he is a senior editor of the Journal of Modern Literature. A fellow of the American Academy of Arts and Sciences, he has authored or edited more than thirty books on modernism, psychoanalysis, contemporary art and philosophy. Recent titles include Lacan Literario  (2007), 1913: The cradle of modernism (2007),  The Ethic of the Lie  (2008) and Etant donnes: 1) l’art, 2) le crime (2010). Currently, he is editing a collection of essays on Modernism and Theory. He is the president of the Samuel Beckett Society and completing a book on Samuel Beckett and philosophy.

GERALD PRINCE is Professor of Romance Languages and Head of the French section at the University of Pennsylvania. He is the author of many articles and reviews on narrative theory and on modern (French) literature as well as of several books (including A Dictionary of Narratology and Guide du roman de langue française: 1901-1950) and his work has been translated into a dozen languages. A co-editor of the “Stages” series for the University of Nebraska Press and a member of a dozen editorial and advisory boards, Prince is working on the second volume of his Guide du roman (1951-2000).

NICK MONTFORT writes computational and constrained poetry, develops computer games, and is a critic, theorist, and scholar of computational art and media. He is associate professor of digital media in the Program in Writing and Humanistic Studies at the Massachusetts Institute of Technology, and is now serving as president of the Electronic Literature Organization. He earned a Ph.D. in computer and information science from the University of Pennsylvania.

Book Arts and Broadsides Showcased

Thursday 9 December 2010, 12:42 pm   ////////  

a photo (and not a very good one, sorry) of the Building 14 WHS Books Arts & Broadsides display case

MIT’s Building 14 has a great new display thanks to poet Amaranth Borsuk, who is a Mellon postdoctoral fellow in the Writing & Humanistic Studies program, where I also work. There are some wonderful pieces from many of my colleagues and their students, all of them displayed brilliantly. I’ll mention the digital tie-ins: The broadside “Love Letters,” done in one of my graduate CMS.950 Workshop classes, consists of computer-generated poems produced by a Manchester Mark I emulator. These were set on a letterpress by the class thanks to the Bow & Arrow Press’s John Pyper. And Peer Hofstra, who took my 21W.750 Experimental Writing class last semester, did an extraordinary untitled book for his final project. It’s made of punched cards, with the words are formed by alphabetically-arranged letters punched out from those pages. Each word is some are subsequence of the alphabet, so “APT” can occur, while “APE” cannot. Alex Corella’s Experimental Writing final project, which cuts up and rearranges the text on Cambridge historical plaques, is also on display. If you’re on campus, do stop by to see the case, which is by the elevator on the first floor of Building 14. It will be up for at least this month, December 2010.

Robot Prints and Binds Riddle & Bind

Monday 6 December 2010, 12:59 pm   //////  

If you’re looking for my new book of poems, Riddle & Bind, and you happen to be near the MBTA’s Red Line or Harvard Square specifically, prepare for excitement. You can not only purchase the book in this venerable area of Cambridge; you can have the Harvard Book Store’s book-making robot, Paige M. Gutenborg, manufacture a copy of Riddle & Bind for you in about four minutes. The cost for the book and the bibliotronic display in which it is forged is simply the retail price, $16.

The Harvard Book Store's book-making robot.I have the feeling that someone must have put in a good word for me.

Update: As of August 14, 2012, Riddle & Bind is not available to be printed on the Espresso Book Machine at the Harvard Book Store. The book can be special ordered through the Harvard Book Store, however.

The MIT Press bookstore, down the red line at the MIT/Kendall stop, has copies of Riddle & Bind in the store and available for purchase.

My New Book, Riddle & Bind

Wednesday 13 October 2010, 11:58 pm   //////  

Riddle & Bind My new book – a book of poems entitled Riddle & Bind – has been published by Spineless Books. The book contains figurative language that does not explicitly state what is described, but leaves this for the reader to discern: riddle. And I have placed myself within certain constraints to write poems in this book: bind. The official publication date is October 31, but thanks to the attention and deft work of my publisher, I was able to lay my hands on a book and volume today. I will follow up soon with details about this tome and its availability, but for now: Riddle & Bind is bound. And it even has a spine.

A Deterministic ppg256

Wednesday 22 September 2010, 7:36 am   /////  

Last night I premiered ppg256-6 in Bergen, Norway:

perl -le '@d=split/ /,"eros won to tree for fire sex sever ate nice tin elfin wealth";@t=split//,"_bhlmnpstw";{$_=localtime;/(..):(.)(.):(.)(.)/;print"\n$t[$3]".($4%2)."ck $t[$4]".($3%2)."ck\n"if!$5;print"\\"x$5." $d[$1%12] $d[$2] $d[$3] $d[$4] $d[$5]";sleep 1;redo}'

This is the latest in my series of 256-character poetry generators written in Perl. An unusual feature of this one is that it is deterministic: If run at the same time, it will produce the same output. Those who run Windows should check the ppg256 page for a .pl file that will run on that OS, on ActivePerl.

Finally, Your 50 Character Reward!

Saturday 21 August 2010, 12:15 am   ///////  

After I presented poetry generators ppg256-1 through ppg256-5 at Banff in February, I shouted out, more or less spontaneously, “50 character reward to whoever gives us the best explanation of what ppg256 is!” Why did I say that? Childhood trauma, possibly, but the more immediate reason, as I mentioned earlier, is that the last of these, ppg256-5, is based on a section of Tristan Tzara’s February 1921 Dada Manifesto, one which ends with the phrase “50 francs reward to the person who finds the best way to explain DADA to us.”

I got some great answers, including “It does a lot with a little” (Chris Funkhouser) and “ppg combines atoms of language” (John Cayley). But at this point I’ll skip right to the one from Travis Kirton, who did the following without having any previous experience programming in Perl:

perl -le '@a=split/,/,"illmn,imgn,ltr,mut,pxl,popl,strlz,pnctu,typfc,poetc,glmr,idl,ion,cptl,cpsl,cvl,atom,pltc,txtul,erotc,rvl";sub f{pop if rand>.5}sub w{$a[rand@a]}{print f("de").f("over").w."izes ".w."ation".f("s")."\n".(" "x45)."IS WHAT ppg DOES!";sleep 5;redo}'

The program is a modification of ppg256-5, one that answers the questions that ppg256-5 generates. That’s not only clever; it showcases the expressive power of small programs and the many, if not arbitrary, uses to which a language generator can be put. This certainly earns the reward. Travis, here’s an base64-encoded version of a 32-byte DOS intro, matisse, by orbitaldecay. When you run it after decoding it with a base64 decoder, it should look like this. The base64-encoded string, you will notice, is exactly 50 characters in length:

sBPNEMUPHgeLFwmXQAEJVwFL4vSsQKq5ZQDkYEh16cM=

Okay, I lied. It’s only 44 characters long. Please accept base64 as the remaining part of the prize.

Now, I think Mark Markino’s explanation of ppg256, which I wrote about yesterday, is also great and will suffice. It’s a wide-ranging and deep study of the series of generators, similar programs I’ve discussed, and some relevant contexts of techneculture. I can’t really decide which of these explanations is best, as they both work excellently for what they are. So I am going to offer Mark Marino a 50-character generator, too. Mark, here is an ASCII encoding of a set of tools that, used properly, will allow you to draw any image:

())___RED___))_> ())__GREEN__))_> ())___BLUE__))_>

Enjoy!

Code is Beauty, Beauty Code

Friday 20 August 2010, 12:07 am   //////////  

Beautiful CodeIn recent years, I’ve written a series of 1k (that is, exactly 1024 character) reviews on here. This ruse has helped me compose succinct (and possibly useful) notes about many things that I wouldn’t have otherwise written about. But some things that are worth reviewing, such as a documentary about interactive fiction, are really better treated in a bit more depth. Given my interest in the aesthetics of code, and in code that produces aesthetic output, a book entitled Beautiful Code: Leading Programmers Explain How They Think is certainly one of those things.

Beautiful Code is an edited collection of 33 articles by a well-known publisher of technical books. The articles deal with how programmers solved a variety of problems, some of them very general computational problems, others quite specific to particular systems and applications. Several of the authors discuss their own code. The book is part of the Theory in Practice series with Beautiful Data, Beautiful Architecture, and Beautiful Security.

Beautiful Code: Leading Programmers Explain How They Think. Edited By Andy Oram & Greg Wilson. O’Reilly Media, 2007.

Beautiful Code is a success in several ways. It widens the conversation about code and the innovative development of it beyond particular programming languages, which have often been silos for such discussion has taken place in the past. At least, book-length discussion of programming – in textbooks, in introductory and reference books, and in “tips and tricks” books – has often been language-specific. While encompassing many systems and code in many languages, the book doesn’t take the position that the programming language can be abstracted away, that knowing about data structures, algorithms and an arbitrary programming language allows on to say all that can be said about how to program.

The first article is a particularly excellent one. In it, Brian Kernighan discusses 30 lines of regular expression matching C code which Rob Pike wrote as an example in an hour or two. This concise article deals with how to solve the core of the regular expression problem elegantly and correctly, but it also touches on many other important aspects of code and programming. By suggesting a series of modifications, Kernighan shows that code is an element of future programs rather than simply a fixed solution. Kernighan mentions how the code takes advantage of C pointers and suggests converting it to Java to see how the result would be slower and would require a lengthier program. If you can only read one essay in Beautiful Code, be glad that the editors have placed this one in the front, allowing you to retrieve it in a constant-time operation.

I was also interested in how several of the essays dealt with the need to consider hardware specifics, something one might expect pure, beautiful code to avoid touching. There’s some hint of this specter in chapter 7, which discusses how Jon Bently’s official, “proven” algorithm for binary search has a bug when it’s implemented on most real systems. When the code finds a midpoint within the array by computing (low + high) / 2, the sum of low and high can, in very extreme cases, exceed the maximum integer value, giving a negative (and obviously wrong) result. Later chapters deal with more productive connections between hardware and code. In chapter 10, Henry S. Warren, Jr. delves into the amazing intricacies involved in efficiently computing the population count or sideways sum: the number of bits in a word, or an array of words, that are 1. The current best way of doing this for an array involves using a special circuit called a carry-save adder. Chapter 14, “How Elegant Code Evolves with Hardware: The Case of Gaussian Elimination,” explores the relationship of leading matrix algorithms to changing hardware architectures.

Several other articles interested me; I suspect that programming language researchers, professional programmers, and others will find that a good number of the selections are worthwhile.

But despite the title and some compelling discussion inside, this is really isn’t a book about “beautiful code.” There is almost nothing in it about beauty or what that concept means when applied to code. “Aesthetics” isn’t in the index. When beauty is mentioned, it seems obligatory and stands for whatever the author of a particular chapter values. This, for instance, by Travis E. Oliphant:

“Iterators are a beautiful abstraction because they save valuable programmer attention in the implementation of a complicated algorithm.” (p. 318)

Could one say anything similar about paintings? Sunsets? Or even something that has an important functional aspect, like a building? “Frank Ghery’s Stata Center is a beautiful building because the layout of its hallways saves valuable programmer time.” That doesn’t sound quite right, does it? There are more reasonable-sounding, if not very elaborated, statements about code and beauty in the book, but some of those seem to express a very narrow perspective. For instance, Adam Kolawa writes:

“In sum, I believe that beautiful code must be short, explicit, frugal, and written with consideration for reality.” (p. 266)

Michael Mateas and I have written about obfuscated code, a topic that isn’t mentioned at all in this book. While obfuscated programs are usually short, they are also the opposite of explicit, gratuitous rather than frugal, and written without any concern for “realities” like re-use, practicality, and legibility. An obfuscated program isn’t good programming practice – that’s part of the point. For reasons that Michael and I have written about, we consider the best examples of obfuscated code to be beautiful, and I suspect we’re not the only ones. They simply display a different kind of beauty, an aesthetic of complexity and extravagance that shows us things about programming and about the language in which the obfuscated code is written – things that technical essays don’t reveal. You may share this aesthetic and be willing to consider obfuscated code beautiful, if, for instance, you saw beauty in the exorbitant Ok Go video “This Too Shall Pass.”

A final disappointment: There are no articles on the creative, artistic use of code, on programming projects that are meant to create beautiful output – no music, poetry, story, or terrain generators, lightsynths, demos, intros, or Processing sketches. Certainly a book about beautiful code, even if it is targeted at the professional programmer, would benefit from investigating a program or two of this sort?

This isn’t to say that valuing conciseness and clarity is a bad idea, or that having a book about utilitarian programming practice, particularly a wide-ranging one with many interesting articles of great technical depth, is a problem. It just means that much work remains to be done on matters of beauty and code. Perhaps we’ll soon see a book that brings together the diversity and depth of technical discussion that’s displayed here with consideration of the nature of beauty, of what it means for code to be beautiful, and of how the workings, conception, code expression, and wider contexts of a program are all involved in its beauty.

« Previous PageNext Page »
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2014 Post Position | Barecity theme