Now is 23:42 Beijing time, just lost a game of king glory mood some low… Habitually open the computer, slightly occupational disease has opened the Google browser, yawned rubbed his eyes, inadvertently opened the dusty nuggets website, see the first article is 🏆 nuggets essay | 2020 years, and I stare big eyes suddenly, I realised already more than half 2020 😢 ok. Admit that I have been a little decadent recently. Recall the past half year, as a Web front-end developer working in a traditional industry company in a second-tier city, there is no pressure from the project, no pressure from the boss and no quarrel with the product manager. In a word, here is the paradise of fish finder… It was in this’ bad ‘working environment that the last shreds of gumption told me THAT I had to save myself! So I rose to write, to sum up some of their own situation in the first half of the year, in order to plan a good learning plan in the second half of the year, and finally successful self-help!
Working from home during the epidemic, THE sense of crisis made me learn data structure
This year is a special one, it’s all outbreak of credit Say it’s the home work, is actually a gimmick, after all, in the company office is also often fishing 😄, but man is more idle time will need to find something for yourself dry (thinking about at that time, the company didn’t didn’t carry outbreak, then I need to look for a job again), in order to improve their core competitiveness, So choose to complement data structure and algorithm but now feel, learned and did not learn the same 😅
I mainly learned the content
- Stack and queue concepts are encapsulated based on arrays
- The realization principle of linked list and the JavaScript realization of single linked list and bidirectional linked list
- Implementation principle of binary tree and javascript-based encapsulation
- Hash table hash function concept, and use JavaScript encapsulation
- Some common algorithms such as: array flattening, array de-duplication, finding the optimal solution…
I wrote the specific content in my public number [code not stop] inside, interested can go to take a look
My daily work is stress-free, and my free time allows me to make some extra money
That is to take some private work, here some experience to share with you, I hope to take some help to the compatriots who want to take private work
Accept the premise of private work is to do their own job first
This point I hope you can distinguish clearly, I usually take private work is after I finish my own work will go to pick up, extra money for a while, but after the job, you will have more possibilities
Avoid asking price
Some people received private work do not know how to ask a price, want little feeling oneself suffer a loss, want much feeling customer does not pay again, here you can refer to the following flow
- First ask the customer if there is a budget, if there is a budget, you see whether you can accept his budget, if the feeling is similar, then take it, if the feeling is too bad, then don’t waste time
- If there is no budget, I usually look at the difficulty of the project and the development time. The general calculation method is to estimate the number of days of development time * your current salary for each day * 0.8. If the project has been done, I will give this quotation. And you are excited about this project, so I will lower the quotation appropriately (because when you feel that you can learn more from this project, the price will be better). After all, it is your own private work, so how can you be happy
- Pay attention to project quality, want to do 3 or so private work only actually, later won’t worry not to have a list to be able to do, do you see which project goes on line after do not need to maintain? People will compare, if the customer feels you this person is more reliable, you understand the follow-up
How do I take a private job
Avoid not by you technology more cow force, channel, a lot depends on your contacts and the accumulation of at ordinary times you in the eyes of others I almost all avoid is through introducing the colleagues and friends, because in someone else’s view, I this person is Online although there are a lot of single stage, but the list of quality and price are weird, For example, one thousand pieces do a taobao mall, such you dare to connect 😂
With no end in sight, the confusion led me to develop my first small project
Most programmers can’t escape the fate of writing business. Business can be fun for a while, but it can also make people sick to their stomach to write all the time. So TWO months ago, I started to plan to do a project of my own. To put it bluntly, I want to better improve my technology through a specific project
My project was inspired by games
It was a stormy night, and I was still fighting in the valley of Kings! Although the pain cut more than ten people promotion successfully, but after putting down the phone, or feel very empty, inadvertently ask yourself, paragraph is so important? Is it that important? Is this sentence let me inspiration, if I do a small program, to learn as the carrier, to the level of the segment, is not beautiful! So it took me ten minutes that night to come up with the general logic of the project
The general idea is to improve your paragraph level by brushing. The higher the paragraph level, the more difficult the questions will be. The higher your paragraph level, the higher your comprehensive level will be
Ha ha ha… I was so excited
Project structure of the fire who use the method 😎
The next day, I began to formulate the project structure, and my structural thinking was that I wanted to weaken the business and pay attention to technology
-
Design the front end first, this is also my best, recently uni-app to make small programs are popular, ok, this is it!
-
In conceivating the backend, is the language natural to choose the Node.js framework? Egg.js looks pretty good and is used by all the big factories.
And then there’s…
-
TypeScript is popular!
-
The GraphQL Api is popular!
-
Redis never used it!
-
Docker is heard to be easier to use!
-
Nginx doesn’t use it!
So at the beginning, the technical architecture of the project was
- Front end:
uni-app
+TypeScript
- The backend:
egg.js
+GraphQL Api
+Docker
+redis
+nginx
+linux
The project architecture of the first run again 😅
- feeling
uni-app
Recommended editorHbuilderX
Not used to use, choose to usenpm
The way the build project is configuredTypeScript
I haven’t used it beforeTypeScript
“So that the writing becameany
😌 - Background management system is based on the Element- UI to build their own, get more than a week to the permissions, routing, navigation all configured, but the page is extremely ugly, there are all kinds of small bugs to annoy you 😌
egg.js
The framework directory structure is really quite formal, so much so that you need to write an interface incontroller
Layer processing dataservice
Link the database then inrouter
To expose the interface, plusGraphQL Api
A variety of configurations, finally lead to write a linked list query can not write out 😌
By this time, more than a month had passed… Okay, let’s start with 😅
So it bowed to reality and changed the technology architecture
- The front end stays the same, because it still holds
- Management system, replaced by a ready-made framework
- Switch to the familiar backend
koa2
theGraphQL Api
Also remove
Summary of project Architecture
I have to say, I taught myself a lesson, the ideal is full, the reality is cruel to sum up
- Don’t use it just to use it, like
egg.js
It is an enterprise-level framework by nature - Don’t use too much beyond your cognitive range, because you can’t handle it. Some techniques are not difficult, but your cognitive is not enough
- A person’s ability is limited, it is necessary to develop core functions in the limited time and ability range. Do not make the function very complicated in the early stage, it is likely to lose the field
Projects show
The project is deployed with docker + nginx + pM2, which is still in the inner side. It is expected to be online in a week
The front end saves the second half of flag
Flag still needs to exist, in case it is implemented
- Continue to do their own work, good service to the donor father
- Small program optimization, maintenance of a project is not easy, there are a lot of things to improve
- Write more technical articles to summarize, such as the recent deployment of Linux server project learned a lot of things, later can share with you in the form of the article
- Deep cultivation of technology, the formation of their own knowledge system
The last
I hope you will exercise more attention to rest, the first time to participate in the essay activity, I hope you can praise oh 😘, good not to say, play the game to sleep
The nuggets essay | 2020 years and I summarize the campaign is under way…