Who am I

Hi, I’m Sea Monster, a front-end programmer. I graduated in March 2020 and joined Tencent in July. I’ve been working for about a year now, in June 2021.

I wrote a lot of articles, but 99% of the time is to do technology sharing, rarely talked about some of their own ideas. The Nuggets have an event this time, so let’s take this opportunity to share some of my thoughts on working for a year.

I was a student

2018 to 2020 is the time for me to go to graduate school. Although it is said that I am going to graduate school, I still like to do front-end work very much in my heart, so I have been working on a lot of gadgets at Github. One of the things I’m proud of is the overwatch UI that I made myself following a tutorial.

(I have not done the real-name authentication of LeanCloud, so now the message function of the website can not be used)

When it came to V2EX and got over 300 Stars, to be honest, it was really fun and a bit of a float.

I met Ali, Byte and Tencent, but only Tencent gave me an Offer. Part of the reason is that I was not prepared, and part of the reason is that Tencent gave the Offer too fast, and the whole person took off directly, thinking that the universe could be seconds days seconds seconds seconds, the results of other big factories said: good, good, you cow you cow, you hang up, look at your cow. 🤣

I’m in

When I started, I felt like I was normal at first. Because when reading, as long as free will think of some projects to write their own play. After work, it feels like I’m just writing code in a different place.

At that time, the project I was working on was very new. There was almost no infrastructure, just a management background written in React, NPM run dev locally, NPM run release online was OK, and the deployment process was similar to Travis CI. It can be said that any college students to take over the problem, write a page three five divided by two, really not much difficulty.

I knew it was “interviewing to build rockets, working to turn screws,” but I was hoping that the company’s projects would give me something different, or at least not make it look like I was working on my own.

Since I could not distinguish between corporate projects and personal projects, and there were only two front ends of the project between me and another colleague, I really treated the company project as my own project:

  • Upgrade the technology stack first
  • Refactor some nasty code when you can
  • Type AnyScript and go straight to TypeScript
  • Since I had worked as an intern in DJI before, I want to apply Jira’s development model to this project

Of course, I’m not a complete idealist. This is all in my spare time. My state at that time, two words to describe is: excited! . Every night is excited to sleep, one eye is how to optimize the project code, structure. It can be considered as the excitement period of the first job, everything is new, everything is fun, everything wants to do, and there is not much pressure.

I hung up the page

npm run release
Copy the code

“How white screen? What did you post?” . This is an enterprise wechat message sent to me by my tutor around September last year.

It was around 12 p.m., I was still playing a game, and I looked at my phone: WOC. Turn off the game, turn off the computer, scan the meituan bike, and rush back to the company to see the Bug (generally do not take the computer home). A look, the original back-end data structure is wrong! The grass!

The tutor did not blame me too much, just said: more than 1 o ‘clock go back quickly, tomorrow morning come to do a pocket. Although I do toB business, the user is not many, but, I still can not forgive myself, how still like to do math problems so not careful.

After that incident, I became more rigorous in writing code:

  • As soon as the interface is ready, it no longer trusts any return from the backend
  • All pages, all operations have to be done at the bottom

Such as:

console.log(user.info.name)
Copy the code

I probably would have done both (which, to be honest, is a bit more than necessary, but it’s been a bit more stressful since then).

if (user) {
    console.log(user.info.name)
}
Copy the code

That’s a good thing, but this incident changed my mindset from carefree to nervous:

  • When we go online, we are treading on thin ice. If we can not go online, we will not go online
  • Don’t want to refactor, afraid of a refactoring, directly collapsed, collapsed and look for me to repair
  • When adding a new function, as long as the old function did not report error will not change, just want to pull the new 💩 on the basis of the original
  • There is a problem, as long as I do not do this function, push it to others, afraid to change others and collapse, collapse and find me to repair

In the end, the project also slowly from a cute baby into cthulhu behemoth.

I gave up the code

