Key design principles in software development

Anupam Mazumdar
A dev’s life
Published in
2 min readJul 2, 2022
Photo by Zan on Unsplash

SOLID

Probably the most important principle in object oriented programming. These are the set of 5 design principles for creating class structure to make it maintainable, extensible and robust to failure. These are:

  1. Single-Responsibility Principle
  2. The Open-Closed Principle
  3. The Liskov Substitution Principle
  4. The Interface Segregation Principle
  5. The Dependency Inversion Principle

KISS

It stands for Keep It Simple, Stupid. The idea over here is that the end product should be easy to use for the end user, if not they may not use it at all or may not reach a larger audience.

YAGNI

This one stands for You Aren’t Gonna Need It. It simply states that if a feature is not required immediately, then it shouldn’t be build. It may not be required at all in the future despite of what we might think today and this would hence save a lot, effort and money.

Boy scout principle

While working on a module, if we see a piece of code dirty then we should clean it up. This will help make the code better everyday and foster team spirit, as everyone is working together to make the product better.

DRY

Don’t Repeat Yourself. It means you should repeat code functionality all over the codebase. Code should be made modular as much as possible which helps in making code resuable, maintainable and robust.

POLA

It is an acronym for Principle Of Least Astonishment. The idea here is to think like a end user and do not surprise them with feature or interface which they do not expect. From a developer perspective any other person reading or modifying your code should not get astonished by seeing something which they do not expect such as defining a module name differently from what it does.

More details regarding each of the principles/rules can be found below:

https://martinfowler.com/bliki/Yagni.html

Thanks for reading.

--

--