prospects

I have been learning Go language for more than half a year, so I tried to interview a small company near my school for an internship in the summer of my sophomore year, and recorded the process of my first interview

A HR

  1. Introduce yourself.

I am XXX, a sophomore student from XXXXXX. As the class XXXX, I assisted the monitor and counselor XXXXXXX. At the same time, I served as the XXXX department of the college to complete the TASK of XXXX. That is my self-introduction.

  1. Talk briefly about the projects on your resume. Which projects did you remember the most or learned the most from?

The most profound thing is the shopping mall project of GIN + VUE. I learned go in September last year. I wrote about this project from the end of December to the beginning of February and for two months, and learned a lot about GIN framework, GORM, VUE and so on from the back end to the front end. I also accumulated a lot of experience, such as the payment function, which I had never written before, but I also learned from the mall project this time.

  1. How to learn The Go language.

At ordinary times is in B station above to watch the teaching video, and then their own books, and students to participate in some software program design competition consolidation and so on.

  1. What are the biggest problems encountered during development?

The communication of the team, if the team lacks the communication, can cause a lot of problems. For example, this page I think like this, and then the product side of the thinking is different, the lack of necessary communication led to everyone think it is their own. The end result does not meet the requirements.

  1. Could you tell me something about your department?

Our department is divided into four parts: Offer group, PS group, video group and technology group. The Offer group mainly helps the college complete daily document tasks and year-end PPT production, the PS group mainly makes some publicity posters, the video group makes some publicity videos, the science and technology group mainly helps the college complete some web pages, small program production, as well as the development and maintenance of our department’s website server.

  1. Do you have any questions about our company?

What I know is that your company is doing security, may I ask what kind of security is it?

These are the questions about HR. They ask about the current situation, school performance, academic pressure and so on. Finally, HR said that the result would be notified in three working days or so.


Two technical aspects

  1. To introduce myself

Same as above

  1. You are in the video group of your department. Have you made any promotional videos

Yes, I am the leader of the video team, and I helped the college make a video for freshmen at the beginning of the semester, as well as the external publicity video of mathematical modeling.

  1. I input a data from the browser, get the data, what’s the main action in this section

In this case, I’m setting up a TCP connection, sending the data I entered to the back-end server through an HTTP request, so in this case, I’m setting up a TCP connection. Assume that host A is A TCP client program and host B is A TCP server program. Initially, the TCP processes on both ends are CLOSED. The client A opens the link, and the server opens the link. At first, B’s TCP server process creates A transfer control block, TCB, and prepares to accept the client process’s connection request. Then the server process is in the Listening state, waiting for A’s connection request. Then process A first creates the transport control module TCB. Send a connection request segment to B with SYN=1 in the header and select an initial sequence number seq=x. According to TCP, the SYN segment (that is, the segment with SYN=1) cannot write data, but consumes an ordinal number. At this point, A enters the state that synchronization has been sent. After receiving the connection request packet, IF B agrees to set up A connection, B sends an acknowledgement packet to A. In the acknowledgement packet, B sets the SYN bit and AVK position to 1, ack+1, and selects an initial serial number y for B. Similarly, this segment cannot write data, but it consumes an ordinal number. Then B enters the synchronization receiving state. After receiving B’s confirmation, A should also give B A confirmation. ACK =y+1, and seq=x+1. An ACK packet segment can carry data, but if it does not carry data, no sequence number is consumed. In this case, the sequence number of the next data packet segment is still seq=x+1. TCP is now established. A Indicates that the connection has been established. After receiving the confirmation, B also enters the connection state.

This part of the interview when the answer is more general, some details did not say up, sorted out.

  1. IP Address How do I find the target ADDRESS

First of all, the IP address is a real – time virtual address, for the convenience of management. IP addresses are mapped to physical addresses on the link layer through ARP. Transmit as MAC frames at the link layer. If the IP address is transmitted at the network layer, it is checked whether the destination address is in the LAN through the and calculation of the subnet mask. If not, it is transmitted through the router. The router performs and calculation on the network until the destination address is found.

  1. Processes are different from threads

