Archive

1290 posts · Page 63 of 108. ← Blog

Pratik Dhanave · ·10 min read

Durable Execution: Checkpoint Every Step, Resume After a Crash

Lesson 2 of Harness Engineering in Go — a workflow that saves its progress after each step and picks up exactly where it died, proven by a test that kills a real subprocess mid-run.

Lesson 2: a workflow that checkpoints after every step and resumes from the last one after a crash, why at-least-once execution forces idempotent steps, and the atomic-rename store that survives a killed process.

Pratik Dhanave · ·7 min read

Confounding — The Central Villain of Causal Inference

If you remember one thing about why causal conclusions go wrong, make it confounding. A confounder is a lurking variable that influences both the treatment and the outcome, manufacturing a correlation that looks causal but isn't. It's the reason observational data is so treacherous, the reason randomized experiments are the gold standard, and the single concept that explains most spurious causal claims in business, science, and ML. This post makes confounding concrete and shows why it's so hard to defeat.

A confounder influences both the treatment and the outcome, manufacturing a correlation that looks causal but isn't — the reason observational data is treacherous and experiments are the gold standard. Why it produces confident wrong conclusions, why unmeasured confounders are the nightmare, and how the field fights it.

Pratik Dhanave · ·8 min read

How Startups Get Funded

Raising money looks, from the outside, like the goal — the headline, the milestone, the validation. It isn't. Funding is a tool with a specific purpose and a real price: you're selling pieces of your company, permanently, in exchange for capital to grow faster than your revenue alone would allow. Understanding what that trade actually is — when it's worth making, and what you're giving up — is the difference between funding that accelerates a business and funding that quietly takes it away from its founders.

Raising money looks like the goal — the headline, the validation. It isn't. Funding is a tool with a specific purpose and a real price: you're selling pieces of your company, permanently, for capital to grow faster than revenue alone would allow. Understanding that trade is what separates funding that accelerates from funding that takes the company away.

Pratik Dhanave · ·6 min read

Testing Agents Without a Model

The full pipeline should run in CI with zero API keys and zero network. A deterministic classifier is the test double that makes an agentic system testable.

Put the seam at the router: same interface, a deterministic classifier for tests. The whole orchestration, routing, gateway, human-in-the-loop, and checkpointing, runs in CI with zero API keys and zero network.

Pratik Dhanave · ·6 min read

Context Caching in ADK: Stop Paying for the Same Tokens Every Turn

How caching a large, stable prompt prefix cuts latency and cost — and the ADK config that decides when it pays off.

Context caching cuts latency and cost by caching large, stable context — system prompt, reference docs, tool definitions — so repeated calls don't re-send and re-process the same tokens.

Pratik Dhanave · ·8 min read

The Agent Harness: guardrails as middleware around the model

Lesson 1 of Harness Engineering in Go — why the input guardrail is a hard block, not a warning, and how a plain `net/http` handler wraps the model call so it tests without a running server.

Lesson 1: why the input guardrail is a hard block rather than flag-and-pass, why it counts runes instead of bytes, and how a plain net/http handler wraps the (stubbed) model call so it tests with httptest.

Pratik Dhanave · ·6 min read

Potential Outcomes — Defining a Causal Effect Precisely

To reason about causation rigorously, you first need to define what a "causal effect" even is — and the answer is more subtle than it looks. The potential-outcomes framework defines it through a counterfactual: the difference between what happened and what would have happened otherwise. That single idea, and the "fundamental problem" that you can never observe both, is the foundation on which all of causal inference is built.

To reason about causation you must define a causal effect: the counterfactual difference between what happened and what would have happened otherwise. The potential-outcomes framework, the fundamental problem (you can never observe both), and why everything reduces to making treated and untreated groups comparable.

Pratik Dhanave · ·8 min read

Financial Health and Making Decisions

Financial literacy pays off in two moments: when you look at a business and can quickly tell whether it's healthy, and when you face a decision and can reason about it in the numbers. Both come down to synthesis — pulling the statements, metrics, and economics together into a judgment. This closing post is about that synthesis: reading a company's financial health at a glance, using finance to make and understand decisions, and the mindset that turns financial knowledge into better judgment.

Financial literacy pays off in two moments: when you look at a business and can quickly tell whether it's healthy, and when you face a decision and can reason about it in the numbers. Both come down to synthesis — pulling the statements, metrics, and economics together into a judgment.

Pratik Dhanave · ·7 min read

Azure-Preferred, In-Memory Fallback

Same interface, two implementations: cloud-backed stores when config exists, in-memory when it doesn't. The whole service boots with zero external dependencies.

Same store interface, two implementations: cloud-backed when config exists, in-memory when it doesn't. Don't let a subscription be a hard dependency for make test, it's the ports-and-adapters move teams skip under pressure.