News for hackers. Stuff that matters.
Re:Act on Press by Toutouxc on Thursday May 23, 2024 @04:43PM (#40459673)
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.
Re:Act on Press by tialaramex on Thursday May 23, 2024 @07:15PM (#40461034)
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.

Re:Act on Press by eru on Friday May 24, 2024 @01:40AM (#40463156)
I think phone cameras might be doing that these days, too?

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

Re:Act on Press by Toutouxc on Friday May 24, 2024 @08:06AM (#40465313)
Yeah, phone cameras and even some mirrorless cameras (in certain modes).
Re:Act on Press by teaspoon on Thursday May 23, 2024 @05:14PM (#40460000)
> 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

Re:Act on Press by hi-v-rocknroll on Thursday May 23, 2024 @08:10PM (#40461456)
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.
Re:Act on Press by eru on Friday May 24, 2024 @01:41AM (#40463160)
> 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?

Re:Act on Press by hi-v-rocknroll on Monday May 27, 2024 @12:37AM (#40487591)
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.

Re:Act on Press by anon456354 on Thursday May 23, 2024 @05:15PM (#40460004)
Negative time delay?

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

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

Re:Act on Press by eru on Friday May 24, 2024 @01:44AM (#40463175)
Thanks, that was a great read.
Re:Act on Press by Rygian on Thursday May 23, 2024 @05:46PM (#40460290)
They might have doped their silicon with https://en.m.wikipedia.org/wiki/Thiotimoline