JavaScript Patterns 2.1 Writing Maintainable Code
2014-05-14 22:11
344 查看
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
• 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
相关文章推荐
- Writing Better Code – Keepin’ it Maintainable
- Writing-Efficient-C-and-C-Code-Optimization
- 读书笔记:Writing Solid Code (2)
- Writing Better Code
- Writing Solid Code
- 编写可以单元测试的代码 Guide-Writing Testable Code
- Writing Efficient Android Code(转)
- Simple Code Overwriting API Hook
- about writing clean code
- How to Write Maintainable Code!!
- Codeforces 543 A Writing Code 计数DP
- Writing Efficient C and C Code Optimization
- 【转】Writing linux kernel code in Eclipse
- Writing Secure Code, Second Edition
- 完全背包 Codeforces Round #302 (Div. 2) C Writing Code
- Writing Efficient C Code for Embedded Systems
- Zen Coding — a new way of writing HTML and CSS code
- writing clean code 第八部分 剩下来的就是态度问题
- Guidlines and rules About Overwriting hashCode()
- Writing code is writing