Archive

1046 posts · Page 42 of 88. ← Blog

Pratik Dhanave · ·7 min read

Consuming APIs and Handling Webhooks

Talking to a payment rail is the least reliable part of your system. Treat every outbound call as fallible and every inbound webhook as hostile.

Talking to a payment rail is the least reliable part of your system. Treat every outbound call as fallible and reconcile on ambiguity; treat every inbound webhook as hostile — verify, dedupe, ack fast, and go read the truth.

Pratik Dhanave · ·6 min read

The Structural Type System

TypeScript's type system has two properties that shape everything you do with it: it judges compatibility by structure rather than by name, and it infers types so you rarely have to spell them out. Add the small vocabulary of primitives, literal types, and the special types `any`, `unknown`, and `never`, and you have the foundation the rest of the language builds on.

TypeScript's type system has two properties that shape everything: it judges compatibility by structure rather than name, and it infers types so you rarely spell them out. Add the vocabulary of primitives, literal types, and the special types any, unknown, and never, and you have the foundation the rest of the language builds on.

Pratik Dhanave · ·7 min read

Self-Regulation: Responding, Not Reacting

There's a moment — after the provocation, before your response — that determines almost everything about how an interaction goes. The critical review comment lands, the production system is down, someone dismisses your idea in a meeting, and there's a gap, sometimes only a fraction of a second, before you act. Self-regulation is the skill of using that gap: not suppressing what you feel, but choosing your response instead of firing off the automatic one. It's what separates the reply you'd stand behind from the one you'd regret.

There's a moment — after the provocation, before your response — that determines almost everything about how an interaction goes. Self-regulation is the skill of using that gap: not suppressing what you feel, but choosing your response instead of firing off the automatic one.

Pratik Dhanave · ·12 min read

How LLMs Work, Enough to Build With Them

The working mental model an AI engineer needs — next-token prediction, attention, training, and sampling — without the transformer math, and with every fact tied back to a decision you make in code.

The working mental model an AI engineer needs — next-token prediction, attention at an intuition level, pretraining vs post-training, and sampling — with every fact tied back to a concrete decision you make in code.

Pratik Dhanave · ·6 min read

Idempotency and Full Resumability

The network will time out mid-transfer. The only safe assumption is that every request runs zero, one, or many times — so make "many" behave like "one."

The network times out ambiguously, so every request runs zero, one, or many times. Idempotency keys make many behave like one; full resumability lets a crashed money flow resume from its last committed step.

Pratik Dhanave · ·5 min read

Why Put Types on JavaScript

JavaScript runs everywhere and forgives everything — including your mistakes, right up until they reach production. TypeScript adds a static type layer on top of JavaScript that catches those mistakes at compile time, while compiling away to plain JavaScript that runs unchanged. Understanding what TypeScript actually is — a structural type checker that erases at build time — is the foundation for everything else.

JavaScript runs everywhere and forgives everything — including your mistakes, right up until production. TypeScript adds a static type layer that catches them at compile time, then compiles away to plain JavaScript. Understanding what TypeScript actually is — a structural type checker that erases at build time — is the foundation for everything else.

Pratik Dhanave · ·7 min read

Self-Awareness: The Foundation

You cannot manage an emotion you don't know you're having. The frustration that sharpens your tone in a code review, the anxiety that makes you defensive about your design, the resentment that leaks into a message — these steer your behavior whether or not you notice them, and mostly you don't. Self-awareness is the skill of noticing, and it's first for a reason: every other emotional-intelligence skill depends on it. You can't regulate, empathize, or lead if you can't first see what's happening inside you.

You cannot manage an emotion you don't know you're having. The frustration that sharpens your tone in a review, the anxiety that makes you defensive about your design — these steer your behavior whether or not you notice them. Self-awareness is the skill of noticing, and every other EQ skill depends on it.

Pratik Dhanave · ·12 min read

What AI Engineering Is

The opener to a from-scratch series on building applications on top of foundation models in Go — what AI engineering actually is, how it differs from traditional ML and from ordinary software, and why Go is a serious language for the systems around the model.

The opener to a from-scratch AI-engineering-in-Go series: what AI engineering actually is, how building on foundation models differs from traditional ML and from ordinary software, and why Go is a serious language for the systems around the model.

Pratik Dhanave · ·7 min read

Executing Money Flows: Invariants, Reservations, and Overdrafts

A transfer is a state machine with money on the line. Model the states explicitly, reserve funds before you commit, and decide up front what an overdraft even means.

A transfer is a state machine with money on the line. Model the states explicitly, reserve funds before you commit, enforce invariants at every transition, and decide up front what an overdraft even means.

Pratik Dhanave · ·7 min read

The Preprocessor, Undefined Behavior, and Safe C

Two things separate C programmers who ship reliable code from those who ship time bombs: understanding the preprocessor (the text-substitution pass that runs before compilation) and respecting undefined behavior (the operations C says have no defined meaning at all). This closing post covers both, plus the multi-file structure of real programs and the idioms that keep C safe — turning the whole series into a working discipline.

Two things separate C programmers who ship reliable code from those who ship time bombs: understanding the preprocessor (the text-substitution pass before compilation) and respecting undefined behavior (operations C says have no meaning at all). This closing post covers both, multi-file programs, and the idioms that keep C safe.