I <3 Steve McConnell*
Coding Horror
programming and human factors
by Jeff Atwood

Jun 28, 2004

Visual Diff Tools

I'm currently building a .NET library that constructs .MHT files, aka single file web page archives. That's what you get when you perform a File | Save As | Web Archive, Single File operation in IE6. HTML is a great, standard format for building richly formatted one-off reports, but once you start including images, it becomes a pain to manage a set of files. Thus, the utility of combining everything into a single file.

Surprisingly, instead of some crazy proprietary Microsoft format like you'd expect, the file follows the simple Multipart MIME Message RFC standard. Building an .MHT file is sort of like sending an email to yourself-- go figure. It also works in via extension in your precious Firefox, for those of you that enjoy slow rendering.

During development, I needed to reverse engineer what IE6 constructs, and use that as a comparison point for the output from my application. Unfortunately, the only file comparison tool I had access to was the crappy default "compare versions" function in Visual SourceSafe. It's workable, but it's kind of.. ghetto.

Every developer should have a good diff tool in their toolkit. After a bit of research, I settled on Araxis Merge as my preferred tool for visual comparisons.

screenshot of araxis merge

It's a pricey tool, but it's come in very handy so far. The only regret I have is that VSS doesn't allow the use of any external comparison tools, so you can't integrate Merge with Visual Studio .NET.

Anyway, if like me, the only diff tool you ever used was the one in VSS-- you may not know how much you're missing.

Posted by Jeff Atwood    View blog reactions
« Code Complete 2: The Revenge
Hungarian Wars »
Comments

Actually, VS .Net does allow you to specify external programs for doing diffs, etc. In VS.Net, go to Tools, Options, Source Control, SCC Provider, then click on the advanced button. In the resulting dialog box, click on the custom editors tab and enter your editor's information.

I, for instance, put an operation of 'File Difference', for .vb and .cs files, and set my command line arg to "C:\Program Files\WinMerge\WinMergeU.exe" %1 %2.

Enjoy con leche.

Matt

Matt W on November 3, 2006 10:03 AM

Maybe this comment is waaay to late. But my personal favorite is tortoisemerge.

It's a part of the tortoisesvn client. You can rip out all the SVN related stuff if you dont need it and it'll work fine.

you can find it at:
http://tortoisesvn.tigris.org/

Ben Blok on October 30, 2007 9:22 AM

XCode has a very nice diff visualizer. But I guess that is not your platform.

Scott M on February 3, 2009 1:59 AM

perforce's merge tool appears similar to the araxis. best part is that is is free (last i looked anyway).

scott on March 19, 2009 1:05 PM

Hi Jeff, I spent the last 4 days with evaluating diff/merge tools. There are a lot out there but very few usable when you start comparing large directories and like to integrate it with code repositories.

Then I stumbled upon DeltaWalker: a href=http://www.deltopia.com/compare-merge-sync/http://www.deltopia.com/compare-merge-sync//a">http://www.deltopia.com/compare-merge-sync//a">http://www.deltopia.com/compare-merge-sync/http://www.deltopia.com/compare-merge-sync//a

Finally suitable tool for these crappy compare jobs I have strugled with. It also works remotely via sftp and is cross platform compatible (Mac OS X, Linux and Windows) as it is based on Eclipse RCP.

Andr on April 12, 2009 4:22 AM

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Content (c) 2009 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved.