- 1、本文档共50页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Delphi Business Proprietary Software Debug Debugging Methods Intuition may be the simplest debugging method, but Binary Search is not far behind. Here’s the scenario: We’re releasing version 14.31 to the customer this Friday. My last change to the Cylinder Deac logic was version 14.10, about a month ago. I tested the changes thoroughly, and the logic worked flawlessly. During release checks, I see that the 4 Deac outputs look fine- 180 degrees apart, like they are supposed to be. But they seem to turn on and off at random angles, not as specified in the calibrations. Delphi Business Proprietary Software Debug Debugging Methods 14.31 14.27 14.23 14.19 14.15 14.30 14.26 14.22 14.18 14.14 14.29 14.25 14.21 14.17 14.13 14.28 14.24 14.20 14.16 14.12 14.11 14.10 What do I know? Almost everything. I know the code worked in 14.10, and there were no changes. Approach- Binary Search. Consider the boxes above to represent the releases. 14.10, on the right in green, is known to be good. 14.31, on the left in red, is known to be broken. The releases in yellow are unknown, but we suspect they’re all good, from right to left, until the error was introduced. Delphi Business Proprietary Software Debug Debugging Methods 14.31 14.27 14.23 14.19 14.15 14.30 14.26 14.22 14.18 14.14 14.29 14.25 14.21 14.17 14.13 14.28 14.24 14.20 14.16 14.12 14.11 14.10 We could test each release in turn, from right to left, until we find the problem. Worst case, this would involve 19 builds, and trips to the bench for testing. Binary search lets us identify the error with a maximum of 5 tests (32 or fewer releases). We’ll start with a test of 14.20, and see if it’s proper. Delphi Business Proprietary Software Debug Debugging Methods 14.31 14.27 14.23 14.19 14.15 14.30 14.26 14.22 14.18 14.14 14.29 14.25 14.21 14.17 14.13 14.28 14.24 14.20 14.16 14.12 14.11 14.10 14.20, now marked green, passed the test. We assume that 14.11 to 14.19 were good also- this is not proven, but i
文档评论(0)