
Recently, some readers have inquired: What good programming habits should be noted? Let me share with everyone.
Read Official Documentation Frequently
Don’t be intimidated by these words; official documentation is actually a treasure.
A mature technology can exist without blogs or books, but it will undoubtedly have official documentation, which is the most accurate and up-to-date information available. The people who write official documentation are usually the developers of the technology or software, and they are the ones who understand it best, so the documentation is not only of very high quality but also contains the latest content.
Therefore, official documentation is much more suitable for beginners than various blogs and forums found online. When we encounter many problems and technical details, carefully reviewing the official documentation will clarify many vague issues and understandings.
Every programmer should master the ability to learn a technology through official documentation; mastering this ability will lay the foundation for learning all other technical frameworks. Moreover, the original official documentation can also enhance your self-learning and summarization abilities.
Code with Search Engines in Mind
Many people think that searching for everything on Google is a lowly act, but in fact, an ordinary programmer + Google = a super programmer.
Using search functions effectively, Google + Stack Overflow + GitHub can solve most of your problems.
So, before asking others questions, try searching for it yourself first.
Of course, being a super programmer is not just about knowing how to Google; the real skill lies in absorbing and applying what you find on Google.
However, whether you are reading official documentation or coding with Google in mind, you must have a good command of English. This will allow you to read documentation and search for what you need more effectively.
Use Descriptive Naming Conventions
ITWorld once conducted a poll on “the most frustrating thing for programmers,” and nearly half of the programmers believed naming was the most frustrating issue.
Sometimes when writing code, programmers get carried away and start naming variables whimsically, like gousheng, tiedan, xiaonaigou, i, j… While you might be having fun, others reading your code will be confused.
Therefore, whether for internal or global variables, you should establish your own naming conventions, so that the meaning of the variables is clear at a glance. Confusing or incorrect naming not only makes it difficult to understand the code but can also mislead our thinking; conversely, good naming can significantly improve code readability and maintainability.
Write Meaningful Comments
Along with naming, there are two other things that frustrate programmers: writing comments is frustrating, and reading code without comments is frustrating.
The reason for writing comments is that when you are writing a program, you might remember clearly what a certain segment does and how it works at that moment, but as you write more programs, you will forget why you wrote it that way, making modifications and handovers quite troublesome; commenting your code can effectively avoid this situation. Comments not only help others understand the code but can also provide additional information to the reader.
However, comments should be concise rather than excessive. Avoid over-commenting, as excessive comments can become background noise.
“Don’t reinvent the wheel” is likely the first principle every programmer is told when they enter the field. Programming is actually one of the jobs where you can “be lazy” the most: every feature you are working hard to implement may already have excellent solutions contributed to the open-source community. Using existing libraries and frameworks will make your work much easier.
Of course, finding a very suitable solution can be quite challenging. Sometimes after a lot of effort to find a solution, you may discover various problems, and in the end, it may not work out.
So, what constitutes a good solution?
-
Open source with a permissive license.
-
Has documentation, code standards, friendly interfaces, and preferably has real use cases.
-
Has a relatively active community.
-
Loosely coupled and easy to customize.
In short, as long as it is suitable and easy to use, it is a good solution.
Improving programming skills really has no shortcuts; the best way is to write more code.
However, in addition to writing a lot of code, improving programming skills also requires reading a lot of code written by others.
Firstly, reading source code can enhance your programming skills. Learning starts with imitation, whether it is reading sample code in tutorials during your initial learning or reading excellent project source code during your advanced learning; both are great learning methods.
Secondly, reading source code can improve your debugging skills. Only by practicing and accumulating the ability to read code can you understand it and quickly and accurately locate issues within the code.
Finally, reading source code can help develop a good coding style. “Development” is not just about writing executable code, but also about writing code that others can understand, which greatly benefits code maintenance and expansion.
Allocate Development Time Wisely
It is very important for a programmer to accurately assess development time. However, for novice programmers, it is better to overestimate a week than to underestimate a day. Being too “optimistic” can easily shock your boss.
After all, in the process of estimating development time, you need to anticipate how various modifications will impact other modules. A modified unit test, acceptance testing, UAT environment testing, and finally going live; many areas require time. Once a test fails, you have to debug, modify, and run unit tests again… Who can guarantee that every modification will pass on the first attempt?
Refactoring is a core skill for programmers.
The greatest courage of a programmer is to look at the code they wrote three months ago. However, learning how to refactor your code into better code is a very valuable skill. Good code is improved through refactoring; code needs continuous refactoring, and refactoring should be integrated into the entire code development process.
Refactoring should not be done only after several months; the best approach is to refactor in real-time. Spending 70% of your time refactoring after writing code for a day is not excessive.
Finally, as a novice programmer entering the workforce, finding a reliable mentor to guide you is very beneficial for your growth.
The ideal mentor should possess the following traits:
-
Supportive: Someone who will not be threatened by your success. e.g., colleagues competing with each other.
-
Technical Skills: Someone from whom you can actually learn.
-
High Standards: Someone who can keep you to high standards, not just to get through today’s work, but to become a more advanced programmer in the future.
In this way, when you encounter various problems at work, your mentor can guide you in the right career development direction.


1. No
2. Why are schematic diagrams always poorly drawn? These tips should be known
3. How to display IP location on embedded devices?
4. RISC-V targeting MCU/MPU, RTOS, but facing challenges…
5. A method for self-updating firmware on microcontrollers!
6. The XuanTie Cup RISC-V Application Innovation Competition is officially underway, and registration is now open!

Disclaimer: This article is a network reprint, and the copyright belongs to the original author. If there are copyright issues regarding the work, please contact us, and we will confirm copyright based on the copyright certificate you provide and pay for the manuscript or delete the content.