🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2642

Re: Report on defect in M2 vs C (Was Modula-2, Modula-3, C or C++)

#2642
From: Karl Kleine
Date: Mon, 23 Oct 1995 13:09
54 lines
3657 bytes
Robert Dewar (dewar@cs.nyu.edu) wrote:
: Ian says:

: "Besides, an interactive debugger is essential in the real world."

: Well in one sense this is true, namely the commercial sense. Since so many
: programmers are lost without an interactive debugger, it is certainly true
: that a compiler must have a debugger to be generally used.

: However, the idea that it is impossible to write code without an interactive
: debugger is rubbish. Indeed, using the clean-room approach, it is quite
: practical to write code under conditions where the devlopers do not test
: the code they write AT ALL, let alone fiddle around with interactive
: debuggers.

: I have written compilers and entire operating systems without the use
: of debuggers, perfectly happily. I *do* find the traceback from an
: exception useful, and I would say that these days, working on GNAT,
: one of my main uses of gdb is simply to get this traceback.

: I do think that a lot of programmers waste a lot of time in interactive
: debuggers. The great danger is that you sit there stepping watching working
: code working correctly. This gives the illusion of productivity, but it
: is actually achieving very little. There is great merit in reading code
: and getting it right, rather than endless prodding with debuggers to
: mend junk code.

: Now of course these things are by no means absolute, and given a good
: interactive debugger, there are bugs for which it can be an invaluable
: time saver. However, over-reliance on such tools can lead to a situation
: where programmers are not as productive as they could be, and it is 
: worth listening to Hoare, because that is what he is warning about!

: Many programmers these days never read their code at all. In fact I think
: that formal methods are often valuable just because in order to reason 
: about your code formally, you at least have to read it :-)

It is considered bad USENET style to quote such long text, but Robert just
spelled out the important things, so you better read it twice!

The point I want to make: I went back from industry to teaching last year,
and in my introductory programming courses (based onm Modula-2) I do NOT
introduce a debugger. I insist on CONSTRUCTING programs, not fiddling until
it works. The debugger is sketched and demonstrated towards the end of term
with small groups during the practical hands-on sessions. As Robert pointed
out above, I use the debugger to get a traceback, maybe look at a variable
value, but then it's reading and understanding the source code again.



--
Prof. Karl Kleine			vkk@rz.uni-jena.de
Fachhochschule Jena			kleine@fzi.de
Postfach 100314, D-07703 Jena, Germany	+49-3641-64-3451/-3453 fax -3449
Technical Details
Message-ID: <46g46d$aeg@fsuj01.rz.uni-jena.de>
Path: arc1-ca.pugleaf.net!fsuj50.rz.uni-jena.de!vkk
References: <44hcri$rsm@theopolis.orl.mmc.com> <DFyAJF.KpC@research.att.com> <DG1yzI.8Ln@mv.mv.com> <45cj8d$red@ixnews3.ix.netcom.com> <DG8y40.BMz@world.std.com> <KANZE.95Oct11123925@slsvgqt.lts.sel.alcatel.de> <460ibq$b0j@reuters2.mitre.org> <cspt.1144.30867CCE@giraffe.ru.ac.za> <4662pc$kmi@ubszh.fh.zh.ubs.com> <dewar.814190504@schonberg>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!fsuj50.rz.uni-jena.de!vkk
From: vkk@rz.uni-jena.de (Karl Kleine)
Newsgroups: comp.lang.modula2,comp.lang.modula3,comp.lang.c,comp.lang.c++,comp.lang.ada
Subject: Re: Report on defect in M2 vs C (Was Modula-2, Modula-3, C or C++)
Followup-To: comp.lang.modula2,comp.lang.modula3,comp.lang.c,comp.lang.c++,comp.lang.ada
Date: 23 Oct 1995 13:09:33 GMT
Organization: Friedrich-Schiller-University Jena, Germany
Message-ID: <46g46d$aeg@fsuj01.rz.uni-jena.de>
References: <44hcri$rsm@theopolis.orl.mmc.com> <DFyAJF.KpC@research.att.com>    <DG1yzI.8Ln@mv.mv.com> <45cj8d$red@ixnews3.ix.netcom.com>       <DG8y40.BMz@world.std.com> <KANZE.95Oct11123925@slsvgqt.lts.sel.alcatel.de> <460ibq$b0j@reuters2.mitre.org> <cspt.1144.30867CCE@giraffe.ru.ac.za> <4662pc$kmi@ubszh.fh.zh.ubs.com> <dewar.814190504@schonberg>
NNTP-Posting-Host: fsuj50.rz.uni-jena.de
X-Newsreader: TIN [version 1.2 PL2]