Sign up

Karn Wong

Not verified No WebSub updates No webmention support Not yet validated

Homepage and blog by Karn Wong

Generator
Zola
Public lists
I ♥ RSS
Fetched

Karn Wong
Text • Unknown

2025-08-27

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 😛


โลกนี้มี polars ที่ไวกว่า pandas

แต่บทต้องทำ spatial operations ทุกคนใน polars ecosystem พร้อมใจกันไปยืมมือ geopandas

โดยเฉพาะตอนอ่าน geoparquet สุดท้ายโดนไล่ไปคุยผ่าน geopandas parquet reader ตายที่ parsing bottleneck อยู่ดี

WKB/WKT/geometry column อีกล้านแปด ที่แต่ละ implementation คุยกันคนละอย่าง เพราะแต่ละยี่ห้อมอง geometry column คนละแบบ

แต่ถ้าเจ็บทีเดียวแต่จบ จะแนะนำ spark sedona เล่นใหญ่หน่อย แต่จบทุกงานจริงๆ

Karn Wong
Text • Unknown

Static lib linking in Go program

Background I have a Go program for various utilities. Some of the features talk to hardware: sensors and battery statistics. For funsies, I ported this program into Rust because I want to get a feel of the language outside the data/ml ecosystem. To my surprise, I found that...

Karn Wong
Text • Unknown

2025-08-25

Services และ tools ต่างๆ ที่ใช้ ให้ความสำคัญกับ privacy ไม่เท่ากัน อันนี้ก็แล้วแต่ว่ายอมรับกันได้ขนาดไหน ความเป็นจริงคือ email: ยังไงก็ต้องติดต่อกับชาวบ้าน ถ้าเป็น email provider ที่มี video call ผูกมาด้วย ไปสมัครติดไว้ก็ดี จะได้ไม่ติดปัญหาตอนต้องเข้าประชุม photos: immich ร...

Karn Wong
Text • Unknown

2025-08-24

Google ทำถึงอีกแล้ว เด็กเนิร์ดที่จริงใจ

เพราะฉะนั้น เลิกเถียงกันเถิด คนรัน datacenter ออกมาพูดแล้ว

ไมโครเวฟ 1 วินาที ยอมๆ เถอะ

https://cloud.google.com/blog/products/infrastructure/measuring-the-environmental-impact-of-ai-inference

Karn Wong
Text • Unknown

2025-08-18

Norway ที่ไม่ใช่ Norway

Yes ที่ไม่ใช่ Yes

อยากลุ้นระทึกตอนเขียน yaml เชิญได้ที่สถานี kubernetes

https://www.ohyaml.wtf/

Karn Wong
Text • Unknown

2025-08-16

ส่วนตัวใช้ todo.txt มาน่าจะเกิน 10 ปีละ ก็ยังไม่ย้ายออก flexible สุดในสามโลกล่ะ

reminder ใช้วิธีปักใน calendar เอา อะไรที่ต้องทำแบบมี timeline เอาลง calendar ให้หมด

อะไรที่อยากทำ แต่ตอนไหนก็ได้ ก็ใช้วิธีดู calendar เอาว่าว่างช่วงไหน แล้ว block เวลาเคลียร์ task เป็นอันๆ ไป

หรือบางทีพอมีเวลาว่าง ก็เช็ค todo เอาว่าพอมีอะไรทำเสร็จภายในช่วงนั้นมั้ย

เจ๋งสุดคือใช้ผ่าน command line ได้

ท่าโกงอีกอัน คือ เวลาเขียนโค้ดแล้วต้องงอก todo ก็งอกใน terminal แบบไวๆ เอา แล้วค่อยมาไล่เก็บ

แต่ถ้าท่านี้ไม่เวิก ก็ไม่ว่ากัน หาท่าที่เวิกกับตัวเองให้เจอก็พอ

https://www.al3rez.com/todo-txt-journey

Karn Wong
Text • Unknown

2025-08-15

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.

Karn Wong
Text • Unknown

2025-08-11

Been using Immich for a very long time, really love how the creator documents "bugs".

https://immich.app/cursed-knowledge/


ใครที่ทำ product ตัวเดียวกันนานๆ จะโชคดีได้เจอ bugs ประหลาดๆ (ถ้าได้ engineer ที่ทำงานที่เดียวกันมาเกิน 2 ปี แล้วมีส่วนในการทำ features และเก็บ bugs ถือว่าเจอของดี คว้าไว้แน่นๆ นะ คนที่อยู่นานพอเก็บกวาดซากตัวเองไม่ได้มีเยอะ)

มีคนทำ product ตัวนึงมาหลายปีละ เขาจดบันทึกไว้ ว่า เจอผีอะไรบ้าง เป็น case study ที่ดี ว่า ใดๆ ก็ตามที่ต้องมาไล่เก็บ bugs ควรจดบันทึกไว้ ว่า ไปเจออะไรมา ถึงต้องแก้กันท่านี้

