</>CodexBash
All articles
Programming

SOLID principles

The five SOLID principles of object-oriented design, each explained with a small before-and-after example, what problem it prevents, and when following it too strictly makes code worse.

CodexBash, , 5 min read

SOLID is five principles for writing object-oriented code that is easy to change. Robert C. Martin collected them in the early 2000s, and they remain a staple of design discussions and interviews. Each one answers the same underlying question from a different angle: when requirements change, how much existing code do you have to touch? This article explains each principle with a small example, and where it can be overdone.

Sign in to read the rest

The whole 5 minute article is free with an account, along with every problem, lesson and tutorial. No card.