Code Smells in C: Couplers — Feature Envy, Inappropriate Intimacy
Identify coupler code smells in C: Feature Envy, Inappropriate Intimacy, Middle Man, and Message Chains. With examples and fixes.
Identify coupler code smells in C: Feature Envy, Inappropriate Intimacy, Middle Man, and Message Chains. With examples and fixes.
Understand technical debt with C examples. Learn the types of debt, how to recognize it, and practical strategies for managing and paying it down.
Learn how to design clean, maintainable modules in embedded C. Structure .h and .c files with proper encapsulation, static functions, and opaque pointers.
Learn how to test embedded C code with unit tests and mocks. Use Unity/CMock frameworks to test on your PC without hardware.
Compare 4 firmware architecture patterns: super-loop, time-triggered, event-driven, and RTOS-based. Choose the right one for your embedded project.
Learn how to design a Hardware Abstraction Layer (HAL) in C. Build portable, testable embedded code with clean hardware interfaces and mock implementations.
Build a complete driver interface in C combining Strategy, Factory, and DIP patterns. One interface, multiple hardware implementations, fully testable.
Learn the Liskov Substitution Principle with practical C examples. See how interchangeable modules (like storage drivers) should behave consistently through a common interface.
Learn the Open/Closed Principle with practical C examples using function pointers. See how to extend behavior without modifying existing, tested code.
Learn how to use a config.h header file to enable and disable features at compile time in embedded C projects. Covers board variants, debug logging, build system integration, and compile-time assertions.