SOLID Principles Cheatsheet

Want the PDF version? Click here to download S: Single Responsibility Principle (SRP) Real Meaning: One reason to change, not one “thing” it does. Why It Matters: Avoids “God classes” that block clean PRs & slow refactoring. Personal Analogy: “If you can’t give a clean commit message for the change, it’s violating SRP.” Code Smell: Method/class summary has multiple and/or. Actionable: Before adding a method, ask: “Is this a different concern?” Read more on SRP Short link: bytecrafted.dev/solid-srp O: Open/Closed Principle (OCP) Real Meaning: Add features by extension, not by editing old code. Why It Matters: Keeps legacy code stable; new business rules plug in cleanly. Personal Analogy: “If a new requirement means touching brittle switch statements, you’re not OCP.” Code Smell: Growing switch/if chains for types or behaviors. Actionable: When adding a rule, prefer new handler/class over changing the old one. Read more on OCP Short link: bytecrafted.dev/solid-ocp L: Liskov Substitution Principle (LSP) Real Meaning: Subtypes must behave as expected, no surprises for callers. Why It Matters: Swapping implementations shouldn’t break existing tests or runtime logic. Personal Analogy: “If a subclass throws where the base returns null, that’s an LSP landmine.” Code Smell: Derived classes override with different exceptions, parameters, or semantics. Actionable: Run parent class tests on every subclass; look for broken guarantees. Read more on LSP Short link: bytecrafted.dev/solid-lsp I: Interface Segregation Principle (ISP) Real Meaning: Small, client-focused interfaces, never force unused methods. Why It Matters: Reduces coupling, makes mocks/tests trivial, avoids NotSupportedException landmines. Personal Analogy: “If your interface summary needs bullet points, it’s already too fat.” Code Smell: Implementations with empty or throw NotSupportedException methods. Actionable: Extract groups of related methods into separate interfaces as soon as a client skips one. Read more on ISP Short link: bytecrafted.dev/solid-isp D: Dependency Inversion Principle (DIP) Real Meaning: Depend on abstractions, not concrete implementations, flip the usual control. Why It Matters: Makes business logic testable, swappable, and free of infrastructure glue. Personal Analogy: “If you see new SqlRepo() in a service, that’s DIP going up in flames.” Code Smell: Direct instantiation of dependencies inside business logic. Actionable: Use constructor injection for every external dependency; mock in tests, swap in production. Read more on DIP Short link: bytecrafted.dev/solid-dip Read full series: bytecrafted.dev/series/solid. ...

August 12, 2025 · 3 min

C#

C# is a modern, type-safe programming language that combines object-oriented principles with powerful features like LINQ, async programming, and nullable reference types. It’s the go-to language for .NET development, supporting everything from web and desktop apps to cloud services and games.

September 28, 2026 · 0 min

EF Core

EF Core is a powerful, open-source ORM for .NET that simplifies data access, supports LINQ queries, and enables efficient database operations. Learn how to leverage EF Core for high-performance, scalable applications with best practices, real-world examples, and advanced features.

December 8, 2025 · 0 min

ASP.NET Core

ASP.NET Core is modern web framework that runs anywhere - Windows, Mac, or Linux. It combines blazing performance with developer-friendly features like dependency injection, MVC architecture, and Razor Pages. Perfect for building everything from lightweight APIs to complex enterprise applications.

October 23, 2025 · 0 min

SQL

SQL (Structured Query Language) powers the world’s data systems, giving you precise control over relational databases. From building table structures and relationships to performing complex data operations, SQL remains the industry standard for anyone working with structured data.

October 11, 2025 · 0 min

Software Design

Software design encompasses the principles, patterns, and practices used to create scalable, maintainable, and efficient software systems. It includes high-level architecture, component interaction, and design patterns that guide developers in building robust applications.

September 8, 2025 · Last modified: September 20, 2025 · 1 min

JavaScript

JavaScript is a programming language that is commonly used for building web applications. It is a client-side language as server-side language which means that it runs in the user’s web browser as well as on the server.

September 5, 2025 · 0 min

System Design

System design is the art of architecting complex software systems to meet functional and non-functional requirements. It involves high-level planning, component interaction, scalability, and performance considerations to create robust, maintainable, and efficient applications.

August 10, 2025 · Last modified: September 3, 2025 · 0 min

Angular

Explore comprehensive articles about Angular framework, including components, services, dependency injection, state management, and best practices for building modern web applications.

June 23, 2025 · Last modified: July 3, 2025 · 1 min
×