Job-hopping reason
The former employer department is doing tourism, under the impact of the epidemic, basically finished.
So I took a three-month sabbatical and got a redundancy package at the end of April. So far, I have been looking for a job for almost two months.
This is not the standard face classics, want to get from the big factory job-hopping experience can rest.
More is to talk about the vast majority of you like me, education slag technology is poor, no big factory experience of the front end how to go.
1. Offer
situation
I am lazy, so I may meet 2 or 3 people a week, only in the afternoon. Some weeks there were no interviews.
Limited by the degree + company, I used the two recruitment software as “Boss direct rejection” and “hook hanging”.
After rough calculation, we have met about 12 large, medium and small companies, and only 4 offers are offered, respectively:
- A game company
- A small company
- The wind changed programming
- Jinshan department some division
As a social orphan, I also found many problems in this job-hopping process, and listen to me slowly.
This post is a bit depressing, but you can find the answers (I made almost every stupid interview mistake)
Part of the company has: 360 strange dance company, a listed game company, wind change programming, Jinshan department some department, Ali.
2. Summary of frequent interview questions
I’ve met a lot of companies, just for the record.
1. The whole process from “Enter the domain name in the browser” to “page static resources are fully loaded”
See: a game company, Gosling, Ali Side, three other small companies
To answer this question, I combine yCK’s Tips for Front-end Interviewing with the browser principles column:
The process can be broken down into several steps:
-
User input
When the user enters the keyword and enters Enter, it means that the current page is about to be replaced with a new page, but before the process continues, the browser also gives the current page the opportunity to perform a beforeUnload event, which allows the page to perform some data cleaning before exiting. You can also ask the user if they want to leave the current page.
-
URL Request process
First, the network process looks up whether the local cache has cached the resource.
If there is a cached resource, it is returned directly to the browser process. If the resource is not found in the cache, the network request flows directly. The first step before the request is to perform a DNS resolution to get the server IP address for the requested domain name. If the request protocol is HTTPS, you also need to establish a TLS connection.
- Among them,
DNS
There are also several steps of caching: browser caching,hosts
File, - If the local DNS server does not record the domain name, the system starts recursive and iterative resolution
TCP
Three handshakes,HTTP
.TLS
Shaking hands,HTTPS
.
The next step is to establish a TCP connection with the server using the IP address. After the connection is established, the browser side will construct the request line, request information, etc., and attach the data related to the domain name, such as cookies, to the request header, and then send the constructed request information to the server.
Before the data goes to the server, it may also pass through the load-balancing server, which distributes the request reasonably across multiple servers, assuming that the server responds with an HTML file.
So the first thing the browser will do is figure out what the status code is, if it’s 200 it’ll keep parsing it, if it’s 400 or 500 it’ll get an error, if it’s 300 it’ll redirect it, and there’s a redirect counter in there, so if it redirects too many times, it’ll get an error if it redirects too many times.
The browser starts parsing the file, unzipping it if it’s in Gzip format, and knowing how to decode the file based on its encoding format.
- Among them,
-
Prepare the render process
By default, Chrome assigns a render process to each page, meaning that a new render process is created for each new page opened.
-
Rendering phase
After decoding the file successfully, the rendering process will officially start. DOM tree will be built according to HTML first, and CSSOM tree will be built if CSS is available. If a script tag is encountered, it will determine whether async or defer, the former will download and execute JS in parallel, and the latter will download the file first and wait for HTML parsing to complete and then execute sequentially.
If none of the above is present, the rendering process will be blocked until JS execution is complete.
After the CSSOM and DOM trees are built, the Render tree is generated, which determines the layout, style, and many other aspects of the page elements
During the Render tree generation, the browser starts to invoke GPU rendering, compose layers, and display the content on the screen.
2. eventloop
Mechanism,promise
Implementation and static methods,async
The implementation.
It’s a big topic to talk about, processes, threads, coroutines. Some will be accompanied by the most classic disheventloop
The title.
See: Ali side, gosling, Toutiao side, 360 side, wind change programming, and four other companies, must test.
Event Loop
What is?
There are two types of JavaScript events, macro-tasks and micro-tasks.
- Macro task: includes the overall code
Script, setTimeout, setInterval
- Micro tasks:
Promise. Then (the new Promise)
.In the process. NextTick (node)
- The order of execution of events is macro task first, then micro task, this is the basis, tasks can be synchronous task and asynchronous task, synchronous task into the main thread, asynchronous task into
Event Table
After the asynchronous event completes, the callback function will be put inEvent Queue
Medium (macro and micro tasks are differentEvent Queue
). After the synchronization task is complete, theEvent Queue
The callback function may also contain different tasks, so the above operations are executed in a loop.
Promise
The meaning of
Promise is an asynchronous programming solution. In simple terms, promises are like a box that holds events that will end at some point in the future.
Three states:
pending
In:fulfilled
: Have succeededrejected
: Failed state change, can only frompending
becomefulfilled
orrejected
The state is irreversible.
Async implementation and common methods
async
And the way that functions are implemented is that theGenerator
Function and autoexecutor, wrapped in one function.
Generator functions are an ES6 implementation of coroutines with the best feature of surrendering execution of the function (i.e., suspending execution).
Coroutines are lightweight threads in user mode, and the scheduling of coroutines is completely controlled by users. Coroutines have their own register context and stack. When the coroutine schedules the switch, the register context and stack are saved in other places, and when the switch is cut back, the previously saved register context and stack are restored. The direct operation of the stack basically has no kernel switching overhead, and you can access global variables without locking, so the context switch is very fast.
3. Vue
和 React
The difference between
From YCK, The Way of The Front-end Interview
-
Vue forms can use v-Model to support two-way binding, which is much easier to develop than React. Of course, V-Model is a syntax candy, essentially the same way React forms are written.
-
React requires the use of setState to change the state, and there are some pitfalls to using this API. In addition, the bottom layer of Vue uses dependency tracking, so page update rendering is already optimal, but React still requires users to manually optimize this aspect.
-
After React 16, some hook functions will be executed multiple times due to the introduction of Fiber, which will be covered in a later section.
-
React requires the use of JSX, which has an initial cost and requires a complete toolchain support. However, you can use JAVASCRIPT to control pages, which is much more flexible. Vue uses template syntax, which is less flexible than JSX, but it can be run in a browser by writing the Render function directly out of the toolchain.
-
In terms of ecology, there is not much difference between React and Vue. Of course, React has far more users than Vue.
-
In terms of start-up cost, Vue’s initial positioning was to reduce the threshold of front-end development as much as possible. However, React was more about changing users to accept its concepts and ideas, and the start-up cost was slightly higher than Vue.
4. Vue 3.0
The interview questions
See: 360 side, wind change programming, is expected to test in the second half of the year.
Vue3.0
What are the important new features?
- It is recommended to look at Composition apis and tree-shaking
React Hooks
andwebpack
的Tree-shaking
Vue3.0
contrastVue2.0
What are the advantages of?
Vue3.0
andReact 16.X
What are the differences and similarities?
- It’s time to update your answers and highlight that the two are starting to learn from each other. Remember to admire
Vue3.0
Copy it and do it better.
Vue3.0
How to reuse code logic?
- You can compare
Composition API
andmixin
The differences are highlightedVue2.0
The downside of that code bouncing up and down.
Most of the answers can be found in the following two blogs:
Copy notes: Yuxi talked about this in Vue3.0 Beta live…
What’s so good about Vue3? (Detailed comparison with React Hook)
5. React
Frequent Interview questions
React 16.X
的Fiber
The principle of
setState
Principle, when is it synchronized?
React Hooks
Relative higher order components andClass
What are the advantages/disadvantages of components?
React 16.X
Life cycle, and why replace the previous one?
React
Cross-platform implementation principles.
- say
redux
And thanflux
Advanced reasons.
To be fair, if the technical stack is not requested before the interview, it is recommended to cite the Vue direction. React interview questions to one or two difficulty….
6. HTTP
Frequent Interview questions
See: Alibaba, Toutiao, 360, FVC, and four others.
- Talk about strong caching and protocol caching, okay?
HTTP / 2.0
What are the features? How does head compression work?
TCP
Three handshakes and four waves? For its meaning of existence.
- Status code.
302.304.301.401.403
The difference between?
- Status code.
204
and304
What are the roles of the two?
HTTP
andHTTPS
Handshake differences?
CSRF
Cross-site request forgery andXSS
What is a cross-site scripting attack?
- How do you solve cross-domain? How many are there?
nginx
Understand? What do you do with it?
- The 【
The if-modified-since last-modified
Why should there be [ETag, If - None - Match
】
I have summarized a xmind map, welcome to my public account.
7. JS/CSS
High frequency basic problem
See: Alibaba, Toutiao, Wind programming, and many other companies, very high frequency.
- Elastic box
flex: 0 1 auto
What does it mean?
- The arrow function works
new
Instantiate? Have a chatthis
Is pointing to the problem.
- Talk about prototype chains.
- The difference between heap and stack in garbage collection.
0.1 + 0.2 != 0.3
The principle behind it?
TypeScript
The used? Talk to you aboutTypeScript
Understand?
- Image lazy loading principle.
The call, the apply
andbind
Method usage and differences
Webpack
Principles, and common plug-ins
8. Project and optimization related
- Difficulties encountered in the project and solutions.
- How did you do it
Web
Performance optimized? How to handle the first screen rendering?
This is a big question, and I have a short version of the answer, which comes from the browser Principles and Practices column:
It mainly revolves around two phases: loading phase and interaction phase
Loading stage:
- Reduce the number and size of key resources (
Webpack
Unpacking/closing, lazy loading, etc.) - Reduce critical resources
RTT
The time (Gzip
Compression, edge nodesCDN
)
Interaction phase:
JS
Code should not occupy the main thread for too long, scripts that are not related to the first screen plus delay processing (aysnc/defer
) attributes, andDOM
Irrelevant toWeb Worker
.CSS
Bind with a pair of selectors (as far as possibleClass
orId
), otherwise it will traverse multiple times.- If there is animation in the first rendering, add
will-change
Property, the browser opens up a new layer of processing (triggering the composition mechanism) - Avoid forcible layout synchronization and layout jitter.
- Lazy loading of images (four ways)
- Is there a plan for reporting buried data?
- Front-end architecture thinking, how do you measure the department’s technology stack?
- Thinking about front-end refactoring, how to weigh old projects between new business urgency and refactoring technical debt?
9. Full link as wellDevOps
cognitive
Since my second company department is DevOps platform, some interview questions have nothing to do with the front end.
- Have you done any unit tests? How did you do it?
docker
Preparation process?
DevOps
Key platform function points?
- Automated testing,
CI/CD
What are the key cores of?
- How to guarantee
DevOps
To promote?
- How to optimize the interface?
Mock
Platform building scheme?
3. How you feel about the interview
This year, it was so, so hard. @Muyiyang this paragraph is quite right:
First of all, the environment, feel very bad, for a second line of Internet recruitment few companies, layoffs, internal adjustment, lock HC is really a lot of, so we must not resign naked when changing jobs, the risk is too big.
This year’s interview is a little different from previous years. I pay more attention to the key and difficult points and highlights of the project, my contribution to the team, my awareness of being the Owner of the project, and more investigation on my programming ability.
Simply put, education is the first competitiveness, you rely on APP to send resume almost no feedback, the most reliable push.
Secondly, if you only have junior college, ability is not high irreplaceable (or big man is willing to do trust endorsement), do not recommend in this year frequently cast big factory (waste precious opportunity), I have experienced a variety of resume and HR face hanging, part of the reason:
- Frequent job-hopping (THREE in four years, two of which were disbanded/closed)
- Too much blogging, not enough focus, not enough English.
- No highlights in past projects.
To be fair, past job changes haven’t gone so well, but this year I really hit the ceiling:
- Big companies don’t apply for resumes.
- Small companies can’t afford it.
Fully appreciate a sentence:
You’ll spend the rest of your life paying for not working hard in high school.
4. Interview skills
Strictly speaking, this is not enough interview skills, but there are some good things I didn’t do well. I suggest you take a look:
1. Pay someone to wrap your resume
If you don’t have a degree and a resume, your resume sucks.
Trust me, you’ll get a lot more feedback if you pay a couple of dozen bucks to have your resume revised by a big shot.
2. Excellent self-introduction template
Hello, interviewer!
-
My name is ***, very happy to apply for ** position today, I have *** work experience, work content includes **, *** ** and so on, have participated in *** projects/work, complete ** achievements, these experiences exercise my *** ability. In addition to daily business development, I am also engaged in ***…..
-
Before the interview, I learned that our company is mainly engaged in consumer products
Product, belongs to the industry ranking the best enterprises, I am very optimistic about this industry, but also want to develop in this line for a long time! This position requires ** *** ability and experience, which is a good match with my work experience, I believe I can be competent for this position, thank you!
3. Prepare drafts of project questions in advance
About a month after the interview, I found that I was always on the second/third side, so I began to examine my own questions:
- I was too hasty in answering the difficulties and solutions of the project. I only described what I did, but did not reflect the progress that the plan brought to the project.
- Lack of breakpoints, nonstop talking, lack of command of sentences.
To tell the truth, it is quite difficult to tell, especially I have no big project experience, I have been doing middle and background system for the first three years, I can only start from some details, the following is my draft (although it is very bad), for your reference. :
Vue background fine particle permission control and anti-multi-person operation:
-
Simple permissions are typically defined by roles, but developers/operations want to create their own members, requirement 1
-
I gave them a module for permission management, but because DevOps has too many functional modules to remember, developers/operations want to intuitively modify permissions, requirement 2.
-
With this pain point in mind, I designed an “authorization mode”, with high permissions and switching capabilities.
After switching, all buttons in the module will first block the left click, and block the default right click, with a custom attribute. And the Authorization/freeze menu. Authorization function, directly have selected members of the tree control popover.
After use upload member array + custom properties. The custom property object is returned the next time you visit the background to determine the new permissions.
After the permissions issue was resolved, developers/operations found that a deployment/release click module had many simultaneous operations. Will conflict. 4.
-
In the multi-person frequent trigger module, joined the WebSocket management, to achieve similar online document display function, display the current operator, and set shielding (simultaneous operation will show the name, and locked).
-
Simple version: after the current button is clicked, the background will set a time threshold, during which other people will pop up to remind the current operation.
-
Complex version: Multi-party WebSocket maintains a value.
-
Scenario: DevOps platform
5. People who run against themselves
Wrote an annual review last year:
My name is “xiao Vain”, 16 years of geographic information system professional college graduate, self-study front. I have three and a half years of experience. I have worked for several small and medium companies, made Python crawlers, and worked in o&M development department. The first two years of work, are struggling for a living, do code farmers only because of their own no specialty, see this line of high wages, crowded in. — “The Road to Self-elimination of front-end Waste”
Y1s1, I have a bad base. It took 1 year to understand the layout, 2 years to understand function return, and 3 years to understand React.
Since entering this line, although there are bole all the way, but in front of the field is still in the majority alone.
But thanks to this line, let me know that “outside the well, the world is big”. The more excellent people you know, the more you want to work hard and improve.
So I have been busy reading some good books/columns:
- How networks are Connected. Difficult. Suggested notes.
- “
DevOps
Field Notes, fun, but with some foundation. - The perspective
HTTP
Agreement, not bad, worth two brush. - The illustrated
Google V8
“, relative to the first “browser principle”, water a lot, part of the value of two brush. - “
Nginx
Core knowledge 100 lectures, is currently reading.
How can I improve my technical competitiveness (or income)?
- Write a tech blog. “In a way, my blog is my best study note and personal card. A tech blog is one of the best ways to get to know a developer in the IT industry, especially if you don’t have a decent degree or a stellar career track record. The past should not be remonstrated, but the future can be pursued.” — @Xingzhou in Langli “The tech blog Thing”
- Based on the front end, scan the whole link. This year I thought was weak
DevOps
“Helped me figure out quite a few 2/3 technical aspects. - To the right, this is the biggest (and most unattainable) source of income growth. I once saw a friend who made a leap from 9K in 17 to 50K + now. Don’t say, I really sour…
Along the way, my ability, education and background are inferior to others, and I have been lazy and confused, but I have been racing with myself, AND I refuse to give up:
Although when you left school
All the people thought you would never amount to anything
And you didn’t blame yourself for it
.
We all had a truckload of problems around us at the time
Do not know the meaning of success is to surpass themselves
We are all in a race against ourselves
Work hard for a better future
Strive for a meaningful victory
Work hard for a better tomorrow
There is no end ahead
We never stop
❤️ Read three things
If you find this article inspiring, I’d like to invite you to do me three small favors:
- Like, so that more people can see this content (collection does not like, is a rogue -_-)
- Pay attention to “front-end persuaders” and share original knowledge from time to time.
- Look at other articles as well
Personal wechat: HUAB119 (if you can’t add luob119, or leave a message on the official account, I will add you)
You can also get all the posts from my GitHub blog:
Front-end persuasion guide: github.com/roger-hiro/… Let’s play. ~