The Nine Indispensable Rules for HW/SW Debugging 软硬件调试之9条军规
I read this book in the weekend, and decided to put the book on my nightstand. It's a short and funny book, clear insight and good stories, strongly recommend entry even senior engineers to read it.
Introduction
This book tells you how to find out what’s wrong with stuff, quick. It indeed short and fun. I finished reading in the weekend and made some notes. And it convinced me the Nine Rules powerful to hardware/software design and design, as some rules I already have, which helped me find the bugs efficiently. Some engineer probably say it’s an old book, which is not applicable today, as we have big progress on HW/SW debug tools and instrument. Although tools can help reduce or find bugs more or less, it will bring some latent bugs, which is harder to find. Besides, over-dependency on tools blocks a new engineer to become a clear thinker, obviously, this side effect is harmful in one’s engineer career life.
how can that work?
a. when it took us a long time to find a bug, it was because we had neglected some essential, fundamental rule; once we applied the rule, we quickly found the problem.
b. People who excelled at quick debugging inherently understood and applied these rules. Those who struggled to understand or use these struggled to find bugs.
Obvious vs Easy
These things are obvious (fundamentals usually are), but how they apply to a particular problem isn't always so obvious.
Don't confuse obvious with easy - these rules aren't always easy to follow, and thus they're often neglected in the heat of battle.
Debugging vs Troubleshooting
Debugging usually means figuring out why a design doesn’t work as planned. Troubleshooting usually means figuring out what’s broken in a particular copy of a product when the product’s design is known to be good.
The Nine Indispensable Rules
1. Understand the System 了解系统
No1 rule is the most important, and it deserves much time if you really want to fix bugs ASAP.
1.1. Read the manual
HW engineer has to read chip datasheet, and SW engineer has to read API/Frame document.
1.2. Read everything in depth
Read everything, cover to cover.
1.3. Know the fundamentals
1.4. Know the road map
1.5. Understand your tools
1.6. Look up the details
2. Make it Fail 复现故障
It seems easy, but if you don't do it, debugging is hard.
2.1. Do it again
2.2. Start at the beginning
2.3. Stimulate the failure
2.4. But don't simulate the failure
2.5. Find the uncontrolled condition that makes it intermittent
2.6. Record everything and find the signature of intermittent bugs
2.7. Don't trust statistics too much
2.8. Know that "that" can happen
2.9. Never throw away a debugging tool
3. Quit Thinking and Look 观察!而不是瞎想
3.1. See the failure
3.2. See the details
3.3. Build instrumentation in
Use source code debuggers, debug logs, status messages, flashing lights, and rotten egg odors.
3.4. Add instrumentation on
Use analyzers, scopes, meters, metal detectors, electrocardinography machines, and soap bubbles...
3.5. Don't be afraid to dive in
3.6. Watch out for Heisenberg
Don't let your instruments overwhelm your system.
3.7. Guess only to focus the search
4. Divide and Conquer 分而治之,各个击破
4.1. Narrow the search with successive approximation
4.2. Get the range
4.3. Determine which side of the bug you are on
4.4. Use easy-to-spot test patterns
4.5. Start with the bad
4.6. Fix the bugs you know about
4.7. Fix the noise first
5. Change One Thing at a time 每次只改变一个因子
5.1. Isolate the key factor
5.2. Grab the brass bar with both hands
5.3. Change one test at a time
5.4. Compare it with a good one
5.5. Determine what you changed since the last time it worked
6. Keep an Audit Trail 调试日志
6.1. Write Down What You Did, in What Order, and What Happened as a result
6.2. Understand that any detail could be the important one
6.3. Correlate events
6.4. Write it down! No matter how horrible the moment, make a memorandum of it
7. Check the Plug 检查所有设定条件
7.1. Question your assumptions
7.2. Start at the beginning
7.3. Test the tool
8. Get a Fresh View 换个角度看问题
8.1. Ask for fresh insight
8.2. Tap expertise
8.3. Listen to the voice of experience
8.4. Know that help is all around you
8.5. Don't Be Proud
8.6. Report Symptoms, Not Theories
8.7. Realize that you don’t have to be sure
9. If you didn't fix it, it ain't fixed 你不解决bug,bug就不会解决
9.1. Check that it’s really fixed
9.2. Check that it’s really your fix that fixed it
9.3. Know that it never just goes away by itself
9.4. Fix the cause
9.5. Fix the process

