Policy-based design — assembling behaviour at compile time
Alexandrescu-style policy classes: compose behaviour from interchangeable compile-time policies instead of runtime switches. Zero overhead, no virtual dispatch, unlimited configurability.
Patterns, performance techniques, and embedded systems for engineers who care about the details.
Alexandrescu-style policy classes: compose behaviour from interchangeable compile-time policies instead of runtime switches. Zero overhead, no virtual dispatch, unlimited configurability.
From SFINAE to Concepts: how to constrain templates, write type traits, and enforce compile-time contracts. Practical C++17 and C++20 patterns without academic theory.
How type erasure works in C++. std::function internals, std::any, hand-rolled type erasure with a storage buffer — when each approach is worth the complexity.
Building an embedded HMI with Qt. Signal-slot architecture, background worker threads, keeping the UI responsive, and safe cross-thread communication.
Evolving a firmware state machine from a basic enum+switch to a table-driven design and finally a state-object pattern. Practical STM32 examples throughout.
Ready-to-use CRTP mixins: logging, enable/disable toggle, singleton, comparable, printable. Drop into any class to add behaviour without virtual dispatch.
Alexandrescu-style policy classes: compose behaviour from interchangeable compile-time policies instead of runtime switches. Zero overhead, no virtual dispatch, unlimited configurability.
How type erasure works in C++. std::function internals, std::any, hand-rolled type erasure with a storage buffer — when each approach is worth the complexity.
Encapsulating operations as objects. Undo/redo stacks, macro recording, deferred execution queues — with a Qt UI example.
A practical guide to perf and valgrind: what each tool measures, which commands to run, and how to read the output to find real performance bottlenecks.
How CPU cache lines determine whether your data layout helps or hurts performance. Array of Structures vs Structure of Arrays — with measurements.
Why the default heap breaks embedded firmware and high-throughput servers. Pool allocators, arena allocators, and stack allocators — implementation, tradeoffs, and when to use each.
Building an embedded HMI with Qt. Signal-slot architecture, background worker threads, keeping the UI responsive, and safe cross-thread communication.
Evolving a firmware state machine from a basic enum+switch to a table-driven design and finally a state-object pattern. Practical STM32 examples throughout.
When STM32 HAL is the right call, when register access beats it, and how to mix both in a layered firmware architecture without creating a mess.
Ready-to-use CRTP mixins: logging, enable/disable toggle, singleton, comparable, printable. Drop into any class to add behaviour without virtual dispatch.
A type-safe, fixed-capacity object pool for embedded and real-time systems. O(1) allocation and deallocation, no heap fragmentation, compatible with unique_ptr.
The only correct singleton implementation in C++11. Why double-checked locking was broken before C++11, why it works now, and when to avoid singletons entirely.