Ever have a file and wonder what changed? You need a diff tool!
In computing, diff is a file comparison utility that outputs the differences between two files. The program displays the changes made per line for text files.
There are diff tools available for almost any platform you can think of ranging from simple command line utilities to complex GUI based applications.
Here is a screenshot using Beyond Compare comparing my current project build file to the original one when I started the project. Red means changes occurred!
If you use Eclipse there is a diff tool built in! Right click any file and select “Compare With”. You can compare files in your local history, and if you are using source control, you can compare with previous revisions. (In the screenshot below I have a BeyondCVS plugin installed which allows me to use Beyond Compare within Eclipse).

Many tools will also let you compare not only files but directories as well. Beyond Compare can compare a local directory and a remote directory via FTP. Very handy when moving files to remote servers!
Whether you use one of the many freely available utilities or purchase one of the more advanced applications a diff tool is essential in any developers toolbox.

You May Also Enjoy Reading:
2 Comments
I’m a latecomer to the Diff party, but over the past couple of months it’s become an indispensable tool. At home I use CFEclipse, but at work I’m forced to use Dreamweaver. After some hunting I came across a portable version of WinMerge (http://cubegames.net/downloads/winmerge.php) that you can run directly from a USB drive without the need to install. Pretty handy and completely free too!
I recently started using WinMerge, which is a great Open Source Windows-based Diff/Merge program:
http://blog.pengoworks.com/ind.....-Diff-tool
I really like the ability to compare files right from Windows Explorer.