[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Copy/paste issue.

From: Drew Adams
Subject: RE: Copy/paste issue.
Date: Sat, 31 Mar 2012 09:03:54 -0700

> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]