ArticlesProjectsWeeklyCredentialsAbout

Projects

53 projects
TMC #0010: Transistor: BJT Ebers-Moll Simulator
A pure-Python simulation of a 1947-era germanium BJT transistor: Ebers-Moll large-signal model, switch and amplifier analysis, and a physical comparison with the vacuum tube it replaced.
transistorbjtebers-mollsemiconductorsbell-labspythonsimulation
June 12, 2026
TMC #0009: ENIAC: Decimal Accumulator & Ballistic Trajectory Simulator
A faithful simulation of ENIAC's decade-counter arithmetic and the ballistic trajectory calculations the machine was actually built to compute.
eniacdecimal-arithmeticballisticsvacuum-tubespythonsimulation
June 6, 2026
TMC #0008: Memex Simulator: Associative Trails vs. Keyword Search
Python implementation of Vannevar Bush's Memex concept from 'As We May Think' (1945). Demonstrates associative trail navigation, document linking, and the contrast between index-based keyword search and curated associative browsing: the logical precursor to hypertext and the web.
memexvannevar-bushhypertextinformation-retrievalassociative-trailspython
June 1, 2026
TMC #0007: Von Neumann Architecture: Stored-Program Computer Simulator
Python simulator of the stored-program architecture described in von Neumann's "First Draft of a Report on the EDVAC" (1945). A 256-word memory machine with nine opcodes demonstrates the fetch-decode-execute cycle, conditional branching, and the bottleneck that still haunts modern CPUs.
von-neumannstored-programfetch-executearchitecturecomputer-historypythonsimulator
May 26, 2026
The Thinking Machine Chronicles #0056: Combinatorial Explosion and Heuristic Search
A Python demonstration of the combinatorial explosion argument from the 1973 Lighthill Report, using the 15-puzzle as the benchmark domain. Implements breadth-first search (exponential growth), A* with Manhattan distance heuristic (Hart, Nilsson, Raphael 1968), and iterative-deepening A* (Korf 1985). Produces a side-by-side comparison table of nodes expanded at increasing solution depths, making Lighthill's core mathematical argument visible and measurable.
lighthillai-wintercombinatorial-explosionastaridastarbfsheuristic-searchpython1973
May 24, 2026
The Thinking Machine Chronicles #0055: MYCIN Medical Expert System
A Python implementation of MYCIN's core inference engine: production rules with certainty factors in [-1, 1], backward chaining over a goal tree, and the Shortliffe-Buchanan certainty combination formula. Includes a simplified bacteraemia knowledge base derived from the 1979 MYCIN evaluation domain, demonstrating ranked organism diagnosis and antibiotic recommendations across three clinical case scenarios.
mycinexpert-systemscertainty-factorsbackward-chainingmedical-aipython1972
May 24, 2026
TMC #0006: Lorenz SZ-40/42 Cipher & Colossus Attack Simulator
Python implementation of the Lorenz SZ-40/42 cipher machine used by Hitler's high command, including the statistical delta attack that Colossus performed to find chi wheel settings. Demonstrates the "depths" XOR key-cancellation trick from the Athens/Vienna 1941 mistake.
lorenzcolossuscipherwwiicodebreakingxorstatistical-attackpython
May 21, 2026
TMC #0005: McCulloch-Pitts Neuron Simulator
Python implementation of the 1943 McCulloch-Pitts formal neuron model. Builds AND, OR, NOT, NAND, and XOR gates from binary threshold neurons, implements a temporal sequence detector (pattern 101), and contrasts with a Rosenblatt perceptron.
mcculloch-pittsneural-networksboolean-logicthreshold-neuronperceptron
May 18, 2026
TMC #0004: Enigma Machine and Bombe Attack Simulator
Full Python simulation of the Wehrmacht 3-rotor Enigma machine and Turing's Bombe attack. Demonstrates Enigma's fatal self-map flaw, crib dragging, and recovery of rotor start positions from known plaintext.
enigmabombeturingcryptographywwiiciphersimulator
May 15, 2026
TMC #0003: Zuse Z1 Mechanical Computer Simulator
Python simulation of Konrad Zuse's 1938 Z1: the world's first programmable binary floating-point computer. Implements Z1's 22-bit float format, gate-level ripple-carry adder, bistable memory cells, and program tape executor.
zusez1binaryfloating-pointmechanical-computingsimulator
May 11, 2026
TMC #0002: Boolean Circuit Simulator
A Python implementation of Shannon's 1937 algebraic model of switching circuits. Composable gate primitives, truth table generation, SOP/POS canonical forms, Shannon cofactor expansion, and a ripple-carry adder, all from first principles.
shannonboolean-logiccircuitspythonlogic-gatesdigital-hardware
May 7, 2026
SubQ Sparse Attention — Simulator & Benchmark
Featured
A Python implementation of dense vs. sparse attention patterns — sliding window, LSH-bucketed, and top-k learned routing — with a retrieval recall benchmark that shows why prior sparse attention approaches degraded at scale and what a learnable router buys you.
subqsparse-attentionssatransformersattention-mechanismpythonlong-contextretrieval
May 5, 2026
TMC #0001: Turing Machine Simulator
A faithful Python implementation of the formal Turing machine model from the 1936 paper. Includes parity checker, palindrome recogniser, unary adder, and a demonstration of the Universal Turing Machine concept via machine encoding.
turingcomputationtheorypythonsimulatorhalting-problem
May 2, 2026
Backpropagation from Scratch in NumPy
A two-layer neural network trained with hand-rolled backprop in NumPy — forward pass, loss, analytic gradients via the chain rule, and a parameter update loop — no autograd, no magic.
machine-learningneural-networksdeep-learning
April 25, 2026
Minimal Transformer in PyTorch
A self-contained transformer encoder built from scratch in PyTorch: multi-head scaled dot-product attention, positional encoding, and a feed-forward sublayer — under 150 lines with annotated shapes at every step.
machine-learningtransformersnlpdeep-learning
April 18, 2026
Gradient Descent from Scratch in Python
Vanilla SGD, momentum, RMSProp, and Adam implemented from scratch in NumPy — with a shared loss surface visualisation so you can watch each algorithm find the minimum differently.
machine-learningoptimizationdeep-learning
April 10, 2026
Fine-Tune BERT for Sentiment Classification
End-to-end fine-tuning of bert-base-uncased on SST-2 using the HuggingFace Trainer API. Covers tokenisation, TrainingArguments, evaluation with the GLUE metric, and a ready-to-use inference pipeline.
bertpythonfine-tuningnlp
January 13, 2020
BERT Attention Visualiser
Loads bert-base-uncased and extracts per-layer, per-head attention weights for any sentence. Includes a matplotlib heatmap showing how token pairs attend to each other across all 12 layers.
nlpberttransformerspython
January 6, 2020
Spring Dependency Injection Example
Spring XML bean wiring, constructor injection, and a JUnit test that needs no application server — showing exactly why Spring made Java testing practical.
springjavadependency-injection
June 22, 2003
Hibernate Mapping and Session Examples
A Hibernate 2.x mapping file, POJO entity class, and Session usage for loading, saving, and querying — the complete working example from the article.
hibernatejavaorm
July 22, 2001
1 / 3