Code Readability

Code Readability

Writing code that is readable is critical for any software application that needs to be maintained for any length of time.  There are valid performance and anti-theft reasons tominify or even obfuscate code that is being deployed, but the source … Continued
Dependency Injection

Dependency Injection

Dependency Injection is a technique that facilitates loosely coupled object-oriented software systems.  It is closely related to the Dependency Inversion Principle.  In simple systems, references to collaborating objects are made directly within classes that need to refer to them.  This … Continued
Naming Things

Naming Things

It is hard to overestimate the importance of choosing good names for source code elements in software development.  Much has been written on this topic, and it is often a source of great debate.  “What makes a name good, or … Continued
Strategy Design Pattern

Strategy Design Pattern

The Strategy Design Pattern allows an object to have some or all of its behavior defined in terms of another object which follows a particular interface.  A particular instance of this interface is provided to the client when it is … Continued
Adapter Design Pattern

Adapter Design Pattern

The Adapter Design Pattern, also known as the Wrapper, allows two classes to work together that otherwise would have incompatible interfaces.  In this case, this software design pattern maps particularly well to the real-world example of an electrical power adapter, … Continued
Death March

Death March

The worst part of a Death March project is that virtually everybody involved with it knows it’s a death march project. The Death March refers to a project that has little or no hope of success. It’s already over-budget, over-schedule, … Continued
Repository Pattern

Repository Pattern

The Repository Pattern has gained quite a bit of popularity since it was first introduced as a part of Domain-Driven Design in 2004. Essentially, it provides an abstraction of data, so that your application can work with a simple abstraction … Continued
Single Responsibility Principle

Single Responsibility Principle

The Single Responsibility Principle (SRP) states that a class should have only one reason to change.  It was first cited in this form by Robert C. Martin in an article that later formed a chapter in his Principles, Patterns, and … Continued
Open-Closed Principle

Open-Closed Principle

The Open-Closed Principle (OCP) states that software entities (classes, modules, methods, etc.) should be open for extension, but closed for modification. In practice, this means creating software entities whose behavior can be changed without the need to edit and recompile … Continued
Liskov Substitution Principle

Liskov Substitution Principle

The Liskov Substitution Principle (LSP) states that subtypes must be substitutable for their base types. When this principle is violated, it tends to result in a lot of extra conditional logic scattered throughout the application, checking to see the specific type … Continued