Writing

Blog

A place for engineering notes, experiments, and posts about coding topics that are worth writing down.

Building a Linux Kernel Module in Pure x86

An exploration of what happens when the compiler abstraction is removed and a Linux kernel module is written directly in x86-64 assembly.

  • linux
  • kernel-modules
  • x86-assembly
  • kernel

Implementing std::variant from scratch

A step-by-step journey through building your own std::variant, then peeking under the hood of libstdc++ and libc++ to see how the real thing works.

  • c++
  • variant
  • template-metaprogramming
  • stl

Bringing Zephyr RTOS to an ESP32 board

A compact first bring-up of Zephyr on ESP32, from hello world to fixing the blinky sample with a device tree overlay.

  • zephyr
  • esp32
  • embedded
  • device-tree
  • rtos

Debugging multithreaded programs with GDB

A practical GDB workflow for multithreaded programs, with emphasis on thread apply all and on commands that GDB can run automatically for you.

  • gdb
  • debugging
  • c++
  • linux
  • threads

SchemAI — an AI-powered schematic assistant for KiCad

Building an open-source tool that parses KiCad schematics into a structured circuit graph and lets you ask an LLM questions about your design — architecture, code walkthrough, and future plans.

  • kicad
  • electronics
  • ai
  • python
  • open-source

Streaming MJPEG from a Raspberry Pi 4 camera via Yocto Linux

A practical walkthrough of streaming OV5647 camera video over HTTP from a Pi 4 running a custom Yocto build — covering the bcm2835-unicam driver bug, libcamera integration, gstreamer pipelines, and a lightweight HTTP relay server.

  • raspberry-pi
  • embedded
  • linux
  • camera
  • streaming
  • yocto

C++ coroutines through the compiler's eyes

A reference-style walkthrough of how the C++ standard specifies coroutines and the co_await expression, distilled into pseudocode that mirrors what a compiler actually does.

  • c++
  • coroutines
  • compiler
  • language

Running a Docker container with GUI on Fedora

A practical Fedora setup for running X11 GUI apps from a Docker container, including a working ROS Humble example and quick validation steps.

  • docker
  • fedora
  • linux
  • gui
  • ros

Destructor trap

Why skipping a virtual destructor silently breaks unique_ptr but not shared_ptr, and what the constructor/destructor output tells you.

  • c++
  • smart-pointers
  • memory

Practical C++11 std::errc with real examples

A practical C++11 guide to std::errc, std::error_code, and portable error handling with examples for files, validation, retries, and API design.

  • c++
  • error-handling
  • systems

Memory types and their support in Linux

A practical overview of raw and managed flash memory technologies and how Linux handles each of them through the MTD and block subsystems.

  • linux
  • embedded
  • storage
  • memory
  • kernel