“My first act of free will shall be to believe in free will.” — William James, The Varieties of Religious Experience
A couple of years ago, I got my first introduction to Pragmatism through nothing but The Varieties of Religious Experience by William James. Back then, and still to this day, I had intrest in Religions and the understanding of the religious experience in general. So I obtained that book, started reading, and I didn’t know it will change my idea on Pragmatism, not just a philosophical theroy, but as a more practical tool to use, when fit.
Time passes, I get into Computer Science as a career. Later, and since I always try to find ways to improve, I thought one of the ways that could help is to read, and going through the most common books about Programming, the one that intrigued me the most was The Pragmatic Programmer by Andrew Hunt and David Thomas.
A light bulb glew in my head, the idea of combining 2 passions I have along with my actual work. Philosophy and Programming. At the first glance they might seem totally unrelatable but with careful view, you would find out that Programmers and Philosophers are basically the same, both ask questions, both search for answers.
The thing is, and what many people miss, is that Pragmatism is, at its essence, a theory of Truth, it’s true it has its own branches on Morality but its core idea is that Truth is what’s beneficial, that truth is what proves itself in practice.
In fact, this distinction between truth in theory and truth in practice shows up vividly in the history of Computer Science itself. For instance, names like Edsger Dijkstra might ring a bell here. He was one of the early people who called themselves Programmer
. The thing is, and for decades, Dijkstra pushed for the idea that programming should be treated as pure mathematics. A program, in his view, wasn’t just a collection of instructions to a machine but a kind of mathematical proof: every line, every function, every state transition should be provably correct according to strict formal logic.
But the problem is: Dijkstra was wrong. He hit a wall when he found out that some Algorithms cannot be proven. Many algorithms do perform well in practice, even if proving their efficiency or correctness is elusive. For me, what Dijkstra failed to realize is that even though Maths is integral for Programming, it’s not the totality of it. Our Programs run in the wild, requirements change, business needs in a constant change.
And that’s where Pragmatism comes in. Remembering that Truth is what’s beneficial, that Truth is what proves itself in practice. What matters is that the algorithm works and performs well in practice. In general, The True
way is the way that works. There’s no The True Way
. There a way that works, a way that fits the needs of the program, the needs of the business, the needs of the user. And that’s what Pragmatism is all about.
That been said, What we can learn from all of that, is that we need a set of tools, a set of ideas, and using them has to be only done in a pragmatic way. Again, the correct tool is the tool that fits and works. A true concept
or a design pattern
is the one that fits the needs of the program, the needs of the business and the needs of the user. At the end of the day, that what all of this is about, what truely matters.