Archive

1290 posts · Page 57 of 108. ← Blog

Pratik Dhanave · ·6 min read

Training and Scaling GNNs — The Practical Realities

Graph neural networks look clean on paper and get messy in production, because training on graphs breaks assumptions that ordinary deep learning takes for granted. The data points aren't independent, the graph may not fit in memory, and the model fails in graph-specific ways. This post covers the practical realities of making GNNs actually work at scale — the problems you'll hit and the techniques that address them.

GNNs look clean on paper and get messy in production because the data points aren't independent. Why mini-batching and train/test splitting break on graphs (leakage through edges), how sampling scales GNNs to huge graphs, and the graph-specific failure modes (over-smoothing, over-squashing, homophily) that shape real systems.

Pratik Dhanave · ·6 min read

Generics

Generics are how you write code that works over many types without giving up type safety — a function or type parameterized by a type it fills in later. They're the feature people find most intimidating and the one that unlocks reusable, precisely-typed abstractions. Once you see a generic as "a type variable," the intimidation fades and the power remains.

Generics are how you write code that works over many types without giving up type safety — a function or type parameterized by a type it fills in later. They're the feature people find most intimidating and the one that unlocks reusable, precisely-typed abstractions. Once you see a generic as "a type variable," the intimidation fades.

Pratik Dhanave · ·7 min read

Empathy: Understanding Others

Empathy is where emotional intelligence turns outward — and where it becomes genuinely useful to everyone around you. It's the difference between an engineer who "wins" a design debate by being loudest and one who understands what each person actually needs and finds a solution everyone supports; between a code review that makes someone defensive and one that helps them. Empathy isn't sentiment. It's the practical skill of accurately understanding what other people think and feel, and it's the foundation of every effective interaction.

Empathy is where emotional intelligence turns outward — and where it becomes genuinely useful to everyone around you. It isn't sentiment; it's the practical, learnable skill of accurately understanding what other people think and feel, and it's the foundation of every effective interaction.

Pratik Dhanave · ·11 min read

Calling an LLM from Go

Make your first model call from scratch with net/http and encoding/json — the chat/messages API shape, a typed client with a Bearer key and context timeout, robust error handling, and server-sent-event streaming — no framework required.

Make your first model call from scratch with net/http and encoding/json — the chat/messages API shape, a typed client with a Bearer key and context timeout, robust error handling, and server-sent-event streaming.

Pratik Dhanave · ·8 min read

Reliable Delivery: The Outbox, CDC, and Reconciliation

Two systems will drift. The transactional outbox stops you losing events; reconciliation is how you find the truth when they disagree anyway.

You can't atomically update your database and publish a message. The transactional outbox (or CDC) stops you losing events; reconciliation is how you find and classify the breaks when two systems drift anyway.

Pratik Dhanave · ·6 min read

Graph Attention Networks — Learning Which Neighbors Matter

The graph convolutional network treats all of a node's neighbors as (near) equals. But that's often wrong — some neighbors are far more relevant than others, and which ones depends on the context. Graph attention networks fix this by letting the model learn how much to weigh each neighbor, bringing the attention mechanism that revolutionized language models to graphs. This post explains attention on graphs and why it's so often the right upgrade over plain averaging.

The GCN treats all neighbors as equal, but some matter far more and which ones is context-dependent. Graph attention networks learn data-dependent weights so a node listens more to important neighbors — the transformer's attention mechanism adapted to graphs — with interpretability as a bonus. When it helps and the honest trade-offs.

Pratik Dhanave · ·6 min read

Unions, Narrowing, and Type Guards

Union types are TypeScript's way of saying "this could be one of several things," and they're everywhere in real JavaScript — a value that's a string or a number, a result that's data or an error. The companion skill is narrowing: convincing the compiler, through ordinary runtime checks, which member of the union you actually have. Master unions, narrowing, and exhaustiveness and you can model the messy reality of JavaScript data precisely and safely.

Union types are TypeScript's way of saying "this could be one of several things," and they're everywhere in real JavaScript. The companion skill is narrowing: convincing the compiler, through ordinary runtime checks, which member you actually have. Master unions, narrowing, and exhaustiveness and you can model messy JavaScript data precisely and safely.

Pratik Dhanave · ·7 min read

Motivation and Resilience

Anyone can stay motivated when things are going well. The test — and the skill — is what happens when the project stalls, the code won't work, the feedback stings, or the effort drags on with no payoff in sight. Motivation and resilience are the emotional-intelligence skills of managing your own drive and bouncing back from setbacks, and they're what turn talent into sustained achievement. Without them, ability leaks away in the face of the frustration and failure that all real work involves.

Anyone can stay motivated when things are going well. The test — and the skill — is what happens when the project stalls, the code won't work, or the feedback stings. Motivation and resilience are the EQ skills of managing your own drive and bouncing back, turning talent into sustained achievement.

Pratik Dhanave · ·12 min read

Tokens and Tokenization

The unit a language model actually reads is neither a word nor a character — it is a token, and once you see the world the way the model does, half of its strange behavior stops being strange.

The unit a language model actually reads is neither a word nor a character but a token. How byte-pair encoding builds a vocabulary, why tokenization explains half of an LLM's strange behavior, and how to count tokens exactly in Go.

Pratik Dhanave · ·7 min read

Predicting Market Direction with ML: Walk-Forward and Leakage

How to build a quant model that predicts up-or-down moves without quietly fooling yourself into a backtest that never survives contact with real markets.

Building a quant direction model without fooling yourself: feature engineering from price/volume, walk-forward (not random) cross-validation, avoiding look-ahead and survivorship bias, and why realistic backtests beat im…

Pratik Dhanave · ·8 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.