Current location - Education and Training Encyclopedia - Education and training - How to learn computer programming?
How to learn computer programming?
How to learn computer programming? The author found that the most frequently asked question was "How to learn programming? How to learn JAVA? " . After answering many similar questions, I came up with the idea of writing this article. If someone asks a similar question again, I can tell him (her) to invite you to learn JAVA. I have read Sleepless in JAVA written by Mr. Cai in Taiwan Province Province, and some articles, such as The Method of Learning JAVA, make us really * * *, from which the title of this article comes.

The road of software development is full of thorns, challenges and hopes. JAVA learning is the same, there is no shortcut. It is unrealistic to dream of being enlightened by five ducks like the virtual bamboo in Eight Dragons and easily gaining a skill. I cry to the sky every day, "God, please give me a sunflower book." I don't know, even if you get the sunflower collection, you may not become a "Dong Fangbubai" except for your own embarrassment, but the probability of becoming a "western loser" is higher.

"If you don't take a detour, it is a shortcut", which is not unreasonable in the Buddhist scriptures.

Let's talk about how to learn programming today.

JAVA is a platform and a programming language. How to learn programming well is not only applicable to JAVA, but also to other programming languages such as C++. Some programmers think there is no difference between JAVA and C, so just use it. Why can they reach such a state? I think it's because there are similarities between programming languages. I understand the essence of programming, so I can do everything naturally. Of course, how to learn programming also has a lot to do.

1 cultivate interest

Interest is what keeps you going. If you just write programs as a means of making a living, you will live very tired and feel sorry for yourself. Pay more attention to some interesting things in the industry and think more about Gates. I'm not advocating daydreaming every day, but do you think it's interesting that people don't have dreams? Perhaps, like many local farmers, they play mahjong, drink kungfu tea and worship the God of Wealth. There are tens of thousands or more accounts every month, creating a "profit-seeking class" out of thin air. Do you think this is the smell? If you have time to visit some programmers' forums, you will find that they are actually optimistic and humorous, and there will be sparks of wisdom from time to time.

2 Choose the programming language carefully

Men are afraid of going into the wrong business, while women are afraid of marrying the wrong person. Beginners need to be careful when choosing programming languages. Software development is not only about mastering a programming language, but also requires a lot of other background knowledge. Software development is not limited to a few fields, but has penetrated into almost every corner of all walks of life.

If you are interested in hardware, you can learn C language/assembly language and enter the field of hardware development. If you are familiar with the knowledge and network of telecom industry, you can spend more time on C/C++ and enter the field of telecom software development. If you are familiar with the operating system, you can learn C/Linux and so on, laying the foundation for Linux kernel development/driver development/embedded development. If you want to get involved in the most widely used application software development (including e-commerce e-government system), you can choose J2EE or. Net, even a combination of lights. Each field needs different background knowledge. Doing application software requires familiarity with databases and so on. In short, you need to choose the right programming language according to your own characteristics.

Down-to-earth, fast-food learning is not desirable.

Share a story first.

A child likes biology very much, and wants to know how those butterflies come out of pupa shells and become butterflies to fly. Once, he went to the grassland and saw a pupa, so he took it home. Then he watched. A few days later, there was a crack in the pupa. He saw the butterfly inside struggling and wanted to scratch the pupa shell and fly out. This process lasted for several hours, and the butterfly struggled very hard in the pupa, but it couldn't get out. The child couldn't bear to look at it and thought it was better for me to help him, so he picked up scissors and cut them on the pupa to let the butterfly break out of the cocoon. But after the butterfly came out, it became bloated and could not fly because its wings were not strong enough.

The lesson of this story is: haste makes waste.

Impetuousness is the most common mentality of modern people. Who can blame? Perhaps it is because poverty has lagged behind for so many years. Just like the Great Leap Forward, everyone wants to stride into the capitalist society. Nowadays, software companies, customers, governments, schools, training institutions and so on are full of impetuousness. Take the IT training industry in Shenzhen that I am familiar with as an example. In fact, some people flaunt that "100% jobs will be obtained through training", but in fact many students have signed up, which is simply contempt for programmers all over the world. If the social environment is like this, we can't change it, only ourselves. The tranquility of the city center is precious. Many beginners of C++/JAVA have developed a Hello World program with VC/JBuilder without learning. They rushed to announce to the world that "I can develop software" and wrote "proficient in VC/JAVA" on their resumes. As a result, I went to the software company for an interview, either being sent away three or two times or being refuted to pieces. I didn't know until I hit a wall everywhere. I picked up C++ Programming Thought and JAVA Programming Thought and studied them seriously. If I know this, why should I know it?

