PrestoSoft Blog :: Home

Thursday, December 31, 2020

ExamDiff Pro 12.0: Improved Dark Theme and Other Usability Improvements

ExamDiff Pro 12.0 will bring in a set of usability improvements to make your diffing experience as user-friendly as possible.

First off, the dark theme first introduced in ExamDiff Pro 11.0 is getting a facelift. To illustrate it, take a look at the below comparison of dark mode in EDP 11.0 (on left) vs EDP 12.0 (on right):

As you can see, scroll bars are now styled according to the theme, and some other controls such as the diff combo bar at the top are styled a little better as well.

If you find yourself switching between light and dark mode in Windows, you'll appreciate the new View | Themes | Detect Automatically option, which switches ExamDiff Pro's theme automatically based on the Windows default app mode:

For example, now I can set the Windows default app mode to Light:

and ExamDiff Pro immediately switches back to the default light theme:

In addition to dark theme improvements, ExamDiff Pro 12.0 also adds the ability to search for specific messages in the Misc | Messages options panel using the same search interface as for other options. For example, if we want to disable the "Comparison too slow?" message, we can now just type in "comparison too slow" in the search field and we can easily find the desired message:

Last but not least, based on user requests, we're adding a View | Toolbar | Customize ... menu command that opens the toolbar customization dialog (which is also accessible through the Add or Remove Buttons | Customize ... context menu in the toolbars):

Labels: , ,

Wednesday, December 30, 2020

ExamDiff Pro 12.0: Ability to Ignore Columns in Tab/Comma-Separated Files

ExamDiff Pro 12.0 will introduce a powerful new tool for comparing comma- or tab-delimited tables. Let's take a look at how it works.

Let's say that I'm comparing two tab-separated files, in this case the employee roster of a fictional company at two points in time (click the images to enlarge):

Unfortunately these comparison results aren't very helpful because there's an annoying Timestamp column that is completely different between the two files, causing the whole thing to be treated as a single diff block.

That's where the new option to ignore delimited column ranges comes in handy. I go to the Text Compare options panel, enable Column ranges under Ignore parts of each line, set the ignored column range to 1 (to ignore just the 1st column), and define columns as Parts delimited by any of ,\t, meaning that either commas or tabs will be treated as column breaks:

I click OK and voila:

The pesky Timestamp field is now ignored and I'm able to clearly see the actual differences between the two tables.

In this example I used tab-separated (TSV) files, but this feature works the same way for comma-separated (CSV) files, or even files separated by delimiters of your choice. You can ignore any combination of column ranges, and even combine this feature with other Ignore options for a truly customizable table-comparison experience.

Labels: , ,

ExamDiff Pro 12.0: Apply Button in the Options Dialog

ExamDiff Pro 12.0 makes it easy to quickly test out display options with a new Apply button in the Options dialog.

Let's say we just ran a comparison and want to try out a different color scheme. We open the Display | Colors options panel and tweak some colors:

Click the Apply button to immediately apply these changes:

Oof, that actually looks hideous. We need to change it back!

Because the Apply button applies changes immediately, we can't click Cancel to undo them - the changes have already happened. Instead, let's reset with Reset To Default | Reset This Page Only and then hit Apply again, and we're back to how it was before:

The Apply button is also available in the Options | Display, Options | Display | View Filter, Options | Display | Dir Columns and Text Merge | Colors options panels, so you can easily test out all kinds of display-related options.

Labels: , ,

ExamDiff Pro 12.0: Recently Compared Files/Directories in the Main Menu

ExamDiff Pro 12.0 makes it easier than ever to re-run a recent comparison session, with the introduction of a new Recent Files/Directories sub-menu in the Files menu:

Here you can see all of your most recent comparison sessions in order of comparison, including file comparison, directory comparison, and file merge sessions, with the corresponding icons indicating what type of comparison/merge each session is. Clicking any of these sessions will re-run that comparison or merge. You can also use the Clear Recent Files/Directories command to clear this list.

You can control how many recent items are displayed in this menu with the Number of recent items in Files/Directories menu in the Global options panel:

Note that this list of recent files and directories is identical to the Recent list in the ExamDiff Pro jump list, which you can access by right-clicking the ExamDiff Pro icon in the taskbar:

Labels: , ,

Tuesday, December 29, 2020

ExamDiff Pro 12.0: New and Improved Diff Algorithms

ExamDiff Pro 12.0 will feature the biggest improvement to the core diff algorithm since fuzzy line matching was introduced in version 4.5, with the addition of diff algorithm customization options and diff block alignment optimization.

That's kind of a mouthful, so let's illustrate it with an example.

Diff Alignment Optimization

Here's an example of a comparison that was not quite ideal before:

Note that the boundary of the deleted block here is a little surprising: rather than capturing the whole comment above the deleted method, ExamDiff Pro is trying to match the initial <summary> line to the equivalent line in the next comment. It's not wrong exactly, but it looks a little weird and makes it harder to reason about what's actually happening.

To better resolve issues like this, ExamDiff Pro 12.0 introduces a new option called Optimize Diff Block Alignment in a new Diff Algorithm section of the Text Compare | Advanced settings page:

With this option turned on, ExamDiff Pro uses a new heuristic for determining the boundaries of diff blocks, based on the open-source work done in diff-slider-tools. Check out how our problem spot looks now:

Much better! The diff block now covers the whole method and comment as we would expect.

Note that there's a pink diff bar on the left, indicating that this is a moved block rather than a deleted block - ExamDiff Pro was not previously able to detect this as a moved block because its boundaries were a little off and didn't match those of the corresponding block in the other file. We can now right-click on the diff bar and click Locate Matching Moved Block to see the corresponding block in the right file:

Pretty cool: a seemingly small tweak to the diff block alignment has given us a better understanding of what's happening in this given situation.

Because the Optimize diff block alignment feature almost always leads to better-looking comparison results, it is on by default, but can always be turned off in the Text Compare | Advanced options panel.

Diff Algorithm Selection (advanced feature)

In addition to this option, there is now also the option to choose between six different diff algorithms, including the Classic (default) algorithm and Line-by-line (previously enabled by a separate Force line-by-line comparison option), as well as 4 new algorithms brought in from the LibXDiff open-source library: Myers, Minimal, Patience, and Histogram:

This feature is intended for advanced users only. In general, we have found that ExamDiff Pro's Classic algorithm (which is itself a heavily modified version of Myers) gives the best results in most situations, but it's possible that one of the alternative diff algorithms could give you better results in some cases. This paper by Nugroho, Hata, and Matsumoto gives a good overview of the Myers, Minimal, Patience, and Histogram algorithms, and this blog post by Lup Peng offers some examples of when each of these four algorithms can be helpful.

Labels: , ,