Joined in 2016, left in 2021, more than five years. There has been a good, but also had to say goodbye to the number of clouds before sorting out, leaving some words recall the past.

Manpower asked me two questions

After submitting my resignation, hr asked me why I chose to leave. I paused and said quietly, “I used to wake up in the morning and think about what I was going to do today, something I really wanted to do.” “But now I’m on my lazy bed in the morning.”

The man smiled with a face I understood and then asked another question: “What is the most important thing you have learned in more than five years?” After thinking about it for half a minute, he looked directly at the human and said, Patience.

I thought of many things in the eyes of the man.

Technology is dead

When I started to maintain my blog in 2015, I wrote a 22px self-encouragement in the blog management end: if technology does not advance, it will die. That is the choice, please insist!

As far as 2016, I have only written jQuery and React Demo, but in the interview, I showed more methods based on jQuery. Then one day, having just figured out the angular1.x dirty check, I suddenly found that communities were celebrating the birth of Angular2.

In line with the technology does not advance is dead self-encouragement, hurriedly according to the example wrote a demo. Looking at this Angular2 demo and thinking MMP: “It’s not the same fucking framework, is it?” A moment of hesitation and months have passed. When the Shanghai team threw in another project, the framework was a React+ Angular1.x mashup.

With only React letter writing and React Demo development experience, I had no choice but to start learning React. A different set of front-end syntactic sugar, a different set of front-end ideas. While browsing the community, I came across the front end framework share line chart: looks like Vue 2.0 is gaining momentum, too?

There’s only one head. Press which one?

Which framework to learn

By late 2016, the days of jQuery shuttles are a thing of the past and Angular1. x is a thing of the past. Look at that 100% new AngularJS mastery and start asking yourself: [Angular2, React, Vue2] which one do you learn first? Feel your receding hairline and tell yourself it’s important. Not only should you search online, but you should also start a discussion among your peers. Cool sweat after all that: One day in 2016, Angular4.0 was released.

Struts, one of the Java SSH frameworks, came to mind. At that time, I was a Java paste engineer and experienced the tragic process of upgrading a project from Struts1 to Struts2. Struts left me with closure memories of that time. After a long time in rehab, I threw myself into the supposedly wonderful front-end business.

This moment is like that moment. As many of the industry’s bigwigs have said: the front end can feel the back end across the river.

When you have it, start touching it. When it comes to the back end, the first choice is definitely the backend architect. As opportunely as take a play, that annual meeting I and structure were divided to a standard room.

So I asked a few questions:

  • In those daysstruts2Are there any programs in use now?
  • What framework is currently used for the backend, and how will this framework change?
  • Was there a blooming flower in the back end framework?
  • angularIs this cliff version worth learning?

Architecture’s answer, summed up in six words, is: change is the same.

Targeted learning framework for realizing business logic; Take native JS as the baseline to comprehensively improve technical capabilities.

Native JS is the core

As mentioned above, during the interview in 2016, various jquery-based approaches were presented. Chief among these tools is a table component: GridManager.

At the beginning of 2016, a Flag was set: remove GridManager’s dependency on jQuery and transform to a pure native JS implementation.

This is a bold attempt, but also a bottleneck period of self-breakthrough. In the follow-up study of the API of each framework, I can always quickly understand the implementation logic behind it.

Then, I did another thing: I extracted the base methods in GridManager into a JS class library, named jTool, in homage to classic jQuery.

JTool is a jquery-like JS class library that contains common jQuery methods, such as Event and Ajax.

As a programmer born in mud, jTool’s coding process is not smooth, recall the following reasons:

  • Technological thinking solidified, in 2016, the front-end framework emerged as a new force,jQueryThe DOM mindset has not changed.
  • There are a lot of native apis involved in the coding process, and you need to find documentation frequently; In the years of stumbling coding, MDN accompanied the whole process.
  • Because it is positioned as a class library, it refines the code repeatedly; But iteration has a more prosaic name: demand change.

During this period, I also had the idea of retreat, especially in the early hours of weekends: the BUG of not being able to sleep, the beating time and the constant urging of family members, the physical fatigue and the second life pressure of going to the company to make canned food. You’re starting to get upset. Just buckle the computer. I went to the bathroom for a cigarette and turned on my computer.

One day after 2017, I introduced jTool to GridManager and was so excited to show the results everywhere as NPM run start was successfully displayed that I forgot that some people were not in the same industry.

