Our ability to do things can improve, and the change of mindset is the key.
The process of changing from student to professional is very difficult, because we should struggle with the "old habit" that we have accumulated for many years, these "old habits" include: procrastination, punctuality, non-compliance with rules, fear of hardship, etc. Like rocket-propelled satellites, the most fuel is spent to get rid of the shackles of gravity, and once successful, the flow will be easier. The so-called "everything is difficult at the beginning" is the truth.
So what are some misconceptions we need to get rid of in order to master the basic skills of C language in work?
Misconception one: My C language is very good.
This is the idea that almost every person who goes out of school and prepares to do software development has a high score in the school exams. But the idea is good, the reality is brutal. When you get to work, you will find that the knowledge you have learned in school is very limited and it is not enough to deal with the job. In China, there is also a strange phenomenon is that the school teachers speak more, the basic work is not used, and the teacher did not speak, or speak relatively little, the work is often used more. For example, in C language, the pointers, the structure of these, the school has little or no depth, we do not pay attention to, but to deal with the exam, but the work we need to always deal with them. Did you say you were a good study?
This, in part, reflects the fact that there is a serious disconnect between school education and social work in China. For personal career development, we must be humble, to learn humbly.
Wrong idea two: programming is a very simple thing.
People who hold this view are also influenced by school education because the code on the books is short and relatively simple. But is it that simple at work? Not too.
I concluded that there are at least a few differences between the procedures in the textbook and the procedures in the actual work:
First, the number of lines of code.
The code in the textbook is generally dozens of lines, more than one hundred or two hundred lines, of course, we will feel simple, while the work of code less than thousands of lines, many tens of thousands of lines, the two are not the same order of magnitude. When I first got the program, my head was dizzy: Why so much code? I've never seen it before.
Second, the names of variables and functions.
This is the biggest difference between the two, but also "professional" and "cottage" important difference. In the textbook, often named there are these: "int i;", "Char *p", "float f;", "int f (int a, int b)" And so on, we have become accustomed to. This is a textbook "poison" to everyone. In the work, we must strictly follow the programming specification to act, like above those naming method is strictly forbidden. This will be explained in detail in future articles.
Third, the program's annotation.
It's also a very painful thing to have. The textbook is short, so there are fewer notes, which also introduces an illusion: The number of notes is not important. But at work, we have to keep in mind that there must be a comment near some important program statement. Not only that, there are a variety of annotation, in different places, the wording is not the same. Short and clear annotations can improve the speed with which you read your code, thereby increasing your productivity.
Four, input/output statements.
In the textbook, almost every program has "scanf" and "printf" These two functions, for reading and output data, we use is with relish, if which program does not have these two functions, but will feel strange. But in the work, it is true that there are almost no these two functions, but instead other ways to input and output. In the beginning, you may find it difficult to accept, but after you become familiar with it, you will know what the reason is.
The layout of the program.
In the textbook, there is no layout to say, basically realize the required function. This also brings a misunderstanding, that programming only pay attention to function, anything else can be "arbitrary." But in the work, for the program layout, layout has strict rules, where should be indented (and indented a few spaces), where should be left blank, where should be left blank line, are to pay attention to. This is like a person, just say their belly "have goods" not yet, but also need to pay attention to appearance, to make everyone look very comfortable, the so-called "both inside and outside", is this truth.
For the details of the code, I'll explain it in a future article.
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/project/