Take the Tweetable Script Challenge

Twitter limits posts (“tweets”) to 140 characters. This constraint makes sending updates to your friends challenging, but it makes programming more interesting.  I just tweeted this 105 character shell script:

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

Cute, huh? :-) But you can probably do better. Tweet your one-liner, and then send a @natfriedman message on Twitter so that I notice it. Best tweetable script posted today wins. All the basic shell languages are allowed, but your script has to be pastable into the shell, i.e. “perl -e” is ok.

Update: check out the results in Ten Tweetable Scripts and More Tweetable Scripts!

Posted on 10 April 2008

9 comments

  1. Jeff Tickle’s avatar

    It’s those god-forsaken smart quotes that are killing it; WordPress is replacing every quotation with a unicode character. http://www.phpied.com/smart-quotes-in-wp/ if you want to get rid of them.

    Reply

  2. Arturo Espinosa’s avatar

    I tweeted you a 135-line morse decoder. http://twitter.com/pupitetris

    Reply

  3. nat’s avatar

    Arturo – Very cool :-) (but you mean 135-char :-) )

    Reply

  4. nat’s avatar

    @Jeff – Thanks, that helped. The code was a bit different on my machine, but I fixed it.

    Reply

  5. mmoroca’s avatar

    Here is my contribution: write the featured tweets’ authors that shows in the front page… http://mmoroca.tumblr.com/post/35678187/c-mo-obtener-los-usuarios-cuyos-tweets-se-muestran-en

    Reply