整理下目录,看了这个文件,幸好未删除。

以下是《write solid code》中的原文摘录。

1、How could I have prevented this bug?

2、How could I have automatically detected this bug?

3、If a programmer believes that a bug can simply "go away", or that fixing bugs "later" won't be harmful to the product, bugs will persist.

4、Having a good set of habits and attitudes is possibly the most important requirement for consistently writing bug-free code.

5、The developers can bring more knowledge and tools to reviewing and testing the code.

6、Finding and fixing bugs was Developments's responsibility.

7、If you find undefined behavior, either remove it from the design or include assertions to notify programmers when they use undefined behavior.
     Don't waste people's time. Document unclear assertions.

8、Once you've written a function, review it and ask yourself, "What am I assuming?" If you find an assumption, either assert that your assumption is always valid, or rewrite the code to remove the assumption. Also ask, "What is most likely to be wrong in this code, and how can I automatically detect the problem?" Strive to implement tests that catch bugs at the earliest possible moment.

9、The purpose of the debug version is to catch bugs, not to make the maximal use of memory.

10、You don't save time by fixing bugs late in the product cycle. In fact, you lose time because it's often harder to fix bugs in code you wrote a year ago than in code you wrote days ago;

11、Fixing bugs "as you go" provides damage control because the earlier you learn of your mistakes, the less likely you are to repeat those mistakes;

12、Bugs are a form of negative feedback that keep fast but sloppy programmers in check. If you don't allow programmers to work on new features until they have fixed all their bugs, you prevent sloppy programmers from spreading half-implemented features throughout the product----they're too fixing bugs. If you allow programmers to ignore their bugs, you lose that regulation.

13、By keeping that bug count near zero, you have a much easier time predicting when you'll finish the product. Instead of trying to guess how long it will take to finish 32 features and 1742 bug-fixes, you just have to guess how long it will take to finish the 32 features. Even better, you're often in a position to drop the unfinished features and ship what you have.

write solid code 零散(原文)相关推荐

  1. 正反案例介绍SOLID原则

    一.概述 SOLID五大原则使我们能够管理解决大多数软件设计问题.由Robert C. Martin在20世纪90年代编写了这些原则.这些原则为我们提供了从紧耦合的代码和少量封装转变为适当松耦合和封装 ...

  2. WPF MVVM 架构 Step By Step(2)(简单的三层架构示例及粘合代码GLUE code)

    WPF MVVM 架构 Step By Step(2)(简单的三层架构示例及粘合代码GLUE code) 原文:WPF MVVM 架构 Step By Step(2)(简单的三层架构示例及粘合代码GL ...

  3. TypeScript 中的 SOLID 原则

    下面的文章解释了正确使用 TypeScrip的 SOLID原则. 原文地址:https://samueleresca.net/2016/08/solid-principles-using-typesc ...

  4. 抛弃VS Code,我还能用啥编辑器?| 技术头条

    作者 | Abhishek Prakash 译者 | 苏本如 责编 | 屠敏 转载自 CSDN(ID:CSDNnews) 微软的VS Code无论对Web开发人员或其他程序员来说,都是一款优秀的代码编 ...

  5. NET Core的代码安全分析工具 - Security Code Scan

    NET Core的代码安全分析工具 - Security Code Scan 原文:NET Core的代码安全分析工具 - Security Code Scan NET Core的代码安全分析工具 - ...

  6. 抛弃 VS Code 我还能用啥编辑器?| 技术头条

    VSCodium是微软流行的Visual Studio Code(后面简称VS Code)编辑器的一个分支,功能上与VS Code完全相同,唯一不同的是,VSCodium不跟踪你的使用数据. 作者 | ...

  7. Google Code Review最新指南

    本文译自Google最新开放的code review指南:How to do a code review 原文地址:https://google.github.io/eng-practices/rev ...

  8. 《Writing clean code》读书笔记

    <Writing clean code>读书笔记  hopesophite 2006-8-1 写在前面的话: 这两天看了<Writing Clean Code>,很受启发,感觉 ...

  9. [置顶]《游戏引擎架构》信息总汇

    豆瓣  当当  亚马逊  China-pub  京东  中国图书网  淘宝 PDF样章试读微盘下载  微云下载 中英词汇索引表 本页内容 基本信息 作者:Jason Gregory (杰森.格雷戈瑞) ...

最新文章

  1. web框架flask(12)——国际化和本地化
  2. java怎么创建二进制文件_Java:如何编写二进制文件?
  3. [YTU]_2625( 构造函数和析构函数)
  4. Linux操作系统安装LAMP环境
  5. pyspark 连接mysql
  6. 腾讯电脑管家13内测版官方下载地址
  7. boost::set_union相关的测试程序
  8. 20应用统计考研复试要点(part23)--简答题
  9. Top20的OpenSSH服务器最佳安全实践--SSHD_CONFIG配置文件详细解读
  10. Mysql优化_ORDER BY和GROUP BY 的优化讲解(单路排序和双路排序)
  11. 如何在小数点前补0,new DecimalFormat(##0.00);
  12. ubunto应用软件
  13. java 读写mysql_Java读写MySQL数据库小实例
  14. Pytorch中view, transpose, permute等方法的区别
  15. Laravel 源码解读
  16. 和菜鸟们一起攻克金盾2018SS加密视频
  17. auto semicolon insertion 自动分号补齐的坑
  18. 【虚拟机数据恢复】误删除VMware虚拟机vmdk文件的数据恢复案例
  19. Prometheus监控
  20. matlab安装c盘吗,matlab的安装步骤(附winC盘“用户”文件夹下账户名的更改方法).doc...

热门文章

  1. top刷新间隔_每天一个linux命令:top命令
  2. java url加密解密,java URL 编码解码,该如何解决
  3. 路径规划Github库推荐
  4. http与https的区别,http 1.0与1.1的区别
  5. linux下防火墙的管理工具firewall-cmd
  6. 从C++strStr到字符串匹配算法
  7. 使用AndroidStudio编译NDK的方法及错误解决方案
  8. kettle spoon中“表输入”到“表输出”的乱码问题
  9. Google Chrome浏览器必备的20个插件
  10. java 多线程合并_Java多线程-线程的调度(合并)