As a programmer, I hope that I can write very good software. It is not easy to write good software and I need to have good programming habits, first-class technical skills and rich practical experience. As a teacher of Beida qingbird, I have been teaching ACCP courses. After many years of development experience, teaching experience, and problems found among students, I want to talk about software development and hope to help students compile excellent software and become outstanding software engineers.
1,What you need is the best.For a rooster, wheat grains are better than diamonds.
What you need is the best. For a rooster, a diamond has no value for it. It cannot be eaten or used. For people, diamond may be very useful because we need it.
So what kind of software is the best? What you need is the best. software that meets your needs is the best software. When developing software, we must focus on users and design software for users. Instead of designing software from your own perspective, you cannot change your needs.
It is very wrong for some students to change the question according to the question requirements during the examination. I told them that questions are users' needs. If you do not ask for questions, you will not be able to score. Similarly, the user asks you to develop a software. If you do not develop the software according to his requirements, he will not give you money. If you develop additional functions, he will not give you more money. We must develop software according to user requirements. What we need is the best.
The development of software must be user-centered, rather than self-centered. You develop software for users. The software is sold to users, not to yourself. So you think it's a tough decision. Only good users think it's good software. At a reply meeting, a student's interface made a background in bright colors. I thought it was inappropriate. I asked, "Is the background color in your project reasonable ?", "I think it looks good," he said ". Obviously, such a software must have failed. It is not a user's perspective. At the same time, some students explain projects in a visual project, a menu, a menu, a Web program, a webpage, and a webpage. If you explain it from the perspective of the designer, only you can understand it, and only you can listen to it. We should explain the project from the user's perspective. For example, I want to explain an online bookstore, first open the home page, and then Browse by category. After browsing, I may want to search for books, add to the shopping cart, log on, register, and place orders. How to use it, so that it is easier for users to understand.
2,Improve the readability of the software.
Many programmers know that the software is not readable. Therefore, collaborative development is impossible because others cannot read your code. Similarly, the software is not readable and may not be able to read the code you have written for a while. Such code may become a one-time code and can no longer be modified or used.
How to improve the readability of the software. Experienced programmers will tell you how to use standard naming, rational hierarchy, complete documentation and comments. I won't tell you that, because the criteria for testing the readability of software are more than that. So I will tell you that to make your software readable, you should: Read your code to all the students and teachers in your class. If they can understand it, your code is very readable. If you don't even know what the teacher can do, your code is quite readable. Similarly, programmers must have good communication and language skills. So how can I train my expression skills and know whether my expression skills pass through? When a student encounters a problem, explain it to the student. If he can understand it, it means that you have good expression skills. If everyone does not understand it, your communication and expression must be problematic. We can show our code to others. On the one hand, we can check whether our code is readable, and on the other hand, we can help other students. Similarly, if you have any questions, we can help you to improve and test your expression skills, and help others learn the knowledge. Remember: helping others is helping yourself. One night a blind man carried a lantern, and a pedestrian on the road saw the blind man and said to him, What are you blind man carrying a lantern. The blind man said: I carry a lantern to illuminate others, so that others can see it clearly without hitting me. Helping others is helping yourself! World-class software Master Eric Gamma (Father of design patterns,JUnitDesigners, EclipseArchitect) Well said: "each of us needs the care and help of others, and everyone needs to care and help others ."
3,It has good reusability and flexibility.
The use of object-oriented development technology can well support reusability and flexibility. Encapsulation and inheritance are used for reuse, while polymorphism is used for flexibility.
Reuse is very important and can be used to develop large applications. We can see the Reuse Technology everywhere. encapsulation is to isolate the changed and unchanged things from each other, and the unchanged things can be reused. Inheritance is obviously reusing the basic class code. The framework technology is also reusing, user controls are reusing, master pages are reusing, and three-layer structures are also reusing code. Reuse is not replication. Reuse refers to repeated calls, while replication copies code everywhere. Reuse is good, and replication is poor.
As users' requirements change frequently, how can we improve the software's ability to respond to changes (that is, flexibility ). Polymorphism is used to achieve flexibility. Let me take an interface example. There are interfaces in Java and C #. Why should I use interfaces and why should I use interfaces as method parameters. We can see the USB interface in the computer. Why is the USB interface used? After using the USB interface, you can connect all the devices that use the USB interface. Today you can connect to the printer, tomorrow you can access the mouse, and the day after tomorrow you can move the hard disk, you can connect to digital cameras the day after tomorrow, as long as they are USB interfaces. Therefore, the interface can adapt to the device you need according to your changes. The interfaces in the program are the same. How can we quickly respond to user changes? This requires flexible software writing. The same is true for agile software development. What is agility? In the case of environment changes, quick response is called agility.
Therefore, we should have an in-depth understanding of object-oriented ideas and improve the reusability and flexibility of programs.
4,High-intensity testing ensures the robustness of the software.
Many people do not pay attention to software testing and think that testing is a waste of time. So I tell you that in software development, almost everyone will participate in the test, but not everyone will write code. The system analyst knows the software functions best and will perform system testing, the software designer is the clearest about the relationship between modules. He will perform integration tests. The programmer is the clearest about the code he writes. He will perform unit tests (or module tests ). Testers also perform specialized tests. If you do not perform a good test, the software may have problems in use, and others may no longer use your software in the future. testing is the most critical factor to ensure the quality of the software. Note the following two points for testing: (1) test as early as possible. The earlier the test, the earlier the problem is found, and the easier it is to solve. (2) perform as many tests as possible. The more test cases, the more problems found, the fewer problems encountered during use, and the higher the quality of the software.
If the software has not been effectively tested, you will not get any credit or appreciate your hard work. What you get most will be fatigue.
Why is the software robust? For a person, you certainly do not want to be very obese, because it is inconvenient to do anything and the efficiency will be very low. The reason for being too fat is that there is excess meat, and the program is redundant waste code. Obviously, too much waste code will affect the execution efficiency of the program. The same person is too thin, can't do anything, and may often get sick, which company does not want such a person. For programs, the code is too small to implement functions, and may not run properly due to the absence of exception handling. No one is willing to use such software. The people we need are long, very strong people. They are highly efficient in doing things and don't get sick. They seem to be called physically. For the code, the execution efficiency is high and there is no error, and the code is very readable.
5,Learn how to solve the problem, not just the knowledge itself.
Many students rely on memory to learn programming. This is very wrong. 80% of a person's knowledge in a year will be forgotten. I can tell you that my memory is very poor, but what I remember will not be easily forgotten. Because I rely on understanding and remembering. I have a deep understanding of every technology, so I have a deep understanding of it.
Well, let's give you an example of how I understand it. When a student learns Java, I will ask if the student = is equal to the Compare address or equal to the value. Most students have the same answer address, and some students have the same answer value. I said, "All wrong ". Obviously, they do not understand it. Value-type variables store values and reference-type variables store object addresses. So the comparison between two value type variables must be equal to the comparison value. Do you say 3 = 5 is equal to the comparison address? Because the referenced type variable stores the object address, the equal comparison is of course equal to the address.
When a student learns the auto-plus operator ++, he goes to the evening class and provides tutoring to the student. How many students are 5 ++ equal? All students say 6. Fortunately, I heard it. I believe they all know that ++ is adding one by themselves and can clearly distinguish between variables and constants. However, they do not know how to use them together. But when you talk to them, they will understand that, it will be very understandable. I said to the students, "5 ++ is wrong. It cannot be used in this way. Auto-increment is to change its own value. 5 is a constant, and the value of a constant cannot be changed. Isn't that self-contradictory? Therefore, the auto-increment and auto-subtraction operators can only be used on variables ".
6,The problem is not terrible. The key is whether you can solve the problem.
A lot of students went to the interview and told me, after returning, that the interview company had given me a program or a small project and asked me to show it to him after two days. Isn't this an exam? I told him that if I were an interviewer, I would do the same. Because what I value is not how much knowledge you remember, but how many problems you can solve. This is because everyone will encounter problems, as well as teachers. It is not terrible to have problems. We can read books, read online materials, and ask other people. As long as the problem is solved, it will be very good.