Blog
Things I learned
the long way.
Notes on building software that keeps working, from someone who has been at it since 1999: AI and automation, the business systems they plug into, and the small decisions that decide whether software lasts. Newest first, all the way back to 2024.
I Rebuilt My Student AI From 2000. Here Is What It Taught Me
In 2000 I wrote eight small machine learning programs as a commerce student in Mumbai. In 2026 I rebuilt them from that coursework so they run in today's browsers. On what aged, what did not, and why the maths outlives the code around it.
Latest
New on the blog
Money in Code: Rounding, Paise and Floating Point
Why 0.1 + 0.2 is not 0.3 in code, how to store money as whole paise or decimals, why tax per line and per invoice differ by a paisa, and how to split amounts so the parts always add back.
Lessons From Running This Site on Shared Hosting
PHP, MySQL and one .htaccess file. How this site handles cache-busting, errors, secrets, analytics that cannot take it down, cron over HTTP, its sitemap, and checking that .htaccess is applied.
What Actually Stops the Bots on My Contact Form
A script read the security token, waited and posted, and every check let it through. The layers behind the form now: a bot check verified on the server, content rules, two throttles and a fake success.
Reading a Number Plate the Classical Way
Greyscale, threshold, segmentation, template matching: the four stages of the Y2K Lab plate reader, how each one breaks, and what modern OCR does instead.
Naive Bayes in Plain Words: A Spam Filter You Can Work Out by Hand
Six made-up emails, a word tally and some arithmetic: how a Bayesian spam filter decides, why it needs smoothing and logarithms, and where the method stands today.
A Neural Network You Can Watch Learn
From one neuron to a small digit-reading network: the forward pass, the error and backpropagation in plain language, with one complete training step in JavaScript.
All posts
Everything, by year
2026 8 posts
- 4 Aug How a Markov Chain Beats You at Rock, Paper, Scissors The Mind Reader on the home page wins by counting what you tend to play next. What it counts, the code that does it, why people are easier to predict than they think, and how to beat it.
- 5 Jun Saving a Website for Offline Use, Politely Archives, audits and migrations all need an offline copy of a site. What a full copy really involves, from stylesheets to rewritten links, and the manners that go with taking one.
- 19 May Accessibility Basics Every Small Business Site Should Get Right Seven accessibility basics, from real headings to visible focus, each with a check you can run in about five minutes in an ordinary browser.
- 8 Apr Page Speed on a Budget Where the time goes on a typical small site (images, scripts, caching, fonts), what to fix first, and how to measure before and after with free browser tools.
- 19 Mar Reading Someone Else's Code Base in a Day An hour-by-hour plan for the first day with an inherited system: run it, read its history, find every door, trace one real request, read the data model, list what scares you, write it down.
- 28 Feb Start With the Right Folder Structure Before anyone reads your code, they read your folders. Separate what changes often from what does not, keep secrets and build output out of the repository, and give the project one obvious entry point.
- 12 Feb Zero Uploads: Building Tools That Never See Your Files A privacy policy is a promise. Code that never uploads your file is a guarantee. What building ZeroDataUpload taught me about tools that run entirely in the browser and keep working with the network switched off.
- 14 Jan Do Not Rebuild It Yet Why a full rewrite is so often the wrong first move, what to do instead (read, measure, fix the worst part, replace pieces behind a stable interface), and when a rebuild really is right.
2025 16 posts
- 3 Dec Logging That Helps at Two in the Morning Log lines rewritten from useless to useful, and the rules behind them: log decisions as well as errors, tie each request together with an id, make levels mean something, keep secrets out, keep logs searchable.
- 18 Nov Browser Automation That Does Not Break Every Week Scripted browsers break on layout changes and timing. Use an API when one exists, pick selectors that survive a redesign, replace sleeps with explicit waits, and make failures leave evidence.
- 7 Oct Turning a Handful of Pictures into One Story Four imagined holiday photos followed through describing, finding the thread, writing and narrating, and what goes wrong at each stage: invented details, lost order and flat pacing.
- 9 Sep Your Database Is Not Slow, Your Queries Are The first hour with a slow system: find the costliest queries, read the plan, and check the five usual culprits, with PostgreSQL and MySQL examples.
- 21 Aug Test Your Language Model With Twenty Questions A fixed set of twenty real questions, each with a note on what a good answer needs, run again after every prompt or model change. How to build it, score it by hand, and automate the checks a machine can make.
- 18 Jul When a Script Beats a Product, and When It Does Not Four questions decide it: how many people use it, how often it changes, what happens when it fails, and who maintains it. Two invented cases, worked through side by side.
- 2 Jul What a Prompt Can and Cannot Control in Image Generation Notes from a Gradio text-to-image tool: the words steer subject, style and light well, and counts, text and recurring characters badly. Negative prompts, seeds and generating several all help.
- 26 Jun Building for CA Firms: Websites, Tally Tools and the Hours Automation Gives Back Websites, Excel and VBA tools, Tally tools and document systems for chartered accountancy firms, how the work found me, what a CA firm's website has to do, and why automation pays for itself.
- 14 Jun Plan, Search, Replan, Act: Lessons From Building AI Agents An agent is a loop, a few tools and permission to change its mind. Building a research agent and a voice agent: where the loop helps, where it wanders, and what to cap before you ship.
- 15 May JPEG, PNG, WebP, AVIF: Picking an Image Format Without a Lecture JPEG, PNG, WebP and AVIF in a few lines each: what each is good at, what it is bad at, a plain guide to choosing, and why compressing in the browser keeps your images on your own machine.
- 23 Apr How I Scope and Price a Fixed-Price Project The questions I ask before giving any number, how the scope gets written down, why a change in scope changes the price before the work starts, and when a small piece of work should come before any price.
- 3 Apr What Real Documents Do to OCR, and How a Reader Recovers Crooked scans, tables, columns, stamps and mixed scripts: five things real documents do to OCR, how a document reader recovers from each, and where a person still has to check.
- 14 Mar Retrieval or Fine-Tuning: How to Teach a Model Your Documents Fine-tuning changes how a model behaves; retrieval changes what it reads. When each one wins, when you need both, and the whole retrieval idea in plain Python.
- 24 Feb Getting Numbers Out of PDFs and Invoices Text PDFs, scans and the patterns that find the fields. Then the part that matters: checking the arithmetic before you trust a number, and knowing when a person should look.
- 10 Feb One Prompt, Three Models: Building a Multi-Model Chat Platform Gemini, DeepSeek-R1 and Llama-3.1-8B behind a single chat window. How to normalise three different APIs into one conversation without flattening what makes each model worth having.
- 24 Jan What Audit Taught Me About Building Software Trail, sampling, reconciliation, materiality, independence: five habits from audit work and the engineering practices they become when you build software that produces numbers.
2024 22 posts
- 16 Dec What a Laptop Can Run: Open Language Models Locally Why you might run an open language model on your own laptop, how memory and quantisation decide what fits, how to pick a size for the job, and what to honestly expect from it.
- 22 Nov Twenty-Seven Apps for Phones With Number Keys I started selling software in 2001 with Java apps for Nokia phones: an exam-practice app for CA students, utilities, business tools and work to order. What tiny memory, slow phones and getting found taught me.
- 6 Nov Building a Dashboard People Can Rearrange Design notes for a dashboard with draggable cards: what a card is, what layout to save and where, charts that survive resizing, keyboard drag and drop, and loading states.
- 12 Oct A Prompt Is a Specification Treat a prompt like code: state the task, the inputs, the format and the edge cases, version it, and keep a small set of test inputs. With a before and after example.
- 30 Sep A Backup You Have Never Restored Is a Hope The 3-2-1 rule, what to back up besides the database, and a short script that tests a restore on a schedule. A backup only counts once you have restored it.
- 5 Sep Designing for Six-Year-Olds Many six-year-olds cannot read well yet, and ordinary interface design stops working for them. Big targets, pictures and sound, instant feedback, no dead ends, and nothing that punishes.
- 10 Aug Clean the Data Before You Train Anything Five problems to check before training anything: duplicates, leakage between train and test, inconsistent labels, missing values that mean something, and units and formats. How to spot each, with a line or two of pandas.
- 13 Jul Reconciling Two Systems With a Script When the invoicing system and the accounts disagree, the totals only tell you there is a gap. A method and a short pandas script that classify every difference and prove they explain all of it.
- 25 Jun Code Formatters End Arguments Tabs or spaces never gets settled by argument. Why handing layout to a formatter saves teams time, why having a style matters more than which one, and how it frees code review for the questions that count.
- 10 Jun Fine-Tuning With LoRA, From Training Run to Chat Window Training a LoRA adapter is the easy half. A practical walk through the whole path: preparing data, training with PEFT, merging into the base model, publishing to Hugging Face, and serving it behind a real chat UI.
- 15 May Before You Automate a Spreadsheet, Read It A month-end workbook is a record of every decision anyone made about the process. How to find its inputs, hidden rules and real audience before you tidy, automate or replace it.
- 25 Apr Write the Runbook a Stranger Could Follow What a handover runbook needs so someone who has never seen the system can run it: what it is, where it runs, how to deploy, who holds the credentials, what breaks and who to call.
- 9 Apr Your First Model Should Be Boring Before anything clever, build a model that always predicts the majority class. A baseline shows whether the sophisticated model earns its keep, and why accuracy on imbalanced data flatters a model that catches nothing.
- 15 Mar Getting Started with Machine Learning A first working example in scikit-learn, a learning path in three phases, projects to practise on, and how TensorFlow and PyTorch compare.
- 10 Mar Modern Python Development Practices The tools worth setting up on a Python project: environment, linting and testing, dependency management, type hints and async.
- 5 Mar Building Scalable Web Applications Architecture patterns, horizontal and vertical scaling, caching, infrastructure and the metrics worth monitoring, with small working examples.
- 1 Mar Software Engineering Career Growth The management and technical career tracks in software engineering, the skills each one leans on, and ways to keep learning.
- 25 Feb Cloud Native Development Containers, microservices and DevOps practices, with a multi-stage Dockerfile and a Kubernetes deployment to start from.
- 20 Feb Web Security Best Practices Injection, authentication failures and cross-site scripting, and the security headers that are still worth sending.
- 15 Feb Modern Frontend Architecture Layering a frontend, state management patterns, component structure, and performance work such as code splitting.
- 10 Feb Database Optimization Techniques B-tree and full-text indexes, and a slow query rewritten, shown as SQL before and after.
- 1 Feb RESTful API Design Patterns Resource-oriented URLs, consistent responses and errors, versioning, JWT authentication and an OpenAPI description.