Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain "debounce" #8

Closed
sesam opened this issue Aug 28, 2018 · 2 comments
Closed

Explain "debounce" #8

sesam opened this issue Aug 28, 2018 · 2 comments

Comments

@sesam
Copy link

sesam commented Aug 28, 2018

I EE the term is about avoiding rapid flip-flopping between on and off state of a switch.
In Software Engineering it (says Wiktionary) has come to refer to throttling.

Is callbag-debounce providing similar functionality as callbag-lossless-throttle? i'd realy like to understand the purpose of this library, and can make an ELI5-like PR to add documentation if you first ELI'm an EE & Software Engineer :)

@atomrc
Copy link
Owner

atomrc commented Aug 29, 2018

Hi @sesam

Throttle and debounce are pretty different actually.
They both help dealing with intense event streams, but they behave quite differently.

debounce will only fire once there is a pause of more than nms (typical use case, firing a search request with the few characters the user has typed in when he pauses for 500ms for example).

throttle will fire every nms with the latest event produced.

You can find a quite illustrative live example here http://demo.nimius.net/debounce_throttle/

Now I'd like you to explain a bunch of stuff for me, what is EE and an ELI5-like PR?

@sesam
Copy link
Author

sesam commented Aug 29, 2018

Thanks :)
So debounce as in how it's understood by an EE (Electrical Engineer), rather than as in the "new" meaning supposedly used in SE. I was on mobile and had some fun with acronyms, also to see if you knew them. ELIx = Explain Like I'm x
PR #9 doesn't qualify for ELI5, but maybe good enough as ELI20+ or ELI(developer). Hope this helps!

@sesam sesam closed this as completed Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants