当前位置:网站首页>Come on, it's not easy for big factories to do projects!
Come on, it's not easy for big factories to do projects!
2022-06-24 06:28:00 【Programmer fish skin】
Unveiling the R & D process of first-line large factories
Hello everyone , I'm fish skin .
A lot of kids who haven't worked are curious : What is the process of doing a project in an enterprise ? Especially the projects with millions of users in big factories , What's the difference between learning programming and doing projects ?
To be honest , It's a big difference !
Develop your own projects. It's on your own , Control your own destiny , It's not going to bring down the team ; But in the enterprise, the development project is the starting point , We are grasshoppers on the same rope , Everyone affects the whole project .
I have practiced in several companies myself , Have to say , The R & D process of big factories is also very different from that of other companies .
therefore , For most students , If you haven't worked in a big factory , I don't know much about R & D .
So today I want to reveal the R & D process of Dachang project , Help you open up ideas .
Just before, some comrades questioned that my daily work is only to write code and fish ?! This article is a response , Let him understand , Doing projects in large factories , It's not just code !
The R & D process of big factories revealed
In order to regulate the team 、 Ensure the progress of the project , The R & D process of large factories is usually complicated .
It can be divided into many stages , Use a mind map to summarize :
It should be noted that , The above stages are not carried out completely from top to bottom , There may be intersections between stages , such as Technology selection Actually in design phase We should consider .
More than a year of formal work , I have also experienced the complete R & D process of many projects . From my perspective , Let's go through it quickly ~
( To make the content more interesting , The following story is fictional )
Demand stage
Today is Monday , Yupi came to the company on his small electric car as usual , Little imagine , Waiting for him is the beginning of a nightmare .
Demand arises
Forenoon ten a.m. , Product girl finds fish skin , Tell him : When our system goes online , The user said that many functions are not easy to use , It needs a big change .
The boss also found fish skin , Tell him : I opened the page today and loaded it for more than ten seconds , Is the performance of our system too bad !
Fish skin thought : Vomit , Be finished ! I guess we need to do a new project , It's time for another meeting .
Sure enough , It was not long before , A message pops up on the screen “ Welcome to the conference ” Invitation .
Requirements review
Next morning , Boss 、 product 、 test 、 Several development brothers and fish skin came to the conference room together , Specifically discuss the requirements mentioned yesterday Is it reasonable? 、 Do you want to do ?
Product girl opens the document , Speaking of : This issue , We need to do these needs , Let me talk about it in detail , Let's evaluate if there are any problems .
Demand analysis
Next , The product girl is talking to the screen 、 Crazy output , Next to the development of big brother can not sit .
Big brother development : This demand is unreasonable !
product : Why not ? That's what users need !
Big brother development : That's true. , It can't be realized !
So we started the classic product development war ...
And the fish skin is hiding in the corner How to do this demand , After a while , Put forward a kind of change low 、 Achieve fast solutions , Put down the war .
scheduling
Make sure the demand is reasonable 、 After that , Product sister asked : When will this demand go online ?
Big brother development : I'm busy this week , Next week .
product : Users may be in a hurry , This week !
Big brother development : That's true. , I can't finish it !
So we started the classic product development war ...
Fish skin : Or we can break this requirement down into functions A And function B, This week I'll start with the features A Did , function B It's scheduled for next Tuesday's test , Go online next Thursday ?
That's it , We arranged the planned completion date of the requirements one by one .
design phase
Finally, the meeting is over , Look at the time , It's time to get off work !
alas , The needs are discussed , The work of the product is to complete some , But the work of fish skin is just beginning .
In a hurry to start writing code ?
No , Thinking about how to write code is more important than writing code .
Architecture design
Fish skin open the document writing software and drawing software , Start hacking the whole system , From the whole to the part , Design the hierarchical structure of the system in turn 、 Interface and communication mode of interaction between layers 、 What important modules are included in each layer 、 What kind of physical deployment mode the module chooses, etc .
Outline design
After writing the architecture design , Fish skin began to write to the product sister PRD( Product requirements document ), Analyze requirements , And then it's still from the whole to the part , First sort out the functional modules needed by the system , Then analyze the sub modules in each functional module .
Compared with abstract architecture design , Outline design is more closely related to requirements , It's a refinement of architecture design .
For example, we can see , You're going to build a building , Architecture design is to consider from the whole , How many floors are there altogether 、 How to connect the pipes on each floor 、 There are several households on each floor 、 How to lay the foundation, etc ; And the outline design is to consider how to divide each family's suite , Where is the living room 、 Where is the bathroom .
In many cases , Outline design and architecture design may be carried out in one document , The division is not clear .
Detailed design
After thinking about the functions of the system , Fish skin began to analyze how to realize each function , Which algorithms are used 、 What details should we pay attention to .
Scheme alignment
After writing the design document , At the next meeting , Fish skin and other developers ( front end 、 Back end, etc ) Let's have a discussion about our own design , Ultimately, there is a unified solution , Then we should divide the work and do it .
Test case design
In order to ensure the normal and stable function of the system , Test students ( Or call it QA) It's very important , The test is not just a few clicks on the web page as we do our own projects ok 了 .
In a big company , In order to ensure the coverage of the test 、 Improve test efficiency , Generally, test cases are designed , such as : The user clicks “ Sign in ”, No data was sent , The expected result is to warn the user to enter a user name and password .
After the test case is designed , We need other students to judge and check together , Instead of just giving it to test students . Because it's easy for a person to ignore a lot of test details , It's better to let the developers who are more familiar with the code to help supplement .
Fishskin also wrote a few test cases that might be missed in the test , Confirmed with the test students , Try to expose problems in the test phase rather than online .
R & D preparation
I've been writing design documents for almost a week , Finally ready to start building the project . But before that , There are still some preparatory work to be done .
Technical pre-research
Now technology is developing too fast , New technologies emerge in endlessly , So the fish skin first investigated the technologies that need or may need to be used in the project .
Technology selection
Through research , Fish skin has several technologies that can meet the needs , But he started to get tangled : So many technologies , Which one should I use ? Yes, it is SSM Frame or Play What about the framework ? use guava Package or Apache Commons Well ?
Fish skin opens the document writing software again , Start comparing different technologies , A headache , There are too many factors to consider in technology selection , such as :
- From a technical point of view : performance 、 Ease of use 、 stability 、 Mainstream and Ecology 、 Document detail
- Combined with the team : Team members' familiarity with technology 、 Control ( Is there anyone who is proficient in this technology )
- Combined business : Whether to adapt to the scale of business ( stand-alone or Microservices )、 Adapt to the business ( Read more 、 Write more or More analysis )
For key projects , I'm not sure about the selection of fish skin , So after writing your own selection document , With colleagues and Leader Discuss together , Finally confirmed .
Resource request
After confirming the technology , You have to apply for resources . Like fish skin MySQL database , But this MySQL From where ?
In the past , Fish skin is to buy a cloud server , Build yourself MySQL. But in business , Generally, there is a platform for centralized management and allocation of resources , Go directly to the platform and fill in the budget 、 Wait for the leader to approve 、 Just wait for the resources to be distributed . Never use your own or buy an external server to deploy the project , unsafe !
Fish skin directly applied to 2 More than 10000 years of cloud database , It's really cool .
Environmental preparation
After applying for database and other resources , The skin is as like as two peas in the application machine version , Then you can connect it directly .
Project initialization
When the environment is ready , Because it's a new project , Fish skin to do a minimum runnable initialization project Demo, Use The scaffold Automatic code generation , Instead of creating new files from scratch 、 Repeat the code by hand .
Dependent installation
After generating the project code , Fish skin uses bag management tools ( front end yarn、Java Maven / Gradle etc. ) Auto install dependency , And then the project Demo You can run it !
R & D stage
After the preparation is finished , This is the programmer's most familiar part of writing code , It's also a favorite part of fish skin .
Because you need to be calm when designing a project before 、 Think about , I can't do it while listening to music ; And after the design , It's clear what to do , It's very easy to write code , At most, there are some pits , Search the Internet to solve it .
Local development
When developing , Generally, fish skin will write code locally first , By configuring the hot update tool , Realize automatic recompilation and packaging when code is updated , Instead of manually restarting the project , Greatly improved development efficiency .
by the way , Enterprise development will use version control system , such as Git, Remember to create your own branch before development , Develop... On this branch .
Remote development
Now there is a more popular way of remote development , That is, you can edit remote files just like you edit local files , Directly modify the code on the server . Generally, each of our R & D students has his own development machine , Through remote development, the trouble of repeated deployment and debugging is saved , Increase of efficiency . It's usually used VSCode Development tools such as , Install the remote development plug-in .
Code optimization
When fish skin is writing code , Always keep the habit of actively optimizing your code , Focus on the spatiotemporal complexity of code ; And when there's a lot of duplicate code , I will think of ways to abstract into functions or use design patterns . I wrote a special article to share my programming habits before : My little stubbornness when I write code .
unit testing
Be careful ! Don't think it's the job of testing students when you hear the test , Developers also need to write small granularity tests to be responsible for their own code .
Fish skin generally writes unit tests for each database read-write function and business logic function , image Java In general, it is used JUnit Tools such as , You can also use Jacoco Generate test coverage reports . Every time you change the key code , You have to run a unit test , Prevent accidental mistakes .
Development joint commissioning
Fish skin finally wrote the back-end code , Self test completed , Here's how to package and build the written code , Then publish the executable package to the test server , Joint debugging with front-end students , Let him ask for my interface , Verify that the functions of the system are available .
Test verification
After the joint debugging of fish skin and front end , Told the test and product students .
Testing and verification is a crucial link in an enterprise , Even the last line of defense . The purpose of the test is to find Bug, Try to find problems in the system , Kill them in the test phase .
In the enterprise , There are many types of test validation .
Integration testing
Integration testing is more granular than unit testing , Is to put multiple modules or code units together , Verify the integration and call relationship between modules .
Because the execution of a single function may be normal , But combining multiple functions and calling them in sequence , There may be problems .
For example , We have a bread eating system :
function A: Little fish eat a piece of bread
function B: Xiao PI eats a loaf of bread
Only one bread at a time , Perform functions independently A and B It's all allowed . But if the two work together , The function that is executed later will report an error .
The system test
System testing is more granular than integration testing , The test object is the whole system , Not just software , It may also cover testing of hardware .
Product experience
In addition to testing students to verify the availability of the system , The product sister also needs to experience whether the function meets the expectation 、 Is it easy to use . Most of the time , The product will make suggestions for modification during the experience , Development may need to make some more changes .
The acceptance test
The test and product girl finally said that there was no problem , That's the last step , Give the whole product or function to the end user to experience . Boss The user said no problem , It's true. No problem !
Submission phase
After the system is OK , The fish skin can release the code to the remote warehouse , In general use Git and SVN Wait for version control system .
Submit code
Fish skin first triggers code submission locally (git commit), In order to ensure the standard , In large projects, you usually use the submit detection plug-in , Prevent you from submitting the wrong code .
Code push
The next step is to push the local submission to the remote branch with the same name . Generally, large factories have push detection tools , Detect code errors 、 Cyclomatic complexity 、 Code specification, etc , Just like the submit test , To prevent you from pushing wrong or nonstandard code .
Merge request
After the code branch is pushed to the remote , Fishskin initiated a branch merge request (MR), I want to merge the code of this branch into the main branch ( No problem code ).
Code review
It's not that you can merge directly when you initiate a merge request , And code review , namely CR.
There are two ways of censorship : Human audit and machine audit .
I believe a lot of students know about the human trial , It's usually up to your superiors and other project leaders to read and comment on your code , If you think it's OK, just Approve( adopt ), Otherwise, call back to modify .
What is the machine audit ? In fact, the machine automatically detects whether your code meets the specifications , Whether it can be built automatically , It's usually assigned by the project leader , It can help to find some problems that are difficult to find manually .
When I first came into contact with a new project , Fish skin is often tortured by machine trials , Often be prompted some inexplicable code problems , For example, the plus sign has to change lines , Blank lines should be added at the end of the file line . But later, after paying attention to coding habits , It's a natural adaptation , It is indeed good. .
Release stage
After passing the code review , Fish skin project code can be released online .
Pack to build
The traditional way to go online is for developers to pull code from the official server , Then install the dependencies , And then package and build the code through tools , Get the deployment package , adopt Nginx、Tomcat、Docker And so on .
But it's inefficient , There's a lot of repetitive work . So large factories are generally built with automation , image Jenkins、 Various CI / CD Tools etc. . The code is merged into the main part , The machine packages the code into the final deployment package .
pre-release
In order to prevent online problems , Generally, we will deploy the project in the pre release environment first , And see if it works .
Official release
After the pre release test is normal , The fish skin has finally come online . Large projects are usually deployed on multiple machines , So it's impossible to publish the deployment package one by one .
Usually companies provide visual publishing platforms , Click on the publishing machine ( It's usually gray first , Choose a small number of machines , Release it in full ), Click one button to publish , After the approval of the project manager , Let the machine deploy it automatically !
follow-up
Fish skin once naively thought that after the project went online , You can have a good sleep . But then it turned out , After the project goes online , You also need to be alert . Although it has been tested , But from time to time there is still a little unexpected Bug, It's still a test of mentality .
Let's see when it's online , What did fish skin do ?
Monitoring operation and maintenance
Fish skin will check the monitoring panel of the project regularly , Observe the operation of the project , The load of the machine, etc .
Statistical analysis
Fish skin added some logs to the code , You can use ELK Wait for the log collection visualization platform to analyze these logs , So as to perceive the user's behavior , Further optimize business and systems .
For example, I will count the user execution SQL Time consuming to query , Slow for high repetition rate SQL Targeted optimization .
Event feedback
sometimes , The user can't describe it clearly Bug, And history Bug It's not easy to find . So there is usually an event feedback platform inside the company , Products and other internal students are receiving Bug when , Will release a Bug event , Detailed description Bug Time of appearance 、 condition 、 Details, etc , It is convenient for us to develop, analyze and deal with problems .
Document precipitation
New features and projects are launched every time , Fish skin will document the background of the project 、 design scheme 、 Development process and some pitfalls , It is convenient for other students to understand the project , This is very important ! Benefit others and benefit oneself .
I've shared my document writing skills : How to write a good document ?
Iterative optimization
Last , The end of one requirement is often just the beginning of another . Like fish skin's latest follow-up project , Finish the first phase and do the second phase , The second issue has not been finished, and the third issue is coming ; And take the time to optimize the previous code , It's a long way off , There's no hope !
That's what we're sharing , After reading this article , Welcome to my previous article : Dachang secret !30 A package to improve the team's R & D efficiency , Learn more about big factory Technology .
Finally, I'll send you some more Help me get to the big factory offer Learning materials :
ran , leave 6T Resources for !
Welcome to I started from 0 I began to learn Tencent's programming experience by myself , No more confusion !
I studied computer for four years , Mutual encouragement !
I'm fish skin , give the thumbs-up It's still a request , I wish you all the best 、 Make a fortune 、 Universiade .
边栏推荐
- MySQL forgets root password cracking root password cracking all user passwords, shell script
- Multi objective Optimization Practice Based on esmm model -- shopping mall
- Printer connection mode
- What are the domain name registration query tools? What should be paid attention to when registering a domain name
- Introduction to QWidget attribute table in QT Designer
- Raspberry PI (bullseye) replacement method of Alibaba cloud source
- Clickhouse alter table execution process
- Analysis of DDoS attack methods
- The difference between ArrayList and LinkedList and the principle of using scene locality
- [in depth sharing] Devops evolution path -- Realizing R & D digital transformation based on four vertical and four horizontal Devops system
猜你喜欢

The product layout is strengthened, the transformation of digital intelligence is accelerated, and FAW Toyota has hit 2022million annual sales
![[fault announcement] one stored procedure brings down the entire database](/img/7c/e5adda73a077fe4b8f04b59d1e0e1e.jpg)
[fault announcement] one stored procedure brings down the entire database
Oracle case: ohasd crash on AIX
Fault analysis | using --force to batch import data leads to partial data loss

What is the difference between a white box test and a black box test

Enter the software test pit!!! Software testing tools commonly used by software testers software recommendations

One line of keyboard

Solution to the 39th weekly game of acwing

A cigarette of time to talk with you about how novices transform from functional testing to advanced automated testing

Technology is a double-edged sword, which needs to be well kept
随机推荐
Wireshark grabs the RTSP stream of easynvr without displaying RTSP. Solution
The gadgets developed by freshmen are popular. Netizen: my food is good
WordPress applet build applet from zero to one [server configuration]
The difference between ArrayList and LinkedList and the principle of using scene locality
Reasons for automatic allocation failure of crawler agent IP
How to use the domain name? What domain name should be selected to purchase
Excellent tech sharing | research and application of Tencent excellent map in weak surveillance target location
Web address domain name IP query method, what is the use of domain name
Introduction of frequency standard comparison measurement system
Small programs import Excel data in batches, and cloud development database exports CVS garbled code solution
Analysis and treatment of easydss flash back caused by system time
How to record the domain name reliably? What are the consequences of not filing a domain name?
text classification with RNN
How to solve the problem that after Tencent cloud sets static DNS, restarting the machine becomes dynamic DNS acquisition
Smart Logistics: with the advent of aiot era, how to get through the "last mile" of logistics?
Project deployment for learning 3D visualization from scratch
Brief introduction to the working principle of high frequency signal generator
Just now, we received a letter of thanks from Bohai University.
Provide SFTP connection for Amazon S3
How to recover data by splicing database fragments