Category Archives: oo

Back to Basics: Usage of Static

The keyword static is somewhat awkward in a pure Oriented-Object world. I would like to expose here the usages of static I came up after 15 years of OO Programming. The 2 rules of thumb are: A: Static fields that are not pure value … Continue reading 

| 20 Comments

Exceptional and Substitutable

I watched Sean Chambers deliver an excellent talk about S.O.L.I.D. principles last weekend at Tallahassee CodeCamp. It motivated me to look a little deeper into the Liskov Substitution Principle, which states: Functions that use pointers or references to base classes … Continue reading 

Also posted in C#, design, principles, Ruby, solid | 2 Comments

Return False on the Happy Path

When you call a query method that returns true or false, I highly suggest that you make true results trip conditional logic / guard clauses / etc. I was driving out some code today in an MVC controller that had … Continue reading 

Also posted in BDD, C#, code, design, TDD | 12 Comments

Why SOLID? GIMME AN L!

.csharp { font-family: ‘Consolas’, ‘Courier New'; color: #33F;} Thus far in my journey to explain the why of the so-called SOLID principles I’ve covered Single Responsibility Principle and Open/Closed Principle. This brings us to “L” for Liskov Substitution Principle which … Continue reading 

Also posted in principles, solid | 3 Comments

TDD, Contracts, and Reading the Fine Print

Jimmy Bogard on coming to TDD and interface oriented Jesus and the aha moment of why we use interfaces: An interface is a contract, that any implementation needs to adhere to. Consumers of the interface do not care about implementation … Continue reading 

Also posted in BDD, DbC, TDD | 40 Comments

Why SOLID? GIMME AN O!

The next leg of our quest to uncover the deeper driving forces behind SOLID principles brings us to the Open/Closed Principal (OCP). To refresh, I think it’s important that if we’re going to say (read the next part in a … Continue reading 

Also posted in design, principles, solid | Leave a comment

Why SOLID? GIMME AN S!

There was some chatter on twitter today about why SOLID principles are a good idea. When designing object systems we often tote around a lot of acronyms for principles of good design, but why are these things principles? It’s not … Continue reading 

Also posted in design, solid | 4 Comments

Super Models, Part 2: Avoid Mutators

A quick disclaimer: we’re entering religious territory here. I feel strongly about this issue, but it’s certainly my opinion. If you want to get the full sense of how passionate people are about this issue, check out this article at … Continue reading 

Also posted in code, DDD, opinion | 40 Comments

The Separated Interface Pattern

I did a quick streaming video today with the Separated Interface design pattern as our topic du jour. I wanted to see if the whiteboard would show up on video and if this was something people thought was valuable. It’s … Continue reading 

Also posted in architecture, design, Featured, patterns, video | 3 Comments