Software Has No Rules

Software has no absolute rules. Only suggestions.

Software Has No Rules

I learnt one of my most valuable lessons in software development at my first job, fresh from graduating in Aero Eng, working at an aerospace company.

There I am, first job out of university, writing C++ (which I wasn’t taught at university) as part of the core platform for aerospace software. The senior engineer on the team hands me a design patterns book (they were still made of dead trees back then) open at the composite pattern and says I should use that for what I was working on.

I’m blown away. This was awesome. It helped me solve the problem I had been assigned. I dutifully replicated the composite pattern exactly how it was described in the book by diligently following the code samples. I showed it to the senior engineer. He wasn’t impressed.

I protested that I had followed the rules and samples in the book exactly. He then said something to me that I have never forgotten. “What’s in the book is just a suggestion. It’s not an absolute rule”. Nothing in the book had suggested that was the case!

I rewrote the code feeling more at liberty to deviate from the examples in the book. You know what, it was better. A lot better. 

I studied engineering. I’m working at an aerospace engineering company. We follow what the book says surely!? Not so much it turns out. And this is where I think software really goes from being an engineering discipline to being more of an art form.

Good code can be as much about not following the rules as it can about adhering to them.

I often wonder if this also explains some of the cyclic nature we see in the adoption of design patterns, methodologies, or principles. It wasn’t that long ago that agile was all the rage. Everyone wanted to be agile. Or that SOLID was considered absolute best practice. I see far more people complaining about both nowadays than I see advocating for them.

At some point during the massive expansion of developer talent in the last decade, did we to forget to teach young developers that these are not absolute truths? They are guidelines. I wonder if too many people adhering to them dogmatically results in an inevitable backlash against them.

I don’t have the answers on this. I certainly don’t have a set of rules you can follow. Except maybe, that in software development there are no rules, just suggestions.