When I was a student, I was a very neat code freak. To exaggerate, the code I wrote didn’t change much before and after the IDE was formatted. I have very strict standards for blank lines, Spaces between them, and it’s human eslint (an exaggeration 🤪). When you team up with someone, you often argue about “what makes the code look good”. Now it seems a little childish.

What about the company? Actually not so good, the ancestral code will still have 💩 mountain. So for the first three months, I was on the front line fighting this disgusting code.

Refactor, refactor, refactor.

However, I gradually found that with the continuous participation of others in your project, everyone’s code style is different. For example, I like Functional Component, while others like Class Component.

What’s more, many people think differently about writing code: I myself want to carve projects like works of art, and beautiful code is the first thing. Some people write code just for the money, and it works. The boss thinks it’s good code if it works for the user. (It is impossible to say who is right and who is wrong here. After all, everyone’s own situation is different and the Angle they stand is different. It is unrealistic to force unification.)

When I refactor hard, the new features break the code. Newcomers may break the original design due to their unfamiliarity with the project; The new back end will have new protocols, and the front end will have to write a lot of redundant code to be compatible.

Once this also can withstand, change to change, plus responsible for more and more modules, I am ultimately a double fist difficult enemy N hand. Finally, I gave up my insistence.

I’m no longer the one who gets upset because a line of code isn’t aligned, logic isn’t encapsulated. I have once again completed the programmer’s “black” : do not change if you can, the project is not usable? Why?

When I was a graduate student in the United States, the only thing that impressed me most was a professor who said, “Business always goes first.” That’s what we always say: projects are always about making money.

The professor previously founded a search engine company in the United States, targeting Google. Because he paid too much attention to technology at that time, he failed to deal with many important matters other than technology, such as finance, law, recruitment, etc. Finally, the company fell apart. In the last class of that class, he shared this sentence with us.

At the time, I only knew the surface meaning, but I didn’t really experience it. In the company, it is practiced all the time.

When we cheerfully proposed a new idea, my tutor would often ask us a question: “Does this thing (optimization, new technology, solution) solve any problem?” . For little soldier may experience racquet head said last 2 immediately, but as a mature professional man knew perfectly answer isn’t easy, to research a lot of technical framework, read many articles, combining project whether to fall to the ground, finally could barely paid out a better way to “answer”.

I will also send this sentence to you who are reading this article. If you have a good idea, think more about the above sentence, can you answer without any dead end, and then go to others to put forward their own plan.

Looking back on my first three months on the job, ALL the “efforts” I put in: refactoring code, optimizing projects, technology upgrades, etc., didn’t really add much value to the project. Not only low cost performance, but also easy to appear “changed a thing, other functions can not use” such a scene.

As a result, I gradually “separated” my corporate projects from my personal ones, and instead of spending 200% of my time worrying about the perfection of my corporate projects, I just had to work.

Release yourself

No longer worrying about corporate projects, I let myself go:

  • I will not come to the company in advance to think about problems, nor will I work overtime in the evening to do optimization, leaving all the time to myself
  • Seeing the needs of CRUD is just like a Wolf seeing meat. Anyway, the work is to write code to make money, technology to make money, writing CRUD to make money, so why not find an easy job? Preferably one where I have the page written in my mind before the requirements have been reviewed
  • No longer willing to try new technology, put forward a plan not only to spend a lot of time research, practice and landing, but also to persuade all sides of the vassal, for a Tencent level 5 small soldier to, others may laugh at their childish, forget it, write page not sweet?
  • No longer fantastical and unconstrained, think about yourself on a level 5 big soldiers, do a good job of “duty” can, new technology or their toys in the project to play

It looks like I’m “black,” but I live a good life.

First of all, there are no more troubles. All the problems of the company’s projects are not my problems as long as the bell rings after work. Even if they are my problems, they are problems I can only deal with tomorrow.

He is no longer an honest man, a peacemaker, but a troublemaker. Dare to escalate and delegate problems. Can not deal with the superior processing, not their own function will be transferred to the corresponding owner to fix the bug.

More me time! . By coming to work on time, I have a lot more time. Updated the personal website that was abandoned before.

