Karn Wong
karnwong.me
Karn Wong
@karnwong.me
57 followers 63 following 110 posts
A systems engineer by background. Platform engineer by trade. Technical leadership. https://karnwong.me
Posts Media Videos Starter Packs
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
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.
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/
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 😆
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...
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...
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...
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 😛
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...
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...
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...
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...
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.
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...
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.
Been using Immich for a very long time, really love how the creator documents "bugs".

immich.app/cursed-knowl...
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.
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 🤣
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...
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.
That moment when you are in deep focus mode but you need to cook.

The struggle is real.
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.
You might want to verify that all the values and configs are correct, otherwise you might use outdated image tag (rolling release instead of LTS), wrong machine size (single typo can bankrupt you)

I would argue that if you can't do infra by hand via the web console, generated IaC isn't the solution
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...
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.
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.