Archive
A chronological archive of writing, project notes, and selected work from mhassan.dev.
2026
- A Cron Job That Did Nothing Took Down My Deploy PlatformOct 6, 2026 · 10 min readIn July 2026 a stock-replenishment job that produced zero results ate the memory on Polaris's 4 GB VPS until the kernel killed Dokploy. How it got there, what made it worse, and what I changed.
- kitty's Parallel Test Runner Said OK While Its Workers CrashedOct 6, 2026 · 9 min readA missing addSubTest and an ignored exit status let kitty's new parallel test runner report success after failures. Fixing that exposed seven segfaulting workers on my Mac, and Kovid Goyal fixed those his own way.
- Taking Obelisk's Backend Deploy From 54 Minutes to 32Oct 6, 2026 · 10 min readOur backend deploys had crept up to almost an hour. Docker was fine. Most of the time went to migration tests waiting on one Postgres advisory lock, and to five Cloud Run services promoted one at a time.
- PgBouncer Transaction Pooling Broke Row-Level Security in PolarisOct 6, 2026 · 9 min readI put PgBouncer in front of Postgres to stop a login outage. Two weeks later customer search started returning empty lists on some requests, because tenant isolation depended on a session variable and transaction pooling doesn't keep sessions.
- Moving SMS Realtime Off Postgres Polling and Onto Redis StreamsOct 6, 2026 · 9 min readA Django app whose SSE endpoints polled Postgres from sleeping request threads, and the outbox, relay and Redis Streams setup that replaced them in March 2026.
- An SMS Queue That Wouldn't Drain, and the DynamoDB Row Every Send RewroteOct 6, 2026 · 9 min readIn September 2026 an SMS backlog on AWS drained at four or five messages a minute, and a few weeks later adding workers stopped making sends faster. How I drained the queue by hand, and the DynamoDB items every send was rewriting.
- CogitatorSep 25, 2026 · 1 min readA local code search engine in about 500 lines of OCaml: TF-IDF over code chunks, ranked by cosine similarity, printed as context for an LLM.
- OctoberSep 25, 2026 · 3 min readA campaign platform where brands, agencies and creators run influencer campaigns from brief to report, with numbers every side can trust.
- RISQSep 25, 2026 · 2 min readScoring intake calls for mass tort firms: separating real claimants from coached callers, with evidence a reviewer can follow.
- The Best Way to Learn a Codebase Is to Break Someone Else'sApr 8, 2026 · 4 min readWhat maintainers of kitty, calibre, libtorrent and Fallow taught me in review threads, usually by explaining why my fix was wrong in a way I hadn't considered.
- Every Abstraction I RegretApr 8, 2026 · 6 min readA short list of abstractions I added too early, why they got worse over time, and the heuristics I use now to avoid repeating it.
- How Fallow Analyzes TypeScript in Under a SecondApr 8, 2026 · 5 min readHow Fallow gets dead-code and dependency analysis done fast by skipping the TypeScript compiler, flattening graph storage, and doing the work in Rust.
- Scoring Fraud in Legal Intake CallsApr 8, 2026 · 4 min readCoached callers, invented doctors and borrowed photos. How RISQ scores intake calls for mass tort firms, and why the most useful score is the one that grades the interviewer.
- How Pyscn Analyzes Python with Go and tree-sitterApr 8, 2026 · 4 min readHow Pyscn uses Go and tree-sitter to analyze Python code quickly for dead code, clone detection, and dependency insight.
- Agent Middleware: What Kept Obelisk's Agents in LineApr 8, 2026 · 5 min readObelisk runs more than fifteen specialist agents. Model choice, context, cost, retries and approvals all ended up in a middleware layer around them, and this is how that layer works.
- LLMs Can't Save Bad UXApr 8, 2026 · 6 min readWhen an AI feature flops, look at the UX before you blame the model. Three features I watched fail, what fixed them, and the questions I now ask before anyone writes a prompt.
- Most of My Pull Requests Started as an AnnoyanceApr 8, 2026 · 3 min readDrive-by fixes in qBittorrent, Dokploy and django-hijack: which ones merged, which didn't, and what the rejections taught me about scope.
- Structured Logging for AI DebuggingApr 8, 2026 · 4 min readLogging one structured event per request with evlog, so an AI assistant can follow what happened in a request.
- TF-IDF in OCaml: When Functional Programming ClicksApr 8, 2026 · 5 min readBuilding a local code search engine in OCaml was a good excuse to learn TF-IDF, pure pipelines, and where immutability helps.
- I Shipped a Race Condition That Oversold Stock (And Other War Stories)Apr 8, 2026 · 4 min readTwo cashiers selling the last item, a chain that returned nothing, and a lock that only worked when both requests hit the same process. Bugs I shipped, and the small fixes that held.
- AnatomiaApr 8, 2026 · 2 min readA nurse callback and case review product where transcripts, AI triage and follow-up calls all have to stay attached to the right patient.
- BonnetApr 8, 2026 · 2 min readAn AI brand-development tool that turns a creative brief into research, strategy, creative direction, moodboards and a document a team can use.
- Go Load BalancerApr 8, 2026 · 2 min readA small HTTP load balancer and dashboard in Go, built to understand what a reverse proxy actually does before trusting one.
- LangChain in Production: What the Tutorials Leave OutFeb 1, 2026 · 3 min readWhere LangChain is worth using, where it gets in the way, and the defaults that stop our AI features failing silently: timeouts, validation, persistent state, tracing and pinned versions.
- ObeliskFeb 1, 2026 · 3 min readAn AI marketing platform where specialist agents write, plan and analyze from a company's own material, without leaking one customer's brand into another's.
2025
- Free Web Dev Platforms Worth Your TimeApr 1, 2025 · 2 min readA practical shortlist of free web development learning platforms and how to use them without getting stuck in tutorials.
- Final Year Project (FYP) Guide for StudentsFeb 17, 2025 · 14 min readA practical final year project guide for choosing scope, building steadily, avoiding weak ideas, and presenting work clearly.
- Smart Dustbin: IoT with Arduino, Python, Kotlin & AzureFeb 16, 2025 · 2 min readAn IoT garbage monitoring system built with Arduino sensors, ESP8266 WiFi, a Python desktop dashboard, and a Kotlin Android app, plus what it taught me about hardware constraints.
- Building a C++ Image EditorFeb 16, 2025 · 2 min readMy university project, a grayscale image editor in C++ that loads, filters and transforms PGM images.
- PixelCryptor: Hiding Executables Inside ImagesFeb 16, 2025 · 2 min readA Django project that embeds executable files within images using delimiter-based concatenation, and why real steganography is harder than this.
- Fiction BooksFeb 15, 2025 · 1 min readFantasy, science fiction and a few classics I keep pressing on people.
- Non-Fiction BooksFeb 15, 2025 · 1 min readGeopolitics, psychology, and a couple of books about why people do what they do.
- Books on PakistanFeb 15, 2025 · 1 min readHistory, politics and identity: books that helped me understand where I live.
- Technical BooksFeb 15, 2025 · 3 min readThe books behind how I think about software, data systems and craft.
- What It Costs to Run mhassan.dev: $8/yearFeb 15, 2025 · 3 min readThe full cost of running this site, what's free, and the tradeoffs behind each choice.
- The Invoice Page That Took 4 Seconds to SearchFeb 12, 2025 · 2 min readHow preloading product data cut search latency from 4 seconds to instant on a POS invoice page, and when this pattern breaks down.
- When to Extract a Component (and When to Just Copy-Paste)Feb 12, 2025 · 3 min readThe 3-usage-sites heuristic for component extraction, a premature ConfirmDialog that cost me time, and why copy-paste is sometimes the right call in Vue.
- DMCA NoticeFeb 12, 2025 · 2 min readThis page outlines our DMCA policy and procedures for submitting copyright infringement notices.
- Polaris Performance Log: The Django Mistakes I Made FirstFeb 10, 2025 · 4 min readRefunds that queried once per line item, stock updated one row at a time, and signals that recalculated ledgers nobody asked about. What I changed in Polaris, and what I'd tell myself earlier.
- PolarisFeb 10, 2025 · 3 min readRetail operations software for shops that bill all day: invoices, refunds, batch stock, supplier orders and customer ledgers that have to agree with each other.
- mhassan.dev — This PortfolioFeb 10, 2025 · 2 min readTanStack Start, React, typed MDX content, accessible controls, and static GitHub Pages output. How the site is built.