Chapter 15

Sources

The six principles aren't a single code but ideas from different authors and decades. KISS and YAGNI are usually worth applying first: they keep a system from premature growth. DRY is useful when it removes real duplicated knowledge. AHA keeps you from turning DRY into a factory of bad abstractions. SoC and SOLID help draw boundaries where the system already demands a stable structure.

Sometimes two simple identical functions really are better than one universal construct with twenty-five parameters - not because repetition is always good, but because clarity today can be worth more than invented universality tomorrow.

Below are the primary sources of the principles: the definitions are checked against their authors' work, not against paraphrases.

Links

I wish you code that doesn't demonstrate knowledge of principles but calmly solves the task and doesn't get in the next person's way.