28

Which code comparison plugin does Stack Overflow use? Is that a custom build?

I checked out google-diff-match-patch but that isn't so friendly compared to the one Stack Overflow uses.


To clarify, I am talking about the code comparison on the website, for example:

Enter image description here

10
  • See meta.stackexchange.com/questions/10369
    – juergen d
    Jul 3, 2014 at 15:24
  • 3
    @juergend, strangely it does not appear to be listed there. Jul 3, 2014 at 15:25
  • 6
    Perhaps this will help then: meta.stackexchange.com/a/216326
    – animuson StaffMod
    Jul 3, 2014 at 16:12
  • @animuson sigh, so I think there's no plugin to do so...
    – Mr. Alien
    Jul 3, 2014 at 17:18
  • 4
    I am a bit confused at using the term "plugin", as this sounds like there is some standard software running that people also use and write and use plugins with.
    – PlasmaHH
    Jul 4, 2014 at 14:03
  • 1
    Yeah, the question in confusing because first it asks about code comparison and then goes on and gives an example of answer text comparison which is something different. Jul 4, 2014 at 20:14
  • 4
    Come on, won't SE be kind enough to open source their diff engine? :) They seem to have a very cool algorithm that can handle huge code blocks - meta.stackexchange.com/questions/127497/…
    – laurent
    Jul 4, 2014 at 20:32
  • 1
    @this.lau_ I highly doubt they would do so. A lot of questions on meta regarding how SO works either closed or without any normal answer. This is a business and no one want to share this. Jul 4, 2014 at 23:11
  • 12
    cc by-sa 3.0 applies to morons posting on this website, not to those running the site.
    – devnull
    Jul 5, 2014 at 3:51
  • 1
    @devnull That's the spirit!
    – Boann
    Jul 5, 2014 at 6:14

1 Answer 1

3

As commented by @Animuson, Stackoverflow uses in-house diff engine..

Per balpha, Stack Exchange uses an in-house diff engine based on a particular implementation of Eugene Myers' O(ND) difference algorithm, with several enhancements to support more natural diffing.

For brevity, I'll refer you to his fairly detailed post for an indepth overview.

Quoting From : What does Stack Overflow use for its community wiki edits comparison feature?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .