Magic 8ttp Ball
My son, Britton, woke up this morning a little before 4am. As I was getting back into bed after feeding him, I saw that the clock read “4:04”, and (being the geek I am) I immediately thought “heh, 404 Sleep Not Found”.
He woke up a few minutes later, needing a bit of comforting (he’s definitely not usually this needy!), and when I got back into bed, the clock read “4:22”, obviously telling me that sleep was an “Unprocessable Entity”.
And thus the Magic 8ttp Ball was born.
Go on! Ask it anything! It’ll give you a suitably ambiguous HTTP response code in return. I’ve even been told it works great on the iPhone for when you have those burning questions on-the-go.
Reader Comments
Amazing. Fantastic Job
7 Mar 2008
You’ve impacted me for life. I will never look at a clock the same. Ever. :)
7 Mar 2008
Enjoyed this greatly. Especially the fact that the styling of the answer looks like a browser response.
7 Mar 2008
Damn, it’s 9:40, now I have to wait for about 4 hours before the hour becomes useful.
7 Mar 2008
as someone else with a baby boy waking me up a few times a night I found this to be especially heart-warming
thanks
7 Mar 2008
One of the funniest things I’ve seen in a long time.. Great work..
7 Mar 2008
hehe, using brute force technique you can get really appropriate answers to the questions :)
8 Mar 2008
I’m disappointed that the actual status code being returned for all of them is good ol’ 200. How are we supposed to implement applications that consume it in an efficient way if we have to scrape the body text?
8 Mar 2008
@hatless, I tried having it actually return that status code, but some of them are actually interpreted by the browser as that status, with unexpected consequences. Imagine that! A browser understanding a status code! ;)
On the other hand, though, you obviously didn’t think to try the XML version:
That will return a blank body with the “correct” HTTP status code, and an X-Question header that echoes the original question.
8 Mar 2008
sigh
Never mind. The XML version doesn’t actually work, because lighttpd translates HTTP status codes it doesn’t understand (which is most of them) to “400 Bad Request”.
Ah, well.
8 Mar 2008
Must say I’m impressed that you at least intended to have it work “properly”. :)
8 Mar 2008
As usual, I am in awe. I trust that the https version works for when I need a secure answer to “she loves me, or loves me not?”...
11 Mar 2008
Goodbye the rest of the afternoon!
15 Mar 2008
Jamis,
Aren’t you the original developer of Vade Mecum? You’ve come a long way! :D
404 Sleep not found! Awesome. Glad to see family life gets others up at 4:00 am to (hopefully) get something done.
8 Apr 2008
@Dustin, yes, I originally wrote Vade Mecum, too! I’ve dabbled in quite a few different things, and PocketPC development was one of them. :)
10 Apr 2008