Nat Friedman's Tweetable Script Challenge

Submitted by felixruina on 11 April, 2008 - 19:48.

Yesterday Nat Friedman (really famous in the Open Source world) posted a friendly challenge on his blog to fellow programmers.

The challenge was this: Twitter limits it's posts ("tweets") to 140 characters. So, the challenge is to come up with the best one-line program (or shell script) that falls under twitter's 140 character limit.

Here is Nat's first-try example script:

s="-<";while true;do echo -ne "$s\r";s=`sed 's/->$/-<-/;s/^/;s/--/->/;'<<<$s`;sleep 0.1;done

I've done a little shell scripting here and there, but this just looks like jibberish to me. Yet, if I paste it into my Linux terminal, it's a nifty little program that creates a fun little animation.

And that's pretty good. But you would be amazed at what some of the programmers who stepped up to Nat's challenge were able to come up with!

You can read the contest results here, on Nat's blog.