Monthly Archives: April 2025

Why you’ve probably got Object-Oriented Programming wrong all this time 🤯

Most people were taught OOP means organising code into classes, using inheritance to share behaviour, and exposing/manipulating state via getters and setters. This has led to bloated, brittle code and side-effect-ridden systems that are hard to change.

But that was never the intention!

Alan Kay, who coined the term in the late ’60s, had something very different in mind. He saw OOP as a way to build systems from independent, self-contained objects – like small computers – that communicate by sending messages.

So where did it all go wrong?

Languages like C++ and Java formalised classes and inheritance as core features. Academia followed, teaching the “4 pillars” of OOP – encapsulation, abstraction, inheritance, and polymorphism – often illustrated with real-world analogies like cats inheriting from animals or shapes extending other shapes 🤦‍♀️

This encouraged developers to focus on classification and hierarchy, rather than systems that emphasise behaviour, clear boundaries, and message-based interaction.

Kay later said:

“I’m sorry that I long ago coined the term ‘objects’ for this topic because it gets many people to focus on the lesser idea. The big idea is messaging.”

And:

“OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things.”

In other words, OOP was meant to be about communication, modularity, and flexibility – not rigid structures or class hierarchies.

Kay’s original ideas are still just as relevant today. They’re language-agnostic, and they apply just as well in JavaScript, Go, or Rust as they do in Java or C#.

If you’ve got a beef with OOP, aim it at what it became – not what it was meant to be.

What can we do instead?

If you want to align more closely with the original spirit of OOP – and build systems that are easier to understand, change, and scale – here are some heuristics worth considering. These aren’t hard rules. Like any design choice, they come with trade-offs. The key is to think deliberately and apply them where they bring value.

Design small, composable parts that can evolve

Avoid deep inheritance hierarchies. Instead, model systems using small, focused components that you can compose (“composition over inheritance”). This encourages flexibility and separation of concerns.

Let objects own their state and behaviour

Don’t pass state around or expose internals for others to manipulate. Instead, define clear behaviours and interact through messages. This reduces coupling and makes each part easier to reason about in isolation.

Reduce hidden side effects

Use immutable data and pure functions to limit surprises and make behaviour more predictable. This isn’t about functional purity – it’s about making change safer and debugging less painful.

Look to supporting architectural patterns

Approaches like Domain-Driven Design (DDD) and Hexagonal Architecture (aka Ports and Adaptors) both support a more Alan Kay style approach to OOP.

DDD encourages modelling your system around behaviour and intent, not just data structures. Entities and aggregates encapsulate state and logic, while external code interacts through clear, meaningful operations – not by poking at internal data. Bounded contexts also promote modularity and autonomy, aligning closely with the idea of self-contained, message-driven objects.

Hexagonal Architecture reinforces separation of concerns by placing the application’s core logic at the centre and isolating it from external systems like databases, user interfaces, or APIs. Communication happens through defined interfaces (“ports”), with specific technologies plugged in via adapters. This approach makes systems more modular, testable, and adaptable – supporting the kind of clear boundaries and message-based interaction that aligns closely with the original intent of OOP.

Without Systems Thinking, AI won’t deliver the gains you expect

If you’ve not yet got into Systems Thinking, now is more important than ever.

AI brings the promise of big productivity gains – but so many optimisation efforts deliver nothing. Worse, they can take you in the wrong direction, faster – exacerbating the very issues you’re trying to solve.

Why? Often the things that look like the problem are just symptoms. They’re usually the most visible and measurable activities – and therefore appealing to focus on. At best, it’s like taking painkillers instead of treating the underlying cause of the illness.

I see it all the time – organisations attempting local optimisations to the wrong part of the system, blind to the knock-on effects. Fixes that make bottlenecks worse, and costs taken out in one place, only to reappear elsewhere – often bigger than the original saving.

GenAI makes it even more tempting to fix the wrong problems. It’s good at generating documents, writing more code, handling support queries. None of which are directly value-add activities, but they are visible and measurable.

There’s a real risk of just getting busier with busywork.

That’s why you need to step back and look at the system as a whole. Map end-to-end value streams – across people, process and technology. Identify pain points, bottlenecks, and constraints. Understand how the work flows, and what’s actually causing the outcomes you’re seeing.

That’s systems thinking in a nutshell.

A lot of the theory-heavy books make it sound more complex than it is. It’s why I’m a big fan of The Goal by Eliyahu M. Goldratt. Yes, it’s a corny business novel – but it’s one of the most practical intros to systems thinking you’ll find.

When you take a systematic approach, more often than not, you’ll find the real problems aren’t where the pain is, and rather than playing whack-a-mole patching problems, you’ll uncover opportunities to make changes that deliver real, lasting impact 🙌