In fact, a lot of people learn programming will encounter difficulties, I think one of the fundamental reason is that they do not understand what to learn programming in the end.
Programming is not a knowledge, but a craft.
We learn from small to large are learning knowledge, the process is generally reading before class preview, class listening, class to do homework, and then review the exam. But this is not the way to learn crafts.
Let's take a swim for example, swimming is not knowledge, but skill, it can also be a craft.
Do you need a preview? Need to listen in class? No, because two-year-olds can learn to swim, they can't even talk about it, how can we prepare for the lecture? Swimming is through the practice in the water, the coach hand-hands-on teaching action, 1.1 points to improve the proficiency of the learned.
Let's look at the piano again. To learn the piano must have a piano, music is the basic knowledge of the teacher in the gap taught, and will be combined to practice, the other time is very important to practice, you must ensure a certain amount of exercise, some ideals of the piano children to practice the Qin time can be described with inhuman.
Don't think of programming as knowledge, computer science is knowledge, but programming is craftsmanship.
Since is the craft must use the craft the thought to study.
To practice mainly, reading study supplemented, even extreme points, beginners in addition to see the necessary documents can not read, and so have a certain programming basis to read after reading, read the book immediately hands-on programming to verify the theoretical knowledge of the book.
Practice must be gradual, broken down into a few simple movements, repeated practice until skilled, and then the basic action together to practice until skilled. Take C language examples, such as from the earnest writing a Hello World start, and then to familiarize themselves with the IF for the basic keywords, and then familiar with string operations, memory operations, practice lookup sorting binary tree and other basic algorithm data structure, and then learn a small framework ....
Find a master, the craft of a major feature is that self-study is very slow, and easy detours, and someone hands-on teaching to be much faster, crafts have a lot of details, practical experience, need to experience the feeling of things, these details of the basic books will not have.
Insist on doing a lot of practice, in the number of lines of code, for example, 50000 rows per year is more general practice, there will be perseverance can challenge 100,000 lines. (Some people say that the number of lines of code does not mean anything, the number of lines is not necessarily the program on the written good program code rarely blablabla, roll, go to talk to Lang, tell him actually don't have to practice that long time Qin. )
Remember how they learned how to ride a bicycle, learn to swim, learn to play basketball, according to that idea to learn programming, instead of using your university curriculum thinking to learn programming.
Remember, programming is craftsmanship, not knowledge.
= = =
Finally, the best metaphor for the nature of programming ability is to play the piano. But with programmers who don't have the skills to be good programmers, the good programmer is the composer who can not only come up with beautiful melodies, but also play them, just as a good programmer can come up with a graceful algorithmic architecture and turn it into executable code. It's hard to imagine a composer who doesn't have any musical instrument.
Many people's problem is to be a composer but not to work hard to practice the piano.
A preventive needle, I think someone will cite a counter example that I know that a certain composer does not play an instrument (really).
What I'm saying is, when you become a well-known composer and say you don't know how to play an instrument, you're a great guy.
That's idiot before you get famous.