Understand 2.0: June 2008 Archives

Note: All screen shots are thumbnails. Click to see them bigger.

Have you ever stared at two pieces of similar code, one that worked and one that didn't, and tried to sort out "what the heck is different"?   Or perhaps you are considering merging two functions into one. This is a differencing problem, but not of two versions of the same file.   Fortunately, Understand 2.0 provides two ways to help with this:

  • Arbitrary Text Differencing - this provides two text buffers. Paste into each, do a diff.
  • Entity Comparison - select two separate entities and compare them.

I'll show examples of each.

A frequently requested item for our 1.4 editor was the ability to select blocks.

2.0 has it – just use the “Alt” modifier when selecting. 

Here I select a block:

2008-06-18 11.28

Ctrl-X, Ctrl-Y, and other selection commands work on block selections. For instance using “Ctrl  .”  I comment it out:

2008-06-18 11.31

Other planned features are sorting and sending selections through internal editor macros or external text processing scripts. They aren’t far off, we just have to get done with some localization changes for international versions of Understand 2.0

 

Metrics Overview

Before covering the detailed metrics for B448 I figured a bit of an overview on Understand 2.0 metrics would be useful.

Project vs Change Metrics

There are two basic kinds of metrics that we provide in Understand 2.0.   The first is Project Metrics, which give a static view of a particular point in time.  Examples of this are CountLine and CyclomaticUnderstand 2.0 computes and presents the value of these metrics for any snapshot in the database.  

The second kind is Change Metrics. These show differences between snapshots. The differences can be static - i.e. comparing Cyclomatic from B448 to Cyclomatic in B447. Or it can be dynamic, for instance showing lines deleted (calculated by looking at diffs).

How are Snapshots Made?

You can make a snapshot in three easy ways. First, make one from the current database. Second, make one from an alternate source location where you checked out another version of your source code, and third you can make one from any point in time using TrackBack (after version B443).  All these are done from the Change->Snapshot Manager menu.

Build 448 Metrics

After making a snapshot for B448, the Snapshot Manager showed me this basic information about each recent snapshot:

2008-06-18 01.27

Probably the most welcome improvement in this weeks B447 build is the release of significant improvements in our auto-completion facility in the Understand 2.0 editor.

The improvements are:

  • It exists.
    It sort of did before but you had to hit ESC and it was just offering up a dumb lexical scan of the open file.
  • It is fast.
    It quickly offers options as you type. If you find that irritating you can turn of the auto part in the Editor options dialog.
  • It has key bindings. If you turn off automatic completion then get a completion offering via ESC and CTRL-SPACE.
  • It is smarter. The completion list is based on the parse scope to that point plus what you have typed. It is aware of members and data fields (as appropriate to the language you are editing).

    2008-06-12 21.35

    2008-06-12 21.36

You, the user, as well as our own engineering staff have been asking for a good auto-completion for a long time. And with this release we feel it finally matches or exceeds the capabilities of some of the other popular IDEs.  It won’t stop here. We have plans to improve it in a variety of ways, including the use of code templates so you can tab between parameters and variables needed by the code brought in by the completion.

Your feedback and suggestions are welcome. support@scitools.com

 

(Build b447) - 10 Jun 2008

Change

  • Add a new way of searching for changed entities when comparing snapshots. In addition to the tree used to display the entities, there is now a list -- similar to the Entity Filter or Locator windows in Understand.
  • Added date column to change comparison list view
  • Added new columns to Change Locater

I’m writing this post using data and charts directly made by the the new “Metrics” menu of Understand 2.0.  It provides metrics browsing and charts directly inside of Understand 2.0.    How does this differ from our upcoming Measure tool?  Primarily in scope and flexibility. With Measure you can custom design charts and comparisons and automatically report them, plus a few zillion other things.  But the new “Metrics” menu provides quite a bit of useful information with pretty much zero learning curve.

B447

I made a snapshot. This told me this basic information about B447 versus B446:

2008-06-11 23.40

1,719 classes in B447, while 1487 were in B446.  We’ve been busy (-:

Here is an Understand 2.0 generated chart of the line volume information for B447:

B447

Maintenance Estimation

Has your boss ever dropped by and asked “How hard would it be to add X functionality”, or “What’s involved in fixing that bug in Y”?    Some call this activity “Software Estimation”, others “Change Scoping”, and still others “SWAG” (sophisticated wild assed guessing).   Since we are focused on tools for software maintenance, we call it “Maintenance Estimation”.

Understand has been used to assist in Maintenance Estimation since we first offered it.  This traditionally involved collecting metrics of the code involved, identifying and comprehending dependencies (call tree usually), and mashing it all together into an informed estimate.  Enough customers told us of how they used Understand in that role that we decided that 2.0 should have features directly supporting it. 

And thus the new “Estimate” menu was born.  “Estimate” helps engineers prepare, measure and assess plans for software modifications and enhancements.  It is focused on supporting scoping of changes to existing code.  It supports specifying new code to be hooked into existing code. 

The “Estimate” menu inside Understand 2.0 offers personal Maintenance Estimation by a single engineer.  A tool we will release later this year, tenatively called “Impact”, permits combined multi-user estimation that can integrate plans and estimates from multiple engineers planning maintenance on the same body of source code.

Build 447 will contain the first public release of the “Estimate” feature of 2.0.    It is brand new and we release it more for comments/suggestions than for you to do large amounts of estimating work with.  We wanted to get some early feedback so we could have time to respond to it as we finalize other features in the tool.

So please give it a try. I’ll go over the concepts below the fold.  Your feedback is very welcome.

We use SVN for configuration management here at Scitools. 

Here is a user tool import file that you can use to put SVN to work in your Understand 2.0 setup.  It assumes SVN is installed in c:\program files\ but you can use find/replace to substitute your path.

File Attachment: stitools.ini (10 KB) - User Tool Import File

After saving the file, import the tools via the Tools->Configure User Tools dialog.

You will then have right click menu “User Tools->SVN” on any right click of a file or entity that is within a file.

2008-06-05 13.41