caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Eric Newhuis" <enew@bigfoot.com>
To: "Caml" <caml-list@pauillac.inria.fr>
Subject: Re: [Caml-list] Re: Debuggers
Date: Wed, 7 Nov 2001 13:51:21 -0600	[thread overview]
Message-ID: <000401c167c5$9393a6b0$d0c201cf@XENO> (raw)
In-Reply-To: <B1E4D3274D57D411BE8400D0B783FF32A8D590@exchange1.cswv.com>

> I think (as confidently as I can without reading the source :) that it
> would be relatively straightforward to add that to camldebug. However,
> I won't add it mostly because I don't use debuggers when I have an
> interactive prompt available (such as the ocaml program provides),
> because with a toplevel it's easier to write small functions, test
> them right there, and compose them incrementally.

Yes!

Have others had the same experience as me here?

I've found myself becoming more and more intentional in my habits.  I don't
use debuggers unless there is an emergency.  Instead I write unit tests and
use assertions to halt the system with useful exception information.

And I have found that writing unit tests in functional languages is pleasant
whereas in imperative langaues it is a chore.

"Traditional" debuggers are just not that useful when one has a good suite
of unit tests.

I would have had no idea what I just said a few years ago when all I did was
code in C++ and single-step through code in the debugger.  I've been there.
I thought I was code king then.  Boy was I stupid!

Moreover single-stepping and breakpoints are often times not possible in my
environment that consists of many threads and parallel asynchronously
communicating tasks.

The proof of my ways is in the result:  I can develop complete error-free
systems much faster than before.

Having said all this I still think "traditional" debuggers are absolutely
critical for one's success.  I use them like parachutes, but never on a
daily basis.  If you find yourself using a debugger on a daily basis then I
urge you to consider the wisdom of your ways.  Yes by all means learn how to
be effective at it, but once you learn those important skills move on to a
more proactive habit.

Sincerely,
Eric Newhuis


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


  reply	other threads:[~2001-11-07 19:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-07 19:19 [Caml-list] Re: Debuggers (was Jihad) Krishnaswami, Neel
2001-11-07 19:51 ` Eric Newhuis [this message]
2001-11-07 20:12 ` [Caml-list] debugger backtracking/checkpoints Chris Hecker
2001-11-07 20:29   ` Pixel
2001-11-08 15:14   ` Thorsten Ohl
2001-11-08 18:04     ` Christophe Raffalli
2001-11-09  9:51       ` Jerome Vouillon
2001-11-10 13:39   ` Mattias Waldau
2001-11-10 14:41     ` Dmitry Bely
2001-11-12 18:37     ` Chris Hecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000401c167c5$9393a6b0$d0c201cf@XENO' \
    --to=enew@bigfoot.com \
    --cc=caml-list@pauillac.inria.fr \
    --cc=enew@starband.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).