How to teach yourself computer programming?

Author: skeleton audio
link: https://www.zhihu.com/question/28354731/answer/138578609
Source: know almost
copyrighted by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.

The answers written by many people in the front are very good. The answer is that what the undergraduate and graduate students have been studying for 6 years are all mechanical. The occasional use of programming in their studies is very simple. Write a function, write a loop, nothing more, yes The principle of computer operation is not understood at all, and even the difference between bit and byte is not clear (no exaggeration). When I was looking for a job, I ran into the software industry by mistake. I started to learn programming by myself. I used to read books and open courses every day after get off work. I learned some basic knowledge of computer and programming. Now I work at Google and work in the United States. The reason why I want to add is that most of the other answers say that if you take programming as an interest to learn, personally feel that programming, or software engineer, as your future career, just picking up a language and writing simple programs is not enough of. It is very important to understand the operating principles of computer programs and to understand a lot of related knowledge. Otherwise, on the way of learning, you can only have a little understanding of many concepts, and you will not go too far. Take the following basic computer concepts and related courses. The respondent thinks it is very helpful and necessary to become an excellent programmer. 1. Computer system, recommended course: UC berkely CS61C, difficult to understand, but very important! link: https://www.youtube.com/watch?v=gJJeUFyuvvg&list=PL-XXv-cvA_iCl2-D-FS5mk0jFF6cYSJs_ This course describes how computer programs run, some computers, basic concepts of programs, such as computer assembly The meaning of instructions, memory, registers, the difference between processes and threads. The understanding of these concepts is vital to a programmer. Understand these, in order to consider some basic issues in program design and writing, such as how and why to prevent memory leaks, how to write programs can reduce cache miss and improve performance. 2. Data structure and algorithm, recommended course: UC berkely CS61B , The difficulty of understanding is medium to high, the important ones cannot be more important link:https://www.youtube.com/watch?v=mFPmKGIrQs4&list=PLZBP-86GmPTxpbvoFFzad0qYw5dKA8MV2 If you do not understand the basic data structure and algorithm and programming, it is basically equivalent to building a building without understanding mechanics. The building may be built, but You dare to live, I dare not. The basic function of the program is to store data and process data. Data structures and algorithms can be understood as basic tools and ideas for accomplishing these two tasks. 3. Network basic knowledge, recommended course: Stanford Network, the difficulty of understanding is medium, very important link: Introduction to Computer Networking I don’t need to say how important the network is in the software, unless you just want to write a calculator, otherwise these basic concepts are definitely Understand. This course basically explains the network building blocks, how the browser goes from typing a letter-formed URL to displaying an interactive page to you. Although this happened in just one second, it happened in the background. It takes a lot of things to ensure that this web page is delivered to your browser. From dns, router, to load balancer, to http, tcp/ip, html, css, javascript. After taking this course, it is basically clear. I’ll write this first...I’ll continue to update if someone is interested. I’ll write about one-fourth later./*After a sleep, I was flattered to see so much approval. Since everyone is so interested, I’ll continue with the code word. . I try to set aside a period of time to update every day. The answer is that there is a baby who is just 3 months old and the time is relatively unstable. First of all, I have to explain a few things. The answer to the subject is that the process of self-study of Computer Science or programming is completely completed abroad, so all the learning materials and videos are in English, and I only know English for many terms. It is inconvenient for everyone to understand. Apologizes. But when it comes to this, I think doing two things is very helpful for learning CS efficiently. First, learn English well and try to learn the concepts of CS in English. This is not because I am fond of foreigners, but objectively speaking, even if my country's scientific research technology and programming level are not far behind the United States, but in terms of teaching level and teaching material quality, there is still a lot of difference, and there are many CS Concepts will be directly presented in English in programming languages ​​(stack, heap, tree, array, list, map, graph), even if you use Chinese when you learn, you still need to know English when programming, write English, and learn English directly Eliminates the need for secondary learning. second,*. The reason for this is not just that most of the foreign textbooks and course videos are on websites outside the wall (almost all public courses are on youtube, I will put the course link mentioned above). Also, I went back to China last year and worked in the company's Beijing office for a while. I tried to use Baidu. In terms of search programming technology, I don't know how far the quality of Baidu's search results was rejected by Google. I will post YouTube links to the courses I have written above. The assignments that can be written in these courses are strongly recommended to follow, because the level of programming is written by code. /4. I don't have any recommended courses for the topic of database, because most of the database courses I see are about how to use SQL database. I think database knowledge is divided into two parts. As a beginner programmer, you may only need to know how to write simple SQL statements, how to create databse, create table, insert, update and query. This is the first part of database learning, I recommend using Some websites that you can write while learning to learn this part will be impressed by actual combat. Here is a website recommended (don’t know if it’s necessary ) Learn to code, they have many courses, they are all good, you don’t need to use the paid version, it’s free The version is enough. The second level of the database, I think is the essence of the database. This part I learned by reading articles on the Internet and continuing to search. It is the operating principle of the database. Specifically, it is how the database can be quickly searched. Imagine Here, a table has many columns, such as a person's information, name, gender, address, and age. So, for example, if I want to find people in an age range, the database cannot sort by age every time, and then output. The complexity of sorting is nlogn, even if it is not sorted, the complexity of each output is also n, which is unacceptable for a database with millions of records at every turn, so the database will use several special structure trees to store these columns to ensure When outputting, the complexity is basically logn. Regarding how these trees are implemented, you can write a very long article independently. It is recommended that you first learn and understand a few basic tree structures (the data structure and algorithms are mentioned), and by the way, I recommend a WeChat public account. I stated in advance that this official account has nothing to do with me, except that his article level is generally high. The name of the official account is "Kaidian Workshop", and there is an article about database implementation that is very well written and very profound. / I have been working overtime this week, plus a business trip, and there has been no update. I am very sorry, I have some time to update on the weekend*/5. Operating system recommended course Berkeley CS 162link: https://www.youtube.com/watch?v =1IcZB26STUE&list=PL-XXv-cvA_iBDyz-ba4yDskqMDY6A1w_c Recommendation: Computerlock). My previous work experience at Oracle was mainly responsible for improving the performance of the operating system, so I have a deeper understanding than programmers who are not in this field. Let me talk about why locks are important. Nowadays, very few programs are single-threaded (except javascript). In a multi-threaded environment, if there is no lock, the world will be messed up. To give the simplest example of buying milk, if you share a roommate with someone else and you both drink milk every day, one day you go home and find that there is no milk and go out to buy milk, but before your roommate comes back, you have not come back. Your roommate can’t tell if you’ve gone to buy milk. If he thinks you’ve gone but didn’t go there, you will have a bottle of milk in your house. If he thinks you’ve gone there by yourself, you will have two bottles of milk. , If he thinks you went and you didn't, there will be no milk in your house. This kind of situation where uncertain or wrong results can occur in a multithreaded program is terrible and needs to be resolved. Then the solution is the lock. In this example, the lock is a sticker. If you go to buy milk and post a piece of paper to tell your roommate that you bought it, then this is easy to solve for your roommate. If he sees that there is no Milk, if there is no sticker, he went to post a note to tell you that he went to buy it. As a result, your family has a bottle of milk. If he sees that there is no milk but you post a note, then he knows that you have already bought it, and he doesn't need to buy it. As a result, your family only has a bottle of milk. In this way, there will be no uncertainty in the results of program execution. Of course, the real lock implementation is more complicated than this and there are many kinds of locks, but the basic principle is this. In this regard, together with point 2, I recommend a book. I wrote it at the beginning. The first three chapters of this book are not easy to understand. They talk about some very basic principles of computer implementation, but you must keep reading. If you don’t understand, you can read it a few more times, match it with online search, and you can also send me a letter, but I have very limited time. 6. Version Control System. Recommend Git. Recommend teaching website: Learn Git with Bitbucket CloudVersion Control system, I don’t know how to translate it more reliably, which means version control system. Let me talk about why we need it first. The version control system helps you better manage your program and better help a team to cooperate on the program. For example, if you write an article in Word, imagine that every time you save, it will not be overwritten, but will be saved as a new file, and this file name will record your changes and the last saved changes and your save time (this Save is called commit), so if you feel that the changes are too bad when you make a change, you don’t need to manually change back to the last save. This system will help you return to any of your previous saves with one click, so you can After the second save, you can make bold changes without worrying that if the program is not changed, all the previous results will be scrapped, because you can go back to any previous version at any time. Let’s talk about its second function, which is cooperation. Suppose you write half of the program and find that the workload of this program far exceeds your previous expectations and you need the help of others, so you have a partner, this cooperation Your partner uses this tool to copy (this copy is usually called clone), so that he can get all your previous versions in an instant. When you two edit a lot separately, this tool can merge your modified content with one click (merge). If your modified content conflicts (merge conflict), this tool will tell you where there is a conflict and let you Choose which modification to choose one by one. When the merge is completed, this merge is just a commit for both of you, and you can go back to the previous version at any time. There are many Version Controls. The most popular ones are git, perforce and Mercury. My personal favorite is git. You can learn git first.--------------------- -------------------------------------------------- ----------------------------- You can go back to the previous version at any time. There are many Version Controls. The most popular ones are git, perforce and Mercury. My personal favorite is git. You can learn git first.--------------------- -------------------------------------------------- ----------------------------- You can go back to the previous version at any time. There are many Version Controls. The most popular ones are git, perforce and Mercury. My personal favorite is git. You can learn git first.--------------------- -------------------------------------------------- -----------------------------

Guess you like

Origin blog.51cto.com/15070913/2597271