Karn Wong
karnwong.me
Karn Wong
@karnwong.me
A systems engineer by background. Platform engineer by trade. Technical leadership.

https://karnwong.me
Pinned
Hi Folks 👋

I'm a systems engineer by background, picked up data and ML along the way. Currently I'm an Engineering Manager.

I'm specialized in systems optimization.

I code in Terraform, Bash, Go, Rust, Python.

More about me at: karnwong.me

#introduction
Karn Wong
Homepage and blog by Karn Wong
karnwong.me
Recommend these for markdown linter/formatter
- github.com/rvben/rumdl - for markdown itself
- github.com/hougesen/mdsf - for markdown code blocks

As for pre-commit, github.com/j178/prek. It's backward compatible with pre-commit.

All are written in rust. Fast, that they are 😎.
November 21, 2025 at 7:36 AM
Was implementing SMART reading feature for my cli utils app, and found that my server's ssd is on its last legs. Replaced the ssd and use the old one for a temp mountpoint. 2 weeks later it suddently disconnected, and `sudo blkid` hangs. I think I dodged a bullet there.
October 23, 2025 at 2:58 AM
Recently gave a talk at PyCon Thailand about ONNX.

TLDR; stacking ONNX with rust can reduce latency by 20%.

See workshop repo in the slides.

karnwong.me/speaking/
October 21, 2025 at 8:44 AM
I have a secrets sharing service deployed for personal use. Once the secret is accessed, it's gone.

My friend just told me that he's been using the said service I deployed for "personal use" with his "team". Because he trusts my server.

I'll take that as a compliment 😆
September 26, 2025 at 8:17 AM
This secrets scanning tool is very fast, and it returns normal exit code when found secrets. Very impressed!

Normally I don't use mongodb (only for storing logs) but gotta say this is a gem.

github.com/mongodb/king...
September 12, 2025 at 8:18 AM
I use 3 machines on a daily basis. One for desk, kitchen and bedroom. Nix makes a lot of things easier, but auxiliary tools help.

This setup allows me to switch between machines at a moment's notice. Been rocking this setup for 3-4 years, so it's been tested in prod.

karnwong.me/posts/2025/0...
September 12, 2025 at 6:15 AM
Cranked out a benchmark for spatial join. Indexes do help a lot, and this means you can use frameworks without spatial support to do spatial stuff.

There's duckdb, pandas, polars, postgis, spark, datafusion.

karnwong.me/posts/2025/0...
September 1, 2025 at 7:38 AM
polars is faster than pandas. But when it comes to spatial operations everyone fallbacks to geopandas, especially when it comes to reading geoparquet files.

I find this very amusing, but personally I use spark sedona 😛
August 27, 2025 at 1:09 PM
Documented my setup for static lib linking in Go. It was really fun, and I gotta say the experience is very polished. At least it's easier than using swig with python to achieve the equivalent.

karnwong.me/posts/2025/0...
August 26, 2025 at 12:21 PM
Monitoring a lot of services mean if someone magically forward critical logs to SRE room I'd die happy. Trawling through logs take time, and you have to filter out a lot of irrelevant stuff. Having critical logs directly served means less cognitive load, yay devx.

karnwong.me/posts/2023/0...
August 25, 2025 at 5:44 AM
Good stuff, but doesn't seem to support ONNX converted from scikit-learn.

Seems like it only support neural networks.

github.com/google-ai-ed...
August 23, 2025 at 4:30 AM
Too much cognitive load? Try adopting DevX.

I know I sleep better when I can repro prod setup via containers locally 🐳

karnwong.me/posts/2023/0...
August 22, 2025 at 3:00 AM
I use at least 4 messaging apps because my friends have different preferences.

I use multiple machines and firing up all apps kinda got tedious, then I remember there's matrix bridges. Got it working and now I can text all my friends from one place. Yay open-source.
August 20, 2025 at 8:41 AM
Oldie but goodie. Because we should be kind to other people. And juggling multiple functions isn't fun because it requires a lot of cognitive load.

Also there's a difference between using a pipeline and having to create one yourself.

And because it's a team sport :)

karnwong.me/posts/2023/1...
August 19, 2025 at 2:03 AM
I gave jujutsu a few tries, still doesn't click. But then I heavily use git staging area. I guess it makes sense in a way.
August 15, 2025 at 5:21 AM
Been using Immich for a very long time, really love how the creator documents "bugs".

immich.app/cursed-knowl...
August 11, 2025 at 8:06 AM
Been trying to find activity recovery time on my garmin (or the app) to no avail.

But then you can retrieve the value via garmin connect sdk.

Yup, I added it to my custom watchface.
August 7, 2025 at 9:41 AM
I write a lot of apps for personal use, ranging from gui, tui, mobile app.

In all cases, adjusting the layout and padding takes the longest time. No surprises here 🤣
August 7, 2025 at 7:28 AM
When you start using cloud, it's all good. Then you see the invoice and the reality hits: cloud is expensive!
There's a few approaches you can use to reduce costs, but if optimization at the infra layer doesn't work, you have to do architecture modernization (long story)

karnwong.me/posts/2025/0...
August 6, 2025 at 2:54 AM
Found this gem while looking through garmin connect sdk.

At first I thought maybe it's for Thai numbers? But I don't think people are mad enough to do that.
August 5, 2025 at 7:51 AM
That moment when you are in deep focus mode but you need to cook.

The struggle is real.
August 5, 2025 at 5:05 AM
The lengths I go to not have to fish out my phone out to check for stuff, yup - I wrote my own garmin apps to display qrcode and my todo list.
August 1, 2025 at 1:20 PM
At one point in my life, I had to maintain all infrastructure for an organization, spanning all products they have. Terraform project keeps growing in size, I had to tame it, fast.

Been using it with a lot of orgs and it still works.

karnwong.me/posts/2025/0...
July 26, 2025 at 5:43 AM
When you can write python and other languages, you might find yourself accidentally prototype in python, then rewrite in another language.

I am guilty of this, been doing this a lot with my projects, oops.
July 24, 2025 at 8:02 AM
Was renaming env var and my IDE updated it in my sops file, and it bricked the file. Good to know that the key name is taken into the checksum as well.
July 23, 2025 at 2:23 PM