A process is composed of multiple threads. The fundamental difference between the two is that threads are the basic unit in which processors allocate schedules, and processes are the basic unit in which all other resources (other than processors) are allocated. In addition, the address space of processes is private, so the cost of on-site protection/recovery when processors switch between processes is high, while the cost of thread protection/recovery when threads of the same process switch within the processor is low.

  1. Talk about your understanding of SSL certificates.

I just went to HTTPS S is SSL, but I don’t know much about this. Server authentication phase: 1) The client sends a start message “Hello” to the server to start a new session connection; 2) The server determines whether to generate a new master key according to the information of the customer. If so, the server will contain the information required for generating the master key when responding to the “Hello” information of the customer; 3) The customer generates a master key according to the response information received from the server, encrypts it with the public key of the server and sends it to the server; 4) The server replies with the master key and returns a master key authentication message to the customer so that the customer can authenticate the server.

User authentication: 1) The server has already passed the customer authentication. This stage is mainly used to authenticate the customer. 2) The authenticated server sends a question to the customer, who returns the (digitally) signed question and its public key, thus providing authentication to the server. The secure channels provided by THE SSL protocol have the following features: Confidentiality: The SSL protocol encrypts communication data using keys. Reliability: Both the server and the customer are authenticated. The customer authentication is optional. Integrity: The SSL protocol checks the integrity of transmitted data.

  1. If I have two processes reading and writing the same data, how do I avoid the competition and prevent the data being read incorrectly

Lock the process, look at the requirements, add a mutex if the write is more than the read, add a read/write mutex if the read is more than the write, and defer the lock.

  1. How the go process completes waiting and execution in synchronous and asynchronous go.

The Wait of the go process is blocked, that is, when I go a process, I use sync.waitgroup to manage the process, process increment is Add(), and process execution is blocked with Wait(). Then finish with Done(). This enables safe management between processes.

  1. Can I subtract uint

I answered yes at that time, but after the interviewer hinted, I hesitated and said I didn’t know.

I don’t know, in the computer composition principles above, the bottom computer only adder. Yeah, yeah, yeah, that should work… The following positive solution uint is in the range of 2^31-1, that is: 0~4294967295, so if the boundary occurs, it can only be this number 4294967295. So it depends on whether the case can be subtracted, if the numbers are in the range, it’s ok, if the numbers are out of range, it’s not ok.

Attach example

#include <iostream>
#include <stdio.h>
using namespace std;
int main(a)
{
    int a = 20;
    unsigned int n = 3;
    unsigned int b = 6;
    cout<<a-b<<endl; / / 14
    cout<<b-n<<endl; / / 3
    cout<<n-b<<endl; / / 4294967293
    cout<<4+n-b<<endl;/ / 1
    return 0;
}
Copy the code
  1. Just now you mentioned the principle of computer composition, what have you learned from the principle of computer composition

This course is a freshman, has been a year, learned some of the bottom computer things, such as the bottom is only the adder, other operations are changed through the adder, there are some range of values, complement code shift operation, there is a cache concept, and some MOV, LAD, ADD and other instructions and so on.

  1. Talk about the difference between arrays and slices in GO

The bottom layer of go slices is actually arrays, arrays are non-edge-free, slices are mutable.

  1. What if I want to remove a particular value from an array slice

I will use the append to delete, the value of a subscript before and after the continuation of the append concatenation, the middle and this deleted.

  1. How do I sort the data in a Map key-value pair by key

If I am not sure whether the map of GO is sorted by a specific function, I will use two slices to store the key of the map, then sort it, and output the value in the map according to the map in the slice.

  1. Talk about the go reflex

I’ve only read about reflections in go, but I didn’t use them in the project. I just know that reflection is the type of data that reflects the input. Reflect.valueof (h) is the ability to check the program’s runtime state reflect.valueof (h), get the actual value, and can change its field values;

