码迷,mamicode.com
首页 > 编程语言 > 详细

JavaScript Patterns 2 Essentials - Writing Maintainable Code

时间:2014-05-14 23:27:59      阅读:381      评论:0      收藏:0      [点我收藏+]

标签:style   code   java   c   color   int   

Revisiting the code after some time has passed requires:

? Time to relearn and understand the problem

? Time to understand the code that is supposed to solve the problem

   

As the application matures, many other things happen that require your code to be reviewed, revised, and tweaked. For example:

? Bugs are uncovered.

? New features are added to the application.

? The application needs to work in new environments (for example, new browsers appear on the market).

? The code gets repurposed.

? The code gets completely rewritten from scratch or ported to another architecture or even another language.

   

Maintainable code means code that:

? Is readable

? Is consistent

? Is predictable

? Looks as if it was written by the same person

? Is documented

JavaScript Patterns 2 Essentials - Writing Maintainable Code,布布扣,bubuko.com

JavaScript Patterns 2 Essentials - Writing Maintainable Code

标签:style   code   java   c   color   int   

原文地址:http://www.cnblogs.com/haokaibo/p/writing-maintainable-code.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!