Diff Tool Exercise

Happy Christmas 2020!

Diff is good for doing comparisons of things which are almost, but not quite, the same. It’s best on text things, though there are variants which work on pictures. It’s not a lot of use for binaries (though if you know tricks, teach me).

You’ll use a diff tool on any text thing longer than a paragraph. Even a paragraph, sometimes. You’ll use it when you have two versions - or when you suspect you have two versions rather than two copies. You’ll find differences due to direct action by a person, by generators, by tools, by time, and by corruption. And more.

Diff tools tell you when a line has changed. Many don’t tell you how a line has changed. None tell you if the information still makes sense. You already know diff. You’ve seen tools like it in Word and other collaborative writing environments. You’ve seen it in GitHub and other collaborative coding environments.

In this exercise, you’ll use any diff tool that seems right to you.

This exercise is more fun in a group. If you’re in a group, please talk about what tool you’ve chosen, and why you chose it. Perhaps re-run the exercise with someone else’s tool of choice, or with someone else.

These exercises currently use an xml schema. Clearly, one can use diff tools on more. Should I write more of this exercise? Which of these media should I use?

Would you help? Let me know.


Let’s be clear about this: download the linked files, use them in a tool. If you’re opening the file in a browser, finding out what an xmlschema is, and reading through it, you’re doing it …differently from how I’d expect you to do it.

If you’re going command-line, the choice of option on your command line is up to you. You’re old enough to hold your own hand.


Once you’ve tried the exercises, go have a look at the solutions.

Example tools

There are loads of diff tools. Some very command-line, some more visually-friendly. For context, here’s Wikipedia

Here are a couple of web-based tools. DiffChecker. LineDiff.

Here’s a (commercial) list of common dif tools for Windows and more Dif Tools on Mac. Unix / Linux has diff. Windows has meld and kDiff3, my Mac has DeltaWalker and FileMerge. Both platforms have Beyond Compare.