The Nine Indispensable Rules for HW/SW Debugging 软硬件调试之9条军规的更多相关文章
- [书目20160526]Brain Rules 让大脑自由:释放天赋的12条定律
推荐序1 12条定律,让大脑更聪明推荐序2 走过迷雾地带前 言 人人都有一个不可思议的大脑 定律1:越运动,大脑越聪明 信不信,“驴友”比“沙发土豆”更聪明! 老板,请把办公室的咖啡机换成跑步机! ...
- debugging books
https://blogs.msdn.microsoft.com/debuggingtoolbox/2007/06/08/recommended-books-how-to-acquire-or-imp ...
- How to Acquire or Improve Debugging Skills
http://blogs.msdn.com/b/debuggingtoolbox/archive/2007/06/08/recommended-books-how-to-acquire-or-impr ...
- RFID 仿真/模拟/监控/拦截/检测/嗅探器
Sound card based RFID sniffer/emulator (Too tired after recon.cx to do draw the schematics better th ...
- 微软职位内部推荐-SDE2 (Windows - Audio)
微软近期Open的职位: SDE2 (Windows - Audio) Windows Partner Enablement team in Operating System Group is loo ...
- 微软职位内部推荐-SDE2 (Windows - Power)
微软近期Open的职位: SDE2 (Windows - Power) Windows Partner Enablement team in Operating System Group is loo ...
- 微软职位内部推荐-SDE2 (Windows driver)
微软近期Open的职位: SDE2 (Windows driver) Job title: Software Development Engineer 2 Location: Shanghai, Ch ...
- ALSA 学习小记
对于playback snd_pcm_begin snd_pcm_commit, 貌似 commit给的frame才会使得alsa去把数据填充 转自 http://magodo.github.io/ ...
- Hadoop官方文档翻译——MapReduce Tutorial
MapReduce Tutorial(个人指导) Purpose(目的) Prerequisites(必备条件) Overview(综述) Inputs and Outputs(输入输出) MapRe ...
随机推荐
- ubuntu14.04利用aliyun安装docker
docker官网上的安装步骤比较麻烦,而且下载下来后pull镜像也特别慢.通过阿里云可以快速安装docker,并且可配置加速器.通过阿里云超快速安装docker: 安装或升级Docker 请安装1.6 ...
- 个人评测——K米
K米APP案例分析 关于 K米 -- 的案例分析 产品 K米的APP (全国KTV点歌,手机直播,互动,交友,预订)的Android客户端 第一部分 调研,评测 评测: 软件的bug,功能评测,黑箱测 ...
- 【java项目小记--JManager】项目开始原因及github部署
--记于2016-8-11 毕业已三载,忽然想起大学时的毕业设计项目,想到曾在毕业答辩上说,会吸取老师点评并逐渐完善该项目.而今 老师点评已忘了个干净,项目也还是毕业时的样子,正好最近有些时间,打算兑 ...
- c3p0连接池获得的Connection执行close方法后是否真的销毁Connection对象?
问题描述: jfinal做的api系统中,在正常调用接口一段时间后,突然再调用接口的时候,该请求无响应api系统后台也无错误信息 (就是刚开始接口调用是正常的,突然就无响应了) 于是啊,就开始找错误. ...
- 设置git 不提交 修改权限的文件
vim .git/config 打开文件
- webstorm node 3000端口被占用
首先说明我的问题原因,一个服务端程序用3000端口打开后,未关闭,直接强制关闭的webstorm,关闭的时候提示disconnect了,也点击了,但是打开另外一个文件,再用3000端口打开的话会提示被 ...
- SPSS数据分析—多维尺度分析
在市场研究中,有一种分析是研究消费者态度或偏好,收集的数据是某些对象的评分数据,这些评分数据可以看做是对象间相似性或差异性的表现,也就是一种距离,距离近的差异性小,距离远的差异性大.而我们的分析目的也 ...
- cf#382div2
A. 题意:字符串长度n,每次可向左向右跳k个格子.要求不能在障碍物处停留('#'),可以在空地处停留(' . ').给出字符串,从G开始,问能不能到达T. 分析:直接从G处开始向两边搜,如果能到T则 ...
- 油猴 greasemonkey 背景音乐 火狐 chrome 背景音乐
火狐,chrome背景音乐 http://www.w3school.com.cn/tags/tag_audio.asp js插入背景音乐,猴油脚本使用 var audio = document.cre ...
- uva 820(最大流)
最大流的裸题,直接贴了模板. #include <cstdio> #include <iostream> #include <sstream> #include & ...