How to become a good programmer

Source: Internet
Author: User
Tags learn php
How to become a good programmer
Now this information technology tells the era of development, the programmer this industry has become an indispensable part of this technology trend. However, each programmer from the beginning of the programming, to learn to constantly grow, how to keep themselves in the technology trend to stay ahead, not be eliminated, the following 10 points can help you become a better programmer.
1. Do not repeat. This is a great principle that deserves to be followed. I'm used to looking back at the code I wrote and refactoring the parts that were used many times. Although it is difficult to decompose a long method into several short methods. Ctrl + R + M is useful in Visual Studio to help you refactor your code into separate methods. This allows the code to be more reusable and testable.
2. The key to naming variables is to describe what they are, not what type of data they are. The only exception is that if you are working on someone else's code and need to continue to participate, then you should follow their naming rules.
3. Give your method a name that clearly explains what they want to do. If this article is done well, it will greatly reduce the need for annotations. If your code is legible, then you need to comment on what to do.
4. Do not use weird numbers and string constants. There should be no number and string values in your code that would cause misunderstanding or need to be guessed by others. When creating constants, enumerations, and private variables, give them a name that is easier to understand.
5. If possible, write your own method so that when you test the method, you will not have any dependencies on other parts of the application. Writing a method does not need to focus on where to call from. This makes the code more measurable and more reusable.
If you are using session values or app settings, pass them as variables, get the session, and configure the values when you call the method. This can make the code more measurable.
6. Don't be afraid to ask for help. This is not to ask you to ask for help when you meet all the problems, I mean first you have to think yourself, to try to solve the problem yourself, but if you really can't think of a solution, then you should seek the help of others. Someone may have experienced this problem and know how to solve it. At the same time, in the process of telling someone what you are doing, what you expect, what the problem is, maybe a great idea of what you're doing, and the key to getting it right.
7. No delay. If you see bugs or garbled characters, then resolve them and move on. Don't try to do it later or let someone else do it.
8. Share knowledge with others. Don't appreciating. Try to create a culture of mutual help. You will find that the team is more productive than a single player, and that the atmosphere that helps each other is quicker to improve their level. The progress of a colleague does not leave you behind, nor does it give you the risk of being fired. Instead, you become more valuable, because you not only have a profound knowledge, dare to learn, but also help the people around to improve together.
9. Do not interrupt your colleagues when they are immersed in thinking. Do unto others, come back haunting, when you immerse yourself in programming, when your brain is working at high speed, like you're carefully building a house with cards, you don't want anyone bothering you. If someone asks you a question, then your attention must not be focused, as if the house could collapse easily. It may take up to 5-10 minutes to refocus your attention and straighten out your thoughts one by one, which is only a matter of Google searching or asking someone else to fix it. If you respect your colleagues in this regard and let them know the importance of doing so, they will do the same thing and in turn make you more productive.
10. Actively confront criticism, not negative resistance. For me, criticism is an opportunity for me to improve. If there is another way to do things that I have not thought of, then I would like to understand it, because it may help me improve myself.
Well, 10 golden rules have been told, let's learn them together, and use them to achieve better programmers!
Brotherhood high Lopheng free an apprentice: http://www.hdb.com/party/lzcw-comm.html
Free to receive the lamp brother even original PHP video tutorial CD/"Detailed PHP" Essentials Edition, details of the website customer service:
Http://www.lampbrother.net
"Brother Even it education" learn PHP, Linux, HTML5, UI, Android and other video tutorials (Courseware + notes + video)!
Web Drive Tutorial Download: Http://pan.baidu.com/s/1sjOJiAL

The above describes how to become a good programmer, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.