Archive

1290 posts · Page 70 of 108. ← Blog

Pratik Dhanave · ·13 min read

Errors, Wrapping, and errors.Is / errors.As

Go treats errors as ordinary values, not exceptions — which means everything you know about passing, comparing, and inspecting values applies. This is a working guide to sentinel errors, wrapping with %w, and the two verbs that make error chains navigable: errors.Is and errors.As.

Go treats errors as ordinary values, not exceptions — which means everything you know about passing, comparing, and inspecting values applies. This is a working guide to sentinel errors, wrapping with %w,...

Pratik Dhanave · ·6 min read

Observability in ADK: Seeing Inside a Running Agent

How OpenTelemetry traces, structured logs, and token metrics turn an agent's event stream into something you can debug in production.

Seeing inside a running agent: OpenTelemetry tracing with spans for agent, model, and tool steps, structured logging, and exporting traces to debug latency and tool-call trajectories.

Pratik Dhanave · ·6 min read

State, Channels, and Reducers: How LangGraph Merges Updates

The one idea that makes everything else in LangGraph click: nodes don't pass messages, they update a shared state — and reducers decide how.

State is a typed dict of channels; each channel has an optional reducer. No reducer overwrites; a reducer (like add_messages or operator.add) combines. This is the single idea the rest of LangGraph is built on.

Pratik Dhanave · ·6 min read

Why Interpretability Matters — The Black Box Problem

Machine learning models increasingly make decisions that affect people's lives — who gets a loan, a diagnosis, a job interview — and many of them are black boxes that can't explain why. Interpretability is the field dedicated to opening those boxes: understanding why a model made a prediction, in terms a human can grasp. As AI gets more powerful and more deployed, being able to explain it stops being a nicety and becomes a requirement. This series builds interpretability from first principles.

The most accurate models are often the least interpretable — black boxes that can't explain why. Why 'accurate but unexplainable' isn't enough (trust, debugging models that are right for the wrong reasons, fairness, accountability, regulation), and the questions interpretability actually asks (global vs local, model-specific vs agnostic).

Pratik Dhanave · ·8 min read

Growth and Growth Loops

The funnel has a hidden flaw as a mental model: it's a leaky bucket you must keep refilling from the top, forever. Growth marketing's key insight is to look for loops instead — mechanisms where the output of using the product feeds back into acquiring more users, so growth compounds rather than requiring ever-more input. Combined with an experimental, data-driven mindset that engineers take to naturally, this is how modern products grow systematically rather than by pouring money into the top of a funnel.

The funnel has a hidden flaw: it's a leaky bucket you must keep refilling from the top forever. Growth marketing's key insight is to look for loops instead — mechanisms where using the product feeds back into acquiring more users, so growth compounds. Combined with an experimental mindset engineers take to naturally, it's how modern products grow.

Pratik Dhanave · ·11 min read

Generics: Type Parameters and Constraints

How type parameters and constraints actually work in Go 1.18+ — writing functions and data structures that are type-safe across many types, when the compiler can infer type arguments for you, and the harder question of when a plain interface is still the better tool.

How type parameters and constraints actually work in Go 1.18+ — writing functions and data structures that are type-safe across many types, when the compiler can infer type arguments for you, and the harder...