preface

Hello everyone, let me introduce myself first. My name is Cola, a front-end engineer with two years of undergraduate education. I worked in Tencent before, and now I work in Byte.

I haven’t written an article for a long time, on the one hand, because I’m lazy, and on the other hand, the main reason is that I don’t have a good inspiration at present. I don’t want to write some articles that I feel are not OK. With this activity, I will also sum up my 2020.

New start – Job hopping

In January, 20, I changed my job from Tencent to Byte. Although I lost my year-end bonus, I felt that I did not lose money on the whole, because the atmosphere of Byte was exactly what I liked. There is no relationship between superiors and subordinates, and everyone does not know each other’s rank, so there is no title. And byte are mostly young people, so are more chat to open, our group is not driving, is driving on the road (I haven’t got on the car, and so on me

Of course, I hope we learn from my lesson ha ha ha, must not be hard with money, if possible, or to finish the year-end bonus before running away! When changing jobs, I interviewed three companies, Shopee, wechat and Byte. I am very lucky to have passed the interview. I know you must ask for the interview experience at this time. In fact, I have already written one and a half years of experience in front-end job-hopping interview (Toutiao, wechat, Shopee). Look how much I care for you! Go for it!

Work to reflect on

After this period of work, I personally feel that as an engineer, the most important qualities are as follows:

By spectrum

As cooperation with you, he really don’t care how smart you are, how to write code, he only hope you is a man of, don’t give me an error code you wrote, you provide the interface don’t what moth (such as clearly formulated the interface protocols, but the results you return and not in accordance with the interface agreement). Of course, the code error is on the one hand, there is a more important one is to develop according to the requirements of the document, where there is doubt to timely synchronization, do not develop with doubt, otherwise in case of problems, it will greatly affect your image in the product and development of students.

Good at communication

The ability to communicate is really an important quality. In the process of get along with colleagues, be good at communication, such as found in the project there are some unreasonable places, to communicate with colleagues around, what are the historical background, see if this can’t go to promote optimization of these unreasonable place, rather than their own hard work, finally found that this thing is there are historical reasons.

learning

Continuous learning is an essential skill, because technology is changing so fast in the front end, and if you don’t keep learning, you’ll soon find that the technology you’re using is completely different from what I used to be using.

Last year’s study direction

React

I’ve always wanted to learn the inner workings of React, but last year I stumbled upon the React tutorial by Professor Ka. After learning react, I still have a profound understanding of React. I also shared react with my team, which received a good response.

Learn about the V8 architecture changes and why

Before the adjustment

V8 was previously executed at runtime by the compiler directly compiling source code into machine code. The problem: The machine code itself is a dozen times larger than the source code, and the compiled machine code is stored in memory. This is fine for PCS, but it’s a pain in the neck for mobile scenarios because the phone itself has very little memory.

After the adjustment

V8 compiles the source code into bytecode and then interprets and executes the bytecode dynamically by introducing an interpreter. Since the size of the generated bytecode is much smaller than the size of the machine code, this problem is better solved. Interpreter execution combined with JIT ensures that execution is not much slower than machine code execution.

Vscode

This year, with the recommendation of a gay friend, we had a look at the basic architecture and implementation principle of vscode, and conveniently fixed some bugs and provided some features for vscode, and became one of the top 100 contributors of vscode.

There are a few interesting points about Vscode:

  1. How to implement dependency injection. (Declare dependencies as decorators and inject corresponding dependencies from the current instance’s dependency list at instantiation time)
  2. The Language Service Protocol (LSP) and Debug Adapter Protocol (DAP) are proposed. With the specification, the Language Service provider does not need to re-implement the logic for each editor. I only need to implement it according to the specification. It can be used in any editor that supports the protocol.



3. File directory specification. Vscode each file directory has strict specifications, details can be directly viewedVscode official link

Typescript

I have always felt mysterious about Typescript and wondered how it was implemented. Last month, I took a look at some Typescript code and helped fix two bugs and provide a feature. The two bugs are integrated, the feature is still in CR, and I feel like I could be among the top 100 Typescript contributors if I did.

Typescipt execution process

What I have seen so far is relatively shallow. I can only briefly describe the overall process I have seen so far. May not be right, for reference only.

Ts => Generation of symbols(binder.ts) => Syntax and semantics (Checker.ts) => Generation of code (Emitter. Ts)

TS differs from other JS compilers in that TS does not only syntax checking, but also semantic checking. However, semantic detection is based on symbols, so it will generate symbols more than they do

financial

In fact, from graduation began to slowly finance, but last year is to find a sense, but still stepped on a few big pits, have the following lessons

  1. Don’t chase high, don’t sell low. (Nuon Semiconductor)
  2. Don’t do pre-market trading (last night’s STATION B)
  3. If high, remember to cancel the bet: gold

planning

Accidentally said so much, then say next year’s planning. Thank you for reading!

  1. Money, money, money! Learn about money
  2. Continue to learn

Denver annual essay | 2020 technical way with me The campaign is under way…