Agile Software Engineering
This podcast explores how craftsmanship, architecture, engineering rigor, and organizational practices come together in modern R&D environments. Each edition refines and deepens my earlier reflections, building a coherent and evolving body of knowledge around Agile Software Engineering
Agile Software Engineering
PROLOG: THE OTHER BOOK ON MY DESK
Use Left/Right to seek, Home/End to jump to start or end. Hold shift to jump forward or backward.
In this episode of The Agile Software Engineering Deep Dive, Alessandro Guida revisits Prolog, the logic programming language that once stood close to the heart of symbolic artificial intelligence.
The episode starts with a personal memory from the beginning of his career, where Turbo Pascal and Turbo Prolog sat side by side on the desk, representing two very different ways of thinking about software.
Turbo Pascal was about telling the computer what to do. Prolog suggested something stranger and still fascinating: describe facts, rules, and relationships, then ask the machine what follows from them.
The episode explores Prolog’s origins, why it became popular in the age of expert systems and symbolic AI, what makes its programming model so different, and why its ideas still matter in areas such as rule engines, constraint solving, static analysis, explainable reasoning, and modern AI discussions.
It is also a critical look at Prolog’s place today, because while it may not be the natural choice for most modern software systems, it remains a powerful reminder that programming is not only about instructions.
Sometimes it is about knowledge, relationships, and the questions we ask.
This Podcast is an audio version of the written Agile Software Engineering newsletter. If you want to go deeper, don't forget to subscribe the newsletter too.
Welcome to the Agile Software Engineering Deep Dive, the podcast where we unpack the ideas shaping modern software engineering. My name is Alessandro Guda, and I've spent most of my career building and leading software engineering teams across several industries. Today, I want to go back to a language that many software engineers have heard about, some have studied, and relatively few have used seriously in professional systems. Prolog. This episode started with a question from my friend Henrik, who asked why I had written about Lisp, but not about Prolog. That question immediately brought me back to the beginning of my career where two books often sat side by side on my desk, TurboPascal and Turbo Prolog. TurboPascal was the practical companion, the tool I used for normal day-to-day work. Turbo Prolog felt different, more academic, more unusual, and in some ways much more mysterious. It represented another way of thinking about programming. Instead of telling the computer exactly what to do, step by step, Prolog invites us to describe facts, rules, and relationships, and then ask the machine what follows from them. In this episode, I look at where Prolog came from, why it became popular in the symbolic AI period, what makes it so different from mainstream programming languages, and why its ideas are still relevant today in areas such as rule engines, constraint solving, static analysis, explainable reasoning, and modern AI. I also try to be honest about its limitations, because Prolog is probably not the language most of us would choose for a modern cloud service, mobile app, or large commercial backend. But as a way of thinking, it still has something valuable to teach software engineers. With that, let's dive in.
SPEAKER_01Welcome to today's deep dive, everyone. I am uh I'm really excited about this one. You know that feeling when you're like digging through an old box in the attic?
SPEAKER_02Oh, yeah, totally. Dust everywhere.
SPEAKER_01Right, dust everywhere. And you pull out this one object and suddenly it just brings back this flood of memories. But not only that, it kind of gives you an entirely new way of looking at the world.
SPEAKER_02Like a totally different perspective, yeah.
SPEAKER_01Exactly. Well, today we are doing exactly that, but for human thought and programming. Our mission today is to explore how programming languages don't just tell computers what to do, you know? They actually fundamentally change how we the humans think.
SPEAKER_02Aaron Powell, which is a huge claim, I mean, when you really think about it.
SPEAKER_01Aaron Powell It is. And we're basing this all on issue number 47 of the Agile Software Engineering newsletter. It's titled Prologue the Other Book on My Desk.
SPEAKER_02A great read.
SPEAKER_01It really is.
SPEAKER_02Yeah.
SPEAKER_01Now, quick bit of housekeeping before we jump in. This deep dive is completely free, but it is a massive help to us if you press like on this deep dive, subscribe to receive all future issues, and you know, repost or forward this deep dive and the related article to your friends and colleagues.
SPEAKER_02Yeah, please do. It really helps.
SPEAKER_01And one huge note on that source article the author included some genuinely brilliant visual code examples. And uh, I'll be honest, reading lines of code out loud is just terrible audio.
SPEAKER_02That's the worst. It just sounds like alphabet soup.
SPEAKER_01Right. So we are not going to do that to you today. We're gonna talk about the concepts, but please remember to read and subscribe to the full article so you can actually see those illustrations and get the full in-depth content. You really need to see them.
SPEAKER_02You really do, yeah. Visualizing the logic makes all the difference.
SPEAKER_01Definitely. So, okay, let's jump in. We're starting right where the author's journey began, basically at the start of their career. And it all kicked off because a friend of theirs, Henrik, asked this really simple question. Aaron Powell Yeah.
SPEAKER_02Henrik just said, you know, why not write something about Prologue 2?
SPEAKER_01Aaron Powell Which is such a casual question, but it sparked this vivid memory of two specific books that used to just sit on the author's desk. One was on Turbo Pascal and the other was on Turbo Prolog.
SPEAKER_02In that contrast, I mean that is the whole story right there.
SPEAKER_01Okay, let's unpack this. Because I like to think of Turbo Pascal as um like a trusty power drill.
SPEAKER_02Aaron Powell A power drill, right.
SPEAKER_01Trevor Burrus Yeah. It was the practical day-to-day tool. You pull the trigger, it spins, you use it to build things, test them, you know, debug late into the evening. But Turbo Prologue, that book was like this mysterious puzzle box.
SPEAKER_02Aaron Powell It's a great analogy, actually.
SPEAKER_01Thanks. So for those of us who aren't deeply entrenched in 1980s computer science, why did Prologue feel so academic? Like why was it so unusual compared to a traditional language like Pascal?
SPEAKER_02Aaron Powell Well, the foundational difference is what they actually teach you. So Pascal taught the author how to instruct the machine, right? Step by step.
SPEAKER_01Aaron Powell Like giving someone a recipe. First do this, then do that.
SPEAKER_02Exactly. Initialize this variable, run this loop, stop when it hits 10. But Prologue, it proposed this radical idea. What if instead of giving steps, you just told the computer what was true?
SPEAKER_01Aaron Ross Powell Wait, just told it what was true.
SPEAKER_02Aaron Powell Yeah. You just give it facts. And then you simply ask it a question. It's not just a syntax change.
SPEAKER_01Right.
SPEAKER_02It's a complete paradigm shift. You move from execution to reasoning.
SPEAKER_01Aaron Powell That's I mean, that's kind of mind-blowing, handing over the how and just dealing with the what.
SPEAKER_02It really is. You're no longer micromanaging the processor.
SPEAKER_01Aaron Powell So if Prologue is all about this, you know, this reasoning. Where did this strange philosophy even come from? Because it doesn't sound like it was made to build a banking app.
SPEAKER_02Oh, definitely not. It was born in the early 1970s. Okay, 70s. Trevor Burrus, yeah. In Marseille, actually. Uh Elaine Kolmerauer and Philippe Roussel created it. And they had a lot of influence from a guy named Robert Kowalski on the logic side. Gotcha. And the name Prologue literally means programming in logic. Like in French, programmation en logique.
SPEAKER_01Oh, that makes so much sense. I never actually put that together.
SPEAKER_02Yeah. And we have to look at the era. This was the era of symbolic AI.
SPEAKER_01Right, before neural networks took over everything.
SPEAKER_02Exactly. Prologue wasn't built for, you know, payroll systems or GUIs. It was made for natural language processing, automated theorem-proving.
SPEAKER_01Heavy academic stuff.
SPEAKER_02Very heavy. Back then, researchers honestly believed human intelligence could be represented purely through symbols, like facts and rules.
SPEAKER_01So if you could just map out enough facts, the machine would be quote unquote smart.
SPEAKER_02That was the dream, yeah.
SPEAKER_01Which perfectly leads into this concept in the article of building a small world. I love this part. The author demonstrates this using just everyday relationships.
SPEAKER_02The family tree example.
SPEAKER_01Yes. So instead of writing these crazy complex loops to find out someone's grandparents, in prologue, you just define facts. Like Alice is Bob's parent, Bob is Carol's parent.
SPEAKER_02Right. You're literally just declaring the truth of the world.
SPEAKER_01Exactly. And then you add a rule. A grandparent is the parent of a parent. And again, folks, remember to check out the written article to actually see this elegant code. We aren't reading it out loud, but it is so cool to see how short the code is.
SPEAKER_02It's remarkably concise.
SPEAKER_01And there's another example in there about city to city travel routes that uses recursive rules, which is just brilliant. But why does this declarative style actually matter under the hood?
SPEAKER_02It matters because of what Prologue is actually doing when you run it. It searches for a logical proof.
SPEAKER_01A proof, not an outcome.
SPEAKER_02Right. It doesn't execute a list of instructions. It tries to satisfy your query, it takes the facts, takes the rules, and essentially searches through this maze of logic to find a path that makes your question true.
SPEAKER_01Okay, so moving from the theory to the practice then. If describing a small world is this elegant and you just ask questions and get answers, why isn't the entire modern internet running on Prolog?
SPEAKER_02That is the big question.
SPEAKER_01Right. Because in the 1980s, Prolog was a huge deal. It perfectly matched this massive ambition of building expert systems.
SPEAKER_02Oh yeah. Expert systems were the hype of the decade.
SPEAKER_01This totally seductive idea that we could just take a doctor's medical knowledge or a lawyer's legal knowledge, perfectly captured into machine rules, and boom, AI doctors.
SPEAKER_02It sounded flawless on paper.
SPEAKER_01But here's where it gets really interesting. Despite this amazing pedigree, the author fully admits that Prolog wouldn't be their first choice or their second or even their fifth choice for building a modern cloud platform today. So why did Prolog lose the mainstream war?
SPEAKER_02Aaron Powell Well, the harsh reality of modern software engineering just hit it. I mean, look at mainstream languages today C, Java, Python, Rust, Go.
SPEAKER_01They're massive.
SPEAKER_02They have immense ecosystems. Cloud integration is seamless. You have observability tools, massive talent pools. Prolog just doesn't have that commercial infrastructure. Trevor Burrus, Jr.
SPEAKER_01It's kind of on an island.
SPEAKER_02It really is. But furthermore, there's what I call the mental model wall.
SPEAKER_01The mental model wall. Tell me more about that.
SPEAKER_02So when programmers who are trained in traditional imperative languages try to learn Prolog, they almost always try to write it like Pascal.
SPEAKER_01Oh, I see. They try to force step-by-step logic into it.
SPEAKER_02Aaron Powell Exactly. They use strange punctuation, they try to force sequential execution, and it just leads to disaster. Prolog uses concepts like backtracking, unification, and search.
SPEAKER_01So they're basically fighting the language itself.
SPEAKER_02Completely fighting it. It requires a totally different brain space. And frankly, that brain space isn't always commercially convenient when you have a tight deadline.
SPEAKER_01You don't want to rewrite your entire way of thinking just to ship a feature by Friday.
SPEAKER_02Exactly.
SPEAKER_01But even though Prolog didn't achieve, you know, world domination, its ideas didn't die, did they?
SPEAKER_02Not at all. They evolved.
SPEAKER_01And they're suddenly becoming incredibly relevant to our modern AI boom, which I find fascinating. Where does Prolog's DNA actually live today?
SPEAKER_02You'll find its descendants in some very powerful tools. Things like Datalog, CodeQL, and Souffle.
SPEAKER_01Code QL? I've heard of that one. GitHub uses it, right?
SPEAKER_02Yeah, it's heavily used for large-scale static analysis. Basically, you treat your code base like a database of facts and you query it for security vulnerabilities.
SPEAKER_01Oh, so you're using logic rules to say, find me the security flaw instead of reading line by line.
SPEAKER_02Exactly. It's constraint solving. Verification tools rely on this declarative logic heavily.
SPEAKER_01Which brings us to the article's contrast between prologue and modern neural networks, like large language models. And this analogy is just perfect. The author says modern AI is like this brilliant savant.
SPEAKER_02The savant, yeah.
SPEAKER_01You ask a question, it gives you an amazing answer. But if you ask it, hey, how did you get that answer? It has no idea. It just predicted the next word.
SPEAKER_02It can't explain its work.
SPEAKER_01Right. Whereas Prolog is like a meticulous mathematician. It shows every single step of the proof. Why does that distinction actually matter in the real world?
SPEAKER_02Aaron Powell What's fascinating here is the absolute critical need for explainability. Explainability? Yes. Think about safety critical systems, medicine, law, railway networks.
SPEAKER_01Aaron Powell Oh, right. You don't want an AI just guessing if the train should switch tracks.
SPEAKER_02Exactly. You can't just have a statistical guess from a neural network in those domains. You need to know why the answer follows. If a medical AI denies a treatment, the doctor needs to know the exact logical proof that led to that decision.
SPEAKER_01That makes a lot of sense. You can't just say the black box said so.
SPEAKER_02I really can't. So the old questions the prologue asked: how do we represent knowledge? How do we explain conclusions? They are more vital today than they ever were.
SPEAKER_01Which brings us to the author's ultimate conclusion and really the heart of this whole deep dive. The real value of having that turbo prologue book on the desk wasn't about using it in production.
SPEAKER_02No, not at all.
SPEAKER_01It was about opening a mental door.
SPEAKER_02I love how the author breaks down what different languages teach us as mental models.
SPEAKER_01Yeah, let's go through that because it's so insightful. So C teaches you about memory and control. You're right down there with the hardware.
SPEAKER_02Lisp teaches you about symbolic structures and recursion.
SPEAKER_01Smalltalk teaches you to think in objects. Everything is an object sending a message.
SPEAKER_02And SQL teaches you to think in sets.
SPEAKER_01Right. And Prolog. Prologue teaches us to reason from facts and rules.
SPEAKER_02Which is such a powerful tool for anyone listening to this.
SPEAKER_01Even if they never write prologue.
SPEAKER_02Even if you never write a single line of prologue in your life. Thinking like a logician helps you design domain models. It helps you untangle messy business rules and build better configuration systems.
SPEAKER_01Because it forces you to separate things.
SPEAKER_02Exactly. It teaches you to separate what is true about your system from what should be done by your system.
SPEAKER_01Aaron Ross Powell That is just it's such a profound way to look at software engineering. So what does this all mean? We started with the feeling of finding a dusty book on turbo prologue in the attic. And it turned into this profound lesson on how the tools we use literally shape the way we construct logic in our own heads.
SPEAKER_02It's a journey for sure.
SPEAKER_01It really is. Before we wrap up, a final enthusiastic reminder for everyone listening. Please remember to read and subscribe to the full article for the in-depth content and those amazing code illustrations. Like we said, this deep dive is free, but your support is crucial.
SPEAKER_02Please press like.
SPEAKER_01Yes. Press like, subscribe for all future issues, and repost and forward this deep dive and the article to your friends and colleagues. We really appreciate it.
SPEAKER_02Definitely. And you know, I want to leave you with a final thought to mull over.
SPEAKER_01Oh, go for it.
SPEAKER_02If every programming language teaches us a specific way to think, specific mental model.
SPEAKER_01Yeah.
SPEAKER_02How is our modern reliance on generating code through AI chatbots reshaping the mindset of the next generation of engineers?
SPEAKER_01Oh, wow.
SPEAKER_02Right. If we stop explicitly describing the truth or even writing the step-by-step instructions, and we just accept whatever the statistical model outputs, what kind of mental door is that closing for us?
SPEAKER_01That is wow. That is a terrifying and fascinating thought to end on. If we outsource the logic, do we lose the mental model entirely?
SPEAKER_02Something to think about.
SPEAKER_01Definitely something to think about. Thank you all for joining us on this deep dive. See you next time.
SPEAKER_00Thank you for listening to the Agile Engineering Deep Dive Podcast. If you found this episode valuable, feel free to share it with someone who might benefit. A colleague, your team, or your network. You can access all episodes by subscribing to the podcast and find their written counterparts in the Agile Software Engineering newsletter on LinkedIn. And if you have thoughts, ideas, or stories from your own engineering journey, I'd love to hear from you. Your input helps shape what we explore next. Thanks again for tuning in. And see you in the next episode.
Podcasts we love
Check out these other fine podcasts recommended by us, not an algorithm.
Darknet Diaries
Jack Rhysider