Algorithms are just a way to organize
Many people hearing the word algorithm get impressed or intimidated when they hear it, thinking that it is really advanced technology. It can be, but the underlying concept is pretty straight forward and is put into practice by most people on an everyday basis. Algorithms are a way of organizing information or things. “I want to put A and B next to each other”. Boom, algorithm.
Easy example:
“This sandwich is going to have lettuce, tomato, turkey, and mustard.” - Sandwich algorithm
“I’m going to have a pickle and some chips with this sandwich.” - Lunch algorithm
You will notice with the lunch algorithm that it incorporated the Sandwich algorithm with it. So complex! Building algorithms within algorithms!
Where it starts to get messy and hard to understand is when the algorithm is written in a language that most people do not understand (e.g. a coding language like Python or MATLAB), and they reference outside data sets that are bigger than any one person can understand easily or well. And then they start putting more and more algorithms nested within each other. Using a proven algorithm from someone else, then building upon it. Lots of layers to understand and unpack.
But that is why algorithms are so helpful, you can write a series of things saying: “I want a pickle and some chips, as well as a sandwich with lettuce, tomato, turkey, and mustard.” You put that into a computer, call it “Lunch” and then you tell the computer to make you Lunch, and it goes out and gets you exactly that. Very efficient and saves time.
But then the problems happen: Do you want a dill pickle or a sweet pickle? What kind of chips? Did you mean chips as they would be called in the UK (i.e. French Fries)? Or did you want salt and vinegar potato chips with ruffles? What kind of mustard did you want? Spicy, yellow? If you specified these things ahead of time then the algorithm can be very efficient in understanding what you wanted. But…
Even within this relatively simple example the problems pile up super quickly. That is why algorithms are complex: they’re complex because organizing is complex. Context and perspective change the way it is implemented, and the source data can change it even more fundamentally.
More to come on this topic when I start talking about ethics in technology, machine learning, deep learning, and AI. (Spoiler: AI is essentially just a really big algorithm with lots of data to pull from).