Reflect.typeof (h), which gets the metadata of the type, with t we can get all the elements in the type definition; If value needs to be modified, the fields of the struct type must be uppercase, lowercase is equivalent to private, and cannot be modified by reflection. An exception will be reported. Can you explain how you define the interface return type

I specifically write a serialization of a function, each return is a serialization operation, is an interface definition of a special serialization function, to return data.

  1. If I have 200 interfaces, how do you solve this problem and ensure efficient development

Error codes are placed uniformly. A project is three parts development and seven parts maintenance. But if is 200, I think I should be have a lot of interface can be reused to serialize function, which I think may be is about to see what is the architecture of database, 200 interface, if the problem is the architecture of the data, that is I can’t do any change, but if not database architecture problem, that I think should be have a lot of repetition, Error code may account for the general, so the error code is placed uniformly.

  1. If you don’t know much about Linux, why do you choose Go

Go has the simplicity of python and the ability to manipulate memory with Pointers, so it has the performance of C++ (but certainly not as good as C++), and it’s not as hard to deploy as Java. Google is behind it. And now cloud computing, distributed fire, these are also go home, so I chose go.

  1. Is there anything you want to ask me

Does your company have any business that uses GO?

The interviewer’s answer

Our company uses the Architecture of Java. Now we have a large master node, but we need to operate some small nodes, which will be difficult to deploy if we use Java. Therefore, we plan to use go, which is easy to deploy, for the business of these small nodes.

Probably these questions, some of which I don’t remember very well. Finally, the interviewer said to wait three working days.

Updated May 31, 2021


End face

  1. To introduce myself

Same as above

  1. I don’t have a technical background, but I want to say that this internship is different from what you did in school. The work pace here is very fast, and the work pressure may be very high. This is your first internship, so can you give me a reason why you are qualified for this position?

Because I am the league branch secretary of my class and also the deputy department of the student Union of our college, I have other student jobs besides my studies. I think it is ok to balance study and student work well before.

  1. So how do you balance your studies with student work?

This semester is ok, but last semester I had a little imbalance, so my gpa last semester was a little low. If I was in the water course, I would do homework or student work. I listened to the teacher carefully in the professional course, and completed the homework on the same day. You have to be more efficient. That’s about it.

  1. So, you doing student work, did it change anything for you?

I think it is the biggest changes I, obey superiors, what I have own idea before, but always be refuted back, then I feel even if, superior this arrangement, also has the superior, I think it’s the same reason, the company superior on what tasks, what thing, also is to have a point.

  1. Do you think you’re gonna complain when you get back?

I think I should still be able to, I am still young, when the blood of the youth, the attitude may not want to be so hard, I put forward my ideas, the superior or others accept it depends on their own.

  1. Let me ask you a question, if your leader gives you a task, do you want the leader to list the tasks and ask you to do it step by step, or do you want to do it yourself?

First of all, if I enter the company at the beginning and the ideas of the leader have not been integrated, I think I should ask the leader to list the tasks step by step, because I don’t know whether the leader is what I think. After running in with the leader later, I would have known what the leader wanted, and I wouldn’t have needed the leader to list the tasks. That’s my idea.

Specific there are some irrelevant did not type out. It’s not technical, it’s mostly cooperative.

conclusion

  1. I was the league secretary of my class. I thought there would be a question about the league secretary, but I didn’t think it was all about technology. Instead, I asked about the technical department of the college.
  2. Linux systems need to learn some serious things in depth, just a few basic operations. It was also suggested by the interviewer.
  3. On the algorithm part, and did not ask binary tree, sorting, dynamic programming and other algorithms (fortunately not on the spot to write code), intend to continue to brush the problem.
  4. Computer network, computer composition principle, computer operating system is involved in part, but because the details of the part is not too familiar, so it is more general.
  5. The database side also only asked the lock question, did not further mysql, Redis, etc.