Live data from Hacker News

DiffDebugging

martinfowler.com

11–20 of 43 posts

Re: DiffDebugging

#11
post #4

DiffDebugging is not a term I have ever heard of before, but I guess it's something I do on a regular basis. The code used to work, it doesn't now, WTF has changed?

Right, this is the common sense approach for identifying the cause of a regression. Not sure what people do other than this unless it's a very simple codebase

Re: DiffDebugging

#12
Martin, small commits interrupt flow, contain intermediary trains of thought that aren’t relevant, and decompose the entirety of the feature in to unrecognizable pieces removing all wholistic meaning.

Stop doing it.

Re: DiffDebugging

#13
post #12

Martin, small commits interrupt flow, contain intermediary trains of thought that aren’t relevant, and decompose the entirety of the feature in to unrecognizable pieces removing all wholistic meaning. Stop doing it.

But it's much easier to rebase, squash, and reorder lots of small commits than a few big ones.

Re: DiffDebugging

#14
post #5

A more generic term is "delta debugging", which has been around for a while. git bisect is one example of a tool which does it, another is Zeller's DD tool https://www.st.cs.uni-saarland.de/dd/ It's also possible to do this is a Bayesian fashion.

I'm very curious in the Bayesian approach to bisect debugging. Got a reference?

Re: DiffDebugging

#15
post #5

A more generic term is "delta debugging", which has been around for a while. git bisect is one example of a tool which does it, another is Zeller's DD tool https://www.st.cs.uni-saarland.de/dd/ It's also possible to do this is a Bayesian fashion.

dd? Isn't that a problem on UNIX systems where "dd" (the disk destroyer) is a standard command.

Re: DiffDebugging

#16
post #12

Martin, small commits interrupt flow, contain intermediary trains of thought that aren’t relevant, and decompose the entirety of the feature in to unrecognizable pieces removing all wholistic meaning. Stop doing it.

If you want a a wholistically meaningful thing to look at for the feature, look at the PR.

When you're looking for a smoking gun commit, you want it as small as possible, otherwise it'll take longer to fix.

Re: DiffDebugging

#17
post #12

Martin, small commits interrupt flow, contain intermediary trains of thought that aren’t relevant, and decompose the entirety of the feature in to unrecognizable pieces removing all wholistic meaning. Stop doing it.

> interrupt flow

sorta. this really varies strongly from person to person and i wouldn't generalize. but you can construct small commits after you're done with your work.

> contain intermediary trains of thought that aren't relevant

no. delete these, they should not be present in the final history.

> decompose the [...]

i don't know what this is supposed to mean.

Re: DiffDebugging

#18
post #12

Martin, small commits interrupt flow, contain intermediary trains of thought that aren’t relevant, and decompose the entirety of the feature in to unrecognizable pieces removing all wholistic meaning. Stop doing it.

But it's much easier to rebase, squash, and reorder lots of small commits than a few big ones.

The experience of splitting in git could be made nicer in a few ways, but yeah.

Re: DiffDebugging

#19
Note that when (other people's, surely, not yours) bad git history with unrelatedly-broken commits everywhere means you can't bisect, you can use bisect --first-parent to travel down only the first-parent history (which should be just merges to master) rather than having to laboriously figure out whether it's "bad" or "skip" this time.

If you're unfortunate enough to have an impoverished "linear history", you're stuck figuring out whether it's "bad" or "skip", sorry.

Re: DiffDebugging

#20
post #7

> I originally posted this page on 2004-06-01... Diff debugging isn't a term that's caught on much in the industry, but I haven't seen a another term generally used to describe it. I can't speak to 2004, but these days "bisect" is the standard term in my circles (even when we're not actually using git and its bisect command). It would be interesting to know whether git was the first to associate that word with this a…

Bisecting an interval has been in use in mathematics quite some time before the existence of Git. Bolzano proved (his version of) the intermediate value theorem in 1817, but it has been used in calculations for _way_ longer.
Post reply on HN