The following reprint from Http://news.cnblogs.com/n/511465/, the author is the code farm-small peak.
A good programmer is the kind of person who has to look both ways, even if it's a one-way street. --doug Linder
As a software programmer in the IT industry, the motivation that drives me to work every day is fun and passion for programming. But in order to have fun and get a lasting thrill, we need to learn and follow some basic knowledge to become a good programmer.
Of course, I summarize these things are not so God, you say you want to learn to be able to become a good programmer, it is impossible. This is just a few short cuts from my experience point of view. For the definition of a good programmer, this can be understood as a programmer who can develop a great IT solution and can promote the overall development of the industry.
1. Master Basic Knowledge
No matter the industry or any job, the concept of understanding is the key to success. Unless you have a strong conceptual foundation, you can't be a good programmer. Understanding the core concepts helps you design and implement solutions in the best way possible. If you feel you have not mastered the specific concepts of core computer science and programming languages now, it is not too late to go back and learn the basics again.
2. Label each code set that you write (how,what)
I find that the obvious dividing line between the pros and cons of a programmer is whether there is a passion to know "what". Some programmers know everything about how their code is executed and how they execute the results. I also understand that sometimes because of the time constraints, we have to do the next step without knowing that the code can do the work. While this seems to be the topic of another direction for solving the problem, as a programmer, we should study the problem as much as possible to reach the highest level. Believe me, as time goes by, you will develop this good habit unconsciously, and then benefit infinitely.
3. Learn more by helping others
Perhaps most of us will only be on the forums and groups when we need help. There is a split line between whether a programmer is good or not, and good people often go to these places to help others. And they can learn a lot of things while they are helping others. If you are in a team, you should help each other. Believe me, understanding other people's problem backgrounds, researching and proposing solutions will help you learn more and grow faster.
4. The code is simple, easy to understand and logical
As in other aspects of life, the KISS (Keep it simple and short) rules also apply to the field of programming. The code has to be logical to avoid being overly complex. Some people have to write code so complex just to prove that they have the ability to write complex code. But my experience tells me that simple and logical code works well, and that it's less problematic and more scalable. I remember a word like this:
The good code itself is the best document. Before you add a comment, ask yourself, "How can I improve my code so that I don't need to write this comment?" "--steve McConnell
5. Spend more time analyzing the problem, then you can take less time to repair it later
Spend more time understanding and analyzing problems, designing the best solutions, and then you will find that the next work will do more with less. The design process does not necessarily mean using modeling languages and tools, or it can be simple, such as looking up at the sky and then brainstorming in your mind. Those programmers who routinely go to the crackling and write code as soon as they get the problem will often end up with different requirements.
If you don't have the whole structure of the program in your mind when you're in the shower, that means you're not ready to start writing code. --richard Pattis
6. First analysis to review your own code
It's a bit difficult, but knowing what the problem is before someone else finds out, can help you learn how to write "near-bug-free" code. Own code audit to be impartial and rigorous, but also to be able to accept the approval of others without hesitation. Jinzhuzhechi, working with good programmers and actively listening to their feedback, will inevitably help you become a good programmer.
7. Don't be frustrated with the ever-changing technology
In recent times in the IT industry, many of the people I've met-either talking about disappointment with their work or even resigned to looking for a new job-agree that they want to learn and use the latest technology. I think this wish is understandable, but the word "newest", I think, is not very correct. Every day we hear someone say, "What's new, tools, APIs, frameworks, and other ways to do this now" can make programming more straightforward. This has actually been happening in the technical field. What really needs to be focused on and understood is the transformation of core and fundamental technologies, on which to look at new frameworks, tools, and APIs. For example, many Java companies may switch to a new web framework every other week, but the core concepts of client-server communication patterns, MVC patterns, filters/servlets/jsp, resource bindings, XML parsing, and so on are still the same. So instead of worrying about the changes in frameworks and tools, take the time to learn these core concepts. Believe me, we can get to know the new frameworks, tools and APIs faster, based on understanding these core concepts.
8. Contingency measures are not long-term and effective
Many times, software programmers may take contingency and workaround solutions (either due to time constraints, or lack of a deep understanding of the problem, or insufficient technical experience). However, these workarounds break the code, which makes it difficult to extend and maintain later. I can understand, sometimes it's really hard to avoid, but like we should all tell the truth, you tell a lie, then you have to know that lies always have a bare day.
9. Read the documentation
One of the basic habits of good programmers is to read a large number of documents, technical indicators, JSR, API documentation, tutorials, and so on. Reading the documentation has laid the necessary groundwork for us to program in the best way possible.
10. Learn the code of others
I love interacting with good programmers who have Java source code in the IDE, reading/referencing their code. Because this not only can understand the basic knowledge, but also can learn to write new methods of the project. Reading and referencing some reliable and known open source or your own high-level code can also help us to program better.
Last point, not listed in front: Don't compare with others
As the saying goes, people are more angry than people, and comparing themselves with others can only lead to negative emotions and play into bad competition. Ruler has a short inch, everyone has their own strengths and weaknesses. I've seen so many times that some so-called special fork programmers make stupid mistakes. Therefore, to analyze themselves, list the shortcomings, and strive to improve themselves, is the way.
Programming is a real pleasure and welcome to enjoy it.
"Any fool can write code that makes a computer understand, but the code written by a good programmer can be understood by all mankind." "--martin Fowler
Link: http://www.codeceo.com/article/10-effective-way-good-programmer.html
Translation Code Agricultural Network-Xiao Feng
00From: www.codeceo.com
[Reprint] 10 effective ways to become a good programmer