Welcome to my collection of notes and guides about software development, focusing on modern technologies and best practices.
Machine Learning
- Machine Learning Resources - Curated list of courses, books, and tools for learning machine learning
- Describing Data - scales of measurement, mean versus median, why variance divides by n − 1, what correlation does and does not see, and causation without correlation
- What a Model Learns - Y = f(X) + ε, prediction versus inference, the bias–variance decomposition measured, double descent, honest test error and k-nearest neighbours
- Linear Regression, Read Correctly - least squares on 32 real cars, what 95% confidence means, what a p-value is not, why R² misleads, collinearity, suppressors and selection on noise
- Classification - logistic regression, a coefficient that flips sign, perfect separation, LDA, QDA and naive Bayes compared, the confusion matrix, thresholds, ROC and AUC
- Cross-Validation and the Bootstrap - validation sets, k-fold and LOOCV measured, what CV really estimates, screening inside the loop, the bootstrap, bagging, and where the bootstrap fails
- Decision Trees and Their Ensembles - CART from scratch, cost-complexity pruning, Gini vs error rate, how unstable trees are, and bagging, random forests and boosting on a benchmark
- Principal Components and k-Means - PCA as most variance and closest line, USArrests and why scaling matters, Lloyd’s algorithm and local minima, choosing K, and where k-means fails
- Neural Networks and Backpropagation - neurons and activations, gradient descent and mini-batches, backpropagation derived and solved by hand, initialisation, vanishing gradients, and a playground
Kotlin Multiplatform
- What Kotlin Multiplatform Actually Shares - one compiler with several backends, source sets, KMP vs Compose Multiplatform, a reading-list app running in the page, and Now in Android KMP measured: what is shared, what is not, and what each target ships
- expect and actual, Done Right: Platform Code That Cannot Crash - what the compiler checks and what it does not, interfaces instead of a global Context, nonAndroidMain and nullable capabilities for features some platforms lack, and thirteen expect/actual mistakes compiled for every target
- One Database on Four Platforms: Room in Kotlin Multiplatform - one Room 3 database in commonMain with a different SQLite driver per target, a list that updates itself through a Flow, SQLite in a browser worker with OPFS and a tab lock, a migration bug found in the browser, and measured costs and speeds
- State That Survives: ViewModels and Navigation 3 in Kotlin Multiplatform - a second screen with Navigation 3, ViewModels and SavedStateHandle, the browser’s history as the source of truth, and five ways to hold an unsaved note tested against rotation, process death and reload on an Android emulator and in Chrome
- One UI, Many Windows: Adaptive Layouts, Resources and Fonts in Compose Multiplatform - list and detail side by side from 840 dp, measured on desktop, web and Android; strings, plurals and German in Compose resources; and where the web build gets its fonts: Google’s servers, on demand
- Building Four Targets: What a Kotlin Multiplatform Build Costs, and a CI That Checks Everything - each target from clean and after one-line changes, the configuration and build caches, a 7-second check of every target, and a CI pipeline with an emulator and an iOS job
- Offline Sync Without Losing Data: Two Devices, One Server, Kotlin on Both Ends - a Ktor server sharing its merge code with the app, uids, tombstones, per-field timestamps and a hybrid clock, seven conflict stories run against the real server, and an Android phone back from airplane mode
- The Pipeline, Run: Every Target Tested, iOS at Last - the chapter’s CI workflow, run in a public repository: three jobs green on the first push, the shared tests on the iOS simulator, SQLite timings on iOS, and what a run costs
Computer Vision
- Computer Vision Reference and Resources - the course, books and tools behind these notes
- From Neural Networks to CNNs: Why Images Need Convolutions - Why fully-connected networks fail on images, how convolutions, stride, padding and pooling work, and where CNNs fall short
- Going Deeper: From AlexNet to ResNet - Why deeper networks stopped training well, and how skip connections fixed it
- Debugging a Fine-Tuning Script: ResNet-50 on Three Images - a fine-tuning notebook read line by line, reproduced on two PyTorch versions, and fixed one bug at a time: loss, labels, zero_grad, learning rate, normalisation and BatchNorm
- Efficient CNNs: Doing More With Less - 1×1 convolutions, Inception, ResNeXt, squeeze-and-excitation, DenseNet, MobileNet and EfficientNet
- Semantic Segmentation: Labeling Every Pixel - FCN, encoder-decoders, U-Net, PSPNet, dilated convolutions, DeepLab, nnU-Net, and how to measure a segmentation
- Object Detection: Finding What and Where - IoU, anchors, NMS, R-CNN to Faster R-CNN, YOLO, SSD, focal loss, FCOS and mAP
- Attention from Scratch - why RNNs struggle, queries, keys and values, positional encoding, multi-head attention and the Transformer
- Vision Transformers: ViT and Swin - patches as words, a ViT running in the browser, why ViTs need data, DeiT, shifted windows and ConvNeXt
- Learning Without Labels: Self-Supervised Vision - pretext tasks, InfoNCE, SimCLR, MoCo, BYOL, SimSiam, DINO and MAE; collapse, few-label training and frozen features measured
- From a 3D Point to a Pixel: Image Formation - homogeneous coordinates, 2D transformations and homographies, the pinhole camera, K[R|t], two views and lens distortion
- Finding the Same Point Twice: SIFT, the Ratio Test and RANSAC - Harris, scale space, SIFT and ORB, Lowe’s ratio test and RANSAC, tested under known transformations
- From Two Views to 3D - epipolar geometry, the essential and fundamental matrices, triangulation, bundle adjustment and calibration
- When Attention Meets Geometry - SuperPoint, LightGlue, LoFTR, DUSt3R and depth from one image, benchmarked against SIFT and ORB
Associative Memory
- Associative Memory Reference and Resources - the blog, code, papers and books behind these notes
- Hopfield Networks: Memory as Energy - Hebbian storage, recall as rolling downhill in an energy landscape, the 0.138·d capacity, spurious states, and why correlated patterns break it
- Modern Hopfield Networks - steeper energies, the softmax update, global average vs metastable vs single-pattern retrieval, and exponential capacity measured
- Attention Is a Hopfield Update - the correspondence checked in algebra, code and trained models: one step, values instead of memories, and which regime BERT and ViT heads use
- Hopfield Pooling: Learned Queries over Sets - Hopfield, HopfieldPooling and HopfieldLayer; finding one 9 among 100 digits, why learned queries fail to start, and the fix
- Pooling a Set: Hopfield Pooling against Seven Others - average, max, log-sum-exp, generalized mean, attention, gated attention, Set Transformer and Hopfield pooling: bigger test bags and rarer evidence
Spiking Neural Networks
- Spiking Neural Networks Reference and Resources - the course, books, papers, datasets and tools behind these notes
- From ReLU to Spikes - the leaky integrate-and-fire neuron, why a spiking neuron is an RNN, where ReLU comes from, and a spiking CNN running in the browser
- Seeing in Events - how event cameras work, a pixel-level simulator, why a moving camera kills sparsity, converting video with v2e, and turning events into tensors
- Training Spiking Networks - why the spike has no useful gradient, surrogate gradients, backpropagation through time, and experiments on real DVS Gesture recordings
- Counting Energy - MACs, accumulates and neuron updates, how NeuroBench counts them, and what the DVS Gesture networks really cost
- From ANN to Akida - train a frame CNN, quantize it to 8 and 4 bits, convert it with CNN2SNN and run it in BrainChip’s Akida simulator: accuracy, events and limits
Insights
- Writing Code Is Cheap. Knowing It Is Wrong Is Not. - AI, validation and the junior developer dilemma, with evidence from building this blog