Hi, I’m Ahmed đź‘‹

Backend engineer working in Go and Ruby — scalable systems, infra, and the occasional deep dive into OCR pipelines and LLM inference. This is where I write it all up.

photo-dedupe: cluster by time, group by likeness, keep the sharpest

Building photo-dedupe: a local-first burst-photo cleaner in Go

Burst mode leaves you with seven nearly-identical frames and no easy way to pick “the good one.” photo-dedupe is a small offline Go CLI (plus an optional local web UI) that does that triage: cluster by capture time, group the shots that actually look alike, keep the sharpest and highest-resolution frame. Nothing is ever deleted — losers move to a quarantine folder for you to review. What’s worth writing up isn’t the algorithms, which are well-known, but how cleanly the problem splits into independent, testable stages, and how much of the design is really about safety: a readable JSON plan, a move instead of a delete, a one-command restore. ...

August 30, 2026 Â· 13 min Â· Ahmed Magdy
pdf2epub: Building a Self-Hosted PDF→Kindle Pipeline

pdf2epub: Building a Self-Hosted PDF→Kindle Pipeline

A Go CLI that turns scanned, image-only PDFs into Kindle-ready reflowable EPUBs — and everything that went sideways along the way. I had a real problem to solve: a scanned copy of an old Arabic memoir — 420 pages, image-only PDF, no text layer at all. I wanted to read it on a Kindle, reflowable, in Arabic, with proper chapters. Nothing off-the-shelf did that well without uploading a personal scan to some cloud OCR service, which didn’t sit right with me. ...

August 13, 2026 Â· 24 min Â· Ahmed Magdy
LLM Inference Architecture

Building a Local LLM Inference API for Semantic Similarity

At whatisgoing.com, we needed a reliable way to extract named entities from multilingual news articles — especially Arabic news — where the same entity can appear in different linguistic forms. For example: “The Ukraine War” and “The Russian Invasion” both refer to the same geopolitical event — the ongoing conflict in Eastern Europe — yet share no overlapping words. Traditional keyword or similarity-based methods fail to capture such semantic equivalence. ...

October 5, 2025 Â· 6 min Â· Ahmed Magdy