The best coding routine

Source: Internet
Author: User

Recently, I have read a lot about Steve yegge. One of the articles is "practicing programming", which was written in 2005. I was surprised after reading it:

Contrary to what you believe, simply focusing on your work every day cannot be a real exercise-Participation in meetings cannot train your interpersonal skills; replying to emails does not increase your typing level. You must set aside time for concentrated exercise on a regular basis to make things better.

I know many outstanding programmers-one of the best "benefits" for working in Amazon. If you observe them carefully, you will find that they are always exercising. They are already excellent, but they still do not forget to exercise. There are many ways they work out, and I will only introduce several of them in this article.

As far as I know, the reason why these outstanding programmers are so successful is that they have been exercising. A perfect body can be obtained only after regular exercise, and it must be maintained after exercise; otherwise, the body will become out of shape. The same is true for programming and software engineering.

This is an important difference-I drive to work every day, but I am not as good as a professional driver, daily programming may not be enough to make you a professional programmer. So what can we turn an ordinary person into a professional driver or professional programmer? What do you need to exercise?

The answer is in an article titled The expert mind in Scientific America:

According to Ericsson, what is important is not experience, but hard learning, that is, constantly challenging things beyond its own capabilities. Some enthusiastic fans spend a lot of time playing chess, golf, or musical instruments, but they may stay in their spare time, A well-trained student can surpass them in a relatively short period of time, for this reason. It is worth noting that in terms of improving the level, the time spent on playing chess (even in various competitions) seems to be more effective than dedicated training. The main value of training lies in discovering weaknesses and improving them accordingly.

"Hard Work" means that you should always deal with the problems that are just on your limit, that is, the things that are likely to fail for you. If you do not experience some failures, you may not grow. You must constantly challenge yourself and surpass your limits.

Such challenges are sometimes encountered at work, but not necessarily. Exercise is separated from professional work, which is often called code Kata in programming ).

The concept of code kata was proposed by David Thomas, who is one of the authors of "Programmer cultivation: from small workers to experts. This concept mainly refers to repetitive exercises for a particular technique or skill to be mastered. -- Translator's note

 

The so-called routine is a series of moves. This concept draws on martial arts.

If you want to see some examples of coding routines (that is, the method of learning and training programming skills), steveyegge's article provides some good suggestions. He called them "Practice drills ":

1. Write your resume. List all of your skills, and then mark those that have been used since 100. Each skill is scored with a full score of 10.

2. List the programmers you admire. Include people who work with you as much as possible, because you will get some skills from them at work. Record 1 ~ of them ~ Two bright spots, that is, you want to improve yourself.

3. view the "Computer Science" section on Wikipedia, find the category of "pioneer in the computer field", select a person from the list, and read his stories, and open any links you are interested in.

4. spend 20 minutes reading other people's code. Reading good code and reading bad code are both beneficial. Both of them must be read and switched in turn. If you cannot feel the difference between them, you can turn to a distinguished programmer to show you what is good code and what is bad code. Let's take a look at the code you have read and ask what they think.

5. List your 10 most popular programming tools-those that you think are the most useful, but not the best. Randomly select a tool and spend an hour reading its documents. In this hour, I tried to learn a new feature that you didn't realize or find a new way to use the tool.

6. Think about what you are best at besides programming? Another thought, how do you become so skilled and professional after training? What is the inspiration for your programming work? (How to apply these experiences to programming ?)

7. Take out a pile of resumes and stay in the same room with a group of interviewers for an hour. Make sure that each resume is viewed by at least three interviewers and 1 ~ A score of 3. Discuss resumes that are widely judged by different interviewers.

8. participate in a telephone interview. Write down your feedback afterwards, throw your opinion, and chat with the person hosting the phone interview to see if you have reached an agreement.

9. For a technical interview, the person to be interviewed should be an expert in a field you are not familiar. Let him assume that the audience has no knowledge in this field, so ask him to start from the most basic. Try to understand what he said and ask some questions if necessary.

10. Have the opportunity to participate in technical interviews with others. During this period, you just listened carefully and learned carefully. While you are trying to solve technical problems, you must try to solve these problems in your own mind.

11. Find someone who can exchange questions with you and exchange programming questions every other week. Flowers 10 ~ Try to solve these problems within 15 minutes, and use 10 ~ 15 minutes for discussion (whether it can be solved or not ).

12. When you hear any interview questions that you cannot solve for a while, return to your seat and email the questions to yourself for Future reminders. Find a point in time that week and use your favorite programming language to solve it.

I like Steve's list because it looks comprehensive. When some Programmers think of "exercise", they always think it is a difficult problem in coding. But in my opinion,Programming is more about people than code.. Therefore, by solving all the obscure programming interview questions in the world, this method is limited in improving your personal abilities.

I also like Peter norvig's many suggestions in "Teach Yourself programming in tenyears" (taking 10 years to learn programming by myself:

1. Communicate with other programmers. Read others' code. This is more important than any book or training course.

2. Write a program! The best way to learn is to learn while learning.

3. Study programming courses in undergraduate or postgraduate courses.

4. Find some projects and cooperate with other programmers. Learn to identify the best and worst programmers in the project.

5. Work with other programmers in the project to learn how to maintain the code that is not written by you and how to write the code that is maintained by others.

6. Learn a variety of different programming languages, especially those that have different world views and programming models from the languages you are now familiar.

7. Understand the impact of hardware on software. Know how long it takes for your computer to execute a command, how long it takes to retrieve a word from the memory (in the case of cache or no cache), over Ethernet (or the Internet) the amount of time required for data transmission, the amount of time required to read continuous data from the disk or jump to another location on the disk, and so on.

You can also get inspiration from Dave Thomas's 21 practical coding routines (codekata.com), or you prefer to join your local "programming martial arts" (codingdojo.org ).

For "hard work", I cannot provide a long list of suggestions like Steve, Peter or Dave. I am far less patient than they are. In fact, in my opinion, "programming routines" only need two moves:

1.Blog writing. I founded the codinghorror.com blog in early 2004 as a form of hard work. It was very inconspicuous at the beginning and later became the most important thing I have done in my career. Therefore, you should also write a blog. Finally, people who "smell the world" are often those who can effectively write and communicate. Their voice is the loudest. They are making game rules and leading the world.

2.Actively participate in famous open-source projects. It sounds good to talk about it all, but are you a great talker or a real man? Don't just say no, this is very important, because people will use your actions to measure you, not your comments. Try to leave something really useful in front of the public. Then you can say, "I worked in that project ."

When you can write wonderful code and explain the code to the world with wonderful words, I will feel that you have mastered the best coding routine!

The best coding routine

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.