How to learn programming, how to get started with a programming language, quickly master a programming language

When you ask this question, someone will always tell you, you should study this, study that, or it is useless to brush the question, you should do the project, or you should watch this video is useless, you should do it yourself To implement it again, or you should use the xxx framework, xxx language, and make a xxx system, so that you can learn a lot. I would say that most of these suggestions don't have much practicality. For a programming novice, many things are unfamiliar, and even if you get a document, you don't know how to use them. Because I couldn't find the starting point at all, figuring out how I should start, it was difficult to start everything.

The essence of programming is a technology, a craft , it is best to have a master take you and tell you that you can complete this part first, and you can also start that part first, accumulate little by little, and start from a small part to the whole , who can make cleverness with ease. But unfortunately, you will not have such a master in your life. You need to find opportunities by yourself . I divide the steps to find opportunities like this into three steps :

  • Crazy accumulation of code, crazy questions, crazy accumulation of your self-confidence.
  • Find an internship, find a place that interests you, follow others, and learn what technology is being used in the industry.
  • When your internship is over, you will no longer be unfamiliar with those terms, you have some experience, you can try to do some simple projects with some open source frameworks independently.

How to do it?

  • When you are still a novice , you need to accumulate your code crazy . You can start from basic problems, do some simple problems, how to input data, how to output data, and then familiarize yourself with various data structures, various common Algorithms, crazy quizzes, such as LintCode - Home is a very good quiz website, what can I do! Look at the answer, here is a website to find the answer: LeetCode / LintCode answer query , learn how to write it, and then implement it yourself. You can start with the easy difficulty first, each program is only about 20-40 lines, and even once you are AC, you can submit it repeatedly to enhance your self-confidence. Although this is just a joke, it can improve your understanding of Confidence in programming, love for programming, when you have confidence, you can really do one thing well. When you're solving problem after problem over and over again, tell yourself that I'm a natural programmer! Then you can challenge more difficult problems. When you accumulate more than 10W of codes, you will find that you will have a qualitative change. Everything will go smoothly. When I used to think about a sentence for a long time, now I have it at my fingertips. Congratulations on taking a very important step.
  • You should go for an internship. When you have the first step as a foreshadowing, you should go to the industry to improve your programming ability , this is very important. What is programming ability? Use programs to solve real problems. Your program is more readable and understandable. This is programming ability. Your program is efficient and maintainable. This is programming ability. Your program has been reviewed many times. Few, high quality, this is programming ability, you can quickly understand a small project, what a small module is doing, how to do it, this is also programming ability. So you should go to the company, have a mentor to guide you, do something, participate in the team. At the same time, the interview threshold for interns is much lower than that of full time. As long as you do the first step and prepare for the interview well, it is not a problem to get a good internship (interns are also easier to get return off).
  • When your internship is over , make a summary , what the industry is doing, what technologies are used in the industry, their usual programming tools, etc. These are all things worth learning. You can use what you have learned to try to do it. Some simple projects. You will find that things that had no clue in the past will gradually become clear. Crazy training, super self-confidence, do an internship in industry and you'll understand what I want and what I need to do to get what I want.

Recommended reading:

Welcome to follow my WeChat public account ninechapter, reply to the keywords "resume", "career", "rating", "project"...you can get all the things you want~


This question is indeed very big, and it is difficult to cover everything. I will start from my personal experience and perspective for the time being, hoping to have the effect of attracting others and giving you some small suggestions.

Table of Contents (can be read on demand)

  1. Preface: clarifying the nature of programming
  2. Necessary aids and skills
  3. clear learning direction
  4. Choose the right learning style and method
  5. Summarize

0) Preface: clarify the nature of programming

In fact, when we were solving application problems in elementary school, we had gradually cultivated the way of thinking of abstractly modeling practical problems and choosing appropriate algorithms (such as addition, subtraction, multiplication and division) to solve them. When the amount of calculation is huge or the problem is too cumbersome, manual calculation is obviously beyond the ability, and modern computers emerge as the times require, and automatic programming has become an inevitable trend of social development.

So fundamentally, programming is to abstract the actual problem into a model, and then use a highly logical language to describe and implement it with a specific algorithm.

1) Necessary auxiliary tools and skills

Learn to use git commands and github:

