How do quasi-programmers view code?

Source: Internet
Author: User
>

When I first went to college, the most common question I asked was how software engineering students could learn what I did not even know about C. The most common answer is: "Read more code and write more code ." Now, three years have passed. As a quasi-programmer, I have been practicing for a while. In the face of the code I read every day, I am as confused as I was when I first went to college. How should I read the code?

"If you want to learn but not think about it, you can't think about it." It's time to close the screen and think about it.

First, we should understand two things. First, learning programming is not just a matter of coding. I used to read a lot of books, watch a lot of videos, and there are a lot of K in the code. But there are only a few of my own, and some of them just come off without a brain, sometimes you can understand it while you are looking at it, but you have no idea how to implement it. Second, writing a program does not mean that it can be used after copy. When I was working, I really thought it would be okay to copy from here, copy from there, and finally run the program. Until I saw a cartoon: "A: I don't understand your program. What are these lines of code used? B: I don't know, but if I delete them, the program won't run ." I don't think I should continue.

I personally think we should pay attention to this point when looking at the code: what can be done to achieve this problem. These problems can be as big as the entire program, or as small as some functions. We should summarize these Implementation ideas to find the simplest and most suitable method. For example, there are many ways to exchange two numbers.

1. tmp =;

B =;

A = TMP; (A and B have been assigned values)

2. A ^ = B;

B ^ =;

A ^ = B;

3. A + = B;

B = A-B;

A = A-B;

Read, think, and summarize every code for your own use. This may take a lot of time, but it is definitely worth it. For quasi-programmers, they can grow smoothly without learning many languages. "Education belongs to the past, ability belongs to the present, and learning ability belongs to the future ". What we need to do with the code is to improve our learning ability and improve our ability.

The above are some recent ideas. I hope that experienced people can give me more advice and communicate with colleagues who are new to me.


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.