Skip to content

deep dives

Engineering, explained

Long-form writing on the systems I build and the way I build them — from first principles to a production cutover. The depth that doesn’t fit in a README, written so it’s useful whether you’re new to the idea or reviewing my work. Everything I publish lands here.

Series · 7 parts

Background Jobs From Scratch

From “why your BackgroundService isn’t enough” to a money-moving production cutover — building a job system that’s idempotent, atomically enqueued, dead-lettered, observable, and secure.

  1. 01Why Your `BackgroundService` Isn't Enough — and What a Real Job System Looks LikeA tour of the 2026 options for .NET background work — and why choosing the engine is the easy 20% while the reliability wrapper around it is the real job.12 min read
  2. 02The Worker Host — a Dedicated Service, Not a Thread in Your APIStanding up a standalone Hangfire worker, its own SQL schema, three queues, two servers, and a drain ladder that survives a deploy.14 min read
  3. 03The Job Contract — Idempotency, Kill Switches, and the 'Runs Twice' RuleWhy every background handler must survive running at least twice, and the exact shape — message, runner, binding — that makes that convergence structural.14 min read
  4. 04The Outbox — Why "Enqueue Then Commit" Is a Lie, and How to Fix ItMake the enqueue atomic with the state change by writing it into the same SQL transaction — table, claim SP, and dispatcher included.15 min read
  5. 05When Jobs Fail — Retry Classification, the Dead-Letter Queue, and ResilienceTransient vs permanent, one global retry curve, and a dead-letter table that never lets a death vanish.15 min read
  6. 06Security & Observability — Schema-Write Is RCE, and You Can't Fix What You Can't SeeLeast-privilege SQL, an enqueue allow-list, and the one outbox gauge that tells you the whole pipeline is stalled.15 min read
  7. 07Production Patterns — Async Image Uploads (202 + Poll) and Retiring a Legacy Scheduler Without Double-Paying AnyoneThe UX-visible payoff of the whole scaffold, and the legacy-scheduler cutover war story — a non-idempotent money job — that justifies every part's caution.16 min read

Series · 3 parts

Claude.md Mastery

Treating an agent's context file as a contract, not a manual — how to keep it lean, let it auto-load the right rules per module, and grow it without ever bloating again.

Series · 6 parts

ML Research, Explained

The machine-learning research I've done — quantum classifiers, knowledge distillation, multi-output CNNs, ensembles — rebuilt from first principles and grounded in the actual papers and the code that ran them.

  1. 01Machine Learning in the Realm of Quantum: Training a Classifier on a Quantum CircuitMy undergraduate thesis, rebuilt from first principles: what a variational quantum circuit actually is, how you encode classical pixels into qubits, how a hybrid quantum-classical model learns by gradient descent on a simulator, and what the numbers honestly showed — 0.92 and 0.72 against classical baselines of 0.96 and 0.88.19 min read
  2. 02Tagging Bangla Parts of Speech: Which Layer of BERT Knows Grammar?The real, messier story behind a Bangla POS tagger: probing a pretrained Bengali BERT layer by layer to find where part-of-speech actually lives, then running knowledge distillation backwards — a humble decision-tree teacher handing its less-biased judgment to a hungrier neural student — to fight a savage class imbalance.15 min read
  3. 03Finding Attacks You've Never Seen: Network Anomaly Detection with Knowledge DistillationSignature-based defenses only catch attacks they already know. This is how you frame intrusion detection as anomaly detection — learning 'normal' so well that novel attacks stand out — and use knowledge distillation to make it deployable.16 min read
  4. 04Counting Blood Cells: Why Data Augmentation Is a Modeling Decision, Not a CheckboxAn object detector for blood-cell microscopy — and the lesson that cost me the most to learn: an augmentation is a claim about which transformations leave the label unchanged. Get the invariances wrong and you teach the model something false.15 min read
  5. 05One Network, Three Answers: Age, Gender, and Race with a Multi-Output CNNInstead of training three separate models, one CNN shares a backbone and branches into three heads — a regression for age, classifications for gender and race. Why multi-task learning helps, how you balance three losses, and what the trade-offs were.15 min read
  6. 06Will This Startup Make It? Ensemble Classification on Startup DataPredicting startup success from funding, milestones, and firmographics — and why an ensemble of models beats any single one. What features actually carried signal, which ensemble method won, and how honest the accuracy really is on a noisy, imbalanced problem.16 min read