Coupling and Cohesion in C — A Deep Dive With Examples
Deep dive into coupling and cohesion in C with examples. Learn to build modules with high cohesion and low coupling for maintainable code.
Deep dive into coupling and cohesion in C with examples. Learn to build modules with high cohesion and low coupling for maintainable code.
Learn the Law of Demeter (Principle of Least Knowledge) in C with examples. Reduce coupling by only talking to immediate friends, not reaching through struct… Read More »Law of Demeter (Principle of Least Knowledge) in C — With Examples
Learn 5 essential refactoring techniques in C: extract function, replace magic numbers, guard clauses, explaining variables, and consolidate duplicates.
Learn encapsulation and information hiding in C with examples. Use opaque pointers, static functions, and header/source separation to protect internal details.
Build a complete driver interface in C combining Strategy, Factory, and DIP patterns. One interface, multiple hardware implementations, fully testable.
Learn how to design a Hardware Abstraction Layer (HAL) in C. Build portable, testable embedded code with clean hardware interfaces and mock implementations.
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 test embedded C code with unit tests and mocks. Use Unity/CMock frameworks to test on your PC without hardware.
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 three most common embedded communication interfaces: UART, SPI, and I2C. Understand how each works, their wiring, data formats, speeds, and when to use… Read More »Communication Interfaces: UART, SPI, and I2C Explained