zoukankan      html  css  js  c++  java
  • 你的代码是否过于复杂?

    你的代码是否过于复杂?
    
    
    译文:
    	如果你的代码中出现了下列的情况,就说明你的代码过于复杂了:
    
    1. 你需要在代码中添加“hack”来使其正常工作。
    2. 其他的开发人员经常问你一些代码块是如何工作的。
    3. 其他的开发人员经常错误使用你的代码,并导致了不少的bug
    4. 有经验的开发人员不能一眼看出你代码的含义。
    5. 你很害怕修改这部分的代码。
    6. 管理层认为需要多人共同维护一个简单的类或者文件。
    7. 很难添加新的特性。
    8. 开发者经常为如何实现这段代码的功能而争论。
    9. 这部分代码经常修改。
    原文:
    

    Here are some clues that tellyou that your code may be too complex:

    • Youhave to add “hacks” to make things keep working.

    • Otherdevelopers keep asking you how some part of the code works.

    • Otherdevelopers keep mis-using your code, and causing bugs.

    • Readinga line of code takes longer than an instant for an experienceddeveloper.

    • Youfeel scared to modify this part of the code.

    • Managementseriously considers hiring more than one developer to work on asingle class or file.

    • It’shard to figure out how to add a feature.

    • Developersoften argue about how things should be implemented in this part ofthe code.

    • People make utterlynonsensical changes to this part of the code very often, which youcatch only during code review, or only after the change has beenchecked in.

    That’s what I can come upwith off the top of my head. What are some others?

    链接:
    http://www.codesimplicity.com/post/clues-to-complexity/#comments

  • 相关阅读:
    关于在组件GIS开发中使用Python的一点补充说明
    shell环境变量以及set,env,export的区别
    快速配置 Samba 将 Linux 目录映射为 Windows 驱动器
    Expect 教程中文版
    rpm 包管理
    .bash_profile和.bashrc的什么区别
    grep 零宽断言
    自动化测试
    dialog shell下的gui设计 代替繁杂libncurses编程
    x11 gtk qt gnome kde 之间的区别和联系
  • 原文地址:https://www.cnblogs.com/johnpher/p/2570591.html
Copyright © 2011-2022 走看看