In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Lesson 11, "5 minutes from student to programmer."
Finally start to do the function, I believe that the novice will be a little excited and nervous, we take this wonderful feeling to start the code journey. Many beginners get the function and begin to copy the code and enjoy being a code porter. This kind of start is inappropriate. Let's take a look at the common mistakes made by beginners.
1. Common mistakes made by beginners
1) be a happy code porter
This is the most common. Generally speaking, the functions of novices are relatively simple, they will display the functions of classes and list classes, and have a little simple interaction at most. There are a lot of functions like this in the project, and the engineer will look for similar functions, and then copy the whole piece of code and change the display elements on the interface. Basically, the function development is almost enough. See for yourself that there is no problem. Just throw it to the test engineer.
It is true that the junior engineer is a code porter, but there is a problem with this operation. He does not understand the function and code. When the code is copied, it almost doesn't matter. Anyway, he gives the development to the feeling.
Share a case: I did a project before. When I was sending an iterative version, I tried it, and I found that a function was wrong, and the text displayed on H5 was wrong. I knew that this guy copied the code wrong. I deliberately asked him about the business process. He talked for a long time and couldn't explain it clearly. Finally, he told me that he copied the code, and he didn't understand it. I couldn't figure it out if I asked him about the calling relationship. I think there is a lot of junk code in the copied code, which is the business process of the previous function, which is not needed here. I'll let his master take half a day to teach it again.
2) first lay out the interface, then find the interface, and spell out a function to be tested.
Many beginners see the function, he does not know how to understand the function, they see that there is interface design, and regardless of others, they begin to write the interface, finish writing the interface, then ask about the interface everywhere, adjust the interface process for a long time, and finally get through. I also found that I couldn't keep up with the interface, and made a fuss for a long time, and finally got the data right. Yes, the interface is available, the data is available, and when the function is developed, it will be thrown to the test. Then, the test complained: "that so-and-so, half of the functional development to submit the test, it is a joke."
This kind of development method, not only the novice likes to use, I have seen many engineers who have worked for many years also like to use.
Share a case: a H5 engineer with four years of experience is particularly outrageous. He does the function in three steps: first, lay out all the interfaces according to the product prototype, then connect the interfaces, transfer the data, and finally readjust the interface according to the UI interactive design diagram. I have estimated that his development speed is 30% higher than normal, and the bug rate is also very high, and the key is to work overtime every day.
3) get started as soon as you understand it, then patch it and give the functional integrity to the test
This is also quite common, but those who make such mistakes are all experts in the novice, and ordinary ones cannot be made. For example, there are ten points for a function, and he knows how to analyze it and get five or six points, and then he begins to develop it. After it is developed, he compares it with the product prototype, and when he finds something less, he begins to add one or two points, and then feels perfect. Submit the test.
This kind of product has a certain understanding ability, but the understanding is not in place, so the integrity of the function is not guaranteed.
We analyzed the common wrong ways, and then we looked at what to do normally.
two。 Normal functional flow
We have all used Wechat, so the function assigned to you now is to send text when chatting. What should we do?
1) step 1: know what the function does
First of all, what do you know the function does? The function of sending text is to send Chinese and English, numbers, symbols and other information to friends.
Secondly, who can use it and how to use it? Send text function, everyone can use, can be sent to friends, can be sent in the group.
Finally, does the function have anything to do with other functions? For the time being, this function has nothing to do with other functions.
From the previous analysis, we know what the function probably does. Next, it depends on how to do it.
2) step 2: know the process and steps of function implementation
To put it simply, it is to sort out the implementation ideas of the function, and what are the main steps of it? List these steps, and the goal of this function can be achieved.
APP side:
* there is an input box in the chat interface, and users can click on the input box to enter text and send
* if there is no network, prompt the user that there is no network.
* if the connection is normal, send the text content to the server asynchronously
* received a response from the server. Success: remove the chrysanthemum. If it is not successful, a red "!" is displayed. .
Backend API:
Let's take a look at the background Java end, the same function, the background thinking is not the same as the front end. The background is probably:
* message sender tells the server that there is a new message
* the server receives data from the sender
* the server tells the message receiver that there is new data to receive
* the receiver acquires data on the data side
* the receiver tells the server that the data has been obtained and the message can be invalidated.
It basically makes sense to one thing like this.
3) step 3: ask the master or leader
Think about it like before, write it down, you can use a mind map, you can use text, you can use a UML diagram, or you can use a flow chart you learned in college. Are you sure that the understanding of the function and the idea of implementation are correct? I'm sure you're not sure. Therefore, after finishing the train of thought, not direct development, you should first ask the master, let him see if your understanding is correct. According to his experience, if there is a problem, he can point it out for you, and you can revise your train of thought. When the two discussed each other again, they basically found out all the functional points.
In fact, the three parts I mentioned earlier are requirements analysis, summary design, and design review. If you are in a large enterprise or a process enterprise, there are special process nodes and writing requirements. Normally, UML diagrams are used to draw analysis and design drawings, and there is a special analysis and design review meeting for review, just do it according to the company's requirements. If you are in a company with low professional requirements, you can use this simplified method of analysis, design and evaluation, at least your professional level will not be too poor.
My simplified sharing is mainly used to help understand the principles of analysis and design. Through this simplified sharing, it should feel that the analysis and design is very simple! Otherwise, many people think that analysis and design is very high-end, very difficult things, they are very resistant to do, as a result, professional ability has been unable to improve.
In fact, analysis and design are relatively simple, but the difficulty is that UML diagrams do not know how to draw, but analysis and design are often understood as drawing UML diagrams and writing documents. Analysis and design are used to sort out ideas and assist in understanding requirements. UML diagrams are used to assist analysis and design, but now UML diagrams make analysis and design difficult. There is a saying in the University: "things have their roots, and things always have their roots." Understanding analysis and design as drawing UML diagrams is putting the cart before the horse.
4) step 4: write code (be a happy code porter)
At the previous stage, it is basically clear what the function does and how to do it. Then you can be a happy code porter, find the implementation code for each step, move it over, and all the steps and function points have been realized, then this function is finished.
5) step 5: test
When the code is developed, don't think it's over, just throw it to the test. Generally speaking, junior engineers don't do tests and run test cases, so the company doesn't ask for it, and we don't do it either. However, we have to use this function by ourselves. If we can't use the function developed by ourselves, do you think the user will know how to use it?
In the process of your own trial, if it is useful and not smooth, the user will not use it smoothly; if you think the feature looks ugly, the customer will feel the same way. Therefore, the function handed over is the function that you are satisfied with. At the time of testing, there was basically very little BUG.
3. The supreme principle of development
[finish on time]
Said so much before, through analysis, design, review, so that you have a full understanding of the functional requirements, so that the integrity of the written functions can be guaranteed, their own trial functions, can reduce bug, all these operations are to allow you to do functions, reduce bug rates and rework, to ensure the progress of development.
One of the most important principles of development is to "finish on time". I lead the team, the mandatory requirement is that the project must be online on time, there can be no delay. If you can finish it on time, it will be more effective than reading ten books on execution.
4. Summary
In this lesson, we share common mistakes in functional development, and we try to avoid making these mistakes. Simply share the principles and operating steps of analysis, design and design review, dispel programmers' resistance to analysis and design, improve programmers' professionalism, and let everyone master better methods and habits of doing functions. ensure that functional development can be completed on time.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.