A good programmer is someone who looks both ways when crossing a one-way street.
As a IT software programmer, what drives us to work hard day after day is our interest and passion for programming. But to make programming consistently fun, we must learn to stick to certain basic principles of being a good programmer.
I’m not trying to write down some mantra that you can follow to become a good programmer. My purpose is to record some useful experiences I have learned and used that have helped me achieve better results. There is no clear definition of a good programmer, here we are referring to those who create great IT solutions and help the industry grow.
Ten effective ways to become an excellent programmer,Some things about the Internet
0. Master the basics
For any job in any industry, mastery is the key to success. . If a person wants to be a good programmer, he must have a solid foundation. Understanding the core concepts will help you use the best methods to design and implement the most perfect plan. If you feel you can't grasp core computer science or knowledge of a certain programming language, it's not too late to start reviewing the basics.
1. Start labeling the code you have written(how to do it, what to do)
I found that there is an obvious difference between excellent programmers and ordinary programmers The dividing line between good programmers is the desire to understand what each line of code does and how it is implemented. There is a small group of people who must understand every line of code. I know that if time is very tight, we often cannot follow this principle and just write some code until we know that it achieves the required functions. How to deal with this situation is another topic, but as programmers, we often want to explore as deeply as possible. Trust me, over time this will become a habit and you will be doing it every time without even realizing it.
2. You can learn more by helping others
Many people have a common characteristic. Only when he needs help, he will turn to forums or groups. What sets good programmers apart is that they frequently browse forums to help others. They learn more by helping others than by relying on others to help them solve problems. The same is true in a team, you gain more by helping others solve problems. Trust me, learn about other people's problems, think about them, and ultimately provide solutions, and you'll learn more than you did before.
3. Write simple, understandable, logical code
Just like the KISS principle (Keep it short and concise) applies to all aspects of life. also Suitable for programming. Try to write logical code to avoid complications. Sometimes people write complex code just to show that they are capable of writing such code. My experience tells me that simple and logical code works better, creates fewer problems, and is easier to extend. I remember a sentence:
Good code itself is the best document. When you want to add comments, ask yourself, "How can I improve my code so that it can be read without comments??"
4. Spend more When you analyze the problem, you will spend less time solving the problem
and spend more time understanding and analyzing the problem, and then designing a solution. You'll find the rest is easy. Design does not mean using modeling languages and tools, it can mean just looking at the sky and imagining ideas in your mind. People who start typing code when they encounter a problem often end up deviating from the requirement.
If you can’t figure out the structure of your entire program while taking a shower, then you’re not ready to start programming. – Richard Pattis
5. Be the first to check your code
Although it’s a little hard, try to change your code before others change it, as Over time, you will write code that has almost no bugs. Do unbiased reviews of your code, and don't hesitate to have others review your code. Working with other good programmers and accepting their opinions can help you grow as a good programmer too.
6. Don’t get lost in the rapidly changing world of technology
In the IT industry, I often meet many people who are dissatisfied with their current jobs and even leave it to pursue new jobs because they want to learn the latest technology. What we hear every day are new tools, interfaces, and frameworks that can make programs simpler and faster. This is commonplace in the tech world and will always be so. But the most basic and core technological changes are much smaller than the changes in those frameworks, tools and interfaces. Just like the sea, the waves are rolling on the surface, but the depths of the sea are quite calm, and that is where aquatic life lives. So immerse yourself in the depths of the sea of core technology. For example, in Javaenterprise-level applications, new frameworks appear every week, but the core technology remains unchanged, such as client-based -server-side requests, MVS Schema, filters/servlets/JSP, data source binding, XMLparsing and more. So spend time learning core concepts instead of worrying about the emergence of ever-changing frameworks and tools. Believe me, with a foundation in core technologies, you will find it easier to learn new frameworks, tools, and interfaces.
7. Emergency plans will not last long
Many times software engineers will adopt emergency plans(It may be due to lack of time, incomplete understanding of the problem or lack of experience ). But this often results in messy code, lack of scalability and maintainability, and more time is wasted later. Please wait until you understand the entire plan before you start implementing it. I know there are situations where contingency plans are unavoidable, it's like, one should tell the truth, but there are situations where you have to lie.
8. Read documentation
Reading a lot of documentation is one of the necessary habits for a good programmer. It may be product manuals, JSR, API documents, tutorials, etc. Reading the documentation helps you gain the basic knowledge necessary to write better code.
9. You can learn other people’s code
I have come into contact with some excellent programmers, they always keep JAVA source code in their IDE, and often use it in their daily life Read and consult at work. In doing so, they not only satisfied their thirst for knowledge, but also learned how to write excellent programs. Read and consult famous open source code that you think is reliable or the code of programmers who are more experienced than you, and you will write better programs. (Extended reading: "Reading excellent code is a shortcut to improve developer performance")
Finally, what I want to say but didn't list it above: Don't compare yourself to others
Comparing yourself to others often creates negative emotions and unhealthy competition. Everyone has his strengths and weaknesses. It is important to exploit strengths and avoid weaknesses. I also often see some very basic mistakes made by programmers with very good basic skills. So just compare yourself, list the areas where you need to improve, and keep improving on it. Programming is fun, enjoy it.
Any fool can write a program that the computer can understand, but an excellent programmer can write a program that others can read and understand.
Get it for freeLAMPBand of BrothersOriginalPHPVideo TutorialCD/《 DetailsPHP》Concise version , please consult the official website customer service for details:
http://www.lampbrother.net
PHPCMSSecondary developmenthttp://yun.itxdl.cn/online/phpcms/index.php? u=5
WeChat Development itxdl.cn/online/server/index.php?u=5
JavascriptCourse
http://yun.itxdl.cn/online/js/index.php?u=5CTOTraining Camp
The above introduces ten effective methods to become an excellent programmer, including all aspects. I hope it will be helpful to friends who are interested in PHP tutorials.