February 1, 2014

Dependency Inversion Principle

Definition: One should depend upon abstractions and not concrete instances. Typically in a software application, high level components need to depend on lower level components. If the low level components are ‘hard-coded’ into the high level components this causes two problems. Testability The first problem is testability. It becomes very hard or even impossible to…

Read More
January 27, 2014

Interface Segregation Principle

Definition: Many client specific interfaces are better than one general purpose interface. This principle is fairly straight forward in that it is really just saying keep your interfaces to a specific role, keep them small and concise. Reason: This enables code concrete classes to not have to implement every single method regardless of whether they…

Read More
January 20, 2014

Liskov substitution principle

Definition: Objects in an application should be replaceable with instances of their subtypes without altering the correctness of that program. To understand the Liskov principle is useful to understand the concepts of Contravariance and Covariance. Contravariance Contravariance is the conversion of a class from its sub class to a class higher up the hierarchy. An…

Read More
January 16, 2014

Open / Closed Principle

Definition: An object should be open for extension but closed for modification. This principle states that code should only be modified to fix bugs and errors, and to extend the functionality a new class should be used. Typically the new class would be a derived class to enable code re-use from the original or a…

Read More
January 15, 2014

Single Responsibility Principle

Definition: An object should have a single responsibility. In practice, to adhere to this principle, an object is a class and that a class’s functionality is grouped around a single idea or unit of responsibility. Robert C Martin defined responsibility as a reason to change. This means that a class should only have one reason…

Read More
January 8, 2014

The SOLID principles of Object Orientated design

The 5 basic principles of OO design were put together in the early 2000s by Michael Feathers and Robert C Martin. They are intended to allow the developer to create software that is easy to maintain and extend over time. The patterns which have come out of these principles are usually easy to test and…

Read More
December 19, 2013

Office Politics

Over the years I have found a commonality in the way developers think, which is fundamentally different than non-technical managers. This difference has often perplexed me and I have often wondered exactly what the nature of this difference is. It usually manifests itself in the form of developers thinking they are in some way better…

Read More