Archive

1290 posts · Page 16 of 108. ← Blog

Pratik Dhanave · ·7 min read

Scheduling and Resources

Kubernetes has to answer a question every time a pod is created: which machine should run it? The scheduler answers it, and the quality of that answer depends entirely on information you provide — resource requests and limits. Get those right and the cluster packs efficiently and stays stable; get them wrong and you get waste, evictions, and mysterious outages.

Kubernetes answers a question every time a pod is created: which machine runs it? The scheduler answers it, and the quality depends on resource requests and limits you provide. Get those wrong and you get waste, evictions, and mysterious outages.

Pratik Dhanave · ·6 min read

Observability, SRE, and Reliability on the Platform

A platform that ships fast but falls over isn't a good platform. Reliability is a first-class platform capability — and the smartest move platform engineering makes is to build observability and SRE practices into the platform, so every service gets monitoring, SLOs, and reliability by default instead of each team reinventing them. Reliability becomes a paved road too.

A platform that ships fast but falls over isn't a good platform. Reliability is a first-class platform capability — the smartest move is to build observability and SRE practices into the platform, so every service gets monitoring, SLOs, and reliability by default.

Pratik Dhanave · ·6 min read

Smart Pointers: Box, Rc, and RefCell

Module 1's ownership rules — one owner, borrow-checked references — cover most code. But some data structures genuinely need more: a value on the heap, shared ownership, or mutation through a shared reference. Smart pointers are Rust's escape hatches that provide these while keeping the safety, and knowing the big three is knowing how to model the shapes ownership alone can't.

Ownership's rules cover most code. But some data structures genuinely need more: a value on the heap, shared ownership, or mutation through a shared reference. Smart pointers are Rust's escape hatches that provide these while keeping the safety.

Pratik Dhanave · ·5 min read

Evaluating Models — Accuracy Is the Metric That Lies

The most dangerous number in machine learning is accuracy, because it's the one everyone reaches for and the one that most often misleads. A fraud model that's 99.9% accurate by never catching any fraud is useless and common. Choosing the right evaluation metric — and understanding what each one hides — is the difference between a model that looks good and a model that works. This post is about measuring models honestly.

The most dangerous number in ML is accuracy — a 99.9%-accurate fraud model that catches nothing is common. The confusion matrix, precision vs recall (a business decision), F1/ROC, regression metrics, segment-level evaluation (how bias is caught), and why every offline metric is a proxy (Goodhart's law).

Pratik Dhanave · ·6 min read

The Index: Git's Staging Area

Every Git user meets the staging area on day one — `git add` puts things there, `git commit` takes them out — but almost nobody knows what it actually is. The index is a real file, a binary snapshot-in-progress that sits between your working directory and the object store. Understanding it turns `add`, `reset`, and the difference between "staged" and "modified" from memorized rules into a picture you can see.

Everyone meets the staging area on day one, but almost nobody knows what it is: a real binary file holding a snapshot-in-progress between your working directory and the object store. Understanding the index turns add, reset, and the staged-vs-modified distinction into a picture you can see.

Pratik Dhanave · ·7 min read

Pricing and Packaging

Pricing is the single highest-leverage number in a business — it directly sets revenue per customer, funds everything else, and signals value more loudly than any marketing — and it's the decision teams agonize over least and get wrong most. Engineers in particular tend to price by intuition or by cost-plus, when the real question isn't "what did it cost us to build?" but "what is it worth to the customer?" Getting pricing and packaging right is often the difference between a viable business and a struggling one.

Pricing is the single highest-leverage number in a business — it directly sets revenue per customer and signals value more loudly than any marketing — and it's the decision teams agonize over least and get wrong most. The real question isn't 'what did it cost to build?' but 'what is it worth to the customer?'

Pratik Dhanave · ·7 min read

Virtual Memory

Every process believes it has the whole machine's memory to itself, starting at address zero, contiguous and private — and none of that is literally true. Virtual memory is the elaborate illusion the OS and hardware maintain to make it true enough, and it's simultaneously what gives processes isolation, what lets you run programs bigger than RAM, and the reason a stray pointer segfaults instead of corrupting another program.

Every process believes it has the whole machine's memory to itself — and none of that is literally true. Virtual memory is the elaborate illusion the OS and hardware maintain, giving isolation, letting you run programs bigger than RAM, and making a stray pointer segfault instead of corrupting others.

Pratik Dhanave · ·7 min read

Configuration and State

Pods are disposable — destroyed and recreated constantly — which raises two problems: how do you give a pod its configuration without baking it into the image, and how does any data survive a pod's death? ConfigMaps and Secrets answer the first; volumes and StatefulSets answer the second. This is how stateless-by-default Kubernetes handles config and the state it can't avoid.

Pods are disposable, which raises two problems: how to give a pod its config without baking it into the image, and how any data survives a pod's death. ConfigMaps and Secrets answer the first; volumes and StatefulSets answer the second.

Pratik Dhanave · ·7 min read

Developer Experience and Golden Paths

A golden path is the well-lit, paved road through your platform — the supported, opinionated way to build and ship a service, so a developer can go from idea to production without making a hundred infrastructure decisions. Developer experience is the measure of how good that road feels. Together they're what makes a platform actually reduce cognitive load rather than just relocate it.

A golden path is the well-lit, paved road through your platform — the supported, opinionated way to build and ship a service, so a developer goes from idea to production without a hundred infrastructure decisions. Developer experience is how good that road feels.

Pratik Dhanave · ·7 min read

Error Handling: Result, Option, and No Exceptions

Rust has no exceptions. Errors and absent values are ordinary data — enum values you must handle — so the compiler forces you to deal with the possibility of failure instead of letting it propagate invisibly. It sounds tedious and turns out to be one of Rust's quiet strengths: you cannot forget to handle an error.

Rust has no exceptions. Errors and absent values are ordinary data — enum values you must handle — so the compiler forces you to deal with failure instead of letting it propagate invisibly. It turns out to be one of Rust's quiet strengths.

Pratik Dhanave · ·6 min read

Iterators

Iterators are how Rust does loops without writing loops — a chain of composable adapters (map, filter, collect) that reads like a description of what you want, not how to get it. And the astonishing part is that this high-level, functional style compiles to code as fast as a hand-written loop. Zero-cost abstraction, at its most delightful.

Iterators are how Rust does loops without writing loops — a chain of composable adapters (map, filter, collect) that reads like a description of what you want. And the astonishing part is that this high-level style compiles to code as fast as a hand-written loop.

Pratik Dhanave · ·5 min read

smolagents in Practice

smolagents is the right choice when you value a small library you can fully understand, the code-agent approach fits your task, and you can execute code safely. It's the wrong choice when you need a big ecosystem, can't sandbox, or your tasks are simple isolated calls. This closing post gives the honest verdict and places smolagents in the landscape.

smolagents is the right choice when you value a small library you can fully understand, the code-agent approach fits your task, and you can execute code safely — and the wrong choice when you need a big ecosystem, can't sandbox, or your tasks are simple isolated calls.