The Best JavaScript Debounce Function in the Universe

If you code in JavaScript, you should know all about debouncing functions.

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.

So what’s the best way to debounce/throttle in JavaScript?

(more…)

How to upgrade Ubuntu in place on WSL / WSL2

WSL Ubuntu do-release-upgrade made easy!If you’re using Windows Subsystem for Linux (WSL), you may be wondering how to upgrade your flavor of linux in place.

Whether you’re using WSL or WSL2, you could just go to the Windows Store and download the whole new shebang.

In my case, I was using Ubuntu 18.04 LTS, and it’s gonna die in the near future. So, I wanted to do a double-upgrade from 18.04 to 20.04 to 22.04. I’ve got a ton of stuff installed and configured, shell scripts set up, rsync, git, and so on – and I didn’t want to have to redo all of it.

Due to some strange error messages when you try do-release-upgrade, it doesn’t seem like you can do an in-place upgrade in WSL1/2 – but you can!

(more…)

How to get more speed from your USB drives

USB 3 Speed ExplainedJust how fast is USB 3?

There seems to be a bit of confusion out there about how fast USB 3.x devices can actually go – as well as how to actually obtain those blistering-fast transfer rates.

That’s not surprising since what should be a pretty simple topic is actually quite convoluted…

You may recall my earlier video, Slow copy speeds with USB 3? No problem! 🎞

I was recently informed by one viewer that 400 MB/s is completely impossible for USB 3, so I guess it’s time for a review!

(more…)

Windows 7 is going bye-bye – Upgrade to Windows 10!

RIP Windows 7If you’re still using Windows 7, I’ve got bad news for you: On January 14, 2020, extended support for Windows 7 will end.

That means Windows 7 will no longer get any updates or security patches. In other words, it’s officially a “dead” version of Windows.

And that means it’s time to upgrade to Windows 10!

Now, you might be thinking, “Oh no! I’ll have to pay for it!”

Not to worry! You can still upgrade for free.

(more…)

Fast USB 3 sticks that won’t break the bank

USB 3.1 Stick ComparisonAh, the USB stick. They’re supposed to be handy for transferring files between computers.

Unfortunately, most of the time they end being painfully slow. If you’re frequently waiting several minutes for that large file to copy to your USB stick, then you’re using the wrong one!

After a recent debacle with 2 different USB 3 sticks, I set out to find the best USB 3.1 sticks that won’t set you back an arm and a leg.

Not only did I discover a new Speed Champion, but I also found a VERY cheap and large model that’s still quite zippy…

(more…)