11 suggestions for improving the programmer's project design level and 11 suggestions for programmers

Source: Internet
Author: User

11 suggestions for improving the programmer's project design level and 11 suggestions for programmers

1. Analyze the project you are facing.
This is the first step in all work. If you make a mistake in this place,
All subsequent efforts are in vain. For example, you need to complete the library management system,
Then you should understand that this system is mainly used to solve the problems of library management.
2. Consider the project design method.
At this stage, you need to consider the design tools and languages based on the characteristics of the project.
For example, the book management system needs to be encapsulated, which is conducive to management and maintenance.
This system has a short development cycle and has simple functions. Therefore, according to its characteristics,
Choosing Java as the development language is a good choice.
3. Collect complete requirements.
Spend time figuring out what are the basic needs of your user group and what are the final features of your product.
Clear thinking can save you a lot of time.
4. Prepare a comprehensive implementation plan (or model ).
For small independent projects, this may be just a basic flowchart or a simple function model.
For a large project, it helps to break down the work into modules and take the following into consideration:
* What are the functions of each module?
* How to transmit data between modules
* How can each module call the data?
Although it is boring to collect requirements and write plans than to write code,
It is even less fun than spending hours debugging bugs. However,
Taking the time to pre-plan the correct procedures and structures of the program ensures the efficiency of subsequent programming.
5. Add comments to the code.
Add comments where you think you need to explain the code.
The most common annotations appear in function descriptions, variable statements, and return values,
It tells people what the use and why it is.
6. Use unified naming rules to name variables.
It will help you track every type of variables and figure out what each variable represents.
Compared with the simple x = a + B * c, the variables named by naming rules can make the code easier to maintain and debug.
The most common naming rule is the Hungarian naming method. The prefix of a variable name contains its function type. For example,
IntRowCounter for the integer variable name and strUserName for the string type name.
No matter what naming rules you use, you must ensure the consistency of naming rules,
In addition, this rule can be simple descriptive of your variables.
7. Organize and edit the code.
Use a visualized structure to present the code structure. For example,
Indent the code in the code block of the conditional statement (if, else) or loop statement (for, while.
For example, add spaces between variables and operators. This makes the code more intuitive and elegant,
The program process is clear at a glance.
8. Conduct a comprehensive test.
First, test common data values in each module to see if they are the same as expected;
Then test those unconventional data types to eliminate hidden errors. Testing is an art,
You can enrich your skills and insights in practice. The written test cases generally include the following situations:
Extreme Value: contains the minimum value and the maximum value that exceeds expectation, the text value of the null string,
Every parameter is null.
Meaningless value: assume that the user will input Something unrelated to the output requirement and check whether the program will respond to this.
Incorrect value: for example, if zero is used as the divisor and negative is used as the square root,
Or enter a number when entering the string.
9. Practice, practice, and practice.
The programming work keeps pace with the times. You can learn a lot of new knowledge in practice,
At the same time, the old knowledge that has been learned before can be reviewed again.
10. Reduce the Risk of demand changes.
In a real working environment, changing requirements has always been a headache but a headache.
However, if you can clearly present your needs and project plans at the beginning of the project,
In the future, the design results and requirements may be deviated due to misunderstanding or lack of understanding.
Therefore, in the project design stage, Please clearly present your requirement documents and work instructions before writing the Code:
What the system needs, what you are planning to do, and how much your work has been done.
11. Learn from simplicity to complexity.
If you need to program something very complicated, this will help you do your work more smoothly.
For example, if you have such a project, the window has an image of any shape,
You need to design a program that can change its shape based on the direction and speed of moving the mouse.
First, you can design a square that slides while holding the mouse to produce deformation. In other words,
This step mainly solves the problem of mouse motion tracking.
Then, associate the size of the square with the speed of the mouse. In other words,
This step solves the problem of association between the mouse speed and its own shape.
Finally, create the actual shape you want and connect the three components.
This method is helpful for coding modular projects, where each component has its own independent block.
This is very useful for code reuse (for example, you want to use the mouse to track New Projects)
And makes the program easier to debug and maintain.


How can programmers improve their abilities and make a project independently?

You can switch to a small company to improve your development level.
Then, join other colleagues interested in entrepreneurship to start a business, minimize risks, solve problems, and wait for several projects to have experience and work independently.
Join QQ, learn together, and start a business together. 1151860914

Programming projects for novice programmers

Different companies have different requirements.

Large mature companies may only need to write some small Functions Based on Pseudo code.
Most companies cannot have a large number of people. In many cases, a project is completed by several people. This requires a lot of knowledge and capabilities.

The suggestion is to lay a good foundation, do more things, and accumulate experience.
Xie yingmin [authoritative expert]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.