Modern programming is full of principles and acronyms that help developers write maintainable, readable, and robust code. Here’s a quick guide to the most popular and widely used ones:
KISS (Keep It Simple, Stupid)
The simplicity principle: solutions should be as simple as possible, without unnecessary complexity. Simplicity makes code easier to maintain, test, and understand.
DRY (Don't Repeat Yourself)
Don't repeat yourself: avoid duplication of information and logic. Repeated code makes maintenance harder and increases the chance of errors.
YAGNI (You Aren't Gonna Need It)
Don't implement what you don't need now: don't add functionality "for the future" if it's not currently necessary.
BDUF (Big Design Up Front)
Big design up front: the architecture and system design are planned first, then coding begins. Contrasts with agile methodologies where design and implementation are iterative.
SOLID
A set of five key object-oriented design principles:
- Single Responsibility Principle (SRP) - a class should have only one reason to change.
- Open/Closed Principle (OCP) - software entities should be open for extension but closed for modification.
- Liskov Substitution Principle (LSP) - objects of a superclass should be replaceable with objects of a subclass without affecting correctness.
- Interface Segregation Principle (ISP) - clients should not be forced to depend on interfaces they do not use.
- Dependency Inversion Principle (DIP) - depend on abstractions, not on concretions.
APO (Avoid Premature Optimization)
Avoid premature optimization: don't optimize code before it is proven necessary, to avoid unnecessary complexity.
GRASP (General Responsibility Assignment Software Patterns)
A set of patterns for assigning responsibilities to objects in OOP.
PSR (PHP Standard Recommendations)
A set of coding standards for PHP (if you are working with PHP).
Law of Demeter
The principle of least knowledge: "Don't talk to strangers," meaning an object should only interact with its immediate friends.
Occam’s Razor
The simplest solution is usually the correct one.
Principle of Least Astonishment (POLA)
The system should behave in a way that least surprises the user.
Convention over Configuration
Using conventions instead of explicit configuration to simplify setup and reduce code.
Single Source of Truth (SSOT)
Data should be stored in only one place.
Release Early, Release Often (RERO)
Frequent and early releases for quick feedback and product improvement.
TDD (Test-Driven Development)
Development through testing: write tests first, then code.
BDD (Behavior-Driven Development)
Development through behavior description: focus on specifications and usage scenarios.
DDD (Domain-Driven Design)
Design focused on the domain and its logic.
CQRS (Command Query Responsibility Segregation)
Separation of commands (state changes) and queries (data reads).
KISSY (Keep It Short and Simple, Yet)
A variation of KISS emphasizing brevity as well.
FAANG
Acronym for major IT companies: Facebook, Apple, Amazon, Netflix, Google.
POC (Proof of Concept)
A prototype or demonstration of an idea's viability.
MVP (Minimum Viable Product)
A minimally viable product.
MVC (Model-View-Controller)
An architectural pattern dividing an application into model, view, and controller.
MVVM (Model-View-ViewModel)
An architectural pattern popular in UI development.
ACID
Database transaction principles: Atomicity, Consistency, Isolation, Durability.
CAP Theorem
The theorem stating it is impossible to simultaneously guarantee Consistency, Availability, and Partition tolerance.
OOP (Object-Oriented Programming)
Programming paradigm based on objects.
SPA (Single Page Application)
A web application that loads a single HTML page and dynamically updates it.
REST (Representational State Transfer)
An architectural style for web services.
SOAP (Simple Object Access Protocol)
A protocol for exchanging structured information in web services.
FIFO / LIFO
Data structure principles: "First In, First Out" and "Last In, First Out."
IoC (Inversion of Control)
Inversion of control, often implemented via Dependency Injection (DI).
DRY RUN
Running a program without performing real actions (e.g., for testing).
WET (Write Everything Twice / We Enjoy Typing)
An anti-pattern opposite to DRY.
BOY SCOUT RULE
"Leave the code cleaner than you found it."
RFC (Request for Comments)
Documents describing standards and protocols on the internet.
Conclusion
There are many principles and acronyms in software development that help create maintainable and high-quality code. In addition to KISS, DRY, YAGNI, BDUF, SOLID, and APO, you’ll often encounter GRASP, PSR, Law of Demeter, Occam’s Razor, POLA, Convention over Configuration, Composition over Inheritance, and more. Mastering and applying these principles is a hallmark of a professional developer.
Top comments (0)