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

以下是《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. write solid code Chapter 2 练习题4 的解答与扩展

    原题: 4.When programmers add new elements to an enumeration, they sometimes forget to add new cases to ...

  2. 关于write solid code中的memset

    文中说明memset可以通过操作整形以加速程序执行速度,这一点值得肯定,问题在于unicore或arm中协处理器有地址访问对齐检查,如果我们如此操作,编译器最终使用str指令来完成,那么当地址未对齐时 ...

  3. TypeScript 中的 SOLID 原则

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

  4. 中国 700 万开发者中,370 万在使用 VS Code

    近日(2019 年 12 月 10 日 - 11 日),Microsoft Ignite The Tour 北京站圆满落幕. 微软大中华区副总裁.市场营销及运营总经理康容先生,在大会上表示:“在中国 ...

  5. [转]9个offer,12家公司,35场面试,从微软到谷歌,应届计算机毕业生的2012求职之路

    1,简介 毕业答辩搞定,总算可以闲一段时间,把这段求职经历写出来,也作为之前三个半月的求职的回顾. 首先说说我拿到的offer情况: 微软,3面->终面,搞定 百度,3面->终面,口头of ...

  6. 高效jQuery的奥秘

    讨论jQuery和javascript性能的文章并不罕见.然而,本文我计划总结一些速度方面的技巧和我本人的一些建议,来提升你的jQuery和javascript代码.好的代码会带来速度的提升.快速渲染 ...

  7. c++内存分配

    [导语] 内存管理是C++最令人切齿痛恨的问题,也是C++最有争议的问题,C++高手从中获得了更好的性能,更大的自由,C++菜鸟的收获则是一遍一遍的检查代码和对C++的痛恨,但内存管理在C++中无处不 ...

  8. 从一行代码里面学点JavaScript

    从一行代码里面学点JavaScript 现如今,JavaScript无处不在,因此关于JavaScript的新知识也是层出不穷.JavaScript的特点在于,要学习它的语法入门简简单,但是要精通使用 ...

  9. (转)9个offer,12家公司,35场面试,从微软到谷歌,应届计算机毕业生的2012求职之路

    原文:http://www.cnblogs.com/figure9/archive/2013/01/09/2853649.html 1,简介 毕业答辩搞定,总算可以闲一段时间,把这段求职经历写出来,也 ...

随机推荐

  1. unity + win8.1 apps 小游戏demo

    unity3d用的人挺多. . .本来想写个3d游戏试试. .额..貌似挺麻烦.. . .. ..先用unity写个简单的2d游戏吧.. (adsw回车  或者  触摸屏虚拟摇杆) 开发环境 unit ...

  2. FPGA基础设计(四):IIC协议

    很多数字传感器.数字控制的芯片(DDS.串行ADC.串行DAC)都是通过IIC总线来和控制器通信的.不过IIC协议仍然是一种慢速的通信方式,标准IIC速率为100kbit/s,快速模式速率为400kb ...

  3. 【Android】Java堆栈溢出的解决办法

    分类:C#.Android.VS2015: 创建日期:2016-03-18 随着项目中添加的.jar和.so文件越来越多,编译MyDemos项目时,可能会出现Java堆栈溢出的错误,提示让增加Java ...

  4. Python框架级编程的能力要求

    说在前面:比较基础的就不说 1.装饰器熟练掌握 2.内建函数,内建变量.下划线函数之类的东西要搞明白 3.一定Python数据接口和算法实现能力 4.内省 5.元编程

  5. FZU Problem 2028 时空门问题

    Problem Description 在一个N*M的地图上旅行.地图上有些地方可以走用. 表示,不能走用 # 表示.在可以走的地方上下左右移动一格需要一个单位时间.可以走的地方还有一些时空之门.时空 ...

  6. Oracle PLSQL Demo - 05.WHILE循环[WHILE LOOP]

    declare v_sal ; begin ) loop v_sal :; dbms_output.put_line(v_sal); end loop; end;

  7. 开发song-list组件;

    注意点: 1.song-list的高度是通过计算动态获取的: 2.可以直接在{{}}调用函数,来显示函数的返回值: <template> <div class="song- ...

  8. Web应用程序开发的标准架构

  9. slimphp中间件调用流程的理解

    slimphp是一款微型php框架,主要是处理http请求,并调用合适的程序处理,并返回一个http响应. 它遵循php的psr7规范,可以很方便的集成其它遵循psr7规范的php组建. 当读到中间件 ...

  10. hive 定时加载分区

    #!/bin/bash #每天定时位外部表加载分区 #服务器当天的时间 #加载环境变量 source /etc/profile; #如果没有指定日期用当前日期如果指定的日期使用指定的日期 echo ' ...