Hi, I’m Koba.

Good habits will benefit us all our lives, no matter what we do. It is like our compass, guiding our actions, thus leading to success.

Forming good habits will make our work go more smoothly and our life will become clearer.

When we get used to doing these things over time, we know when to do what. We can get twice the result with half the effort by focusing our energy in one direction.

In the process of our programmers writing code, if we want to write good code, we should also constantly develop some necessary good habits, so that we can constantly follow the technology, so as to improve ourselves.

What are some good habits you should have as a programmer?

Write a comment

Perhaps many programmers feel that simple code doesn’t need to be commented.

But for programs that involve some complexity, you need to explicitly annotate each class, method, function, parameter, and other data.

This way, when you have a bug in your program, you can find it faster and fix it. For the later iteration of the project, we will not have to look at the code again because of the long time, and the annotations are clear at a glance, which can greatly shorten the time.

Pay attention to the small details

No matter in the development or in the debugging process, we should have a rigorous attitude, attention to details.

For example, a parenthesis is missing because a minor detail in writing the code was ignored. You debug the code, you debug it over and over again, and then you stare at the code, looking for errors in function names or variable scopes.

Finally, it was found to be a small grammar problem, missing a parenthesis, such a problem is really easy to be criticized by the leader.

The use of plug-in

Most of the time there is no need to reinvent the wheel.

Plug-ins are a great way to extend a user interface, application, or website.

Plug-ins also help us provide customization. If you can’t find one, you can develop one yourself.

By making

GitHub is a platform that no programmer can live without.

There are plenty of open source projects where you can learn about new technology stacks and frameworks.

GitHub has a lot of plugins and templates that we can use on our own projects.

Using StackOverflow

It’s also a community platform.

There are a lot of bosses up there who are very warm-hearted and willing to help people solve problems.

When you have a BUG that you can’t solve, go to StackOverflow and describe the problem in detail. Friendly people will help you out.

Will use Google

Whether we’re looking for information or solving problems at work, Google is our first choice.

Compared to baidu and other browsers, Google is more suitable for programmers to use.

When our program reports an error, if you can’t understand the reason for the error, you can search on Google, and the top answers on Google can give you a very accurate solution.

Read the API documentation

Each API is described in its own official documentation.

The documentation shows you all the parameters and options available, as well as some sample code.

If you still don’t understand a plugin or framework technology properly, you can read the corresponding documentation several times.

Backing up the database

In the process of developing and testing our code, we must remember to make frequent database backups.

This way, we are equivalent to more than a protection, even if later found that the change is not reasonable can also be rolled back.

The best advice is to keep local backups of project files and different versions of the database.

Dare to refactor

It’s not uncommon for code to become bloated, either for our own reasons or for external ones.

Good code is the result of multiple revisions, not a one-shot process. It takes a lot of refactoring to make a good piece of code.

For example, in the previous project, during the development process, several new functions were constantly added and minor problems appeared, but I didn’t pay attention to them. In the later stage, due to the accumulation of minor problems, the code was very bloated, but due to the completion of the development schedule, it was hastily completed. And if there are bugs in the system that are hard to fix or impossible to fix, even if they cost a lot of time and money, we have to be willing to refactor the code.

Multilingualism

There are many programming languages, and each language has its own domain.

Should continue to expand their own field, using spare time to learn other programming languages, so that your programming thinking ability will be better improved, thinking problems will be more comprehensive.

The so-called soldiers who do not want to be generals are not good soldiers, which will be of great benefit to our team in the future.

Good English reading ability

English is one of the essential skills for programmers.

There is also a saying in the circle “a programmer who does not learn English well is not a qualified programmer”.

It is true that all the code programmers have to deal with every day is written in English. Only by constantly improving our English reading ability, can we learn the latest technology earlier, contact first-hand technical documents, and locate the error information of our own projects well to find out which part of the problem.

Reading blogs

Now the Internet is developed, basic programmers need to go to the technology platform to learn new skills.

Read other people’s blogs and compare them to what you already know.

Everyone’s mind is different, maybe you have a difficult question, in someone else’s blog, can provide you with a different thinking understanding.

Technical output

We should write down what we learn and share it with others.

There are many benefits to keeping writing, and you will develop a deeper understanding of the technique by constantly producing.

At the same time, I will also get some suggestions from readers, different opinions from others’ comments, and some like-minded friends.

Good at learning and summarizing

Technology is constantly developing, if we do not timely to learn and summarize, will be eliminated.

Every technology is not always on top, so we have to keep up with new technologies and learn new skills.

Good at learning, indispensable to programmers, find the right target, diligent summary. When the project is completed, we should keep track of the user feedback of the system, find out the deficiencies and areas needing improvement, and constantly improve ourselves so as not to lag behind others.

Learn to self-test

For software development, not only r & D is responsible for R & D, testing all to test to do.

In order to improve the efficiency of development, development engineers need to complete their own code, the first time to conduct a self-test.

In this way, we can find bugs as soon as possible and solve them, greatly improve the efficiency of development and shorten the development cycle, thus providing a reliable guarantee for the overall efficiency and construction of the project.

Team collaboration

In the development process, we all need to work with other team members, not just finish our own tasks.

Because the final completion of a project is completed by a team, no matter how outstanding my personal ability is, there is nothing I can do without the team.

Therefore, we should actively communicate with team members during the research and development process, which will not waste our development time. On the contrary, effective team cooperation will greatly promote the early completion of the project.

Keep your Passion at work

Most programmers choose this field because of the high pay. Whether you really have a passion for programming, or love of programming, I guess it’s hard to say.

However, in our years of coding, we must maintain sufficient passion and love, only a commitment to study the code, we will truly experience the joy of programming.

Interest is the best teacher, keep the biggest passion in work, when facing bugs, we will not be bored, but can’t wait to solve them, harvest the sense of achievement.

Constantly improve logical thinking ability

It is well known that programmers need to have rigorous logical thinking ability.

We should spend more time understanding the technical steps to understand exactly what the requirements are and how to implement them.

When you have a problem to consider in your head, go back and spend the rest of your time writing code. Therefore, it is very important to constantly improve their logical thinking ability.

The faith to rise to the occasion under pressure

Most of the time, there are a lot of requirements in front of us.

When a bunch of projects need to be completed at the same time in a short period of time, we shouldn’t shy away from these pressures.

Instead, embrace challenges, and the belief that we become better developers by overcoming one problem after another will help us in our lives.

Improve efficiency and work overtime effectively

The 996 work schedule for programmers has become the norm in most organizations.

We cannot avoid this, because without so much effort, there is no corresponding return.

However, we can control a lot of overtime, most of which is due to the low development efficiency and the progress of the project. Therefore, we should improve efficiency and stay focused in our daily work, so as to avoid unnecessary overtime.