Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.alphanet.ch!alphanet.ch!news.imp.ch!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news.bbs-scene.org!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 23 Dec 2011 12:25:23 -0600 Date: Fri, 23 Dec 2011 10:25:12 -0800 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: comparing two test files References: <5fdf65a2-052b-4c0b-b6bf-bc4dc8a7dd02@v24g2000prn.googlegroups.com> <1IGdnbzxbYSzD2nTnZ2dnUVZ_rednZ2d@earthlink.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 34 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 75.11.53.36 X-Trace: sv3-DSkS0fwOwNRNyKpTjp/SEaFh0bsvliPpC3Wxn+nIEa4MQuMgMo+GDck33BuXMY7hQYR2uXaSR4+xHJY!C9onrl2w9On7ykaqmmthyVNIIJkTLBN0T3w823aVimvRQBo3bvywutAdw086fkI+vNdYqneht7UV!TXTkN1XbZNqsyuBrLIckIWoNKRD9grjBPUNP0b5ekNM= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2610 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10977 On 12/23/2011 9:18 AM, Gene Wirchenko wrote: > On Fri, 23 Dec 2011 06:37:25 -0800, Patricia Shanahan > wrote: > > [snip] > >> I've written a web page on the subject of how to debug, >> http://www.patriciashanahan.com/debug > > Nice page. Thanks. > > How did you come up with that example? It is very good. The > problem with cooking up examples like that is that one already knows > what the problem is so any "detective work" is suspect. I took a common student problem that needs a little attention to detail, and wrote a Java implementation as fast as I could type, making minimal changes to fix compile-time errors. I then went straight to test and debug, writing up the debug steps as I went along, without doing any desk checking. Normally, my programming keystroke rate is a lot slower than my raw typing rate. Suppressing self-checking and thinking about details in favor of typing speed made a good collection of mistakes statistically likely, but without giving me any knowledge of what the mistakes were. I hoped the result would be a more realistic example and debug process than if I had consciously inserted errors in an otherwise carefully written program, and then pretended to find them. Patricia