Online Shopping on a Valentine's Weekend
Valentine’s Day has always been like any other day for me, except this year it was a rare casual Friday - the day that is the harbinger of relief in the monotonous melancholy of life in Delhi.
Little did I know, my past self had planned a surprise for present me. And not necessarily a good one.
The setup
A month ago, in a moment of what I can only describe as “programmer hubris,” I made a script for myself and set it up on my Raspberry Pi to place orders on Amazon. The inspiration came from this XKCD and this glorious website: Bobcat In A Box:
The premise is simple: receiving unexpected packages is delightful. So why not automate the delight?
Here’s what my beautiful creation did:
Browsing history surveillance: I set it to send me stuff based on my browsing history during special holidays. Google and Facebook show you relevant ads based on your browsing habits. My script skips the middleman and just ships the stuff directly to my door. No “Add to Cart” required. No impulse control possible.
Budget constraints (in theory): I set it to operate within a constraint of 100 USD (~7000 INR) in total. It periodically checks Amazon (both amazon.in and amazon.com) around holidays (±5 days) to see if there’s a sale. Then it applies a weightage formula based on my interests from browsing history combined with item prices. Basically, it tries to assign a monetary value to my potential interests and ships me at most 3 of the cheapest products.
What could possibly go wrong?
The delivery
I had completely forgotten about this script. Completely. It had been running silently on my Raspberry Pi for a month, watching, learning, waiting.
Then I heard the doorbell this morning.
Two packages. One big box. One suspiciously small box.
Standing there in my pajamas, holding these mystery packages, I had a moment of genuine confusion. Did drunk-me order something? Did I win a contest? Is this a scam?
Then it hit me. The script. THE SCRIPT.
I opened the packages with equal parts excitement and dread.
Package #1: The $70 disaster
I present to you: The Complete Box Set of MacGyver.
Now, don’t get me wrong. MacGyver is an incredible show. I’ve been meaning to watch it for months. I had been browsing reviews, watching clips, reading about how the man could defuse a bomb with a paperclip and a stick of gum.
But here’s the problem: this box set cost $70.
That’s 70 out of my 100 dollar budget. Gone. In one purchase. On the first holiday of the year.
Bug identified: No per-item spending limit. The script saw “user is interested” and “item is available” and went full send. It did not consider that maybe, just maybe, I didn’t want to blow 70% of my annual surprise budget on Season 1-7 of a show from the 80s.
Lesson learned: Always set maximum order limits. Your past self cannot be trusted with a credit card and an algorithm.
Package #2: The semantic nightmare
The second package was… a box of erasers.
Specifically, Apsara Non-Dust Erasers. 20 of them. Worth 60 INR. Less than a dollar.
I stared at this box of erasers for a solid minute. I haven’t used an eraser in like two years. I work with computers. Everything has Ctrl+Z. Why would my browsing history suggest I desperately needed twenty erasers?
A quick search through my browser history revealed the bug:
I had been searching for a Scratch Eraser Kit. You know, the thing you use to buff out scratches on your car.
Bug identified: The script matched on the word “eraser” without understanding context. It saw “eraser” in my search history, found the cheapest “eraser” on Amazon, and called it a day.
To be fair, my script did exactly what I told it to do. It found the cheapest item matching my interests. The problem is that I never taught it what an “interest” actually means. Keyword matching is not comprehension. My script has the semantic understanding of a very enthusiastic golden retriever.
“You searched for eraser! I found eraser! ERASER! Are you proud of me?!”
The aftermath
So here I am. Valentine’s Day 2020. Single, as usual, but now the proud owner of:
- Seven seasons of MacGyver (139 episodes of a man solving problems with duct tape)
- Twenty pristine erasers (for all the pencil-related mistakes I definitely won’t make)
- A Raspberry Pi that has lost my trust
Total damage: $71 and whatever remained of my faith in my own programming abilities.
Moral of the story
A gift, no matter big or small, still counts as a gift. Even if it’s a gift from your past self who clearly didn’t think things through.
But like that XKCD stick figure, I am done playing with AI for now. The script has been… retired. (Read: I unplugged the Raspberry Pi and put it in a drawer.)
Happy Valentine’s Day everyone. My weekend’s set - watching MacGyver, eating pizza, and I guess, making the most out of my new erasers. It’s been a long time since I picked up a pencil, so maybe I’ll go draw or scribble something. I’ve got 20 erasers after all, and plenty of mistakes ahead of me.
At least the erasers will come in handy for those.
Update (March 2023): Looking back at this article 3 years later, a lot of strides have been made in the field of artificial intelligence. Everyone is jumping on the ChatGPT bandwagon now. The irony is not lost on me that these new AIs would probably understand the difference between a car scratch eraser and a pencil eraser.
Then again, they’d probably also try to sell me a MacGyver box set if I asked about duct tape hacks. Some things never change.



