Maintainability of code Quality

Source: Internet
Author: User

<Span style = "font-weight: bold;"> my mindset changes </span>

C =

A = B

B = c

Later, I learned the following code from my brother and thought it was more beautiful than I did before:

A = a + B

B = a-B

A = a-B

Finally, I joined the work and saw a lot of other people's code. Finally, I thought the most beautiful code was like this:

C =

A = B

B = c

Excuse me, why is my mentality changing like this?

 

<Span style = "font-weight: bold;"> reality of software development </span>

<Ul style = "direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; "type =" disc "> <li style =" margin-top: 0; margin-bottom: 0; vertical-align: middle; "> <span lang =" zh-cn "> in a software life cycle, </span> <span style =" font-family: calibri; font-size: 10.5pt; "lang =" en-us "> 80% </span> <span lang =" zh-cn "> the time and effort are spent in the maintenance phase. </Span> </li> <li style = "margin-top: 0; margin-bottom: 0; vertical-align: middle; "> <span> there is almost no software, which is maintained by the original developer throughout its lifecycle. </Span> </li> <li style = "margin-top: 0; margin-bottom: 0; vertical-align: middle; "> <span> there is almost no software, and its documents and code are kept in sync throughout its lifecycle. </Span> </li> </ul> <span style = "font-weight: bold;"> scenario reproduction </span>

<P style = "margin: 0in; font-size: 10.5pt;"> <span lang = "zh-cn"> there are two types of users, the first type of maintenance is your own code. However, with the passage of time, the previous understanding and memories of the system have gradually disappeared, </span> <span style = "font-family: calibri; "lang =" en-us "> bug </span> <span lang =" zh-cn "> or add new features, you need to read the document and code to recall the scenario of the development system at that time. </Span> for the second type, the Code is not self-written. You need to read the relevant documents and code. To understand the intention of a code, you need to understand the logical process of the entire module, I also need to read the relevant requirements and design documents, but unfortunately these documents are not synchronized with the actual code.

 

<Span style = "font-weight: bold;"> factors affecting maintainability </span>

<Span lang = "en-us"> 1. </span> <span lang = "zh-cn"> whether it is the same developer </span>

<P style = "margin: 0in; font-size: 10.5pt;"> <span style = "font-family: calibri;" lang = "en-us"> 2. </span> <span lang = "zh-cn"> human quality, technical skills, and familiarity with the business field </span>

Implementation measures

<P style = "margin: 0in; font-size: 10.5pt;"> <span style = "font-family: calibri;" lang = "en-us"> 1. </span> <span lang = "zh-cn"> improve your own quality, technical skills (Object-Oriented and refactoring), and be familiar with your business, multiple colleagues </span> <span style = "font-family: calibri; "lang =" en-us "> face to face </span> <span lang =" zh-cn "> communication </span>

In fact, the biggest headache for maintaining software is that, as time passes by, previous understandings and memories of the system have gradually vanished. Every time you modify a bug or add new features, you need to read the document and code to recall the scenario when developing the system.

I think maintainability is the most important part of software quality characteristics, and the premise of maintainability is comprehensibility.

<P style = "margin: 0in; font-family: calibri; font-size: 10.5pt;"> <span style = "font-weight: bold; "> who should we understand? </Span>

<Span lang = "en-us"> 2. </span> <span lang = "zh-cn"> to understand a document, information can be better understood only when it is carefully organized. </Span>

<Span lang = "en-us"> 3. </span> <span lang = "zh-cn"> understand the code. Good codes are self-explanatory, talking, and bad codes are visually invisible, the comprehensibility of code is controlled by developers. Whether to create an angel or a monster depends on our attitude. </Span>

 

A well-understood code is not a technology, but an art.

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.