• I started this exercise because I found it intellectually interesting. It stemmed from a task for a client, but of course this extended exercise I did on my own time. Although it's easy enough to take something like Windiff (which is usually included with Visual Studio), and view a line-by-line comparison of two sequences (in this case lines of code in a stored procedure), I also wanted some sort of quantifiable measure of comparison (e.g., the ability to say that these two sprocs are 87% the same). But more than anything, I was just curious about how such a process works.

    That being said, this code could form the basis for a whole host of problems. For example, if you wanted to compare term papers submitted by college students to determine who is cheating, this code could be used for such a purpose. If you attacked the problem using a text comparer (like Windiff), you might have to look at every paper against every other paper (across the history of the class). But a process such as mine would allow you to narrow down the necessary manual comparisons. You could examine only papers with at least 3 matching subsequences of length 10, for example.