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 already subscribed before, has lapsed or is about to, and we want to win them back with a discount....

#rails #payments #apple #cryptography

Don't create a new row for every retry

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

#rails #payments #idempotency #postgres

Moving from VS Code to Neovim

I switched my main editor from VS Code to Neovim about two months ago, and I think it is going to stick.

#neovim #vim #tooling

Verifying rewarded-ad callbacks server-side

Rewarded ads are the ones where a user watches a video and gets something in return. Finish the ad, get some energy, or coins, or an extra life. The flow...

#go #security #ads #cryptography

Refactoring a Go service to 90% coverage

I spent a chunk of last quarter refactoring a Go service that backs our ads. It had grown the way these services do: one big package, functions that did three...

#go #testing #refactoring

Autoscaling workers on queue depth, not CPU

We had a set of background workers that read messages off a queue and processed them. The queue is Google Pub/Sub. The workers run on Kubernetes, and they were autoscaled...

#kubernetes #hpa #pubsub #scaling

The worker that kept eating its own memory

For a few weeks we had a background worker that slowly ate memory until the pod got killed, restarted, and did it all over again. It ran a heavy detection...

#go #kubernetes #debugging

Pairing and TDD changed how I work

The team I joined practices Extreme Programming, or XP. In practice, for me, that has mostly meant two things: pair programming and test-driven development. I had done neither in any...

#tdd #pair-programming #xp

What I took from Design Patterns in Ruby

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

#ruby #design-patterns #books