JTool, a milestone on the road to personal coding.

Maybe this purposeful way of learning is the right way for me.

While compiling this article today, I’ve come to realize that frameworks may not be the cause of jQuery’s demise, but native javascript is jQuery’s grave grave.

With each ECMA proposal, javascript continues to absorb the value of jQuery. How can other frameworks escape this spell?

You get old, you wake up Angular12.

Engineering thinking

Before coming to cloud Counting, I had only used gulp in a literal sense. The projects I took over were mainly GULP. Although I didn’t quite understand the tunnel thinking of these tasks at that time, I learned from each other in the same group.

In June 2016, I wrote my first project based on WebPack1 + Angular1. x + ES5 by pairing programming with a shaanxi girl. Although pair programming was canceled soon after, the revolutionary friendship endures, the revolutionaries remain numerous, and the front-line staff share their experiences with each other:

  • es5 -> es6 hi, babel
  • eslint Code check
  • jenkins Front-end publishing tool
  • jasmine+karma Unit testing
  • mock Write a dummy interface to tune yourself
  • node Write a real interface to tune yourself
  • linux While writing

As for the Webpack, a crowd goes up from 1 to 2, then up to 4 and up to 5. Then, go your separate ways.

In terms of engineering, I now understand that the tools and code used to serve the core code are engineering, including but not limited to build, validate, unit test, release, and server reception.

For engineering, the same team should be unified.

The most impressive thing

Shortly after arriving at the company, I took over the reconstruction work of a project. When I saw the JSP project for the first time, IT immediately raised my awareness of how small the body is.

Looking back to that year, When he was configuring JDK and IDEA, Chettuzai turned his head and looked into the eyes of the project manager, who said meaningfully, “This project has been broken every Double 11 for five years…” . Dodging the project manager’s caring eyes, a thought came out: am I in a hurry to run away now?

After a fleeting thought, there is an opportunity to change the status quo and prove yourself. After running the project, I found that the performance problems were too numerous to record. The major items were as follows:

  • jspFront and rear end separation is not implemented
  • No modular concept
  • Interface calls frequently, and these Taobao interface calls need to charge
  • More than setInterVal

For such projects of a certain age, the steps for gradual optimization are as follows:

  • Build a new front end project that was then adoptedwebpack2 + angular1.x + es6
  • The original project will be approvediframeNested into the new project, at which point the project can run completely
  • In the unit of one level menu, gradual reconstruction is carried out
  • Clear the legacy code to ensure clear core functions
  • Provides a static data caching scheme that is invoked only on first load for non-essential interfaces
  • Set upCDN, replace the public resource withCDNresources
  • iconfontOrganize, try not to use pictures
  • To solveindex.htmlThe cache problem
  • The loading mechanism of common data is changed to preloading
  • Look at the fire chart and findjsPerformance bottlenecks and optimization
  • Be patient while seeking product, backend, and test coordination

Five years ago, I thought technical ability was the most important thing for developers. Five years later, I thought teamwork was more important.

Management in my eyes

Just arrived at Shuyun shortly, in the project manager. With the help of Zhang and the front end manager zheng, I, who had no management experience, was assigned to the position of the front end leader, managing a small team of 4 people. It was a period of groping, project manager. “Write less about business and focus on other things, like people growth and common components,” Zhang told me.

However, OUTSIDE of the business code, I don’t really have a clue.

Until the great leader. CAI’s personal guidance (criticism) only found some direction. As time goes by, five years become a thing of the past.

In these recollections, a few thoughts are worth recording:

  • Leaders often say things like, “I wish you would have asked questions ahead of time, instead of waiting until the deadline to let me know.” However, before you ask questions in advance, it’s best to think about whether there really aren’t any solutions.
  • Subordinate’s work arrangement should cross each other, slack degree, cross is responsible for the company, slack degree is the premise of personnel growth. But if you choose to be relaxed, then the pressure from above needs to be borne by you alone.
  • When coordinating people, the department can rely entirely on the position, but outside the department must need some popularity. So do less guilty, is their own pot please stand straight back good.
  • Management is hard to keep a level playing field because people have feelings.

Remembering the past is often more than enough.

Pack your bags and head for tomorrow. Personal profile: As long as insist, ants can also move yu Gong in front of that mountain.

portal

  • GridManager Please don't skimp on Star
  • jTool
  • Personal blog