Home  >  Article  >  Backend Development  >  10 effective ways to become a great programmer

10 effective ways to become a great programmer

WBOY
WBOYOriginal
2016-07-25 09:02:42776browse

A good programmer is the kind of person who looks both ways even when crossing a one-way street. ——Doug Linder
As a PHP programmer in the IT industry, what drives me to go to work every day is the fun and passion for programming. But to spark fun and gain everlasting thrill, we need to learn and follow some basics to become a good programmer.
Of course the things I summarized are not that amazing. If you say that you will definitely become an excellent programmer after learning them, that is impossible. These are just some shortcuts based on my experience. The definition of an excellent programmer can be understood here as a programmer who can develop excellent IT solutions and promote the overall development of the industry.
1. Master the basics
Regardless of any industry and any job, understanding of concepts is the key to success. It's impossible to become a good programmer unless you have a strong conceptual foundation. Understanding core concepts helps you design and implement solutions in the best possible way. If you feel that you don't have a good grasp of certain concepts about core computer science and programming languages, it's not too late to go back and relearn the basics.
2.Label each code set you write (how, what)
I found that an obvious dividing line that distinguishes good and bad programmers is , do you have the passion to know "what and how"? Some programmers know exactly how their code is executed and the results of the execution. I also understand that sometimes because of time constraints, we have to move on to the next step immediately when we just know that the code will get the job done. Although this seems like a topic in another direction when it comes to problem solving, as a programmer we should delve into the problem as deeply as possible to reach the highest level. Trust me, as time goes by, you will develop this good habit without even realizing it, and the benefits will be endless. .
3.Learn more by helping others
Probably most of us only go to forums and groups when we need help ourselves. One dividing line that distinguishes good programmers from good ones is that good ones often go to these places to help others. And while they are helping others, they can also learn a lot themselves. If you are in a team, you should also help each other. Trust me, understanding the context of other people's problems, researching and proposing solutions will help you learn more and grow faster.
4.Code should be written in a simple, understandable and logical way
Just like in other aspects of life, the KISS (Keep it simple and short) rule also applies to programming field. The code should be logical and avoid being too complex. The reason why some people want to write so complex code is just to prove that they have the ability to write complex code. But my experience tells me that simple and logical code can work effectively, have fewer problems and be easier to expand. I remember this saying
Good code itself is the best document. Before you add a comment, ask yourself, "How can I improve the code so that I don't need to write this comment?" - Steve McConnell
5.Spend more time analyzing the problem, and you will learn more about it later You can spend less time repairing it
Spend more time understanding and analyzing the problem, designing the optimal solution, and then you will find that the next work will be more effective with half the effort. The design process doesn't necessarily mean using modeling languages ​​and tools. It can be as simple as looking up at the sky and brainstorming in your head. Programmers who habitually write code as soon as they get a problem will often end up with different results than what was required.
If you don’t have the overall structure of the program in your mind when you take a shower, it means you are not ready to start writing code. ——Richard Pattis
6.Be the first to analyze and review your own code
Although it is a bit difficult, knowing the problem before others find it can help you Learn how to write "nearly bug-free" code. You must be fair and rigorous in your own code reviews, and you must be able to accept reviews from others without hesitation. Close to the best, working with good programmers and actively listening to their feedback will definitely help you become a good programmer.
7.Don’t be frustrated in the face of ever-changing technology
In the IT industry recently, many people I met - either talked about their work Disappointed, or even resigned and looking for a new job - all agreed that they wanted to learn and use the latest technology. I think this wish is understandable, but I don’t think the word “latest” is quite right. Every day we hear people saying "What new tools, APIs, frameworks and other methods are coming out now" that can make programming easier. This actually happens all the time in the technology field. What we really need to pay attention to and understand is the transformation of core and basic technologies, and then look at new frameworks, tools and APIs on this basis. For example, many Java companies may change to a new web framework every other week, but its demand method is based on the client-server communication model, MVC model, filters/servlets/JSP, resource binding, and XML parsing. The core concepts remain the same. So, instead of constantly worrying about changes in frameworks and tools, take the time to learn these core concepts. Believe me, on the basis of understanding these core concepts, we can master new frameworks, tools and APIs faster.
8.Emergency measures are not effective for a long time
Many times, software programmers may adopt emergency and workaround solutions (either because of time constraints or lack of understanding of the problem) In-depth understanding, or insufficient technical experience). However, these workarounds break the code, making it difficult to extend and maintain later. I can understand that sometimes this situation is really difficult to avoid, but just like we should all tell the truth, if you tell a lie, you have to know that the lie will be exposed one day.
9.Reading documentation
One of the basic habits of a good programmer is to read a lot of documentation, technical indicators, JSR, API documentation, tutorials, etc. Reading documentation provides the necessary foundation for programming in the best possible way.
10. Learn other people’s code
I really like interacting with those good programmers who have java source code in the IDE and reading/referring to their code. Because by doing so, you can not only understand the basic knowledge, but also learn new ways to write projects. Reading and referring to some reliable and known open source code or your own advanced code will also help us program better.
The last point, not listed above: don’t compare yourself with others
As the saying goes, comparing oneself with others will make people angry. Comparing oneself with others will only lead to negative emotions and turn into unhealthy competition. Each person has his or her own strengths and weaknesses. I've seen so many times that so-called awesome programmers make stupid mistakes. Therefore, analyzing yourself, listing your shortcomings, and working hard to improve yourself is the right path.
Programming is a real fun, welcome to enjoy it.
Receive LAMP Brothers original PHP video tutorial CD/"Essential PHP in Details" for free. For details, please contact the official customer service:
http://www.lampbrother.net



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn