In The course of writing The Effective Engineer, The author of The Effective Engineer interviewed top software engineers at silicon Valley’s top tech companies in order to understand The difference between top programmers and average programmers. He found that the engineers who made a big impact on the world had at least five common patterns of thought:
1. Have the courage to study code you don’t understand
Most people don’t want to explore code they haven’t worked with before, and many give up without trying. If you often study code that you have never worked with before, you will become more familiar with different code structures and design patterns. Good open source sources are now so readily available that you can easily download them and make changes or debug them to see why code is written the way it is.
In addition to code, many people are terrified of unfamiliar tasks. Every time you change jobs, you may encounter situations where your new company’s work is different from your old one, and you may not be as productive at first. Many even wonder if they are lying to the interviewer.
In fact, everyone is in the process of learning. In a strange world, no one is a god from the start. If you want to get better, whether it’s coding, communicating with people, or any other skill, it takes time to learn.
2. Proficient in code debugging
One of the questions most people ask when writing code is: Why doesn’t my code work? Why is it not running the way I want?
Almost all programmers don’t write code well in the first try. But top programmers learn very quickly what the problem might be with their code. This is a very important skill, but it is not taught in schools and is not often mentioned in interviews.
So how do you debug your code? In fact, the core is the following methods:
-
Try to guess what happened first.
-
Assuming your guess is correct, think about what your guess might lead to in the program.
-
Try to see if there is anything unusual in these results.
-
If you don’t see anything unusual, then your guess is right.
-
If you see something unusual, your guess is wrong. Try another guess.
For top programmers, this process is a flash in the brain. The more questions you solve, the more accurate your guesses will be.
How do you spot something? You need to have your own tools or methodology. The easiest way to do this is to write a log in the code. But this is a stupid way to do it, you need to go to some advanced tools or an editor with Debug functionality.
3. Value time-saving tools
AlphaGo, which recently beat humans, can train millions of games of chess every day, whereas our 10,000 hours of training take 10 years. In other words, a few minutes of computer operation may be equivalent to several years of human work.
Bobby Johnson, a former technical director at Facebook, describes how productive programmers spend their time building tools.
A lot of people think tools are important, but they don’t take the time to build and integrate their own tools. But the best people on Jonson’s team spend a third of their time building tools that release code, monitor systems, and allow them to do more in less time.
In short, don’t spend time doing things that machines can do for you.
4. Optimize your iteration speed
Suppose it takes you 12 seconds to search for where a function is defined. Assuming you do this 60 times a day, you’ll spend 12 minutes a day searching for function definitions.
If you use a better editor that takes 2 seconds each time you find a function definition, you’ll save 10 minutes a day. You can save 40 hours a year.
If you can find three of these scenarios to optimize, you can save a month each year. Think about how many meaningful things you can get done this month.
If you debug a bug in an App, you need to restart the App after changing the code, and then click 4 or 5 times to see whether the bug has been fixed. Could you take a few minutes to set up the following App to be redirected to a Bug page as soon as the App launches?
Don’t underestimate the small details. The rewards for improving them are huge.
5. Systematic thinking
When you’re writing code, it’s easy to think that as long as you do what you’re supposed to do, your code is done. But that’s just the tip of the iceberg. Any code that is not released to production will not add any value.
To write truly impactful code, you need to understand your work from the system as a whole:
-
How is your code functionally related to code written by other people?
-
Do you test your code properly? Or is it easy for someone else to test your code?
-
Does the code in the online production environment need to change in order to deploy your code?
-
Does the new code affect already running code?
-
Does your target audience behave as you expect with the new feature?
-
Has your code made a business impact?
These are not easy questions to answer, but when writing code, you need to know if your code will end up with the best results.
These are just some of the basics of how top programmers think. If you want a more detailed understanding of how top programmers work at Google, Facebook, Twitter, etc., check out the author’s blog or his book.
Edmond Lau
“THe Effective Engineer” : https://www.theeffectiveengineer.com/book