Blog

Archive for May, 2008

Fast Keyboard Based Document Navigation (using the Navigator)

Wednesday, May 14th, 2008

As I walk around meeting with our engineers, I notice they will frequently have dozens of files open in Understand’s GUI.   They use the “Navigator” to move quickly between them. 

To launch the Navigator choose “Window->Navigator”, or use Ctrl-Tab or Ctrl-Shift-TabCtrl-Tab automatically moves you to the next tabbed document of the same type (e.g. editor, graph). Ctrl-Shift-Tab moves you to the left next document of the same type.

2008-05-14 22.27

(more…)

Handling extensionless C++ header files

Tuesday, May 13th, 2008

It has become vogue in recent times to use extensionless header files. I think it started with the STL library and spread, like a virus, from there.   Oops… sorry to inject my personal opinon there. Suffice to say, I think they are a bad idea.

But they are a reality and we have to deal with them.  In fact, we have hundreds of them in our own source tree, courtesy our use of Qt for GUI portability.

As a teaching example, I setup an Understand 2.0 project file that includes the Qt include tree.  I added a “Makefile” to it for example – it wasn’t really there to start with.  But it does highlight the problem and gives a clue as to why I, a static analysis tool vendor, don’t like extensionless header files…. How are we supposed to tell Makefile, or Todo, or Readme from QString.  Sure we could analyze them to see what was in them, but that is a pain and error prone.

But there is a way, and here is how.

First off, when adding a directory I have to have an additional file filter of *:

2008-05-16 07.32

This places them in the Project, but as un-parsed files:

2008-05-13 20.432008-05-13 20.46

(more…)

Welcome back Find & Replace

Tuesday, May 13th, 2008

You might have noticed that prior to Build 445, Understand 2.0 didn’t have Find and Replace functionality.  This was one of the reasons we have left it in beta status.

In this week’s Build 445 we released find/replace into a shipping build. So I thought it appropriate to blog about how it works.

You will find it under Search->Replace in Files

The “find” part of “find and replace”  works exactly like “Find in Files”.

2008-05-13 13.12

(more…)

Using Understand with an external editor – SlickEdit

Wednesday, May 7th, 2008

With Understand 2.0 we’ve made a lot of improvements to our source editor, and we will continue to improve it. However, we know that sometimes you’ve used an editor for so long that there is no way you could leave it. For that reason, Understand allows you to run with any external editor. One of our customers asked about SlickEdit today, so that’s what I am going to show, but the same steps apply for any other editor.

(more…)

Efficient Informal Code Reviews

Tuesday, May 6th, 2008

Mark F., the lead engineer for our upcoming Measure tool, had an informal code review with our lead architect Jim B. this afternoon.  The purpose was to review the parts of Measure that will be built-in to Understand 2.0.

These reviews are basically what we do before we check in code that will likely be in the next build. Jim is looking for integration/impact issues in areas Mark might not have visibility into.

But what to check?   We don’t review each line of code. That takes too long and it doesn’t yield good quality returns on the investment of time.   Instead we look at edges – where does the new code touch old code, what interfaces change, what dependencies are affected, what new dependencies were created.

Mark first showed Jim this graph (that he made using Measure):

MeasureLibraryVolume

(more…)

Confused Includes

Tuesday, May 6th, 2008

I sometimes end up talking with folks that seem to have duplicate items in the entity filter. In this case the function osTime appears twice in the function list.

(more…)

Understand 2.0 – using only the right pane in the diff view

Friday, May 2nd, 2008

I keep a general watch on what is changing so I know where features are schedule wise, what engineers are working on, and also so I can spot check for appropriate solutions to some of our thornier problems (no bubble sorts please!).   I usually do this by doing a compare of my current source tree against a snapshot of the last public build. I then organize it by staff.

Here is the typical two pane diff view:

2008-05-02 22.11

Trouble is, I’m traveling and my laptop has a small screen. Notice how the rightpane text is cut off?  Also, when I look at diffs I’m usually just looking at the right side. Fortunately, Understand 2.0 has a way to show just the right side, see all the text and make efficient use of my smaller screen. Just hit the 2008-05-02 22.13 button and you will see only the right side.

(more…)

Understand 2.0 – comparing entities & arbritrary text

Friday, May 2nd, 2008

One common task when maintaining software is looking at routines that are close copies of one another. Close… but not quite the same.  You might do this in refactoring or just in looking at a section of a routine that is doing what you want, and is working right, while what you wrote isn’t.

Understand 2.0 adds two new features in to directly address this dilemma:

  • Comparing entities – pick any two entities and textually compare them
  • Comparing arbritray text – paste in any text, compare them

(more…)