Steve Fenton

Principles are combinative and contextual

In software development, we love principles, laws, and rules. Commonly, a set of abstract instructions that can be merged into a cute acronym will get reasonable traction. SOLID, CUPID, YAGNI, and DRY have all lasted well thanks to the memorable letters that make up their names. There are also some great laws and rules that are memorable because of the metaphor, such as Flocking Rules and Yak Shaving.

The thing with all of these principles, laws, and rules is that you don’t die on any of those hills; you listen for the intent behind them and use them where they help you reason about your code in useful ways.

I studied the SOLID principles hard for a long time and found plenty of useful stuff in there. Similarly, the CUPID principles also sparked lots of interesting new ways of thinking. Funnily enough, the Flocking Rules probably had the most profound impact on what happened between my eyes and my keyboard (but what was installed in my head at the time I read about Flocking Rules might have had something to do with it).

The key thing is, none of these principles or rules exclude any other. Read broadly and with an open mind and you’re brain will recombine the ideas in neat ways.

You don’t drop SOLID just because you like CUPID, just like you don’t ditch bread when you discover cheese – you make a toastie and, as you master the skills, you eventually make pizza.

Chirs Pitts shared this excellent quote from Douglas Bader, tempered with the advice that Bader lost both legs in an aerobatics accident:

Rules are for the obedience of fools and the guidance of wise men.

So, there you have it. Ingest all that great advice and use your own smarts to decide how to deploy them in your daily work.

Written by Steve Fenton on