Programmers: Seven Sins of Software Development

Source: Internet
Author: User

It takes a long time to train and practice to become a good software developer. But if we do not follow the appropriate principles, even the best programmers will become the victims of failure. Inadvertently, you will develop some terrible bad habits, which may appear again and again, even for experienced programmers. I think software development has at least seven sins. Then, let's take a look at what unexpected losses your newest programming project will bring to your desires, overeating, greedy, lazy, angry, jealous, and proud.

The first sin of Software Development: desire (excessiveDesign)

Modern programming languages tend to mature by constantly adding new functions. Programmers stack abstract code layer by layer and use newly designed keywords and structures to increase code readability and reusability-as long as you are willing to spend time learning how to use them correctly.

At the same time, the programming principles have changed over the years. Today, you can see thousands of DesignsSolutionAnd pattern, and someone will come up with a new development solution every few months. In addition, developers always swear that these development solutions will make you a leader in the eyes of programmers.

However, the conversation on paper often does not work in actual operations. This principle is simple. For example, you can do something, but it does not mean you should do it. As Joel Spolsky, a programming master, said, those blindly infatuated with themselvesToolsProgrammers will inevitably ignore this point, and even the simplest project may be buried in the development hell. Therefore, you must resist this undesirable impulse. The first thing to do is to stick to your initial design plan.

The second sin of Software Development: overeating (not restructuring)

Nothing is better than developing software. Once you have a product under development, you will be easily tempted to start planning the next iteration. What new features should a new product have? In the first roundImplementationWhen I did not notice what problems?

It is easy to forget that the Code rarely remains in optimal state during running. Then, when the new features continue to accumulate until several reincarnationDevelopmentLater, programmers tend to compose errors that have occurred in the past, which leads to a bloated and fragile code base and is difficult to maintain effectively.

Therefore, try to restrain yourself before adding new features and evaluate the quality and maintainability of existing code. Code refactoring must be included in the budget for every new round of development. Users may only care about the new features of each version, but in the long run, they will certainly want you to keep the product refined.

Third sin of Software Development: greed (competition between teams)

Excessive desire for wealth and rights-otherwise, how can we explain the motives for competition between programmers and their colleagues? When a team receives emails leaked by other teams, it starts closed conferences and development. The next thing you should know is that this team has compiled a code library, which is more than half of the functions of other teams.

Development teams seldom repeat their work out of malware, but they often lack a clear sense of purpose and responsibility. The result is a redundant and powerless code library, not to mention the loss of budget and previous efforts. One of the first tasks of running a development project should be to understand what other teams are doing, and then all teams work toward a common goal.ShareSharing should be the motto of developers.

Fourth sin of Software Development: laziness (not verification input)

The list of errors that are easy to make in basic programming is very long, but the error of not verifying input is so low-level that you can't help but think about the cause of such errors from another perspective. This seemingly low-level error still appears in the code written by many experienced programmers, which is confusing at 01:10. However, many common security vulnerabilities, from buffer overflow to SQL injection attacks, can be traced directly to the fact that the Code entered by the user is not verified in the correct format.

Modern Programming Languages provide many tools to help programmers avoid similar situations, but they must be used properly. Remember, a javascriptWebForm Verification input may be easily avoided by javascript disabled in the browser, or simply not accessed using the browser. Input verification should be yoursApplicationThe core part of the program, rather than the user interface. If this cannot be done, it can only be attributed to the laziness of programmers.

The fifth sin of Software Development: anger (not commenting on your code)

What behavior can be more hostile to your colleagues than to comment on your code? Of course, I know that well-written code is its best documentation. So, do you know what other people can understand? In fact, these codes that you think are proud of may not be seamless.

Programmers may soon forget the code they are writing, but the code will continue to exist for a long time after they leave. For programmers who replace them, it is a thankless job to figure out what each code really represents. In view of this, when you write a program, you can leave some hints for them.

However, remember that too many comments or comments that are hard to understand are the same as those without any comments. Comments similar to "this is corrupted" or "Don't touch this" do not help anyone. Do not make additional comments to explain simple operations, such as variable initialization. Code is its best file material, so comments should try to explain the cause and essence as much as possible.

Sixth sin of Software Development: jealousy (no Version Control)

Maybe you have reason not to implement Version Control for your project. At first, your project may be small. But today, powerful and efficient version controlSystemYou can use it for free. Service providers can even provide low-cost hosted code services for distributed projects. So there is no reason not to use a code library from the beginning, even for small projects-unless you cannot tolerate code changes by anyone other than you.

Seven Sins of Software Development: Pride (No unit tests)

You often think that your programming work is excellent, but how do you know whether your work is beautiful? Are there any indicators to measure your work quality?

Unless you have already performed a specific testEnvironmentYour code has been verified and tested. Otherwise, you will not be able to prove that it is as flawless as it is described in the advertisement. However, too many developers do not perform unit tests on their code. They claimed that they had no time to implement new features after they took the time to test. In fact, some developers do not even write quality tests into the budget of their projects.

So what can I say? We can only expect them to leave this arrogance behind before they taste the taste of failure. Once the defective code arrives at the customer's hand, it is too late to undo it. The more unit tests are performed before code transmission, the more unnecessary losses can be avoided in the future.

Original article title: the 7 deadly sins of Software Development

From: http://www.webspherechina.net /? Viewnews-51506.html

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.