Ahmed Mahdy
Ahmed Mahdy
Intel & Perspective

Articles.

Deep dives into building an LLM from scratch, writing an x86 OS, designing custom network protocols, RAG engines, and more — from a 21-year-old engineer who builds things that shouldn't exist yet.

AI/ML·June 2026·12 min

Building an LLM from Scratch in C++/CUDA

How I built a complete GPT-style Transformer (10.7M params) with zero ML frameworks — raw CUDA kernels, GPU-resident memory, and backpropagation from first principles. Every matrix operation hand-written.

Read
OS Dev·June 2026·8 min

Writing an x86 Operating System in 3 Days

What I learned building hydra-os — a monolithic kernel with GDT, IDT, keyboard driver, framebuffer, and a Snake game. Assembly bootloader to C kernel, Multiboot-compatible with GRUB.

Read
Networking·May 2026·7 min

Designing a Custom Network Protocol in Go

Building nexa — your own mini-internet on top of TCP/IP. Custom DNS resolution for .nexa domains, content storage server, and a smart client with automatic name resolution.

Read
AI/ML·May 2026·10 min

The Last Archive: Building a Local-First RAG Engine

A privacy-first semantic search and archival engine. Go web crawler, Python transformer embeddings, Ollama LLM bridge, Qdrant vector DB — all running offline with Docker.

Read
DevOps·April 2026·15 min

Turning an Old Laptop into a Production Server

Complete guide: Ubuntu Server, static IP, Docker, UFW, Minecraft server, and three methods of internet exposure — port forwarding, Tailscale VPN, and Cloudflare Tunnels.

Read
AI·March 2026·8 min

Prompt Engineering Is System Design

Real prompt engineering is not writing prompts — it is structuring context, chaining outputs, managing state, and building reliable agentic workflows with n8n and open-source tools.

Read