The path of Programmer's cultivation---reading essays 2

Source: Internet
Author: User

Entropy is a concept from physics that refers to the total amount of "disorder" in a system. When the disorder grows in software, programmers call it "software Decay" (software rot).

There are many factors that can cause software to rot. One of the most important of these seems to be the psychological (or cultural) development of a project.

Do not keep the program "broken windows" do not repair, poor design, temporary bad plan and so on. And often we face a lot of "reality", there is no time to reconstruct, the reconstruction of risk is not a resource test.

But we will live forever in the "reality", there is no one day everything has, auspicious auspicious days waiting for you to start to repair these "broken windows."

We can help us reduce risk by means of automated testing. If there is really no way to fix it immediately, be sure to do it: put the found "broken windows" into Todo List and review it regularly.

He is a rich, obnoxious millionaire with a perfect, beautiful house full of priceless antiques, artwork, and the like.

One day, a tapestry hung from his bedroom fireplace too close to the fire. Firemen rushed in to fire--and his house.

But they rushed into the room with big, dirty fire hoses and stopped--the fire roared--they had to put cushions between the front door and the fire.

This is indeed an extreme case, but we have to treat the software this way. If you find the code for your team and project to be beautiful-neat, well-designed, and elegant-you'll probably

Be careful not to stain it, just like the firemen. Even if there's a fire roaring (deadlines, release dates, exhibition demonstrations, etc.), you don't want to be the first person to mess things up.

The paradox of giving computers is that Captain James T. Kirk (Star Trek, Star Trek) likes to use the method of invalidating artificial intelligence that is being looted.

Unfortunately, the same principles can effectively invalidate your code.

We feel that the only way to reliably develop software and make our development easier to understand and maintain is to follow the principles we call dry: every knowledge in the system must have a single, unambiguous, authoritative representation.

Repetition is the worst taste in code, and you can recall how many bugs are caused by repeated code leaks, and how much time is wasted to modify duplicate code. Such a bad thing must be hated!

Common repetition types are summarized in the book:

Forced repetition (imposed duplication). Developers feel they have no choice – the environment seems to require repetition.

The path of Programmer's cultivation---reading essays 2

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.