https://immich.app/cursed-knowledge/

Karn Wong
Text • Unknown

2025-08-07-1

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 🤣


พอดีเขียนแอปใช้เองเยอะ มีหมดทั้ง gui, tui, mobile

ส่วนที่กินเวลานานสุด เหมือนกันทุกเคส คือ การจัดหน้า,ช่องไฟ, layout

เบอร์ที่อย่าคาดหวังกับ LLM เพราะยังไงก็ต้องเก็บรายละเอียดเอง

(จะบอกว่างานส่วนอื่นไม่เจอเคสแนวๆ นี้ก็ไม่น่าใช่ เพราะคนดาต้าก็สติแตกกับทศนิยมอยู่ ว่า แต่ละจุดที่ดาต้าไหลไป มีใครมือลั่นแปลงทศนิยมมั้ย)

(งาน ops ก็กรี๊ดกันตอนที่ naming convention ของแต่ละ resources ไม่ตรงกัน บางอันถ้าจะเปลี่ยนชื่อต้องทุบทิ้งแล้วขึ้นใหม่สถานเดียว)

Karn Wong
Text • Unknown

2025-08-07-2

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.

Karn Wong
Text • Unknown

2025-08-05-1

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.


ไถ garmin connect sdk แล้วเจอว่า มี config ชื่อ FONT_NUMBER_THAI_HOT ด้วย ตอนแรกงง ว่า ฟ้อนเลขไทยเหรอ แต่ใครจะบ้า localize เลขไทย!!!

garmin-thai-hot

Karn Wong
Text • Unknown

2025-08-05-2

That moment when you are in deep focus mode but you need to cook.

The struggle is real.

Karn Wong
Text • Unknown

AWS cost optimization tactics

Imagine working on a product and you finally released it to the public. Things are going great for you, then your budget got out of control and you have to tame the spending. Below are a few tactics you can utilize to curb the costs. Cronjobs -> ECS Tasks on Fargate Cron...

Karn Wong
Text • Unknown

2025-08-01

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.


สองสามวันนี้นั่งคลำๆ Garmin Connect SDK เขียนแอปใช้เอง เพราะความขี้เกียจขั้นสุดที่ไม่อยากเอามือถือออกจากกระเป๋าเวลาต้องการดูอะไรไวๆ

Print statement ก็ยังคงใช้ debug ได้ทุกอย่าง

เจ็บกระดองใจตรงที่โดนวางยา ตอนยิง imageRequest มันไม่ยอมส่ง headers ให้ เลยต้องไปอ้อมใช้ apiKey ผ่าน queryParams แทน

ลงทุนเขียน app เอาไว้ดู qr code แค่นั้นเลย (มีหลังบ้านแยก ไปส่องดูได้ใน github)

มีทำไว้อีกอัน คือ เอาไว้ดู todo list (คนรอบตัวที่ยังคบกันอยู่ทุกวันนี้คงทำใจแล้วล่ะ ว่ายังไงก็เลิก DIY ไม่ได้ 55555)

Karn Wong
Text • Unknown

2025-07-27

ใน bluesky มีคนถามว่า ใช้ llm ช่วยเขียน IaC (จะ terraform หรือ pulumi ก็แล้วแต่ศรัทธา) เวิกมั้ย

มันก็ช่วยทุ่นแรงได้ แต่ไล่เช็ค config ทุกจุดก็ดี ว่า ตรงตามที่ต้องการมั้ย

typo นิดเดียว อาจจะหมดตัวได้ตอนปัก machine size

ทั้งนี้ ถ้าใช้ ui หรือ web console สร้าง infra ไม่เป็น

IaC ไม่ใช่วิธีแก้ปัญหา จะงงกว่าเดิมด้วย เพราะมันไม่มี wizard ช่วยดัก control flow

Karn Wong
Text • Unknown

2025-07-24

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.


สิ่งที่จะเกิดขึ้น เมื่อเขียน python คล่องพอๆ กับภาษาอื่น คือ

จะมีการหลวมตัวเผา prototype ใน python แล้วค่อยไป rewrite ใหม่ในภาษาที่มีการทำ typing ดีๆ

ทำมากับหลายโปรเจคจนเห็น pattern ตัวเอง

ความเผลอมีอยู่จริง 🫣

Karn Wong
Text • Unknown

2025-07-23

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.

Karn Wong
Text • Unknown

Terraform project structure

Recently I gave a terraform talk, and people ask how to get started with terraform. The simple answer is to try to get your hands dirty with it, but at certain point you have to learn how to "manage" the ever-growing terraform project. Single-project structure In the beginn...

Karn Wong
Text • Unknown

The true cost of deploying on EC2

