#Clean Code
Every post that touches Clean Code, newest first.
Primitive Obsession: When a Float Isn't a Temperature
A float can hold any number, which is exactly the problem. Primitive obsession is why the same validation keeps reappearing, and value objects are the fix.
Clean Code28 viewsThe Single Responsibility Principle Isn't About One Thing
The Single Responsibility Principle is the most misread rule in SOLID: it was never about doing one thing, but about having one clear reason to change.
Design Patterns30 viewsPure Functions and Why They Make Code Easier to Test
A pure function returns the same output for the same input and touches nothing else. That single property is what makes code predictable and trivial to test.
Clean Code37 viewsGuard Clauses: How to Stop Nesting Your Code Five Levels Deep
Deeply nested if/else blocks are hard to read and easy to break. Guard clauses flatten your logic with early returns so the happy path stays obvious.
Clean Code41 views