I started writing more technical articles for a long time. 17 articles so far in the first half of this year, huff, huff! I used to write articles in short books all the time, but now I look back and see, wow, I have written so many things.

Gradually, I started updating my posts on more platforms.

For example, it has been used in the past to dig gold and has been used to watch jokes zhihu.

When I have time, I will write some sand toy projects, such as these:

  • Character painting by CAI Xukun
  • Tenet – VsCode plug-in for writing code backwards
  • A lovely banana
  • A rotating cube
  • Document generator for single test driver

Although the mentality of flying self, but in the work or strict requirements of their own. Work professionally and live after work.

And one of the amazing things I’ve found is how much more productive I am once I get back to work after leaving work that I don’t want to do. It’s like I haven’t played a game for a long time, and I feel like I’ve killed 5.

Get better at your job

One might ask: Have you thought about a promotion at work? Of course!

As mentioned above, I did a lot of useless work at my new job. In fact, I know that my boss values “results” when entering the company, but I have no idea what the “results” means and how to present them. Until this year, I gradually felt that the key lies in two points: dare to show and will show.

Don’t just show off your technology, code, this picture, that picture. Best around: solved what problem, the theory of the program, how to land, land effect these aspects to sort out a summary. And then show it.

Take Redux for example:

  • Project background: Currently, our project components communicate with each other via props and onXXX callbacks. When sibling components communicate with each other, there will be a lot of redundant props data. If the subcomponents are deep, you have to pass the state down as a family heirloom, which is troublesome
  • What problem solved: Redux can efficiently communicate between components, no heirlooms, no callbacks and props
  • Rationale: State monitoring is implemented through the event publis-subscribe design pattern, and components are re-render when the data state changes
  • Landing: Use the Redux and React-Redux libraries together
  • Landing effect: reduced redundant code by X %, etc

Try to do your best in work. It doesn’t matter if you are promoted or not. You are not very radical. So I’m not afraid of being mistreated? Emmm, too, so I’m “stingy” with the company: no matter what project, how much open source I do, or how many levels I move up, I think everything I do in the company is owned by the company. Only their own records are counted as own. In other words: when you leave the company, you can only take what you have accumulated

Therefore, when I need the technology, I will write a blog to record it, no matter whether I analyze the source code, a disk of documents, or even a small Demo to be posted on Github, I must do the output, because only when the output, the technology really belongs to their own.

Of course, don’t waste an opportunity to showcase yourself in order to increase your value. If you have a need for good technology, in addition to writing your own blog, show it out.

This step I also slowly learn, after all, the domestic is still relatively advocate “low-key”, “introverted”, and in the programmer is the shortcomings of literary people. But I also encourage myself with this line from The Pursuit of Happyness:

I don’t have to be afraid of anyone who’s looking for a job without a coffin.

What are you working so hard for

In the first half of the year, I often wondered: what is the purpose of working so hard?

If I want to be successful at my job, I have to spend my spare time figuring out how to optimize projects and come up with better solutions. And to put forward a plan to the joint department, but also to seek the above consent, but also to make a report, it sounds very troublesome. And the success rate is not necessarily high. Sometimes it depends on the direction of the boss. If you do not pay attention to this, it will not be very meaningful to do so much. It is better to write a Demo and put it on Github to earn a green box.

Do you want your bosses to approve of your efforts? So I’m not gonna beg on my knees?

I was, in fact, on my knees: working on my own optimizations, proposals, and projects, all in order to impress my boss, but not yet.

So the first half of the year is a little slack, always want to use personal time to do something: or learn other technology, no, such as Golang, but will still be a rookie in the back end. What about the front end? Similarly, even if you learn a new technology and there is no landing scene, it is still a small Demo. It’s better to spend time at work, with landing scenes and support from the big guys. So, I ended up spending most of my time writing articles and playing games.

If you want to stand still, you have to return to the question: what is the point of writing code?

What’s the point of writing code

Well, I don’t know what the point of writing code is either.

