- Tram Ho
I often hear students ask about the importance of learning algorithms. Your opinions are divided into two different lines as follows:
- Spirit of sacred algorithms : Want good programming to be good at algorithms. Big programming companies all interviewed about the algorithm.
- Despise algorithm: The algorithm is useless thing, ‘you go to say that there never used it.
This article will help you answer the question “What is the algorithm to do?”, As well as have a more objective view of the algorithm.
Study algorithms to … answer interviews
Algorithm advocates often say: Big companies like Google and Amazon, Facebook are very interested in the algorithm when interviewing. This is absolutely true! You will have to write the code on the board, explain the code and the algorithm when the PV is in these companies.
I have read 2 books Cracking the Coding Interview and Elements of Programming Interview . These two books refer to the interview process of these companies, as well as all the questions / answers about the algorithm that the programmer should prepare.
However, not any programming company like Google, Amazon, Facebook. According to my experience and friends, Vietnamese companies only ask for some basic algorithms when recruiting (My friend PV Ansadara was asked about oil spill algorithm and DFS).
These companies also recruit people to work immediately, know how to use technology . Therefore, do not take too much into the algorithm, but also spend time learning and using technology.
Also don’t be too confident that good at maths is fast for technology . Need to go through a long working time to fully understand the strengths and weaknesses, techniques and experience when using language / technology offline.
Learn algorithms to solve problems, improve thinking
Algorithms are everywhere around us. Google itself is so strong thanks to its search algorithm. Amazon’s recommendation function is also due to the algorithm. Even the daily news in your Facebook New Feed is also determined by the algorithm.
Some areas in programming need to use a lot of algorithms such as graphic rendering, data coding, driver, machine learning, data mining … Each field will need its own algorithms. To master these algorithms , you can work in that field.
Good at math also helps you find a way to solve problems faster, write more coherent code. Master the algorithm, data structure, you will estimate the complexity of the code, evaluate the code running fast or slow , scalable or not.
These are all skills essential. To be a good programmer, you need to be knowledgeable about the algorithm (Basically it is okay, no need to be super).
Don’t be too sanctifying the algorithm!
In Vietnam, because computer science exams focus on algorithms, solving math problems, we tend to “deify algorithms”. This leads to the situation that Vietnam is receiving information about this and that, but there is no outstanding software.
For good programming, we need to know the algorithm. However, being good at algorithms doesn’t mean you will become a good programmer. In some other areas such as business software, mobile, most of the functions are just “add and remove edits.”
The Requirement of these software is often variable, resulting in code changes. Right now, good algorithms, fast-running code are not as important as understanding requirements, organizing data, designing code structures, writing code so that it is easy to read and maintain .
In addition, the nature of programming is inherited to develop. I used to say, ” Sometimes plugging in code is the stupidest way to solve the problem .” Instead of implementing the algorithms from the beginning, you can use the existing library , or get the written code and edit it accordingly.
For example: Instead of writing Tree, Stack, Linked List, all programming languages are already implemented, we only use. Even complex algorithms such as face recognition, language recognition also have APIs . These libraries / APIs have been used a lot, much test, optimize much so it is faster and safer than the code you write yourself.
At first glance, the algorithm seems quite difficult and complicated. However, the basic knowledge of the algorithm is not much. There are only around: Data structure Stack, Queue, Binary Tree, Linked List, … and some algorithms such as Dynamic Programming, Backtrack, DFS, … You can completely learn and gradually master them .
If you’re not knowledgeable about algorithms, don’t solve difficult questions, you can still be a good programmer. My class used to have two kids who were learning freelance, doing PHP web and SEO all the time, their monthly income was about 20-40 million.
Simple code, which solves the requirement of making money for users, does not need any algorithm. So don’t be afraid of the algorithm, but do n’t sanctify it . If it is a skill, it is good to learn a lot.
If the year after free time, I will take the time to practice more algorithms, then I’ll share it with you again.
ITZone via toidicodedao