Writing
Long-form notes on the internals behind everyday backend work: how the frameworks and tools I rely on behave underneath.
Machine Learning
Classic models built from first principles, with the maths derived and the code run on real data.
Logistic Regression from First Principles: Log-Odds, Likelihood and the Decision Threshold
Logistic regression is linear regression rebuilt for yes-or-no questions: a weighted sum of features pushed through a sigmoid, trained by maximum likelihood. This article derives it from an eight-point example, shows why the loss is log loss and why its gradient is so simple, trains it with gradient descent and Newton’s method you can steer, breaks it on separable data, and then uses it to diagnose breast tumours, where the interesting decisions are about thresholds and probabilities rather than weights.
Linear Regression from First Principles: Least Squares, Geometry and Gradient Descent
Fitting a straight line is the oldest trick in machine learning and still the one most worth understanding completely. This article builds linear regression from a five-point example to the normal equations, shows why least squares is a projection and a maximum-likelihood estimate at the same time, trains it with gradient descent you can steer, and then puts it to work on a real dataset to see where it holds up and where it breaks.
Distributed Systems
How large systems store, replicate and serve data, traced from the data model down to the storage layer.
How GitHub Stores Petabytes of Code: Under the Hood of Git
A deep dive into how GitHub stores and serves petabytes of source code using Git's content-addressable storage model, packfiles, delta compression, distributed architecture, and large-scale storage systems. Learn how commits, blobs, trees, and packfiles work together to efficiently manage billions of repositories and trillions of Git objects.
Spring
What Spring and Spring Boot do between your annotations and a running application: bean lifecycle, proxies and transactions.
What @Transactional Actually Does: Proxies, Thread-Bound Connections and the Rules of Rollback
One annotation, and Spring opens a database transaction, shares its connection with every repository you call, and decides whether to commit or roll back. This article traces a single @Transactional call through the proxy, TransactionInterceptor and the transaction manager, then uses that model to explain propagation, isolation, rollback rules and the pitfalls that follow from them.
What Really Happens Before Your Spring Boot Application Starts: The Complete Spring Bean Lifecycle
Follow a single Spring bean from a class file on disk to a proxied, initialized singleton and finally to destruction. Using real output from a running application and the actual call sequence inside AbstractApplicationContext and AbstractAutowireCapableBeanFactory, this article explains bean definitions, BeanFactoryPostProcessors, BeanPostProcessors, dependency injection, initialization callbacks, AOP proxies, the three-level singleton cache, circular dependencies, startup events, and graceful shutdown.
Java
The language and standard library underneath: collections, hashing and the contracts they rely on.
Why Mutable Objects Break HashSet: A Deep Dive into Java Hashing Internals
Change one field on an object after putting it in a HashSet and the set can no longer find it, remove it, or stop you adding it twice. This article traces the bug through the real HashMap source: how a bucket is chosen, why every node caches its hash, what the equals/hashCode contracts actually promise, and how to prevent or recover from it.