The Metaphysical Mental Models: Abstraction & The Feedback Loop

Last updated Mar 26th, 2024
The metaphysical mental models describe how we solve problems and bring ideas to life. They are 1) Abstraction, and 2) The Feedback Loop. If you're not using these properly, guaranteed, you'll encounter a lot of problems in your work.

Recently, I've been thinking about those early days of when I first started out coding.

There were a bajillion things to learn, right?

And today, we have new tools, libraries, frameworks… and AI tech.

I remember that feeling. Like I was on a never-ending treadmill, always learning new stuff, but still writing spaghetti messes and untestable code in my codebases.

Eventually I had enough of that and went on a journey to discover how to master what matters.

Today, after all that time and what I've seen, I realize something key – simplicity is golden.

And that goes for most things in life actually.

But if I were to write a letter to myself when I was first starting out, I’d tell him this:

“Khalil. Keep it simple. Your entire job as a programmer is to perform problem decomposition. Break valuable problems down into bite-sized pieces and find solutions with code."

I’d also tell him that:

“Programming and problem decomposition are mostly about mental models. Your code is only as good as if it solves a problem or not, and if it uses language and symbols that other developers understand. To help you, there are 2 main mental models you need to master: Abstraction and The Feedback Loop. Keep learning new tools and improving your stack, yes, but primarily focus on how to use these concepts while coding. Everything will come into place if you do.”

Allow me to explain what they are.

Abstraction

abstraction How aware are you of what’s going on behind the scenes when you press “POWER” on your tv remote? Do you know how the sequences of 0’s and 1’s sent from the remote to the receiver are encoded, transmitted & decoded?

Or is it simply enough to think “power button means the tv turns on”?

Second answer, right? Yeah, second answer.

Abstraction is one of the least understood concepts… but also the most important.

It’s all about taking a big, complex problem, breaking it apart and creating new, easier to understand chunks or layers of the problem that interact with each other to solve the problem.

Do it right and our codebases are valuable, readable, understandable — glorious.

Do it incorrectly and our code starts to look like the inside of a turtle (I have no idea what that might look like, nor do I want to, but I imagine it’s not pleasant).

The Feedback Loop

the feedback loop I used to spend so much time changing lines of React code, refreshing the UI, re-walking through a set of steps to see if it worked and - nope, didn't work, time to try again.

These days I just write a test, the minimum amount of code I have to, and avoid all of that.

If I could get those hours back.

I'd probably have had so many more hours to go pro Junkrat in my Overwatch career back then.

There are so many more effective ways to work. In the course, we talk about something called The Ideal Developer Workflow and FA²STR but really, simplicity-wise - it comes down to introducing Feedback Loops.

For example, when we learn how to talk to customers, use things like Impact Maps, DDD techniques like Event Storming & Modelling to clarify before we build, and when we work outside-in by driving your code with tests first (yes, tests, y'all - I know... trust me though, they're not as scary as they seem)… well, then we’re using feedback loops conceptually.

How so?

We’re making a guess, taking action based on that guess, and then we check to make sure we’re OK before continuing deeper and deeper into abstraction-land.

Do this right and we build the right thing, the right way, and with useful tests that’ve got our backs (to protect against accidentally changing some code that breaks an existing feature).


So next time you're coding, if you care about long-term quality (you probably do if you're subscribed to this newsletter - you absolute class act), think about abstraction & the feedback loop.

How might you use these ideas better?

Framing your focus this way makes a huge difference.

And hey, nobody gets it perfect from the start.

Actually, I’ve learned that there are about 5 Stages of Phases of Craftship (a coaching tool I use to make sense of a developer's skill level) that we tend to go through as we improve.

This happens naturally if we're exposed to the right paradigm shifts at the right times, where each one involves better use of each of the essential mental models!

But more on that later.

Looking forward to hearing your thoughts on this.



Discussion

Liked this? Sing it loud and proud 👨‍🎤.



Stay in touch!



About the author

Khalil Stemmler,
Software Essentialist ⚡

I'm Khalil. I turn code-first developers into confident crafters without having to buy, read & digest hundreds of complex programming books. Using Software Essentialism, my philosophy of software design, I coach developers through boredom, impostor syndrome, and a lack of direction to master software design and architecture. Mastery though, is not the end goal. It is merely a step towards your Inward Pull.



View more in The Metaphysics



You may also enjoy...

A few more related articles

4 Principles of Object-Oriented Programming
The four principles of object-oriented programming (abstraction, inheritance, encapsulation, and polymorphism) are features that -...
Why You Have Spaghetti Code
Code that gets worse instead of better over time results from too much divergence & little convergence.
Reality → Perception → Definition → Action (Why Language Is Vital As a Developer)
As developers, we are primarily abstractionists and problem decomposers. Our task is to use language to decompose problems, turnin...
The Code-First Developer
As you improve as a developer, you tend to move through the 5 Phases of Craftship. In this article, we'll discuss the first phase:...