[Chat] How to learn a programming language

0. Preface

How do you usually learn a programming language? I have learned many kinds of things one after another, some are needed for class and some are needed for work. I feel that learning and mastering a language is worth discussing. Let me write this article to summarize and discuss it. However, since my experience and abilities are average, this article is only for casual conversation.

1. Learning multiple programming languages ​​is common and feasible

I majored in electronic information in college and studied many aspects. When I was a freshman, I learned C language, then matlab and python. I learned C++ in the object-oriented course, and even learned a hardware description language like Verilog. Anyway, I learned a lot and will use it in class. For example, C and Verilog are used for embedded microcontrollers and FPGAs, and python and matlab are used for machine learning and image processing. The major provides me with many options for graduation, such as embedded development, machine learning, communications or circuit design. But later I learned C# and started making games. And I also learned a little bit of Java when I was hesitating about what to do after graduation. Then I graduated and went to work. Because the company used to mostly use TS to make small games, Unity3d also used the TS framework, so I started to learn and use TS.

I have also learned many languages ​​one after another, many of which are just introductory, and are too many to be mastered. But then, it is normal for programmers to learn multiple languages. A classmate of mine who majored in software engineering learned c++, java, python, etc. After graduation, he went to work and needed to learn some JS and other things for work. Language, some will also be used when debugging web pages. So from this perspective, learning multiple programming languages ​​is also the basic journey for a programmer. If needs and environments change, it is common to use different languages, which can also take advantage of different languages . In addition, programming languages ​​are constantly iteratively updated and introduced , such as GO, which was very popular before. Sometimes, in order to keep up with the times, it is necessary to learn different languages.

But after learning one language, learning other languages ​​is relatively easy. The interoperability between programming languages ​​is still quite high. The basic content syntax is basically declarations, conditional judgments, loops, etc., and basic knowledge such as data structures can be used in different languages ​​almost seamlessly.

Therefore, learning multiple languages ​​is universal and feasible. Of course, you still need to be proficient in one or two languages. Otherwise, if you just know how to do everything, it will be more troublesome if you can't do it when you want to make something .

2. Tips for getting started with programming languages

(1) Computer major

There’s not much to say about this, just follow the teacher and the course to get started. Then, if you want to do more, you can consider signing up for algorithm-related societies or activities in your major. When writing algorithms to solve problems, you will become more and more comfortable using this language. It would be better if you can enter a relevant laboratory.

(2) Computer-related majors and science majors

Nowadays, it seems that many science majors will teach a programming language. In the past, my classmates in civil engineering majors would learn Java. For example, my major is electronic information engineering. Even if it is a computer-related major, of course it will be taught. The entry-level language should basically be C/C++. If you start learning from this, the content will be relatively small. The basics are basic, and it will be relatively simple to learn other content later.

It's like the teacher's teaching in college, after-class experiments, homework, and the final exam. After this process, you will only learn 7788 of the basic content. Just listen to the teacher's arrangements. In fact, just learn some basics. It doesn't matter if the teacher is too naive. If you have any questions, just search on Baidu or ask your classmates.

However, I would like to make a digression here . I need to discover more skills needed by the industry, and then learn additional skills to complete them. For college students who are not majoring in computer science, software programming is missing from the curriculum (this is quite normal, after all, the major itself is not meant to teach you how to make software), and you will have to make up for it on your own later. For example, I am currently working on games. Databases, computer networks, and computer graphics, which I did not learn at the time, have always been a pain for me.

(3) Non-related majors

If you are a high school student, it is recommended to learn the basic content well first. It is very important to take the college entrance examination . In addition, mathematics and English will be used in the future, so don’t underestimate them. I’m thinking about learning programming when I have some free time. In addition, for zero-based knowledge, language is only the foundation. Later, data structure, network communication and many other contents are crucial for programmers to learn. Don't do anything when your mind is hot, or be brainwashed by the course. It feels like it should take about 4 months to spend 8 hours a day to get started from scratch. You have to take notes very seriously and practice.

