all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <levy@msri.org>
Cc: help-gnu-emacs@gnu.org
Subject: RE: Copy/paste issue.
Date: Sat, 31 Mar 2012 09:03:54 -0700	[thread overview]
Message-ID: <3D650C3DE8AA48B295938542E346EB72@us.oracle.com> (raw)
In-Reply-To: <20120331154408.40E7F180CAB@neo.msri.org>

> In my experience binary search, while sometimes unavoidable, is far
> from logarithmic, because the contents interact with each other.
> 
> At the simplest level, cutting a file in half typically cuts it in the
> middle of a function. Even if the functions are short and it's easy to
> break between functions, the remaining code may depend on the omitted
> code, so the division introduces new errors that have to be debugged.

Well, yes of course, one must not use it blindly or measure "halves" so
literally.  The point is that Jerome's 5000 lines of code in 24 libraries is not
an obstacle but should rather be an inducement to using binary search.

And yes of course, nothing prohibits adding a little knowledge and reasoning
into the mix.  If you can be fairly certain for some reason that some of the
loaded code cannot be the culprit, then leave it out of the search space.  (But
as we all know, sometimes what we think is certain is not.)

FWIW - The code that I load in my own Emacs setup is far beyond Jerome's 5000
lines and 24 Lisp files.  And yes, I try to think before (and during)
binary-searching, to narrow the search space.  I nevertheless surprise myself
periodically by the weakness of my thinking and the strength of binary search.
YMMV.




  reply	other threads:[~2012-03-31 16:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-31 15:44 Copy/paste issue Silvio Levy
2012-03-31 16:03 ` Drew Adams [this message]
2012-03-31 16:15 ` Peter Dyballa
     [not found] ` <mailman.205.1333209850.20052.help-gnu-emacs@gnu.org>
2012-05-07  4:46   ` David Combs
2012-05-07  6:09     ` Vladimir Murzin
  -- strict thread matches above, loose matches on Subject: below --
2012-03-31  8:46 "Jérôme M. Berger"
2012-03-31  8:51 ` "Jérôme M. Berger"
2012-03-31  9:49   ` Peter Dyballa
2012-03-31 10:24     ` "Jérôme M. Berger"
2012-03-31 10:34   ` Eli Zaretskii
2012-03-31 13:47 ` XeCycle
2012-03-31 15:14   ` Drew Adams
2012-04-01  7:59   ` "Jérôme M. Berger"
     [not found] ` <mailman.189.1333201685.20052.help-gnu-emacs@gnu.org>
2012-05-07  4:19   ` David Combs
2012-05-07  6:27     ` Drew Adams
2012-05-07  7:52     ` Yaoyuan
     [not found]     ` <mailman.730.1336372071.855.help-gnu-emacs@gnu.org>
2012-05-29  1:36       ` David Combs
     [not found]     ` <mailman.731.1336377127.855.help-gnu-emacs@gnu.org>
2012-05-29  1:40       ` David Combs
2012-05-29 13:53         ` Barry Margolin

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=3D650C3DE8AA48B295938542E346EB72@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=levy@msri.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.