Whether I’m writing a small project, writing an article, or learning a new technology seems to be to improve my skills, what’s the point of improving my skills? Maybe it was just for fun, but now it’s a little confusing.

The first thought is for the money, to live, not poor.

Really let me think of or because of that time to see a source code: remember I said above, once made a page white screen? In order to solve this problem, I read the Error Boundary section of React and found the react-error-Boundary library.

That day, by some freak of fate, I found it on Github, where the source code was just a TSX file. I looked at it and found: WOc, I can read it! Source code does not seem to be so difficult in my imagination.

Later, I combined Ma Baoguo’s memes and wrote an article called “Building a React-Error-Boundary Wheel”.

I didn’t expect this article to be a hit, but IT was nice to take what looked like complex source code and put it into simple words.

Later, after work, I studied some small NPN libraries in the company’s package.json project, and summarized the zero-to-one source implementation process for the 10 NPM wheels. Then, I put these 10 articles into a small book, so there is “a day to learn an NPM wheel, ten days into the wheel brother” 💪 this small book.

So far, the response has been good, 1.1K Stars, which is enough for a little-known author like me.

Find meaning in writing code

At first, I wrote articles and blogs on Jane’s book, just for fear of forgetting to record, see my Jane’s attention on the amount of know, no promotion, no interaction, even if now Jane’s downhill I did not care. At that time my heart still think: “I am all disorderly write, do not pay attention to me, I just want to record technology and life 🤣”.

I knew THAT I was mediocre and that I would never be great, and I didn’t want to be, because I thought there was more to life than code. The code is just a tool to implement the idea. Just like video editing technology, without a good idea, even the magic scissors can not make the video burst.

It’s not about the technology, it’s about what it serves. So, I hope I can improve my skills and Carry a wave of new players at the same time. At present, we have restored the update of all platforms, you can pay attention to oh ~

  • Zhihu – Sea monster
  • Gold digger. – Sea monster
  • Short book. – A sea monster who writes code

Bilibili

In May of this year, another thing came into my sight: The Lord Up. Back home began to see B station and attention to some Up, at the beginning of no idea, is just a joy. When I saw the program sheep, I felt so kind.

No training class long wordy, no middle-aged uncle’s greasy, only to share the heart. Here’s what he said in the video:

It’s a wonderful thing that programmers can speak and speak on the web.

I deeply believe that many programmers just work hard, rarely in the network and some “we media” to voice, brush presence. Most of the “programmers” on the Internet are almost training institutions. In contrast, some of the programmers on Youtube, such as Techlead, Joma, and Clment, are very personal and shareable. Well, why don’t I play as an Up?

In May of this year, I began my path to the Up Lord. Learn Final Cut Pro, think of titles, think of covers, and write scripts. It was hard work, but when I finally exported the video, I seemed to get back the sense of achievement that I felt after finishing a big project. It was really fun!

So, I rushed! In addition to article output, we will also do some video output in the future.

conclusion

From graduation to a real job, I gave up a lot of unrealistic fantasy, but also gained a lot. To sum it up:

What you give up:

  • No more coming in early and leaving late. Get to work and leave more time to yourself
  • I don’t want to be stuck in my own business. Know what it means to do this, to report, to show, to precipitate
  • No more complaining 💩 mountain, everyone has their own situation, just be strict with yourself
  • Instead of carving the company’s projects as crafts, the products should focus on making money
  • No longer dedicated to company projects, appropriate relaxation is conducive to efficient work

What you get

  • Know some method of doing things: will think this thing can solve what problem, what is the significance, then decide to do
  • Understand the importance of precipitation: after finishing, there must be precipitation, must report, must show
  • Find the meaning of writing code, article output and video output
  • I got more personal time
  • Knowing the importance of Chinese, all sharing, articles, writing are inseparable from Chinese
  • Harvest a relaxed mood
  • Became an Up Lord

This personal share to this, I hope you are still in the school to get a satisfactory Offer, in the work of brother step by step, manually ❤️

The nuggets years | 2021 theme activities I grow half of the campaign is under way on the road…