#clean-code
6 articles tagged with #clean-code
Why we need Clean Code?
Why clean code matters, what makes code clean (meaningful names, small functions, guard clauses, comments that explain why) and how to bring the practice into your team.
How to use Dependency Inversion to loosen the coupling? - Part 5
Dependency Inversion is explained with layered and multi-implementation examples, dependency injection, IoC containers, testing benefits and a summary of all the principles.
What are the Liskov Substitution and Interface Segregation principles? - Part 4
Liskov Substitution and Interface Segregation are explained with open-ended funds and fixed maturity plans, including the warning signs of a broken hierarchy and how to fix it.
What are the Single Responsibility and Open Closed principles? - Part 3
The Single Responsibility and Open Closed principles are explained with a mutual fund service and exit load rules, with the benefits, techniques and trade-offs of each.
How to keep the code simple and the objects in charge? - Part 2
KISS, DRY and YAGNI keep the code simple, while Tell Don't Ask and the Law of Demeter keep the logic near the data, explained with mutual fund redemption and NAV examples.
Why does code become hard to maintain? - Part 1
Code becomes hard to maintain when one change breaks unrelated things, so this article explains cohesion, coupling and the four pillars of object oriented design with a mutual fund example.