Ask HN: When have you coded yourself out of a real-life problem?
For me, I wanted to go to Momofuku Ko, except they have an annoying .NET reservation system for their coveted 12 seats and 2 seatings, which you can only book 6 days in advance for 24 seats. You have seconds to enter your credit card number to confirm.
But it is a good restaurant, and reservations disappear fast; all are gone by 10:00 AM ET. So like any self-respecting hacker, I got TextMate and Ruby out, performed some sudo gem install mechanize magic, did some serious Regex/XQuery work, wrote a function to perform exponential smoothing on calculating the time difference from my clock to the Momofuku clock, and slept soundly at 7 AM Arizona time, knowing that my reservation would be booked (it's unfair I have to get up at 6:55 AM to check if my resy went through, just because I live in a state like Arizona where food is bad except for Pizzeria Bianco and some others!)
Hope to hear some great things from you guys!
Cheers, Jason
Post scriptum: Frank Bruni, former NYT food editor, hates the resy system: NYT, Frank Bruni, "Going Ko-Ko," http://goo.gl/NYfj; NYT, Frank Bruni, "More Fun with Ko," http://goo.gl/gKGZ; NYT, Frank Bruni, "Ko-da," http://goo.gl/6rNc; Departures, "Eating Small in NY," http://departures.com/articles/eating-small-in-new-york
16 comments
[ 4.3 ms ] story [ 21.8 ms ] threadPopped up a dialog, "Cannot run due to security"
... not sure if I should have said this in public, but I remember being strangely proud for having bent the system a bit :)
"We offer a wide array of corrupted Word files that are guaranteed not to open on a Mac or PC. A corrupted file is a file that contains scrambled and unrecoverable data due to hardware or software failure. Files may become corrupted when something goes wrong while a file is being saved e.g. the program saving the file might crash. Files may also become corrupted when being sent via email. The perfect excuse to buy you that extra time!"
It was a self-check in, check out system with a scanning wand. You take your book, log your student number, scan the barcode, and it was added to your account inventory. Returning the book was the same way; but if you didn't have the book, you obviously couldn't scan it back in. I figured out you could look up the book's ISBN through your account inventory, write it down, and manually enter it into the return form.
BAM! Lost book was magically returned :D. I told a few friends about it, I'm sure the school lost out on a few hundred dollars worth of books that year.
Well, the guy at the local library with subscription started to get irritated with me after the third or fourth link so I built my own search engine to use their search engine. I was a research assistant at the time.
Not a terribly challenging problem, but it's always nice to be able to quickly hack up some code to solve something.
1. http://www.mnemosyne-proj.org/
2. http://french.about.com/od/vocabulary/a/audiodictionary.htm
I also have enjoyed writing scrapers for data I wanted but wasn't being provided in a downloadable format - most commonly stuff on forums.
I wrote a scraper that scraped the entire textfiles.org website for their texts (mostly for fun), I wrote a scraper that logged in as me into my favorite phpBB forum and scraped every post in every forum in every thread - the script would create a directory for the forum, a directory within that named by a number to denote which page it was on, a directory within that named after the thread, a directory within that named by a number to denote which page it was on, and a text file containing only the content div (to retain the formatting of the original post).
I used Python and Mechanize for most of this - the phpbb forum scraper was the most fun and rewarding.
I've also written page scrapers for websites that have things like "1324 of the best side boobs!" I didn't want to Save As for all of them! So I wrote a script that downloaded them for me (this one was easy though compared to the phpbb script).
In the end I wrote an AMOS -> QuickBasic converter in C, first for DICE C on Amiga, then tweaked for Turbo C on the PC. I could then do the rest of my coursework at home on my Amiga, instead of the grubby old slow 386s.
Currently in London, and content, if not happy.
I was elated. It was by no means a very challenging thing to do, but I would have been totally fucked if I didn't know how to do software development.