"Pay attention to simplicity and convenience now, and the road will be long in the future", which seems to be an exhortation in Buddhist scriptures.

Practice more and practice faster.

Peng Duanshu's "Learning to Show Sons and Nephews" tells the story of a poor monk and a rich monk.

Once upon a time, there were two monks on the border of Sichuan. One is poor, the other is rich. One day, the poor monk said to the rich monk, "I'm going on a pilgrimage to the South China Sea. What do you think? " The rich monk said, "It is thousands of miles away from the South China Sea. How do you get there? " The poor monk said, "I just want a water bowl and a rice bowl." The rich monk said awkwardly, "I planned to buy a boat to the South China Sea a few years ago, but I haven't made it yet. You'd better not go! " A year later, the rich monk is still raising money to rent a boat, but the poor monk has returned from a pilgrimage to the South China Sea.

This story can be interpreted as: anything, once considered, should be on the road immediately, don't wait until it is ready to do anything. If you are ready to consider things before you go on the road, others may beat you to it. Software development is an engineering discipline, focusing on practice. It is fundamentally wrong for software developers to say that "a gentleman talks but doesn't do it". They advocate "first strike is strong", but don't be afraid. Most of them are gentle and not violent, although sometimes they look like "Bill Gates". Some senior experts believe that the secret of learning programming is: programming, programming and reprogramming. I deeply agree. Not only should we practice more, but we should also practice quickly. When we are reading a book, don't wait until you fully understand it before typing the code. Instead, we should code while reading. The various situations in which the program runs can make you grasp the knowledge points faster and more firmly.

5 multi-reference program code

Program code is one of the most important achievements of software development, which permeates the programmer's mind and soul. Many people were moved by the sad love story in The Legend of the Sword and the Chivalrous Man, and the tragic ending was even more beautiful. Why did it end in tragedy? It is said that the programmer who wrote the legend of the sword and the chivalrous man was lovelorn and arranged such an ending. He put his feelings into the game, but it made many sword fans sigh.

Refer to many code examples. For JAVA, there are references [4.3], the source code of API classes (src.zip file in JDK installation directory), and you can also study some open source software or frameworks.

6. Strengthen English reading ability

English is not necessary for learning programming, but you can't understand it at all. At least things like JAVA API documentation (reference [4.4]) should be understandable, even guessing and confusing; Open a "Kingsoft PowerWord" next to it. The more you watch, the more skilled you will become. Learn English while learning JAVA, kill two birds with one stone. In addition, many softwares need to be downloaded from English websites. You should be able to find them. These are the most basic requirements. Good English is of great help to your study. If you speak English well, you have a better chance to enter the management, and then you can become a "pickpocket" who exploits programmers.

70,000 people have to ask others.

When solving students' problems in the online tutoring system of online schools, the author found that most students can solve them with a little thinking. Before consulting others, you should answer the following questions.

Did you search for a solution to the problem on Google?

Have you checked the JAVA API documentation?

Have you checked the related books?

Have you ever written code tests?

If the answer is "yes" and the solution has not been found, it is not too late to ask others. You know, the ability to think independently is very important to you. You know, programmer's time is precious.

Read more good books.

Yan Ruyu is in the book. Bill Gates is a well-read man. Although he didn't finish college, Bill Gates had read all the encyclopedias when he was nine years old, so he was proficient in astronomy, history, geography and so on. It can be said that Bill Gates is not only the richest man in money, but also the richest man in knowledge.

I often recommend books to students when I give them classes. Later, some students couldn't bear to complain, "God, when can I finish reading so many books?" And "learning software development makes me feel like a thief." At this time, my answer is generally "don't worry, when shall I show you my study?" Up to now, the money spent on technical books every month is in 400 yuan, and it is only at a medium level among software developers. " The student fainted on the spot. (Note: These students are new to software development)

9 Use the right tools

Sharp tools make good work. Software development includes requirements collection and analysis, building use case model, building analysis and design model, programming implementation, debugging program, automatic testing, continuous integration and other activities. Without the help of tools, it can be said that it is impossible to move forward. Tools can improve the development efficiency, make the software quality higher and have fewer bugs. A weapon that combines hands. It is very high to reach the state that flying flowers can hurt people by picking leaves. It's almost impossible to win without making moves, with a sword in your hand and a sword in your heart.