HyperAI

They All Have Lumbar Discs, so Why Do Programmers Stand Out?

7 years ago
Information
Sparanoid
特色图像

By Super Neuro

Steve Jobs has a famous quote: "Everyone in our country should know how to program. It teaches you how to think."

The idea here is not to ask everyone to do the work of a programmer, but to think about and solve problems like a programmer.In Western countries such as the United States and Italy, programming has become part of the curriculum in primary and secondary schools and even kindergartens. In 2014, Obama personally wrote a piece of code to encourage people to learn programming and cultivate programming thinking.

Many people, including some junior programmers, are used to starting from historical experience and randomly trying various solutions when facing complex problems. The success or failure depends on whether they have enough experience. They rarely start from framework thinking and seek solutions to problems.

This will make the problem-solving process time-consuming and labor-intensive, and the final results may not be good.

HackerRank mentioned in its 2018 developer skills report that without emphasizing the importance of technology, having a framework mindset or the ability to break down large and complex problems is more important than being proficient in programming languages.

The advantage of many programmers who are experienced or good at problem solving lies in this framework thinking, which can also be understood as programmer thinking or programming thinking. In addition to being applicable when programming, this kind of thinking can also help everyone solve problems in their programming.

What is programmer thinking?

They all have lumbar discs, so why do programmers stand out?

Tim Ferriss's book "The 4-Hour Chef" may give you some inspiration, but it seems that there is no Chinese translation of this book yet. The author is a famous efficiency expert and has also given a very classic speech on TED. He also wrote "Four Hours of Fitness per Week" and "Four Hours of Work per Week" to guide people to live efficiently.

In addition, V. Anton Spraul's "Think Like a Programmer" (English title: Think Like a Programmer) has a Chinese translation, which makes it more convenient to read.

They all have lumbar discs, so why do programmers stand out?

The following is an explanation of programming thinking, which can be understood from the following aspects:

1. Understand the problem

The reason a problem is difficult is that you don't know enough about it. The famous physicist Richard Feynman once said,"If you can't explain something in simple terms, you don't understand it."

So when solving a problem, you must first understand the problem until you can describe it in simple language.

They all have lumbar discs, so why do programmers stand out?

Many programmers have had this experience: in the process of explaining a problem to others, they always find some logical loopholes that they had not noticed before, and these discoveries may be the key to helping them solve the problem.

2. Make a plan

That is to say, formulate steps to solve the problem, and do not blindly execute them without thinking through the steps to solve the problem.

For programmers, this means that when programming, don’t just start writing code, but first clarify your thoughts, analyze the problem, process the information, and develop the necessary steps to input X and output Y.

3. Break down the problem

When faced with a problem that cannot be solved immediately or is relatively complex, the best way is to decompose it into several sub-problems and then solve the simplest one first. Once you have solved these sub-problems, as long as you connect these sub-problems, the big problem will be solved smoothly.

For example, a junior programmer is asked to write a program to find the third largest number from 10 numbers. Although the program only requires mastering some basic programming languages, it is still difficult for someone who is new to programming.

They all have lumbar discs, so why do programmers stand out?

At this point you can try to break down the problem instead of looking directly for the third largest number.

For example, first determine the largest number among 10 numbers, then find the largest number among three numbers, or find the largest number among two numbers. Then rearrange the largest numbers in these groups until the third largest number is determined.

Break down a big problem into the smallest unit that you can directly answer, then connect these sub-problems and expand them slightly to get the final answer.

4. Facing difficulties

After breaking down a big problem into several sub-problems, what should we do if we cannot even solve the sub-problems? At this time, we should not retreat because of fear of difficulty, but continue to look for solutions to the problem.

Debugging: This means rechecking each step of the solution to see if there is a bug in the solution. If so, find and solve it. This process is called "debugging" in programmer terms.

They all have lumbar discs, so why do programmers stand out?

Re-evaluate: If no bug is found, re-examine the problem from a different angle to see if there is a more general way to solve it. Note that re-evaluation here means determining the solution from a completely new angle.

C. Jordan Ball, who is often ranked in the top three on the coding challenge website Coderbyte, once said, "Sometimes we get lost in the details of a problem and ignore the general approach to solving it. For example, when calculating 1+2+3+…+n, using the formula n(n+1)/2 can quickly get the answer and avoid doing some lengthy and even incorrect addition."

Study historical cases: In fact, many problems have already been answered and solved by previous people. Studying their cases can help you solve many similar or new problems. It can also refine your way of thinking about problems during the research process, which is very helpful for solving other problems.

How to cultivate programmer thinking?

If you want to be an excellent problem solver, the best way is to develop your problem-solving thinking and ability in your daily life. Many things are interconnected, and the ability to solve problem A can also be used for problem B.

In other words, you can train your problem-solving skills and cultivate your problem-solving mindset in many ways that don't cost much, such as games or other things that interest you.

PayPal founder Peter Thiel often cultivates this kind of thinking by playing chess, while Elon Musk does it through video games. In addition, well-known entrepreneurs such as Linkedin co-founder Reid Garrett Hoffman and Facebook founder Mark Zuckerberg have also said that they found solutions to practical problems while playing video games.

They all have lumbar discs, so why do programmers stand out?

These examples are not to say that you can succeed by playing games, but I just want to tell you that it is not difficult to develop a problem-solving mindset, and you can do it through some micro problems in life.

In addition, if you are a programmer or are interested in programming, you can try the programming challenges on Coderbyte, which is very helpful for improving programming thinking.

Face the problem, analyze it, and then solve it one by one,that is"Programming Thinking".

Although I dare not say that all programmers will think about problems in this way, this method is indeed very effective. Moreover, the more problems you experience, the stronger your problem-solving ability will be.

They all have lumbar discs, so why do programmers stand out?

From this point of view, the reason why senior programmers earn higher salaries than junior programmers may not be because of programming skills or tools, but because of different thinking. Many companies emphasize work experience when recruiting, which is also a factor in this regard.