Sunday, October 26, 2014

Levenshtein Distance detects differences in lines of code

After chatting with a colleague Michael Mah about the finer points of code counters a couple weeks ago, I've been studying ways to detect differences between 2 lines of code for my EZ-Metrix product.
The problem is not simply to detect differences of any kind, as this could be accomplished by a simple string compare (e.g., does string A = string B?). The challenge is in deciding if the extent of the differences between the lines constitutes, in effect, a completely new line of code. In other words, at what point does the accumulation of differences between two lines of code exceed what one might characterize as 'changes' to the point where the line is considered brand new?
This research has revealed a solution called the Levenshtein Distance (LD) algorithm ( In simple terms, the LD is essentially the minimum number of character edits (adds, modifies or deletes) that it takes to change string A into string B. If applied to a code counter, this LD value could be used along with a threshold value to decide if a line of code has been modified (LD value below a threshold), or is new (LD value above a threshold).
In EZ-Metrix, I plan to implement a % threshold, which gives the user a (configurable) way to set their own difference threshold, which is relative to each line's length. This way, short and long lines get treated the same, with respect to characterizing the line as either modified or new. An EZ-Metrix user may want to choose a threshold value of, for example 75%, which would count a line as new, if the number of changed characters exceeds 75% of the number of characters in the original line. Otherwise, the line would be counted as modified.
In the near future, a new version of EZ-Metrix (v5.0) will be released, which implements LD, among other improvements.
I'm hopefully this improvement will be embraced by the industry.

Monday, September 1, 2014

EZ-Metrix for Windows?

After 6 years in the field, EZ-Metrix v4.1 has produced many comments from over 500 users. Now, finally we're considering taking action on these comments.
What's on the drawing board? A version of EZ-Metrix for Windows.
This "v5.0" will incorporate many of the features our users have been asking for:
1. Run locally, with no need to connect to the internet to measure source code.
2. Support more programming languages.
3. Support languages with complex rules (e.g., PHP).
4. Ability to delete individual reports (Admin only).
5. Support languages with multiple comment delimiters (e.g., JSP).
6. Improve the difference threshold from characters to percent.
7. Repair defects in the comparison algorithms.
If you have additional requested improvements for EZ-Metrix, let us know! We'll do our best to include as many as possible.

Thursday, April 5, 2012

EZ-Metrix measures Google's Go language

Several news stories emerged recently about Google's programming language called Go. Although Go has been around since 2007, it has gained credibility recently because of it's fast compilation, automatic semicolon insertion, multi-core CPU support and relatively simple syntax.

According to Wikipedia: "Go is a compiled, garbage-collected, concurrent programming language developed by Google Inc. The initial design of Go was started in September 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. Go was officially announced in November 2009. In May 2010, Rob Pike publicly stated that Go was being used "for real stuff" at Google. Go's "gc" compiler targets theLinux, Mac OS X, FreeBSD, OpenBSD and Microsoft Windows operating systems and the i386, AMD64, and ARM processor architectures."

Hello World sample code:
package main   
import "fmt" //text formatting package   
func main() {         
 fmt.Println("Hello, World") 

Go and EZ-Metrix:
Because the Go language specification defines both a single-line comment delimiter (//) and a multi-line comment delimiter set (/*, */), EZ-Metrix has no trouble measuring the size of Go source code.

If you're using Go on your next programming assignment (or inherited someone else's Go source), "Go" ahead and measure its size with EZ-Metrix. A free evaluation of EZ-Metrix is available at

Additional information about Go can be found at the official Go website:

Friday, July 29, 2011

Mil & Aero Magazine features EZ-Metrix

In a July 5, 2011 article, author John Keller lists the company that invented EZ-Metrix®, James Heires Consulting, Inc. in an article about software verification tools.

"Because code counters like EZ-Metrix are routinely used in highly analytical tasks such as software verification, it stands to reason that the Military and Aerospace industries are interested in EZ-Metrix", said President James Heires, PMP.

The full Military & Aerospace Magazine article entitled: "Mathematical proof techniques, automated requirements tracing lead trends in software verification tools" can be read in full here: (

Tuesday, July 26, 2011

EZ-Metrix now available on


You have arrived at the most powerful trial software promotion service available anywhere. Serving over 27,000 publishers, representing 35,000 products and 132 countries around the world, our product library generates over 2.5 million downloads each day. This unmatched exposure comes from powering a growing network of download distribution sites, which reaches a combined total of over 38 million unique users per month.

Monday, July 25, 2011

EZ-Metrix now available on Brothersoft

EZ-Metrix® is a source code metrics utility with a difference!

It's like a tape measure for your software... EZ Metrix Source Code Counter

With an easy Internet-based interface, multiple language support and flexible licensing features, you will be up and running in minutes with the EZ-Metrix code counter. Measure software size from virtually all text-based languages and from any platform or operating system with the same utility. Source code metrics are stored in our internal database and may be exported for further analysis. The EZ-Metrix LOC counter supports software development estimates, productivity measurement, schedule forecasting and quality analysis (CMMI, ISO).

FREE 30-day trial available at

BrotherSoft served the customers as one of the leading software download website worldwide since July 2002. Over 250,000 freeware and shareware are for free download which covers 7 channels including Windows, Mac, Mobile, etc. There are more than 10,00,000 downloads every day on our site.

Multi-language portals including Japanese, German, Russian, French, Spanish to meet the software need of Non-English speaking country customers.

Since 2008, we implemented Akamai’s Electronic Software Delivery and Dynamic Site Accelerator solution with globe servers in more than 60 countries worldwide to keep high-speed download.

Saturday, October 3, 2009

EZ-Metrix to be featured on Quality Conversations

Steve Wilson, a colleague and fellow measurement practitioner, hosts a radio program called Quality Conversations: The Global Voice of Quality. Mr. Wilson's program is available on the Blog Talk Radio website. Steve has hosted many notable experts in the quality industry in the past, and hosts a website called Quality By Design.

Now, EZ-Metrix gets the spotlight, in a show entitled EZ-Metrix: A Web-Based Code Counting Utility. Steve and I will discuss software quality, how metrics can support a software quality initiative, and why software size measurement is missing from most Fortune 500 companies' Key Performance Indicators. And finally, how EZ-Metrix can help to fill the void left by these complex industry dynamics.

This is a recorded show, and is available for immediate download here.

Looking forward to your comments, questions and quality conversations.