Ten Habits of Great Programmers

【Reprint】Original author: haoel

blog.csdn.net/haoel/article/details/4013883

 

In this world, there are millions of people who are passionate about software development, and they have many names, such as: Software Engineer, Programmer, Coder, Developer. After a while, these people may be able to become good coders, and they will be very familiar with how to use computer languages ​​to get their work done. However, if you want to be a good programmer, there are a few more things you need to pay attention to, and if you can make the following ten items into your habits, then you can really be considered a good programmer.

 

1.  There is no end to learning  . Even if you have more than 10 years of programmer experience, you have to study hard, because you are in the creative field of computing, and there are many, many new things appearing every day. You need to keep up with the times.

 

You need to understand new programming languages, as well as programming languages ​​that are developing, and some programming frameworks. You also need to read some industry news and participate in online discussions in some popular communities, so that you can understand and understand the entire software development trend. In China, some well-known communities such as: CSDN, ITPUB, CHINAUINX, etc., in foreign countries, it is recommended that you often go to digg.com to see the aggregation of various BLOGs.

 

2.  Master multiple languages  . Programming languages ​​have always had their best fit. When you are faced with problems that need to be solved, you need to find a language that is best suited to solve those problems. For example, if you need performance, maybe C/C++ is the first choice, if you need cross-platform, maybe Java is the first choice, if you want to write a development program on the web, then PHP, ASP, Ajax, JSP may be your choice , if you're dealing with some text and interacting with other applications, maybe Perl, Python would be the best.

 

So, take some time to explore other programming languages ​​you are not familiar with, it will broaden your horizons, because you are better armed, you will think more comprehensively, which will be good for yourself and the project. help.

 

3.  Rationally face different operating systems or technologies  . Programmers always have incomparable technologies and operating systems in their minds, some people like Ubuntu, some people like Debian, some people like Windows, and FreeBSD, MacOSX or Solaris and so on. . Only some excellent programmers understand the advantages, strengths and weaknesses of different operating systems. In this way, when selecting systems, they can be truly objective and fair without letting their emotions affect them.

 

The same goes for languages, too many programmers like to dwell on the comparison of languages ​​like Java and Perl. What budding programmer didn't argue about a similar topic? Such as VC + + and Delphi and so on. Arguing about these things can only show your superficiality and frivolity. Excellent programs are not obsessed with these, but can rationally analyze and face them, so as to objectively make correct choices.

 

4.  Don't frame yourself in a single development environment.  Again, as mentioned above, every programmer has their own favorite tools and techniques, some prefer the old ones (like I like the Vi editor), and some prefer the new ones like gedit or Emacs etc. Some prefer a debugger with a graphical interface like VC++, while I prefer the debugger on the GDB command line. Etc., etc.

 

Is there less debate about what tools programmers use? It's everywhere. It doesn't matter what kind of tools you use, as long as you can achieve your goals better and faster. But there's one thing every good programmer should know - that it's time to try another work environment. Without comparison, you never know who is good and who is not, and you never know what you don't know.

 

5.  Use version management tools to manage your code.  Don't tell me you don't know source code version management. If your team develops source code without a version management system, then I want to tell you that your software development is still in the stone age. Hurry up and use a version management tool. CVS is a bland-looking versioning tool, but it is the most widely used version management system, and Subversion is an upgraded version of CVS that is starting to take over CVS territory. Git is again a different version management tool. There's also Visual SourceSafe, etc.

 

Which version management tool to use depends on the size and geographic distribution of your team, and you may be using the most or the least efficient tool to manage your source code. But a good programmer will always use a source version management tool to manage his code. If you want me to recommend one, I recommend you use the open source Subversion.

 

6.  Be an excellent team member.  Unless you like to play solo, unless you are a lone hero. But I want to tell you that today, there may not be a mature software that you can do alone. You may be the best player in your team, but it does not mean that you are a good team member.

 

Your abilities can only be deployed in a team. Are you polite in communicating with your team members? Do you communicate with them often and everyone enjoys discussing issues with you? Think of a football team, are you a good member of the team? When others see your movements on the court, when others see your passes and catches and steals, can your team members be inspired by your actions?

 

7.  Turn your work into documentation.  This entry certainly covers writing comments in the code, but that's not enough, you need to do more. Code with a well-commented style is the foundation of a document that makes it easy for you and your team to understand your intentions and ideas. Writing down a document is not only a way to fear that we will forget the idea at the time, but also a method of offline communication for the team, and also a method of knowledge transfer. It can be a good habit to record everything you know.

 

Because, I believe you don't want people to always interrupt you to ask questions when you are at your busiest, or you get a phone call from the company asking you questions when you are on vacation. And if you are always guarding your own things, the result will only be that you will be trapped in this thing for a long time, and you will not be able to do more things. Including upward promotion.

 

You may think that "the disciple of the church can starve the master to death", but I tell you, your conservative will make you lose more and better things, please believe me, I am not sensational here.

 

8.  Pay attention to backup and safety.  Maybe you think this is a "nonsense", you already understand the importance of backup. But, I'm still here to say that losing things is a part of our lives, and you're always going to lose things, and you can never avoid that.

 

For example: your laptop has been stolen, your hard drive has been damaged, your computer has a virus, your system has been hacked, even the whole building has been burned, etc, etc. Therefore, it is very, very important to do a good job of backup. The hard disk is not trustworthy, so regularly burning discs or tapes may be a good method, and the network is also untrustworthy, so be careful of viruses and hackers, not only use software In terms of security policy, you need a sound management system. Also, try to keep your data in different places and have a regular (daily, weekly, monthly) backup strategy.

 

9. The  design should be flexible enough.  Maybe your needs will only require you to implement a dead thing, but, as an excellent program, you should always think about whether this dead thing can have a flexible side, such as making some parameters configurable, putting Some common things form your function library for later reuse, do you provide plug-in functions? Are your modules going to be randomly assembled like building blocks? If there are changes, will your design be able to handle it right away?

 

Of course, flexible design probably doesn't require you to reinvent the wheel, you should use standard things as much as possible. The design of the so-called Linghua is to allow people to consider more things other than requirements, and to consider all such issues in the requirements, rather than only dealing with the specific thing mentioned in the requirements. For example, if the required screen resolution is 800×600, can your design be flexible for other resolutions?

 

Programming always requires us to deal with different environments and future trends. We need to think about problems with a dynamic perspective, instead of seeking swords. Maybe one day, the program you write today will be ported to another environment, and then you can really understand what flexible design is.

 

10.  Don't shoot yourself in the foot.  Programmers always have a bad habit of wanting to get the job done quickly. But things often backfired. The more you want to do it faster, the easier it is to cause problems. The more you want to do it faster, the easier it is to miss problems. In the end, the program is changed and changed, and the gourd is pressed, and the time and energy spent in the end are instead. More.

 

Haste but not reached. The habit of good programmers is to spend a little more time doing some research up front, experimenting with different solutions, and if time allows, a good habit is that every 4 hours of programming, take an hour break, and then another 4 hours. hours of coding. Of course, this varies from person to person, but the purpose is to make you look back from time to time and ask you three questions: 1) Is it the right thing to do? 2) Is this done taking all circumstances into account? 3) Is there a better way? After thinking about it, you will often look back at the road you have traveled, and often summarize the past, which will be of great help to you.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325212397&siteId=291194637