Why you should know algorithms

Hi everyone, today I am going to discuss a topic that would be useful to any beginner of programming, and maybe for some more experienced players as well. When we first learn algorithms, it might seem that they are just abstract things the professors are making you learn to make your life harder. Well, that might also have some truth in it, but, trust me, when you are working a job, these will come into play in a big way.



During my first job, there was a high emphasis on performance. So, there was a heavy emphasis on using the best tools for the job. Majorly we had to pay attention to the data structures used. Using a queue where an array is a big no-no. (It's just one example but you get the idea.) On top of that, we had to worry about the multi-threaded performance and even on top of that, (to my fortune or misfortune) lockless queues. In such an extreme environment, knowing the proper algorithms becomes very important to even assess whether what you are trying to do is feasible.

Maybe you have started to see now that, depending on the job there are specific algorithms you have to learn. For example, you have to learn the shortest path algorithms when working for a company that extensively uses maps like Google Maps, Uber or PickMe. So, kids, it's a really good idea to research and learn the algorithms used heavily in your company's business domain.

Another much less obvious reason is that it helps you to develop new thinking patterns. Some of you might get it, but for the rest of you, let me explain. You can design an application with blocks which are essentially black boxes. (This is one of the most effective ways, in my experience, for development. But, if it doesn't work for you, there's need to go out of your way to adopt it.) You can define a box that does the searching, a box that does the merging, and so on. As you learn more about the nitty-gritty of searching, merging, etc. the more you are able to mentally zoom-in and define the specifics of those black boxes. This will help to reduce the time you have to spend on research and will definitely boost your productivity.

So, there are a few reasons to learn algorithms we have discussed here, they are,
  1. To increase your efficiency in performing in a certain domain.
  2. To get the tools required to move into a new domain.
  3. To increase your own aptitude in software design.
I hope this post has been of some help and interest to you. Let's meet again on another post, soon!

Comments