Upgrade to Pro — share decks privately, control downloads, hide ads and more …

From Plato to Production

From Plato to Production

Every time you sit down to write code, you are unknowingly re-enacting a conversation that has been happening for 2,500 years. About what knowledge is. Where it comes from. And what we owe to the people who come after us.
From Plato to production is not a journey from philosophy to reality. It's the realization that production was always philosophical.

Avatar for yara debian

yara debian

May 11, 2026

Other Decks in Programming

Transcript

  1. 5/11/2026 Is there a perfect version of your code that

    exists, even if it never gets built?
  2. 5/11/2026 # Version 1 def process(account) account.loans.each do |loan| if

    loan.due_date < Date.today && !loan.returned? loan.update(overdue: true) AccountMailer.overdue_notice(account, loan).deliver_later account.increment!(:penalty_points) end end end # Version 2 def handle_overdue_books(account) account.loans.overdue.each do |loan| loan.mark_overdue! notify_member(account, loan) penalize(account) end end IDEA
  3. 5/11/2026 Library loans dashboard Books Magazines DVD Loanables (They all

    have "title") Conditions This page is the librarian's morning dashboard Average branch: 18 active loans. Titles are cached for 24 hours. Books don't rename themselves at night.
  4. 5/11/2026 class LoansController 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 %> class LoansController def index @loans = current_librarian .branch.loans.active .includes(:member, :loanable) end end <% @loans.each do |loan| %> <%= loan.member.name %> <%= loan.loanable.title %> <%= loan.due_date %> <% end %> Production: page is slower than before Cache LoanableCache bypassed
  5. 5/11/2026 Ancient Philosophy Plato → Aristotle → Kant Enlightenment Newton

    → Einstein Modern Programming Knuth → Thompson → Matz HUMAN KNOWLEDGE Hegel
  6. 5/11/2026 # Version 1 def process(users) users.select { |u| u.created_at

    > 90.days.ago && !u.confirmed? } end # Version 2 def unconfirmed_recent_signups(users) users.select { |u| u.created_at > 90.days.ago && !u.confirmed? } end
  7. Ancient Philosophy Plato → Aristotle → Kant 5/11/2026 RESIDUE Enlightenment

    Newton → Faraday → Darwin Modern Programming Knuth → Thompson → Matz Kant Hegel
  8. 5/11/2026 You stare. at a working code you feel bothered

    Platonic ideal failing to approximate you get the itch. you stop and ask Why? Because it has Stakes The answer matters Wonder. Cannot stare. at a working code and feel bothered No Platonic ideal failing to approximate NO itch. does not stop and ask Why? Because it has no Stakes The answer cannot matter NO Wonder. Which one are you?
  9. 5/11/2026 How do I optimize this? Why does it bother

    me that it works? How do I optimize this? You stare. at a working code you feel bothered Platonic ideal failing to approximate you get the itch. you stop and ask Why? Because it has Stakes The answer matters Wonder.
  10. 5/11/2026 def calculate_late_fee(loan) days_late = (Date.today - loan.due_date).to_i (days_late *

    0.20).round(2) end Why per day? Why 20%? Who decided that? Is this punishing the people who can least afford to return things on time? You stare. at a working code you feel bothered Platonic ideal failing to approximate you get the itch. you stop and ask Why? Because it has Stakes The answer matters Wonder.
  11. 5/11/2026 Cannot stare. at a working code and feel bothered

    No Platonic ideal failing to approximate NO itch. does not stop and ask Why? Because it has no Stakes The answer cannot matter NO Wonder.
  12. 5/11/2026 You stare. at a working code you feel bothered

    Platonic ideal failing to approximate you get the itch. you stop and ask Why? Because it has Stakes The answer matters Wonder.
  13. 5/11/2026 What if the most important thing you do as

    an engineer happens before you type a single line? When you make a pragmatic decision, are you being wise? Or are you just giving up? Is there a perfect version of your code that exists, even if it never gets built? Are you building things? Or are you thinking, and code is just the residue? When you name a variable, who are you talking to? If the tests pass, are you done? If you refactor code no one will ever read, did it matter? When you say "good enough," good enough for whom?