When I was a senior, I went to Ireland for exchange and study. The teacher who taught the ruby ​​language devoted a whole semester to inspecting our mastery of git repeatedly. When I first came into contact, I was miserable. I often typed a wrong order. After three days of writing code, I could roll back from Ireland to China on the spot. Several times I made a branch merge error before the deadline -

It is better to die in a foreign country overnight.

But when I gradually mastered git instructions and learned to use github, I realized how awesome github is. As the world's largest same-sex dating platform, github's version control and code hosting functions are very complete. Especially in actual work scenarios, how to avoid conflicts and cooperate efficiently in a large-scale project with multiple people will become the primary focus.

For beginners, learning how to use github will provide a good start. Develop the habit of writing modules with different functions on different branches, which can make your project logic clear and easy to modify. If you put all the code together, once you write nested towers of shit (which is your fate...), the unrooted pile of bugs will just crush you A programming dream that ended before it even started.

So if you want to learn programming, please open a new tab now and enter , register your own dating account. Beginners, don't worry too much. Although this thing looks a bit complicated, but believe me, it is more complicated than it looks... But don't be afraid, know that this difficulty will not count in your future programming career...

Related tutorials:

github tutorial :

blog: b

tutorial: rial.html

Choose a suitable IDE:

Choosing a suitable IDE will greatly improve the programming experience and efficiency. An IDE, an integrated development environment, is an application that provides a program development environment, generally including a code editor, a compiler, a debugger, and a graphical user interface. Different IDEs can be adapted to different work application scenarios, such as: PHP: PhpStorm; web development: WebStorm; Java: Eclipse, Intellij IDEA; C, C++: Visual Studio, Xcode; general-purpose IDE with strong scalability: Sublime 2, Emacs , Vim;

It is recommended to close the upper right corner: word and txt text editors

Sublime 2 is the easiest to use. Although it is a paid software, it can be tried indefinitely... It can be described as a conscience representative

Sublime 2 download address:

Vim is not recommended for novices, because if you don't understand the operating instructions, you can only type random strings at a loss after entering vim mode, and then shut down to get rid of it. . .

I once watched a clip of a TV series. The heroine learned Java overnight and successfully wrote and deployed a large-scale project. At five o'clock in the morning the next morning, the code was written in the form of a word document through QQ . Sent to Party A...

I still remember it as Song. 14th. Bold . Method names are still in italics.

Here, I beg my screenwriter friends, if you are involved in the writing of programming-related fields in the future, please be sure to ask me before writing...

2) Defining the direction of learning

There are many classifications in the field of computer programming, and there are different development directions under different classification standards. E.g:

By programming language: JAVA, Python, C/C++, Javascript, Ruby, PHP, etc.;

By development platform: Web, IOS, Android, etc.;

Divided by job responsibilities: front-end, back-end, operation and maintenance, testing (black and white box), data analysis, network security, etc.;

By species: unique

, other programmers.

For beginners without any previous programming related experience, my suggestion is to learn front-end related languages ​​(JS, HTML, CSS) first. Because the so-called front-end development is committed to developing the interface that directly interacts with users on the client, what you see when you run it, the initial basic project environment deployment is relatively simple, the compilation results are highly visible, and it is easier to obtain the initial stage than the back-end. Satisfaction, interest in sustainable development and motivation to persevere.


With the gradual separation of front-end and back-end, View and Controller in the MVC model are gradually classified into the front-end domain. How to build a front-end code framework that is easy to maintain and has high performance is a matter that needs to be explored and studied. Various front-end frameworks such as Angular , React, Vue also came into being (but remember not to rely on the framework without laying a good foundation for native js). In addition, be sure to lay a solid css foundation, because when your product manager makes even a little change in demand, you will deeply understand what it means to be affected by the whole body.

Of course, if you want to engage in back-end development, it’s okay, but the environment deployment is relatively complex, and the required knowledge base is relatively obscure and unfamiliar, which is more likely to dampen the confidence of beginners. After all, every beginner who wants to be a programmer has a god in his heart. He hopes that there will be light with a single finger, rather than a big hand waved into darkness, and then two moves and it will collapse...

3) Choose the appropriate learning style and method

  • If you are a current student of a related major, please be sure to:

1. Take all relevant professional courses, no matter how boring it is.

If you don't learn the principles of computer composition, you won't know the physical meaning of an int data type occupying 4 bytes, and you won't fully understand the difference between variable declaration and variable definition; if you don't learn data structure, you won't know How to use the optimal algorithm for optimal deep optimization. The foundation is the most important thing, and laying a good foundation will allow you to get rid of most of your peers after work.

