Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I had an e-scooter where a double click on the mode-select button would turn on the light and respond with a little beep. A single click would just switch the mode with no beep. To this day believe that the beep always came before the second click. I tried to trick it by clicking it once and only thinking about the second click — and the beep never came. But once I committed to the second click, I swear it would beep a fraction of a second earlier than that happened. Whatever it was that the button was connected to, it was insanely fast, just immediate. My brain had been so hardwired to expect every human-machine interface to have a delay, that the button responding immediately to the second click felt unnatural, broken, magical, and honestly kind of creepy.


Although this particular trick isn't possible, it is desirable and sometimes you can mimic such features which seem impossible.

I remember at around the turn of the century a friend showed me a neat trick many Sony MD recorders could do, which I think has since been incorporated into many (but IMO never enough) digital recorders: Time machine.

The compression needed for an MD recorder means a PCM buffer is needed, if we run the buffer all the time (after all it's just electronics) some engineer realised that this means you could choose to record audio that happened (and thus was in the buffer) before you actually decided to record it.

When one of the band members drops an instrument & it makes the coolest noise you've ever heard, you have long enough to think "Fuck that sounded so cool" and reach across and hit record and still capture the sound.


I think phone cameras might be doing that these days, too?

Not constantly, but as long as the camera app is open?


Yeah, phone cameras and even some mirrorless cameras (in certain modes).


> But once I committed to the second click, I swear it would beep a fraction of a second earlier than that happened.

There’s a (very) short story about a device exactly like this: https://www.nature.com/articles/436150a


Negative time delay?

"What's expected of us" by Ted Chiang:

https://www.nature.com/articles/436150a


Thanks, that was a great read.


It was probably positive edge-level triggered (and debounced) without considering the second release event. It's a common failure of digital interfacing state machine design.


> To this day believe that the beep always came before the second click. I tried to trick it by clicking it once and only thinking about the second click — and the beep never came.

Does your explanation account for this behaviour?


Yep. The shortcut is either to look for down-down or down-release-down, rather than down-release-down-release, but then the UX becomes inconsistent.

Debouncing refers to removing the dozens/hundreds of random momentary conduction events a real physical switch makes just prior to making contact on a human time-scale that are readily visible on an oscilloscope. Without debouncing, momentary switches would be unusable.


They might have doped their silicon with https://en.m.wikipedia.org/wiki/Thiotimoline




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: