99% of the programs we use are connected to the network. As a programmer, I think it is necessary to understand the computer network, and it is usually offered in university courses.

Before I started this course, I was curious about how one computer could send messages to another computer. Such as:

1. How could the two computers send messages to him since they were not connected by any wires?

2, there are so many computers in the world, how can we find that computer characteristics? Some people say that we can use MAC or IP to uniquely identify people. However, I am a little confused. The world is so big and there are so many computers. Go through all the computers?

3. Multiple programs send messages to a computer at the same time. How does the computer accurately send messages to these different programs?

4. What if the sent message is lost?

In short, a lot of questions, after seeing the computer network, suddenly enlightened. I also wrote a well-reviewed article: How can one computer send data to another computer

So here, I strongly recommend that you learn, in the interview, computer network is also a high frequency test point, here I roughly summarize some must learn protocol and interview high frequency test point:

1, HTTP protocol, including: encapsulation format, common response code, the difference between different versions, common request methods, what security risks exist, what is stateless protocol, etc.

2, HTTPS protocol: HTTP is plaintext transmission, HTTPS is encryption security, you need to know how HTTPS encryption, how to form a digital certificate, what symmetric encryption, asymmetric encryption.

3, TCP protocol: three handshake, four wave, how to ensure reliable transmission, flow control, congestion control.

4, UDP: this general understanding can be, it seems that the content is less

5. DNS, ICMP, ARP, DHCP (I won’t write each one)

I think these agreements are quite important, especially in the interview. My public number article also wrote several of these agreements, we can go to the computer foundation that module to find.

For novice recommended video: you can see the video of Han teacher, in bilibili search Han teacher can find han teacher talk funny “computer network principle”.

Recommended books: Computer Networking: Top-down, Illustrated HTTP

I watched the video first, and then read the two books (I’ll give the electronic version at the end of this article).

You can also follow my wechat public account: the helpless and painful code farmer to get my articles and some information at the first time

Second, operating system

Operating system is also a very important knowledge, in the interview is also asked very much (of course, look at the company, some companies technology stack is Java, may ask less). For the operating system, there is also a lot to learn, such as:

What is a process, what is a thread, and what are the essential differences? When we run a program, where does the data go? Where does the code go? Why do we have to separate heap and stack? What does context mean when a thread switches?

What the hell is a virtual address? Why does a thread need so many states? What are optimistic locks and pessimistic locks? How is a deadlock caused? What are the strategies for resolving deadlocks? , etc.

Some people say that learning operating system is too fucking boring, it is really boring, but to be honest, I still learn very interesting, I feel can learn a lot of strategies, one is better than the other, every time after reading: I go, why I didn’t think of it. In my opinion, for the early stage, we need to refer to others’ strategies more, read more, have a certain foundation, slowly form their own strategies, in short, read these books, not only to master these knowledge points, more importantly is a kind of thinking logic improvement

For operating systems, I’ve compiled a few core things that are relatively easy to interview for.

1. How Processes Communicate (I wrote a great article about remembering an Interview: How processes Communicate with each other? —- Say goodbye to rote learning)

2. What are processes and threads made of? What are the data?

3, memory management, including: virtual memory (emphasis), paging, segmentation, paging system address mapping, memory replacement algorithm (emphasis).

4. Deadlock handling strategies (deadlock prevention, deadlock detection and recovery, deadlock avoidance)

5. Process scheduling algorithm

6. Disk seek algorithm

I think the above is important, if you have not studied, I believe that you can learn a lot of things, knowledge is just one of them.

Recommended videos: I haven’t seen this video, so I would like to learn it. I recommend going to Chinese MOOC universities to find courses of various universities, and also go to foreign countries to find corresponding courses.

I read these books “operating systems – The essence and Design principles (8th edition)”, but the big guys recommend “In-depth understanding of computer operating systems (3rd edition of the original book)”, I read the table of contents, feel good, here also recommend this one. But for the zero-based, I suggest you start with a book for kids: How Programs Run.

