Algorithms are overrated

Leo Liou
5 min readApr 14, 2022

Algorithm: a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.

By the definition above, we can practically classify all/most code as algorithms, sets of rules for computers to execute. That’s not what this article is about. This article will touch on the industry’s recent obsession with Big-O notation, discrete math problems, how fast algorithms run, etc. You see, earlier on (1970s- 1990s) when computer hardware were seriously limited, it was very important to optimise your algorithm in order to make your code run faster and to make your software usable. Game programmers in the 90s were at the frontline of the optimisation battle. They were dealing with an inferior hardware (by today’s standards) at the same time, trying to build real-time software with graphics and physics that would run at multiple Frames Per Second. There was and is a time and place for efficient algorithms and their implementation.

The birth of the Algorithm Industry

From the years 2009 to 2011, there was a big push to encourage people to study computer science at universities. Prominent figures like Bill gates and Barack Obama encouraged more people to learn how to code. This led to a ridiculous number of people flooding into computer science courses as well as flooding into the tech industry. Even people who were ill-adapted for the sport still wanted to play. People from other industries had some serious FOMO when they saw that such a high paying career has a very low barrier to entry. A carpenter, drummer or taxi driver could (and still can) simply learn PHP, Python or javascript for 6 months and become a developer. So companies needed a way to set some standard. They needed an easy way to tell people no. I mean they could have simply turned down people based on their CVs but that wasn’t enough. Big tech companies were being bombarded with millions of CVs so they decided to go the quiz route. Asking you bunch of useless puzzle/algorithm questions that you will never need for the job is a quick way of slapping you with a big NO and telling you that “you should work harder” lol. This method worked and in fact, it accidentally created a way for many other people to eat.

How the algorithm industry grew so big

After the whole hype about studying computer science and Artificial intelligence, the bubble started to burst in 2015 to 2016. Lots of computer science graduates and fairly skilled developers started struggling to find work. Entry level software engineering roles were demanding 5 years of work experience as well as 5 testicles. Lots of jobs, even the ones that just need you to centre a div everyday of your life will ask you to solve some pathfinding algorithm or some tree balancing algorithm in the interview. Even when it became so obvious that this method was ludicrous at best and a blunder in the worst case scenario, companies just could not get rid of a lazy system that easily weeds of these millions of cockroaches (oh sorry, I meant “developers”) out. It was like the new IQ test score as a measure of “Intelligence”. Why come up with a complicated and a more accurate way of testing when a number can be assigned to your “intelligence”. The smart business men started to cash in on this broken system and many companies started to sell courses on “how to be a Google engineer”, “How to hack FAANG interview” and “How to be a 100x engineer”. I mean, I would not blame these folks. I myself regret not cashing in on this market. The fact is that big tech companies as well as road-side tech startups who were struggling to pay their electricity bills were asking for programmers who could solve hard algorithmic problems with the optimal running time given only 30 minutes for the task. You see, I have no problem with a programmer that could genuinely solve difficult problem that he/she has never seen before, in fact, I admire them. I however do have a problem with “programmers” that have memorised how to solve these problems and are able to regurgitate them in the interview. This reminds me of exam format in the broken academic system.

Why a lot of algorithmic and optimisation techniques are practically useless

As hardware have gotten quite fast and network speed keeps improving, a lot of the optimisation on your code get overshadowed by more important factors like network latency. Lots of problems like scaling to multiple users are infrastructure problems with services like AWS are there for. There are also lots of optimised libraries you will be using at work. In game programming, your frame drops will mostly come from lots of vertices and poor mesh optimisation (A 3D modelling problem). And even in cases where code is the cause of frame-rate drop, simple things to look out for such as object pooling, finding components every frame, etc will solve most inefficiency problems. I remember testing out a merge-sort algorithm against a bubble sort algorithm in a update loop. Please note that update loops in game programming are callback functions that should run multiple times every-second. With thousands of elements in the array, I could barely notice any difference in the algorithms (in terms of speed). Most of the times we do not have thousands of elements in a list or array and we are mostly not programming real time software like video games, but the fanatical algorithmists will complain and mock your code for any bubble sort algorithm they see.

What you should learn Instead

I see lots of kids still in university, banging their heads about how to solve different data structure problems and solve them optimally. While this may be good for their foundation, It is easy to see how one can overdo this. The moment you realise that you want to be a front-end web developer, you need to start learning specific front-end frameworks (e.g. react, vue, angular) and start building projects with them. All the A-star and merge-sort will not be used in your day to day life as a professional. If you want to get into iOS development, get deep into Xcode, swift and objective C (optional). Reiterate on your design until it is perfect or close to perfect. Aim to be 10 out of 10 in your sub-field by learning the relevant skills. In most real world applications, running time O(n-squared) and O(n.logn) are barely noticed by the customer. If you need them to pass a job interview then you can simply study for them, just like you will study for an exam. You are simply trying to navigate through a broken system.

--

--