Whether you like it or not, technology is everywhere these days. It’s likely that you own a smartphone and use it several times a day for a variety of reasons. In fact, according to the Pew Research Center “nearly two-thirds of Americans are now smartphone owners, and for many these devices are a key entry point to the online world.” That’s a huge number! But what all these people may not realize is that by using a smartphone, they’re actually using code written by people…everyday!
Think about a time when you’ve needed directions to a destination. It’s unlikely that you pulled out a road map while behind the wheel to check a turn. No, these days we can simply pull out our smartphones, speak to it to ask for help and – voila! – we’ve got our directions. But contrary to what many believe, smartphones cannot perform magic.
So how does this actually work? The answer is programming (also known as coding). Programming is the applied task of using a specific language to write an application. This language is then used to create an algorithm, a step-by-step set of rules that consistently solve a problem. To put it in the simpler terms, code and algorithms make it possible to create the apps, computer software, and websites that we use everyday. Without these things, our smartphones wouldn’t be able to perform the tasks we rely on them to do. We need phones to give the exact directions for the myriad of roads, destinations, and starting locations. Coding allows us to create a series of algorithms that tell the computer (in this case the phone) what the best solution is to this and countless other problems.
Let’s take a closer look at the example above. In theory, there are endless ways to get from one place to another. You can take the highway if you like to drive fast or you could cruise the back roads for a more relaxed ride. But it’s fair to say that most people want to get from A to B in the fastest way possible. Here is where the problem to be solved comes in. How can we quickly travel from here to there, taking into consideration factors like traffic, construction, detours, road work…? The list is endless. A smartphone uses “dijkstra’s algorithm” to solve this problem by allowing a computer to determine the best possible route. No paper map necessary. How did people ever survive without computer programming?