Back in 2002, I was getting a package with a brand new Pocket PC (smartphone without the phone, running Windows). And I really wanted to know when it was delivered, but the UPS guy would regularly leave packages on the porch without ringing the bell or anything.
This was before you could get delivery alerts or anything like that. But I had a spare laptop with an integrated webcam (wow!), and I'd figured out how to make it run actions on motion detection.
My plan was to point the laptop at the door, and eject the CD drive when it detected motion. The tray of the drive would push a water bottle off the table. That would land on a seesaw, which would launch a deck of cards in a hard plastic case at the door and make a very loud noise.
It's unclear why I couldn't just play a really sound on the speakers instead. Anyway, I tested the program by standing in front of the laptop and waving my hand.
It worked perfectly! The CD tray ejected, and I watched as the water bottle slowly rolled off the table. It dropped onto the seesaw...... and instantly launched a hard plastic deck at my face and got me right between the eyes.
Never again have I been in so much pain and also so excited about my code working perfectly at the exact same time.