When an event listener such as a window ‘resize’ fires, sometimes it will fire 72,000 times per second. That means your callback function is also firing 72,000 times in a row, bogging down the browser.
This isn’t as much of a problem as it used to be, but debouncing is still needed and should still be used.
Everyone knows that coders are weird people.
Interrupt them, and you often encounter a rather strange and “interesting” reaction. Why is that?
Well, it’s all about what happens in your brain when you’re programming something. It’s probably one of the hardest things to focus on, at least for me.
There’s a reason why programmers tend to work late/early hours: fewer distractions!
Fortunately, there are a couple of tricks I have taught myself over the years that can make everyone much happier.
Even if you aren’t a coder, you can still benefit from these tips!