Empiricism and Rationalism in Software Development
What Hume, Descartes, and other philosophers can teach us about software development
Adapted from a post I originally wrote in portuguese
Where did this post come from?
First things first: no, I'm not under the influence of any mind-altering substances. I recently started studying philosophy and developed a taste for it. While studying, my mind kept connecting philosophical concepts and questions with techniques and behaviors we're accustomed to seeing in the software development world. I quickly made a list of potential posts I'd like to write, so this definitely won't be my last post about philosophy and software development.
In other words... this trippy post won't be the last one on this subject. :)
Descartes was about 50% agile
Descartes was a rationalist, meaning he believed that the best way to find truth was through thought. This might make us think of him as a traditional project manager, sitting at his desk thinking through every detail of the plan we must follow to develop our product.
But thinking of him that way wouldn't be fair, because in his Cartesian method we can find ideas very similar to what we practice in agile software development:
Breaking big problems into smaller problems
Ordering problems and solving the simplest ones first
You can almost imagine him writing unit tests and breaking down Product Backlog items, right? But there's a problem: Descartes believed we could reach ideas that were "clear, objective, and immutable", and that we could use them like LEGO blocks to build bigger ideas.
It's as if he supported writing unit tests initially to provide clarity and objectivity, but failed to see value in keeping these tests in the repository after the functions were implemented because that idea had already been validated and consolidated.
In other words: Descartes sought an immutable truth, but the process to reach these truths was iterative and incremental.
But if Descartes was partially right about method, where did he go wrong? This is where David Hume comes in with a revolutionary idea: what if experience is more important than pure reasoning?
Hume would have been an excellent Scrum Master
David Hume had the advantage of being born about 120 years after Descartes and thus having more material to study and explore. He argued that real knowledge can only be obtained through experience, and that merely sitting and reflecting or studying wouldn't generate any new facts, only mere speculation.
But even being a devoted fan of experiments, he knew how to recognize their limitations: "Though experience be our only guide in reasoning concerning matters of fact, it must be acknowledged that this guide is not altogether infallible but in some cases may lead us into errors" - David Hume
Through this thinking, he raised some problems (and reflected on others that had been previously raised by other philosophers) that are easily recognizable in the software development world:
1. The problem of induction: Past experience doesn't guarantee the repetition of future results. Also known as: if it works on my machine, it works on the server.
2. The problem of causality: Just because event A occurred followed by event B doesn't mean one caused the other. Also known as: to replicate the bug the customer found, just follow these steps.
3. The fallibility of experiment: An experiment can always fail or lead us to wrong conclusions. Also known as: if we cover 100% of the code with tests, we'll never have bugs again.
As The X-Files would say: The truth is out there!
This maxim should govern Scrum teams worldwide, since the framework has Empiricism as part of its foundation. If David Hume were a Scrum Master and saw teams doing Sprint Reviews with PowerPoint presentations or Dailies that are basically Status Reports, he definitely wouldn't sit idly by.
If Hume were a Scrum Master today, he would probably:
Insist on demonstrations of working software
Prioritize real metrics over theoretical estimates
Question any "absolute truth" about processes
Cool... but can we conclude anything useful from all this?
Well, first of all, I'm not a philosophy expert and took the utmost care not to commit any crimes when mentioning these philosophers and their thoughts. I'm comfortable with my understanding of the subject, and I believe this type of deeper understanding about the why of things always leads us to question mechanical behaviors and be more conscious about what we practice daily.
I think writing helps me better absorb the topics I study, and even if nobody reads it, it ends up having value for me.
For example, we can conclude that context matters. Descartes would probably write unit tests to validate the logic of building our product, while Hume would think about acceptance tests to evaluate customer behavior when using the product. Both approaches have value that can be greater or lesser according to the context in which they are applied.
If Descartes and Hume decided to do pair programming today, they would probably create DevOps.
Descartes would contribute with:
Infrastructure as code (after all, it needs to be clear and objective)
CI/CD Pipeline (order and method in action)
Automated tests (validating fundamental truths)
While Hume would insist on:
Constant monitoring (because experience matters and failures happen)
Feature flags (to validate hypotheses in production)
Culture of blameless postmortem (learning from errors and treating them as a natural part of the process)
If we understand each daily practice as an experiment that can fail, we can start to see if we achieve satisfactory results in each of these experiments:
Why do we have daily meetings?
Why do we do Sprint Reviews?
How can I measure the value that a certain practice brings to my team?
And this way we start to do our work with more consciousness, always taking into account the intention of each step.
Interested? Well, here are my recommendations:
I started learning more philosophy through Stoicism, and Ryan Holiday's The Daily Stoic is a book I'm reading for the third time and therefore never tire of recommending. If stoicism appeals to you, all of Seneca's work might be interesting, and I recommend starting with "On the Tranquility of the Mind".
Oh! If you're not much of a book person, check out the Philosophy Tube channel on YouTube. Her video on empiricism might be a good start!