如何确保代码可维护性? [英] How can I ensure the code maintainability?

查看:149
本文介绍了如何确保代码可维护性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何确保代码可维护性?任何人都可以告诉我这个Q答案..?

How can I ensure the code maintainability?can any one tell me this Q answer..?

推荐答案

阅读本文:撰写可维护代码 [ ^ ]


请阅读下面提到的文章。它会给你很多帮助。



编码技巧和编程做法



编写可维护代码




编写可维护代码
Please read below mentioned Articles.It'll help you a lot.

Coding Techniques and Programming Practices

Writing Maintainable Code


Writing Maintainable Code


问候,





当我在考虑mai时令人难以置信的代码,我想到的东西......







1在实践中保持最佳编码标准。您可以在msdn中查询最佳编码标准..



2.代码应松散耦合。



3.给出更好的评论。



4.它应该是可读的。



5.有人应该能够修改代码而不会有太多复杂因素。



6.尝试构建可重用的代码。



7.方法中的行数不应该太长。



8.在编写代码时,请牢记单一责任原则。<


9.代码应该很容易进行单元测试。



10.遵循良好的命名约定。






问候

Dominic
Greeting,


When i am thinking about maintainable code, the things coming into my mind .....



1. Keep the best coding standards in practise. You can check in msdn for the best coding stadards..

2. Code should be loosly coupled.

3. Give better comments.

4. It should be readable.

5. Someone should be able to modify the code without much complications.

6. Try to build re usable code.

7. Number of lines in a method should not be very long.

8. Keep the single responsibility principle in your mind when you are writing a code.

9. Code should be easily unit tested.

10.Stick on good naming conventions.



Regards
Dominic


这篇关于如何确保代码可维护性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