What is an algorithm?

(Image credit: Shutterstock / carlos castilla)

Algorithms affect our daily lives more than we care to think and, most of the time, we don’t even know it. We use algorithms in our daily commute to work, or as you cook your favorite Gordon Ramsey Beef Wellington recipe or bake your favorite key lime pie. As you follow through the steps of a recipe, i.e., exact measurements of each ingredient and even temperature control, you’re able to create the pie as desired - neither sloppy nor rock solid. 

In his book, The Art of Computer Programming, Donald Knuth describes algorithms as a confusing word. Learning about algorithms, it’s easy to agree with this description. Merriam Webster defines it as, “a step-by-step procedure for solving a problem or accomplishing some end - so let’s look into a few more examples first.

Google’s search engine allows us to get search results within milliseconds because it uses an algorithm. How? Google searches involve scanning millions of web pages for the keywords you entered and giving you results in a fraction of a second. At present, there are probably over 200 algorithms Google uses that we aren’t privy to, but the company was using PageRank, which essentially measured the significance of websites to your search term or keyword to give you the best possible links, before its patent expired.

As another example, the suggestions you see when you’re browsing for movies or TV shows on Netflix are not at all random. The platform uses an algorithm to monitor not only what you’re watching but also when you’re watching, where you’re watching and how long you’re watching for. 

Your favorite social media sites such as Facebook, Instagram and Twitter, all use algorithms too. The ads you see follow certain algorithms to show you content you might like and products you might be inclined to purchase.

Is that all there is to algorithms?

Absolutely not. Algorithms are key in the fundamentals of programming, and if you’re more interested in coding than baking, learning about algorithms should always be your first step. 

Keep in mind that algorithms will not require an in-depth knowledge of computer programming or programming language.

Is there such a thing as a good/bad algorithm?

Algorithms govern many things that happen in the world today. The GPS device taking you to your destination uses an algorithm, the website booking the flight to your next travel destination uses an algorithm, sending emails require algorithms, video games use algorithms, even video conferencing with your workgroup uses an algorithm.

Algorithms created with good intentions can yield negative results, but it’s all very subjective. It’s safe to say there can be good or bad algorithms, depending on the intention and consequences.

Secure Hash Algorithm 1 (SHA-1), a cryptographic hash function used for producing hash “digests” (each 40 hexadecimal characters long), can be considered a good algorithm. It has been supported by Secure Shell, which is responsible for encrypted connections in millions of computers.

However, due to growing security concerns, SHA-1 has placed millions of websites at risk after an encryption fault, which could be considered a negative consequence.

Do algorithms make computers smarter?

Algorithms are important in writing code, as this tells the computer what you want it to do. Whether you want to open a browser, inspect an element, search for an app - every command goes through an algorithm that lets you communicate with the computer, making it do exactly what it needs to.

Do algorithms involve mathematical equations?

Often, but not always. The important thing to note is that algorithms cannot be vague, otherwise any desired outcome will be unattainable.

Let’s take a look at one example: an algorithm created for the American tax system has been reused elsewhere without amendment, resulted in uncollected tax revenue in the UK amounting to up to £31 billion. The algorithm is responsible for calculating taxes, but using the wrong algorithm in the wrong situation can cause detrimental consequences.

I want to learn more about algorithms. Where should I start?

You can start by building your logic, problem-solving skills, and moving on to basic programming (Java, C++, C, Python, etc.). In programming, algorithms play an invaluable role in problem solving, so it is important to note that algorithms have a larger impact in our world than simply getting millions of crawling links within milliseconds of searching on Google, or baking the best key lime pie. 

More so, learning about algorithms is not something you can do by reading a single article in one sitting - fortunately, there are a wealth of  resources available online you can use in your search for a better understanding of algorithms.

Anna is a freelance copywriter with extensive knowledge on the technology sector. She writes about a variety of topics for TechRadar including web hosting, website builders and cybersecurity. She also has a knack for writing deals, guides and versus articles.

Latest in Software & Services
A man sitting at his desk in the evening and using a desktop computer
Office 2021 vs Office 2024: is it time to upgrade?
Microsoft 365 Business app logos
Office 2024 LTSC vs Microsoft 365 Business: what are the differences?
Windows 11 Start menu layout choices: Grid view
Windows 11 vs Linux for business: which operating system should you embrace?
A phone sitting on a laptop keyboard with the Microsoft Outlook logo on the screen.
Gmail vs Outlook for business: which email system is right for your organization?
Windows 11 logo
Windows 11 Pro vs Windows 11 Home: which version is right for you?
Canva HubSpot
HubSpot and Canva team up to level the creative playing field
Latest in News
Google Gemini Robotics
Gemini just got physical and you should prepare for a robot revolution
Lilo & Stitch Official Trailer
Stitch crashes into earth and steals our hearts with the first trailer for the live-action Lilo & Stitch
GTA 5
GTA Online publisher Take-Two is gunning for a black market that’s basically heaven for cheaters
Y2K cast looking shocked
Y2K has a streaming release date on Max, so you can witness the technology uprising at home
The Discovery+ homepage
Discovery+ just got a big update to its streaming app that makes it more like Max – here are 5 great new features to try
Two Android phones on a green and blue background showing Google Messages
Struggling with slow Google Messages photo transfers? Google says new update will make 'noticeable difference'