</>CodeWithKarani

Engineering notes from the trenches of building software.

Practical, no-hype writing for developers and businesses - on AI, ERPNext, Frappe, Linux and shipping software. I cut through the noise to what actually works, with a sharp eye on what it all means for Africa.

485
Articles
33
Topics
11
Years writing
Start here

Featured article

Artificial IntelligenceJuly 23, 2026 · 6 min read

Don't Get Pressured Into Buying AI Before Your Business Is Ready

The hype says buy AI now or be left behind. The truth is most businesses aren't ready yet, and rushing wastes money, frustrates teams and quietly breaks customer trust. Using the Ngazi ladder, here's how to find the rung you're really on and take the one step that pays off.

Read the guide
Fresh reads

Recent articles

Frappe/ERPNext15 min read

One tap at the till, five documents: the submit chain behind ERPNext retail

I recorded an hour and twenty minutes of UpeoRetail and refused to cut the boring parts, because the eight seconds at the counter is the easy bit. What one submit really writes: stock ledger, GL, a serial and batch bundle, a payment, and two integrations that live outside the transaction.

Read
Mobile Engineering14 min read

Your spare Android phone is a payment gateway: an offline-first SMS relay for M-Pesa

M-Pesa till confirmations arrive as an SMS, and Daraja is not open to every merchant. So we turned a spare Android phone into a self-hosted SMS-to-HTTP gateway: encrypted on-device, HMAC-signed on the wire, and built so that it never loses a message.

Read
AI Engineering6 min read

Metering, model routing and the regression suite that stops your agent rotting

Two questions decide whether an AI feature survives its first year: does each request make money, and will a prompt edit break something silently? An append-only credit ledger, two-tier routing, and a suite that asserts question-to-metric mappings are the answers.

Read
Mobile Engineering16 min read

Six ways Android will eat your background service, and what actually worked

A broadcast receiver is a lie, WAL journalling wedged openDatabase on OxygenOS, and one polite database close in a WorkManager teardown silently stopped the whole gateway. Six real failure modes from a production Android SMS gateway, and the fix for each.

Read
Security12 min read

Exactly-once over an unreliable pipe: HMAC, nonces, and a byte-exact contract

A per-request nonce and a per-content hash look like the same idea and are not. One says this request arrived twice, the other says this message arrived twice, and a payment pipeline needs both. The signing design behind a production SMS gateway.

Read
Mobile Engineering9 min read

Shipping an Android app that can never be on the Play Store

Play forbids READ_SMS for anything that is not the default SMS handler, so this app was never going to be listed. Then a silent fallback to the debug keystore and a versionCode stuck at 1 turned every update into an uninstall. Two traps, one incident.

Read
Browse by

Popular topics