You ever open up instagram ready to consume some Grade-A content but immediately start seeing posts from '5 Days Ago' at the top of your feed? That's because Instagram sucks at algorithms and want to ruin your life.
You ever have a dream about a specific product then about 20 minutes after your REM cycle is over, BOOM it's on your Facebook feed? Yeah that's also an algorithm.
You ever say something out loud then it shows up as an ad everywhere you look. YEP YOU GUESSED IT MORE ALGORITHMS BUDDY.
There’s been a good deal of chatter in recent years about algorithms. This previously esoteric concept has become a household term because algorithms of various sorts are pervading our lives, in often not-so-good ways. There's some useful ones that make our digital experience much better though, for example: Google’s algorithms that determine what sites show up on that all-important first page of search results are closely guarded secrets and the subject of much speculation among search engine optimization experts. Amazon and Netflix use algorithms to make recommendations based on your past viewing or buying selections. The list goes on...and on and on and onnnnnn.
Dig a little deeper, though, and you will find that algorithms turn up all over the place—pretty much anywhere a computer is involved. Or a phone... which is just a lil tiny computer.
What in the Blueberry Heck is an Algorithm?
In general, an algorithm is a set of procedural steps for executing a task, often in the context of performing a calculation. This can be pretty much anything. In fact, when I went through my rubiks cube phase (don't ask) I learned that the patterns used to solve a cube are called algorithms too.
The idea has been around for a long time, at least back to the ancient Greeks (trust me I was there). The advent of calculating machines brought with it a need to formalize how algorithms are described. Typically, this is done with flowcharts and what computer scientists call “pseudocode,” which looks like program code except that it is not written in a specific programming language.
Most algorithms feature IF-THEN statements, loops, calculations, and comparisons in order to arrive at some result. An algorithm is a level up in abstraction from actual computer code—any developer who is competent in any language should be able to implement an algorithm in code.
Algorithms are not necessarily implemented as computer programs; some algorithms can be implemented in hardware. Consider one of my favorite hobbies, photography: An algorithm governs how the autofocus system inside a lens and camera body syncs up with the distance of an object, an entirely separate algorithm decides which item to focus on when you hit that autofocus button. These work in conjunciton nearly instantly to provide you with a sharp, crisp photograph. This is also why third-party lenses often lack in autofocus performance. The manufacturer of the camera body seldom shares the proprietary autofocus algorithm with the lens-maker, forcing them to reverse engineer the system and often focus at a slower or less accurate rate.
In what other unexpected areas might we find algorithms?
- Automobiles: Gasoline-powered cars use algorithms to determine the precise mixture of air and fuel to inject into the engine’s cylinders in order to operate at maximum efficiency under every operating condition. Hybrids use algorithms to determine when to turn the engine on and when to operate battery-only.
- Traffic lights: Old-fashioned “dumb” traffic lights, which changed at a set frequency regardless of traffic conditions, have been supplanted almost everywhere with traffic lights that employ sensors in the roadway to determine when to change, whether the turn-arrow signal is needed, and whether the light cycle needs to account for pedestrians. Some cities have even implemented city-wide systems intended to time the traffic lights to minimize traffic jams.
- Appliances: Modern clothes washers, clothes dryers, dishwashers, and other appliances use sensors and algorithms to determine how much water or heat is needed to get the job done, thereby maximizing efficiency.
- Gadgets & Gizmos: Modern electronic devices are of course loaded with algorithms. The smartphone feature that changes the screen brightness according to ambient light conditions, automatic sprinkler timers, thermostats, hearing aids…all have some sort of algorithm under the hood.
- Financial markets: Most transactions in stock, bond, currency, and commodities markets are now executed by electronic trading systems that operate without human intervention. Sophisticated algorithms are used to determine what to buy and sell, at what time, and at what price. These are being implemented within cryptocurrency and machine learning algorithms are becoming a big part of the financial technology world.
The Future of Algorithms
Here are some emerging areas where algorithms play a major role:
- Customer Service: In the (very) near future, most customer service systems will route calls more efficiently and provide a better response time. This is already relatively widespread but will gain efficacy and traction within the customer service industry.
- Machine Learning: My favorite, obviously. Machine Learning algorithms are increasing in complexity and the use-cases are ever expanding. As these predictive technologies are improved we're going to see vast improvements in medical, financial and other industries.
- Smart electric grids: As the electricity industry evolves to incorporate more renewable and variable sources of power, such as wind farms and rooftop solar panels, algorithms will be needed to maintain voltage and frequency and to prevent or limit blackouts.
- Crime prevention: Police departments have started using predictive analytics algorithms to project where and when crimes are likely to occur, so they can focus officer presence on those areas. Kind of like that Minority Report movie but without Tom Cruise or the creepy people hanging out in that pool... the precogs or whatever. That was weird. Stupid movie don't bother.
- Robotics: Any autonomous or semi-autonomous system, from self-driving cars to security robots, will be guided at least in part by algorithms to drive decisions. By also incorporating machine learning techniques, these algorithms can be tweaked automatically for continuous decision-making improvement.
Despite my whining about how much Instagram sucks, algorithms are not necessarily insidious contrivances designed to compromise your privacy or separate you from your money... not always anyway. They are an essential part of modern life, and will continue in that role as long as we keep dreaming up new ways to automate things.