Resi Dwi Thawasa

Posts

Technical writing, personal experiences, and portfolio showcase

Signing Apple promotional offers with JWS

We wanted to give existing subscribers a promotional price. Someone who subscribed before, who has lapsed or is about to lapse, and we want to win them back with a...

#rails #payment #apple #cryptography

Don't create a new row for every retry

We had a recurring-payment flow in our Rails app. Over a few months, it quietly created thousands of failed transaction rows for only a few users. The database kept growing,...

#rails #payment #idempotency #postgres

Moving from VS Code to Neovim

About two months ago, I switched my main editor from VS Code to Neovim. And I think this time it will stay.

#neovim #vim #tooling

Verifying rewarded-ad callbacks server-side

Rewarded ads are the ones where a user watches a video and gets something back. Finish the ad, get some energy, or coins, or an extra life. When it works,...

#go #security #ad #cryptography

Refactoring a Go service to 90% coverage

Last quarter I spent some weeks refactoring a Go service that runs behind our ads. It grew the way these services often do: one big package, functions that each did...

#go #testing #refactoring

Autoscaling workers on queue depth, not CPU

We had some background workers that read messages from a queue and processed them. The queue is Google Pub/Sub. The workers run on Kubernetes. An HPA scaled them based on...

#kubernetes #hpa #pubsub #scaling

The worker that kept eating its own memory

For a few weeks, we had a background worker that slowly ate the memory. The pod got killed, then restarted, then did it again. It runs a heavy detection job...

#go #kubernetes #debugging

Pairing and TDD changed how I work

The team I joined practices Extreme Programming, or XP. For me, in practice, that mostly meant two things: pair programming and test-driven development. I had not done either one in...

#tdd #pair-programming #xp

What I took from Design Patterns in Ruby

I read “Design Patterns in Ruby” recently. It goes through the classic Gang of Four patterns, but written the way you really write them in Ruby, not Java translated word...

#ruby #design-pattern #book