Okay, if you are now determined to start learning, you must first decide on a language . First determine what you want to do, such as front-end or back-end, mobile terminal, or machine learning. This should be considered. If you have thought about it, it is recommended to check the content required by the relevant industry and choose the language . Although the Internet is full of spam information, if you shop around and compare, you will probably know what you want to learn. It is also a good choice to ask the relevant practitioners directly. Here are some things I know relatively well for reference:

  • Making games:
    C++ (Unreal, making large-scale games, good performance and good graphics)
    C# (Unity, making 3D games such as mobile games, used by many companies, many learning resources)
    Typescript (Cocos, making small program web games)
    (the above are different Game engines can all be learned, and the market is pretty good. Then the strengths are written accordingly.) (
    The following are just strengths, not that Unity can only talk about mobile games. It is also very good at making client games. Of course, Cocos can not only do small games. program)

  • Machine learning, AI:
    R language, matlab (used in general universities and academic research, and matlab is charged)
    python (there are many libraries available, you can match them by yourself, and there are many online tutorials)
    (in fact, machine learning mathematics is very important , basic algorithms are the key, you must learn mathematics, advanced mathematics, and linear algebra!)

  • Single chip microcomputer, embedded development:
    C (nothing to say, basic high-level language, it basically has to be him)

I recommend watching the tutorials and making a demo together, and then learning together. It will be easier to continue learning if you have results. What you need to pay attention to is that you don't want the teacher to type a code and you just copy it, and then you don't know anything after you finish it. You should write the code yourself rather than copy it, and then think more about why you write it this way and what this sentence is loading or calling.

If the direction is not clear, C/C++ and Java are better choices for entry . After learning one language, it is not difficult to switch to another language, especially Java and C++, which are very standardized and old programming languages. I don’t really recommend using python or the like. It’s really not as easy to use as the ones uploaded online, such as automatic processing in excel and the like. In this case where the demand is not large, for example, if I register some content every day, I can do this manually. Writing a program actually takes more time. And if this requirement changes later, the program will no longer be usable. If you learn C/C++ first, it should be easier to learn other languages. However, if you already have a clear goal, you can just start learning the corresponding content. For example, if you want to be a front-end, then you can also start learning from javascript (although there are some awkward things about js). I personally don’t think you have to start learning from c/c++. Although you will understand the basics better this way, you still have a lot of energy for comeback. Later, if the work is in-depth or if there are other needs, I can complete it.

(4) Self-study method

As for the learning method, I feel that it is easier to learn by watching videos than by reading books. Reading books is easier to give up and the details are not enough. There are many tutorials like station b. If you take paid tutorials, you need to be careful. Don’t spend money but you don’t want to learn anymore. As for books, I recommend a book. As a reference book, the information density of the book is relatively high, and the content can be used when searching . For example, if you forget how to declare an array or how to type an assembly, you can find out by looking in the directory and looking up the corresponding content.

You should write more, you will get used to it if you write more, practice more, record more, write blogs and so on. I forgot to turn it over later. Try not to copy . You will be more clear and familiar by typing and sorting it out yourself. **If you don’t record it, it will be easy to forget it after learning it later, and in the end it will be the same as not learning it. **I didn’t know that I wanted to write a blog when I was in college, but if I write a good blog, it will be easier to find a job.

3. Tips for learning one programming language from another

If you have already learned a programming language and then learn another language, it will feel like it is divided into two parts. It is recommended to read and study, and jump to read . The first part is about grammar, and the second part is about language characteristics . Of course, you must make sure that there is a need to learn a new language, such as for work. Otherwise, it is better to become proficient in one than to learn multiple languages .

To learn grammar, just look at basic definitions, declarations, loops, conditions and other grammar, and then type the code according to the content in the book. Then just use it more often. If you can't remember how to define an array, just look it up in a book. It takes about 1-2 days to learn basic grammar, and then you can use it relatively proficiently in a week. After that, I will become more familiar with it by using it more often. If I don’t understand it, I will look it up in the book.

Learning language features is actually particularly important here. Just like if you still use C++ for procedural programming as you did in C, then the role of C++ as a language will be eliminated. If you want to learn the characteristics of a language, you can just read a book. Generally, books will give an extra chapter to explain the iconic characteristics of this language. For example, the C# book I bought, "Essential Theory of C#", discusses reflection and generics separately. Just read these chapters carefully and practice more.

One advantage of reading books is that the contents of technology-related books are generally accurate, correct, and easy to understand. Reading books is very suitable for learning language features . After all, publishing a book requires costs. Unlike when I write a blog now, the content will be too complicated. Basically, just pick a hot-selling technical book and it will perform well. When watching videos or tutorials, there are too many useless choices, and too many of them have already been learned before. It is troublesome to skip and watch, and it is a waste of time.

At this point, you are basically getting started with this language. Naturally, you will gradually become proficient in it by using it more and recording more.

4. It’s over

That's probably it. I actually said so much, it's already 3,400 words, it's a bit long-winded, haha.
Finally, I wish you all good health and success in your studies.

Guess you like

Origin blog.csdn.net/Blue_carrot_/article/details/132354925