Several undesirable phenomena in programming

Source: Internet
Author: User
Tags object definition window
However, some of our programmers maintain the process of old code as if walking a dog. Every modification of a program left some hidden trouble, the result of a good code is all over the hidden dangers.

Good programming habits are every programmer should have the quality of work, in my software career repeatedly found that some programmers have such or such a bad habit, these problems in some of the time is not very long programmer's body performance is particularly prominent.

1. The Shed

A shed as the name suggests is to get a task, neither do more detailed requirements analysis, without a detailed design, open the programming tools at the beginning, crackling the definition of a bunch of modules, I do not say is the definition of classes, because so the code can not find the object, and then on the basis of these modules to work, As a result, the whole program looks like a random shed, although there is a procedure, and seems to achieve the desired function, but such procedures are often logical confusion, not only understand the difficulties, maintenance is also very difficult. Since it is a shed, it is difficult to be long in a precarious day.

The emergence of a shelter has revealed several problems:

    1. Management of the confusion. Managers have the responsibility to check for such code, and to give early corrections and provide guidance.
    2. Not paying attention to design. If a software organization does not value design, it is natural to have such a phenomenon.
    3. Pragmatism. In the process of project implementation, some people's slogan is to achieve the function is good, to meet the needs of users, so in the process of programming is always hastily, ostensibly to speed up the progress of the project in the late maintenance of the explosive, serious will seriously affect the progress and quality of the project.

2. Nail Nails

Nail nails In the performance of Code maintenance or program implementation, abruptly to the program to add unnecessary or related to the object and logic code. Such code is often expressed in the system of multi-tier systems, some people in order to lazy, do not want to from the bottom of the code to maintain good, but from the top start to modify, such as users need to do a report program, then some programmers are the way to the SQL statement directly in the interface layer to call, destroy the system hierarchy and encapsulation. There is also the practice of adding to other objects in unrelated objects
The code.

3. Shake Hammer

Some people have just learned a new technology, or a good idea, regardless of whether the idea is used in the current program, and apply everywhere. Quite a "hand with a hammer to see what is a nail" posture. It is good to apply new techniques or ideas, but it also depends on timing and occasion.

4. Paste the window

When the window is broken, if there is no place to glass or bother to do a piece of glass, some people's practice is to get a newspaper or beautiful pictures of the post broke the place, in order to cover the wind and rain. A bug in our program is like a hole in the window. Some people do not solve from the source, or not to find a reasonable solution, but in place to plug a loophole. The consequences may be really blocked, but it may also be because of its changes to bring more problems, it may be blocked a place, turned back to find other loopholes, and then non-stop to the program on the newspaper. Such a program would not seem to know how ugly it was.

5. Diarrhea

Diarrhea, I think everyone has pulled, I believe everyone will admit that the taste is actually not very comfortable, but in fact, some people in the programming activities like this. I have found that some people a function actually more than 3000 lines, to a screen 25 lines to calculate, to turn over 100 screen to be a function of the code to read, my god! I think this code to anyone to pinch the nose, not to mention to maintain. There is also a performance is often written in a long line, I will roll the scroll over the past do not know whether ever felt tired panic.

6. Walk the dog son

The dog is the animal, everywhere defecate is unable to control, one is they do not have the civilized consciousness, another is the human cannot control their consciousness. However, some of our programmers maintain the process of old code as if walking a dog. Every modification of a program left some hidden trouble, the result of a good code is all over the hidden dangers.

These are some of my summary, one is to remind, but alert. To eliminate this phenomenon, in addition to strengthening management, the programmer's self-discipline is particularly important. In fact, many people do not intend to do so, but by their own limitations. As a manager to continue to educate and urge programmers, programmers should also pay attention to continuous learning, training their own programming awareness and quality, but also to develop their own products responsible for the project, responsible for colleagues, responsible for their own work attitude and sense of honor.



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.