Stop learning useless things, do more

Stop learning useless things, do more
Photo by Dmitry Ratushny / Unsplash

Recently, I came across a post by a red competitor from Codeforces. He lists a lot of algorithms, which he said that he hadn't known. He concluded that if someone knows more than 3 of them and hasn't been in red division yet, they did it wrong. Hmm, I know more than 3 of them, but I don't even reach the orange division. So I absolutely agree with him. I did it wrong.

For those who don't know Codeforces and its "colour-based" ranking system, it is a competitive programming platform. If you know that playing chess or strategic video games are sports, you should know programming is also a sport when we put it in a competition. In this kind of competition, programmers need to solve some problems according to the provided specifications. Most of the problems ask programmers to have an in-depth understanding of algorithms, data structures, mathematics, and, of course, coding skills are required. Codeforces is the platform to organise such tournaments. Programmers are rated after each event; whoever delivers more effective and timely solutions will receive higher ratings. Since the programmers are split into divisions based on their rating, each with a distinct identifying color, we often recognise a user's level by their color. It is easy to see that red stands for top-notch users in global ranking.

Example of Codeforces's rating distribution. Credit: Wikipedia

Back to our story, Um_nik (a legendary grandmaster) lists many algorithms in his recent post, which he claims he doesn't know. Yes, I know some of them, but my highest rank is only the candidate master. The problem here is the way I learned; I tried to learn as many as possible. I tried to remember many and many algorithms, data structures and techniques. When I was training for the national competition at high school, I was eager to learn new things every day. As a result, I became a knowledgeable individual. I'm familiar with lots of terms like Fibonacci heap, suffix tree, pre-flow push, convex-hull 2D, and so on. However, I cannot go deeply into any of them and make them function in real problems. Therefore, I failed in the most important competition at high school.

Nevertheless, this setback has taught me an important lesson. This is, "Do not waste your time on useless things; focus on what matters". Of course, it doesn't mean learning more and more things is not good. I merely stated that you need to grasp the fundamentals first. A solid understanding of fundamental knowledge enables you to learn new things easily and know how to apply them in specific situations. For example, I frequently ask candidates at the technical interview, "Which should be the best search algorithm when I want to search for the existence of an element in an arbitrary array?". Many of them told me they choose the binary search algorithm since its time complexity is only $O(\log{N})$. They answered in this manner because they forgot that in order to perform binary search, we must sort the array first, and the well-known sorting method has a time complexity of $O(N \log{N})$. Another red flag is that when you know a lot of things and comprehensive techniques but you don't know when to use quick-sort and when to use merge-sort for specific problems. It need to be considered as a serious problem, so you have to fix it. The things I mentioned before are not only correct in the realm of the algorithm, but it is also correct in all other fields. Hence, if I were to give you any advice, I would say, "Don't strive to invent something new; instead, reproduce the basic one first."