2. Don't question the meaning of the teacher asking you to read the code and copy the code.

I used to sneer at this kind of learning method, thinking that it is simply unreasonable, but it turns out that your teacher is your teacher after all, and this approach must have its rationality. What you can understand and what you can write are by no means the same thing. Once you write, you will know that you may not even fully understand static local variables and dynamic local variables.

E.g:


int fun(int n){
  static int f=1;
  f=f*n;
  return f;
}
void main(){
  int i;
  for(i=1;i<=10;i++)
  printf("fun(%d)=%d\n",i,fun(i));
}

static will directly lead to whether the output result is a factorial or a simple multiplication arithmetic. And if you don't type it out yourself, you're likely to ignore the existence of this keyword.

All in all, don't copy and paste the code at any time, be sure to handwrite it bit by bit yourself.

  • If you are a beginner in a particular field:

Reasonable and full use of network resources, multi-dimensional and multi-channel combined learning, should not buy a few thick brick books at the beginning, carry out untargeted extensive reading without any practical exercises.

Personally, I prefer to consult English teaching materials and video materials. The expression is more concise, and it is actually more semantic in the field of programming. There has always been a lot of controversy about MOOC online, but personally, I would prefer the English MOOC platform for more systematic learning. In the face of a new field, a clear general context and precise entry point can greatly improve efficiency than simple self-learning.

The relatively mature and well-known ones among the various international MOOC platforms are: Udacity, edX, coursera, etc. However, as far as MOOC education in the computer field is concerned, individuals prefer to choose Udacity. Since I'm about to switch to machine learning recently and I'm learning python, let's start with the preview section of python for the time being nanodegree (But it seems that registration is required first), it can be seen that its sinicization work is relatively complete. In the early days, if you can't understand the code, you can't understand people's words, this is enough to let you write a python from entry to give up... The second and most important point - there is code review . Links - here I want to hit the blackboard to emphasize:

Please be sure to cherish someone who is willing to help you with one-on-one code reviews in your early stages.

In the initial learning phase, there are actually two things that are crucial:

1. Independently develop a complete project;

2. There are professionals who give code review guidance (code review).

In the company I used to work for, standup at 10 o'clock every morning was an unstoppable rule. I was hanged in public by my reviewer and became one of the special performances... Although it feels painful to be pulled by the hair, but everyone must remember, must be To cherish the review opinions others give you, and also to review other people's code more

——After all, your own code is awesome no matter how you look at it. Only by exposing each other's idiots can we make progress together...

Beginners with zero basics can preview the relevant introduction nd000 (It seems that you need to register first), you can understand what I said about the architecture with the front end as the primary entry point and python as the later cooperation, which is roughly the same as the one recommended in Chapter 2, which is more reasonable.

In addition, code review is also one of the important meanings of github. Submitting a pull request in a team project is generally not allowed to merge into the main branch of develop or master. One or more reviewers need to approve the merge before confirming the merge. So to repeat: Be sure to learn to use github.

In addition, the more well-known text tutorial websites are:

w3school online tutorial , rookie tutorial ;

w3school has mind maps (which I think is very good), and the course content is more than rookie, but I prefer to use rookie before, because its user interface makes me feel more concise and relaxed, w3school is relatively solemn... ( w3school: ?

Some of the more well-known websites are:

lintcode:lintcode.com/zh-cn/

codepad:codepad.org/

When there is a certain learning experience, it is very important to make good use of the online practice site to consolidate. The so-called programming, the focus is on editing. Trust me, the kinds of weird mistakes you can make are definitely beyond your knowledge...you'll never know what you didn't know without a hands-on practice.

The more well-known technical blogs are:

vczh wheel brother: λ-calculus (C++ direction)

Zhao Jie: Home - A Bit of Lao Zhao - Pursuing the Beauty of Programming (C++ direction)

Learning programming (Python, data mining direction)

Teacher Liao Xuefeng: https://www.liaoxuefeng.com (front-end, python direction)

When you encounter a problem, don't be discouraged and panic, your pit must have been stepped on by your predecessors, and making good use of the blogs of technical masters will make you more effective with less effort.


How to get started with a programming language:



How to quickly master a new language:


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325685511&siteId=291194637