PrestoSoft Blog :: Home

Saturday, December 04, 2021

ExamDiff Pro 13.0: Improved Table Comparison

Among the new features coming to ExamDiff Pro 13.0 is improved support for comparing tabular data - that is, files that are delimited by commas, tabs, or other characters.

If you're a regular reader of our blog, you'll recall that you can already compare tabular data in ExamDiff Pro, by using a custom plugin to sort columns and the Ignore Column Ranges option to ignore unwanted columns.

ExamDiff Pro 13.0 builds on this functionality and introduces a brand-new Table Comparison mode, with built-in functionality to sort and ignore columns and the ability to differentiate columns by color to better view tabular data.

Let's try it out, using the same CSV files as in the previous blog post on table comparison.

Comparing these files as plain-old text files with no special options gives us the same mess that we ran into last time:

But let's see what happens if we switch to Table Comparison mode.

Actually, before we do that, let's set the table comparison options that we need. We want to sort these files by their first column (BusinessEntityID) and ignore the 5th column (ModifiedDate). So, we go to the new Table Comparison options panel and enable Sort Columns for column 1 and Ignore Columns for column 5:

Now, armed with our desired table comparison options, we switch to Table Comparison mode from Files | Compare As:

Wow, very nice! Not only does Table Comparison mode put all of these features in one convenient place, without the need for any plugins, but it also provides a nice coloring scheme, so we can easily see what column each cell belongs to. (This coloring can be disabled in the same Table Comparison options panel, and is always superceded by diff colors within diff blocks.)

What's more, we aren't limited to comma-separated files anymore! By default, Table Comparison works on CSV (comma-separated) and TSV (tab-separated) files, but you can define any tabular file type with any delimiters that you want, in the Table file types section of the Table Comparison options panel:

File types that are registered as "Table file types" will be compared in Table Comparison mode by default. You can also choose which mode to compare them in from the Compare Dialog by clicking on the new Compare drop-down mode selector button:

And since Table Comparison is treated as a separate comparison mode, just like Text and Binary Comparison, you can easily toggle these table comparison features on and off, simply by switching between Table and Text comparison modes.

Labels: , ,

Thursday, December 02, 2021

ExamDiff Pro 13.0: Scope Bar

ExamDiff Pro 13.0 will introduce an exciting and long-awaited new feature: the ability to navigate through classes, functions, and other code blocks, via a new scope bar.

This feature is powered by the open-source TreeSitter library, and will be available for all major programming language doctypes defined in ExamDiff Pro, including C++, C#, Java, JavaScript, and more.

As an example, let's compare two C# files:

When we navigate inside a class or function, the new scope bar control at the top of the diff pane displays where we are, through a series of "breadcrumbs".

Clicking on a breadcrumb opens a nested scope explorer. Scopes that are different (added, changed, or removed) between the two files are highlighted in bold. We can click on any of the scope names here to jump to the corresponding part of the file:

The scope bar automatically updates itself whenever the file changes. For example, we can rename this property, and the scope bar quickly changes to reflect this:

You can control visibility of scope bars by using the View | Scope Bars menu command:

Note that the scope bars will only appear for document types supported by the scope parser (this includes most built-in doctypes in the Document Types options dialog). If a file extension isn't recognized by default, you can use the Set Document Type feature manually to enable all doctype-related features (scope bar, syntax highlighting, etc).

For example, in the screenshot below, the JavaScript files being merged wouldn't be recognized as JavaScript by default because they do not have the expected *.js file extension. But after clicking Set Document Type | JavaScript in one pane's context menu, we override the doctype for all panes to be JavaScript, causing scope bars (as well as syntax highlighting) to appear everywhere:

This new scope bar functionality will make navigating through source code easier than ever in ExamDiff Pro.

Labels: , ,

Wednesday, July 21, 2021

ExamDiff Pro 12.0 Released

We are pleased to announce that we've released ExamDiff Pro 12.0.

Here's what's new in this version:
You can find more details about ExamDiff Pro 12.0, as well as a download link, here, and the complete list of changes here.

Labels: , ,

Wednesday, May 05, 2021

Comparing Tables with ExamDiff Pro

Did you know that you can use ExamDiff Pro to compare tabular data? Let's take a look at an example.

Let's say that I want to compare two comma-separated files that represent tabular data dumps from a database. The data came form the same table but it was sorted differently when each CSV file was created. The two sample files are available here. Our first attempt to compare these files with ExamDiff Pro is not very useful (click the images to enlarge):

There are too many differences shown, because the two files have been sorted differently. Fortunately, we can use a plug-in to sort the data by its primary key, in this case by the first column. We are going to use the xsv command line tool, which, among its other features, can sort CSV files by a given column.

To set up xsv as an ExamDiff Pro plug-in, download the latest version here, unzip it, and then set it up in ExamDiff Pro as follows (with the appropriate path to xsv.exe in the Application line):

Note the syntax: sort -s 1 -N. The -s 1 flag specifies that the we want to sort the data by the first column, and the -N flag indicates that it to be treated as numeric data. The results of using this plug-in are better but still not that useful:

The problem is the ModifiedDate column: it's completely different between these files, and that causes each row to be marked as a changed line. What if we don't care about this column? In this case, let's ignore it in the Options:

After clicking OK here's what we get:

Now this is something we can definitely use!


Sunday, February 14, 2021

ExamDiff Pro 12.0 Beta!

We are pleased to announce a public beta program for ExamDiff Pro 12.0.
You can download ExamDiff Pro 12.0 Beta for 32-bit Windows and for 64-bit Windows. The upgrade is free for all users who purchased ExamDiff Pro less than 12 months before this release (or more, depending on the number of maintenance years purchased).

Here's what's new in ExamDiff Pro 12.0 (as compared to 11.0):

New and Improved Diff Algorithms

ExamDiff Pro 12.0 features the biggest overhaul to the core diff algorithm in over a decade, with the addition of diff algorithm customization options and diff block alignment optimization, which positions diff blocks in a more intuitive way to make the differences clearer to see.

For more information, see our blog entry about the new and improved diff algorithms.

Ability to Ignore Columns in Tab/Comma-Separated Files

ExamDiff Pro 12.0 introduces a powerful new tool for comparing CSV and TSV files: the ability to ignore columns or column ranges as specified by delimiter characters (such as commas or tabs).

For more information, see our blog entry about ignoring columns in tab/comma-separated files.

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: an improved dark theme, light/dark theme auto-detection, the ability to search for specific messages in the Options panel, and more.

For more information, see our blog entry about usability improvements in version 12.0.

Other Additions In ExamDiff Pro 12.0

Labels: , ,