Naturally, when you are working on a project, be it python, go, rust, you would write code and make sure it works as expected. For deployments, packaging your project into a docker image and deploy it as a container would guarantee that it would work the same regardless of w...

Karn Wong
Text • Unknown

2025-07-17

Recently gave a talk about IaC and FinOps. People couldn't agree on who should own cloud cost optimization initiative. But if you ask me, it's a team sport :) Also, if finance isn't monitoring the numbers, high cloud costs would be the least of your worries. https://speakerd...

Karn Wong
Text • Unknown

2025-07-14

I'm in the "labels don't define your camp" in case it isn't obvious. But you are more than the sum of all parts.

https://www.freyaindia.co.uk/p/nobody-has-a-personality-anymore

Karn Wong
Text • Unknown

2025-07-12

Recently gave a talk about WASM. Mostly a tour on deployment infrastructure 😛

https://speakerdeck.com/kahnwong/bkk-dot-js-number-23-intro-to-wasm


สไลด์ของวันก่อนที่ไปแชร์เกี่ยวกับ WASM มา

มีคนถามเยอะ ว่า ตอนไหนควรใช้ WASM

เลยมีเพิ่มหน้าเล็กน้อย

จริงๆ คือพาทัวร์ ว่า ตอน production ใช้ท่าไหนได้บ้าง

https://speakerdeck.com/kahnwong/bkk-dot-js-number-23-intro-to-wasm

Karn Wong
Text • Unknown

Dataframe processing benchmarks (ภาษาไทย)

English ช่วงหลังๆ มานี้ duckdb กับ polars มาแรงขึ้นเรื่อยๆ พ่วงมากับการที่ parquet เป็นที่นิยมมากขึ้นในการใช้เก็บข้อมูล เลยว่าเป็นฤกษ์ดีในการมาดู ว่า data format กับ framework จะมีผลกับความไวในการปั่นข้อมูลขนาดไหน Processing 1 Million Rows สำหรับการ transform ข้อมูลแบบง...

Karn Wong
Text • Unknown

Dataframe processing benchmarks

ภาษาไทย Given the rise of duckdb and polars in recent years, in addition to parquet format being more widely adopted for data storage format, it might be a good time to see how source data format affects data processing speed - in addition to the framework choice. Process...

Karn Wong
Text • Unknown

Simplify SSH (and HTTP & Postgres) access management with Warpgate

Background If you have to work with virtual machines (VMs), you know the drill: disable password authentication and only allow private key authentication. If you want to sleep better at night, make the VMs only accessible through a private network to reduce the attack surfa...

Karn Wong
Text • Unknown

2025-06-26

Finally! Back then we had to manually assign lochash to all datasets we have to join, and it's a lot of stuff to keep track!

H3 makes things better but still it's not as smooth as I'd like it to be. Data mapping is messy.

https://overturemaps.org/announcements/2025/overture-maps-launches-gers-a-global-standard-for-interoperable-geospatial-ids-to-drive-data-interoperability/


ชาว GIS จะสบายแล้ว

เมื่อก่อนจะเอาแต่ละอย่างมาผูกกัน ต้องไล่เช็ค zoom level (สมัยก่อนมี H3) แล้วต้องตี grid กะให้ขนาดพอดี แล้วงอก mapping column มาผูกกันข้าม dataset

join แล้ว join อีก join จนท้อ กว่าข้อมูลจะพร้อมให้เอาไปแงะ (เหนื่อยอีกทีตอนเช็คว่า ผูกตรงกันมั้ย กับ ทุก dataset)

https://overturemaps.org/announcements/2025/overture-maps-launches-gers-a-global-standard-for-interoperable-geospatial-ids-to-drive-data-interoperability/

Karn Wong
Text • Unknown

2025-06-25

I'm eval-ing a tool where you can upload artifacts to it. The docs say you can use toolA, toolB, toolC to upload, but it doesn't mention anywhere that you can also use toolX for this (and toolX is more popular and widely used). Very turf war vibe.

Karn Wong
Text • Unknown

2025-06-24

Recalled this prod story. Had to restart a container on a vm to update its config (can also be changed via ui). Previous guy set it up, and he left the org by then, luckily we can ssh into the vm. We restarted container, only to find out that the docker run command didn't mo...

Karn Wong
Text • Unknown

Using Nix for CI, but with a twist

CI (continuous integration) is kind of tricky in a sense that each CI vendor has its own implementations, often glued together via yaml configurations. If you have a CI to build a binary, unless you use bash to 1) install dependencies and b) build the artifacts, most likely ...

Karn Wong
Text • Unknown

Hello Garage, goodbye MinIO

Given the trend where open-source software license changes to be less permissive, or move features behind a paywall, existing users might not be quite as happy about this predicament. Case in point: MinIO Removes Web UI Features from Community Version, Pushes Users to Paid P...