A beginner guide to CPU air cooling

I was researching about CPU air coolers for the best CPU air cooler and I learnt a lot of stuff. Thought this might be useful to some of you. Most of the stuff below are copy and pasted from various sources. This serves as a basic guide for absolute beginners like me when it comes to CPU air cooling. TL;DR: Noctua NH-D15 is the best air CPU cooler out there.
Read more →

Advanced filtering and sorting with redis (part 2)

With the recent introduction of Redis modules (since Redis v4), redis is now a lot more flexible than the old redis. Previously in part 1, if you want to mimic the sorting and filtering behavior, you need to use set/sorted set and do the intersection/union by yourself. Not anymore. Meet RediSQL # RediSQL is an in-memory SQL engine, built on top of Redis as Redis module. It’s pretty much SQL under the hood now.
Read more →

Pi-hole

I’ve heard a lot of praise about Pi-hole project but hadn’t gotten around actually trying it yet until recently. Pi-hole is a network-wide ad-blocking solution via local DNS. You set it up as a local DNS server and it will block all the ads that match the rule from DNS level. This way, you don’t have to setup adblock on each and every devices you have, especially tablets and mobiles. See example of VnExpress without adblock below.
Read more →

Microsoft Sculpt Ergonomic Desktop review

While i’m a hardcore mechanical keyboard fan, this is my very fisrt split (partially), ergonomic keyboard. The keyboard comes in tenkeyless size and a separated numpad. It’s a bit bigger for my taste but I can live with that. I’m more accustomed to a smaller board. 60%-65% is usually the sweet spot for me. The sculpt keyboard uses wireless but probably not Bluetooth which makes me wonder if I can find the replacement USB receiver dongle if I ever lost it.
Read more →

Optimal team size

Recently, I saw this tweet on Twitter. This is regarding the challenge of adding more engineers to a project in relation to the number of communication lines. This is easy to notice adding 1 more engineer to the team will increase no. of communication lines quite a bit because the function to calculate no. of communications lines in regard to no. of engineers is O(n*n), no wonder why it’s steep. More on that later.
Read more →

From macOS to Windows 10

I’m an Apple fan no doubt but recently, I’ve been using Windows 10 exclusively at work and to be honest, I’ve grown to quite fond of Windows 10. For the first time since 2008, I’m seriously thinking about buying a Windows laptop. With the recent introduction of Ryzen 3000 series, I was so tempted to build a PC again for the first time since 2006 (my last build was 13 years ago!
Read more →

Tips on reducing WASM file size with Emscripten

Optimize for size over performance # If size is more important than performance, you can use -Os flag. I tried with camaro and the file size reduce from 176KB down to 130KB. It’s worth a try. Disable assertion, debug # Try adding these flags: -s ASSERTIONS=0 and -DNDEBUG to emcc. Using emmaloc # Try using emmalloc which is a smaller malloc version available in emcc by adding -s 'MALLOC="emmalloc"' flag
Read more →

Choosing a wireless router in 2019

I found this guide to be extremely helpful. It was written in 2018 but the basic concepts are still true. Do read it if you want to learn what factors to consider when buying a wireless router in 2019. Tldr; I ended up buying Netgear Orbi RBK40. Or money is not a constraint, then Netgear Orbi RBK50. Here’re why: 802.11AC is a must. AX is not available yet. 3 and 4 streams are still expensive for home usage.
Read more →

Some lessons learnt after converting a native module to WebAssembly

I released my first WebAssembly module here on GitHub. Here are some lessons I learnt during the process. Please don’t take it for granted. These things might be true, or not. I’m not sure. I just worked on it for the last few days. Cache WebAssembly instance to save some time on initialization # const Module = require('yourmodule') const mod = Module() const resolveCache = new Map() mod.onRuntimeInitialized = function() { resolveCache.
Read more →

How to delete Redis keys using pattern

So Googling this question show a common approach using KEYS command and then pipe them to DEL command, which looks something like this in Lua script local keys = redis.call('keys', ARGV[1]) for i=1,#keys,5000 do redis.call('del', unpack(keys, i, math.min(i+4999, #keys))) end return keys Doing things like this would be fine for development where the keyspace is small and frequent of use is low. However, if you were to do this at a larger keyspace and a lot more frequent, the KEYS command will block Redis instance and making other commands to fail.
Read more →