zoukankan      html  css  js  c++  java
  • JavaScript Patterns 2.1 Writing Maintainable Code

    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

  • 相关阅读:
    socket的accept函数解析
    c socket(续)
    C socket指南
    网络字节序和本机字节序
    jar包
    RESTful API 设计指南[转]
    理解RESTful架构[转]
    c语言正则表达式
    Fedora设置中文
    创建框架结构的页面2
  • 原文地址:https://www.cnblogs.com/haokaibo/p/writing-maintainable-code.html
Copyright © 2011-2022 走看看