🧠 Brian Sunter Newsletter - What is an Algorithm?
See the rich version of this newsletter on my site.
This post focuses on a simple introduction to what algorithms are and why they're essential. Hopefully, it will be understandable even to non-programmers.
For some "brain food," I share thoughts from my all-time favorite tech talk, Simple Made Easy by Rich Hickey, and an exciting paper on AI playing the board game Stratego.
What is an Algorithm? 🤖
The first section in the bootcamp called "Intro to Algorithms" focuses on introducing what an algorithm is.
This guide is basic, but I think it's helpful to start with a high-level introduction.
In computer science, an algorithm is a series of steps written in code that a computer runs to perform a task.
I go through some examples of algorithms, what they can do, and why they're useful.
Can you explain the difference between an algorithm and a heuristic? If not, check out the guide!
Productivity Toolkit 🛠️
In this section, I'll share a productivity tip I've learned recently.
Logseq Project Template ✅
I manage almost everything I do with logseq-projects.
I use them to group tasks across different initiatives, prioritize them, and make progress on them.
I recommend reading my logseq tasks guide beforehand.
Brain Food 🧠 Simple Made Easy
This talk is about the difference between "simple" and "easy" in the context of designing complex systems like computer software.
Many programmers are obsessed with making things "easy" for themselves, but we should be much more concerned with making things "simple" so they are reliable and easy to maintain.
Tools focused on programmer convenience may do things you don't fully understand.
Simple vs Complex
Programmers use the word "simple" and "easy" interchangeably. However, they're two different yet related concepts.
Examining the root word of "simple" and "complex" sheds some light on the difference between "simple" and "easy."
So the first word is simple. And the roots of this word are sim and plex, and that means one fold or one braid or twist.
And the opposite of this word is complex, which means braided together or folded together. Being able to think about our software in terms of whether or not it's folded together is sort of the central point of this talk.
We can look at something and see that it’s “simple”. We can’t do the same for “easy”.
Simple vs Easy
"Simple" is a concept we can objectively look at, whereas "easy" is much more relative to the individual.
What's easy for me may be hard for you and vice versa, based on our experiences.
The critical thing to distinguish it from simple is that easy is relative. Right? Playing the violin and reading German are really hard for me. They're easy for other people, certain other people. So unlike simple where we can go and look for interleavings, look for braiding, easy is always going to be, you know, easy for whom, or hard for whom? It's a relative term.
We throw these terms around sort of casually saying, oh, I like to use that technology because it's simple, and when I'm saying simple, I mean easy. And when I am saying easy, I mean because I already know something that looks very much alike that. It's how this whole thing degrades and we can never have an objective discussion about the qualities that matter to us in our software.
If you want everything to be familiar, you will never learn anything new because it can't be significantly different from what you already know
Modern tools and processes are so focused on making things fast and "easy" for those making the software, but these processes often produce "complex" results, which eventually become "hard" to maintain long term.
Instead, we must focus on making things "simple" above all else.
Simple may be harder, unfamiliar, and slower at first, but simplicity is the only sustainable way forward in the long run.
Link of the week 🔗
AI Masters Stratego Board Game 🪖♟️
AI can play Stratego at an expert level now.
Stratego is one of the few iconic board games that AI has not yet mastered.
This popular game has an enormous game tree on the order of 10^535 nodes, i.e., 10^175 times larger than that of Go.
I used to love this game growing up. I didn't realize it was one of the hardest board games in the world.
The reason it's so difficult is that you can't see your opponent's pieces. It has "imperfect information" like poker, so you must infer what's on the board.
They developed the AI using "self-supervised learning," where the AI learns by playing against different versions of itself.
Knowing that it's a mathematically interesting game renewed my interest, and I've been playing it on mobile. It has a great "quick play" mode which randomizes the initial layout and makes it much faster to practice.
I hope you enjoyed this week's newsletter.
Next week, we'll continue into the Algorithms Boot Camp with some more detailed code (and math). I'll continue to build out my logseq projects guide to include queries as well.