Operating system learning, or very boring, but only the most difficult to chew over, in order to become more powerful

Database (I’m using MySQL here)

In university courses, there is usually a database course, but the database is not targeted at a certain database language (such as MySQL, Oracle). But I only talk about MySQL learning here, don’t ask why, ask me to miss 19 of 20 classes.

To learn MySQL well, or particularly important, must not stay in the level of use, but should understand the principle, especially for the students to interview, will ask a lot of principles, I am asked about MySQL every time I will be confident, because I am not good to write SQL, but, know a lot of principles, Remember Tencent, Shopee interview, MySQL, the interviewer seemed to me. Ok, enough boasting, these are also the importance of strong MySQL. Here are some of the knowledge I learned and recommended learning materials.

There’s a lot to learn about MySQL, for example,

1, How is an SQL statement executed? What happens when you update it?

2. How is indexing implemented? What are the implementation differences between different engines? Clustered indexes, non-clustered indexes, secondary indexes, unique indexes, left-most matching principle, etc. (very important)

3. Transaction relevance: how is transaction isolation implemented, for example? How do transactions guarantee atomicity? Why do different transactions see different data? Does every transaction have a copy of the view? MVCC implementation principle (important) and so on.

4, various locks related, such as table lock, row lock, gap lock, shared lock, exclusive lock. What problems are these locks designed to solve? (important)

5, log related: Redolog, binlog, undolog, the implementation principle of these logs, in order to solve what problems? The journal is also very important, the interview is also a lot of questions.

6. Master/slave backup of database, how to ensure data loss, how to ensure high availability, etc.

There are also some common commands to know.

I think, as long as you understand the above principle, then the database tuning help is very big, above in addition to the sixth, the other five points, in the interview of fresh graduates, extremely high frequency.

Recommended books: If you can’t even write SQL, I recommend “SQL Must Know and MUST Know”, and then I recommend “Inside MySQL Technology: InnoDB Storage Engine”.

4. Data structure and algorithm

Data structure and algorithm, I do not want to say more, read my article all know, I write 80% of the article is data structure and algorithm related, importance needless to say. I autumn recruit the biggest advantage estimate is the data structure and algorithm master. The study of the above three courses is basically inseparable from data structure. As for how to learn data structure and algorithm, I think I can write an article, so I will not write the study of data structure and algorithm here, you can pay attention to my article, AND I will write an article related to algorithm tomorrow.

On interview, I think operating system + computer network + database + algorithm these three are the most asked, so I write more detailed, for learning the computer foundation, not for the interview, I think the following is also very important. I have singled out these four for those who are in a hurry to interview. My public account “helpless and painful code farmer” will often write articles about this knowledge

Five, the assembly

I think, how to have time, learning assembly is a must, learn assembly, can better help us know how the computer is dealing with the program code, such as registers and how to use memory? How are loops, function calls, and arrays implemented? What’s the address? And so on.

A lot of binary code can be decompiled into assembly, so if you know how to assemble, it can help us understand things better. So I suggest you learn assembly, and to write some procedures.

For the compilation of information, I may not have what good recommendation, their own reading is not much. Read two books, for entry, I suggest to see Wang Shuang that book “assembly language (the third edition)”, but this is only suitable for entry, if you want to continue, you can see “assembly program design”.

Compilation principle

To be honest, the principle of compiling is quite difficult, I think it’s difficult anyway, but I think you can learn it some time, so you can learn how our compiler analyzes our code, for example, lexical analysis, syntax analysis, semantic analysis, etc. Of course, you might write your own compiler to analyze specific code in the future, which is all the more important.

For learning materials, I think we can watch videos + books. Video words Chinese MOOC university search can, the book, said, I also see not much, only read the school designated teaching materials, so here can not give much advice, their own dangdang their own search, which popular sell which.