Algorithms for Everyone

Henrique Mota
Full-Stack tips
Published in
3 min readJun 16, 2018

Algorithms are an important part of every programmer toolbox. In fact if you are a programmer you use algorithms everyday even if you don’t notice.

An algorithm is a set of rules and transformations applied to a specific data structure. So everything you do with your code will end up in an algorithm.

So what’s the big deal with algorithms? Why so much hype about them?

Well apps are impacting the world nowadays and apps are a bunch of algorithms to fulfil a purpose. So it’s normal that the more recognised apps will see their algorithms praised in the media.

Want to know how to use algorithms to solve complex challenges? Follow me along.

Don’t reinvent the wheel

Software engineering is a very recent field. Still we have enough years to find recurrent challenges along the way. Sorting, finding, hashing all became part of programming languages built-in libraries. But it doesn’t end here.

There a lot of free libraries with other algorithms. Cryptography, machine learning, mathematics, physics, you name it. We have state-of-the-art algorithms tested, optimised and ready to use. So why reinvent the wheel? It’s better to know their existence and use them when needed.

Divide an conquer

So you have a big challenge to solve, something that is not common and very specific. How to approach this? Divide an conquer to the rescue. If you read previous posts you know that I privilege readability over performance.

Sometimes in algorithms performance is a requirement. Even in this situations it’s important to pay attention to readability. So divide your algorithm into small functions and name them accordingly. Then you can use this functions as semantic pieces.

Good books about algorithms

Next I will list 5 books that may help you to develop your skills on this topic.

I hope you liked this article, have fun with algorithms and stay cool.

Stupid Gopher

--

--