← contents

entry 06 · philosophy · 4 min · 10 oct 2026

The developer who kept the cache was being wise

Aristotle, a dented knife, the four causes of rain, and a clean Rails fix that made production slower.

In the last entry, Plato told us there’s a perfect version of our code that we’ll never ship. Lovely. Very motivating.

So what is true code, then? An imperfect one.

Which leaves me with another uncomfortable question:

when you make a pragmatic decision, are you being wise? Or are you just giving up?

We spend hours refactoring. Then at some point we stop. We ship it. Something inside says this is good enough. But where does that feeling come from? Is it wisdom, or is it surrender?

Plato points up, to the world of Ideas. Aristotle points down, to the world we actually live in. Raphael, The School of Athens (detail), 1511. Plato points up, to the world of Ideas. Aristotle points down, to the world we actually live in. Raphael, The School of Athens (detail), 1511.

the perfect knife is a sharp one

Aristotle was Plato’s student, and he had a very different answer. Quite the opposite, actually.

He didn’t believe the perfect form of something lived in a higher world of Ideas. He believed it lived inside the thing itself. The best version of something is what it becomes when it fulfills its purpose well.

Take a knife. A knife with a dent isn’t failing to be the ideal knife. A sharp knife that cuts well is the ideal knife. Its perfection is in what it does, not in how closely it resembles an imagined mold.

Remember the gingerbread cookies? For Plato, every dented cookie was a failed copy of the mold. For Aristotle, a cookie that tastes good and makes someone happy has done its job. The dent doesn’t matter.

why does it rain?

To explain this, Aristotle asked a deceptively simple question: why does it rain? And then he answered it four times.

  • The material cause: rain is made of water. Vapour that was in the air all along, waiting.
  • The efficient cause: the sun heats the water, it rises, cools, condenses and falls. The chain of events that made it happen.
  • The formal cause: the water cycle. The shape and pattern of how it all fits together.
  • The final cause: to water the earth and sustain life. What it’s for.

The last one was the one Aristotle cared about most.

Paris Street; Rainy Day. Gustave Caillebotte, 1877. Paris Street; Rainy Day. Gustave Caillebotte, 1877.

Now apply it to your code.

  • Material: Ruby, Rails, your gems. Your material shapes what’s possible before you write a single line.
  • Efficient: you. The developer, the pull request, the human who sat down and wrote it.
  • Formal: the architecture. MVC, service objects, how things depend on each other. The water cycle of your codebase.
  • Final: the user need it serves. The problem it actually solves.

A perfectly architected Rails app that solves no real problem has failed its final cause. A messy controller that makes ten thousand people happy every day is, by Aristotle’s definition, the better piece of software.

Rain that never reaches the ground has failed its final cause. Let me show you what that looks like in Ruby.

the cleanest fix that made things worse

Meet the librarian’s morning dashboard. It loads thousands of times a day across branches, with around eighteen active loans each. Book titles come from a cache, because books don’t rename themselves overnight, so someone made a sensible call and cached them for 24 hours.

class LoansController < ApplicationController
  def index
    @loans = current_librarian.branch.loans.active.includes(:member)
  end
end
<% @loans.each do |loan| %>
  <%= loan.member.name %>
  <%= LoanableCache.fetch(loan.loanable_id).title %>
  <%= loan.due_date %>
<% end %>

A developer opens this view while reviewing a pull request and something looks off. LoanableCache.fetch? Rails has a perfectly good way to do this. They leave a very reasonable comment: “Why aren’t we just using includes(:loanable)? It’s cleaner.”

Two words in the controller, a tidier view, idiomatic Rails. It gets merged.

@loans = current_librarian.branch.loans.active.includes(:member, :loanable)
<%= loan.loanable.title %>

That morning in production, the dashboard is slower.

The reviewer wasn’t wrong about Rails. The new code is cleaner. It is more idiomatic. And it made things worse.

Look at what disappeared: the word Cache. The original developer had thought about this. Thousands of loads a day, titles that never change, eighteen fast cache hits instead of a join on every page load. The cache wasn’t an oversight. It was the whole point.

phronesis

That original developer wasn’t being clever, and they weren’t ignoring conventions. They understood the final cause. The right shape of this code isn’t the most idiomatic shape. It’s the shape that serves what the page is actually for.

Aristotle had a word for it: phronesis. Practical wisdom. Knowing the right action given real constraints and real consequences. Not giving up. Seeing clearly.

Aristotle with a Bust of Homer. Rembrandt, 1653. Aristotle with a Bust of Homer. Rembrandt, 1653.

So the next time you choose shipping over refactoring, or leave a bit of debt on purpose, ask Aristotle’s question first: what is this thing for?

Technical debt isn’t always a failure of philosophy. Sometimes, it is philosophy.