Blog

Archive for the ‘Tips’ Category

Open Code Files with Understand

Tuesday, August 10th, 2010

As of build 523, the .udb extension on Windows is associated with Understand and when a .udb file is double clicked it will open the Understand Project. Some users have asked for similar functionality with code files. In the past if you setup Understand to open a code file, by default it would open a new instance of Understand. As of build 525 it will open up in the existing instance of Understand instead of a new one. Keep reading for instructions on registering Understand to open code files.

(more…)

Share Your Project

Friday, June 11th, 2010

Use the Project Portability button (Project->Configure Project->Files) to make your project sharable/portable.

More details

UML Class Diagram

Tuesday, June 8th, 2010

We’ve developed a UML Class Diagram for Understand. You can grab it from the plugins page.

image

Edit Companion File with Ctrl + Apostrophe

Thursday, June 3rd, 2010

As of build 516 If you are editing a code file you can quickly switch to the corresponding header file and back again with Ctrl+’ (apostrophe).

Code Refactoring

Tuesday, April 6th, 2010

Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a ‘refactoring’) does little, but a sequence of transformations can produce a significant restructuring. Since each refactoring is small, it’s less likely to go wrong. The system is also kept fully working after each small refactoring, reducing the chances that a system can get seriously broken during the restructuring.  — Martin Fowler  http://www.refactoring.com/

In other words, refactoring is making your code cleaner, safer, and easier to use. Understand can be a very powerful tool in your re-factoring arsenal. Here are a few ways you can use Understand in your refactoring process.

(more…)

Line and Statement Counting Metrics

Monday, March 22nd, 2010

Understand has many different metrics, including a large number that focus on counting the number of statements and lines of code, including Lines of Code (LOC or SLOC), Lines with Comments (CLOC), empty lines (BLOC), Number of Statements, Number of Executable Statements, etc.

The short C/C++ example below shows how each line and statement contribute to these metrics in Understand. You can view the larger version here.

 

2.5 Upgrade Free if Maintenance Current

Monday, March 15th, 2010

image

We have made a lot of changes to the licensing in Understand 2.5. How does this affect you?

  1. These changes require a new license key.
  2. All Understand features are now available to all users

As always, as long as your maintenance is up-to-date, there is no cost for the new version of Understand, we just need to generate a new license for you. The dialog that pops up when you start Understand has three options for getting that new license, whichever you choose, we will get the license to you quickly and without any hassle.

What if your maintenance is not current? You can still use any of these options, and we will get you a quote for getting back up-to-date. Also, the 2.5 install does not overwrite your previous version, so you can continue to use Understand 2.0 with your previous license.

(more…)

GDB and Understand

Tuesday, December 30th, 2008

About 1/2 our engineers program on Linux. A couple use the Mac. And the rest use Windows.

On Linux and the Mac it is quite common to have command line GDB session in use for debugging and to need to inspect or walk a call stack from the “where” command.  It is a bit of a pain to have these separated from Understand. And we may (if we can figure out the Windows side) add debugging support directly into Understand, but until here is a tip that makes working with GDB a bit easier.

With B465 you paste any text into a command result window (get one by choosing “Options->Run a command”).  Once pasted, we analyze it for file, line and entity names and it becomes clickable for Understand events and menus.

Here is a GDB call stack pasted in:

 Gdb_

Files and lines are identified so I can visit them in Understand, or right click and get information and graphs.

Also, with B465 we have made file detection much smarter. It will recognize short, relative and full path names and associate line numbers with them in any fashion a compiler or other tool can think to spit them out.

 

Yes! Searching in Graphs

Tuesday, December 30th, 2008

Searching in graphs has been on my Understand wish list since we first added graphs – 10 years ago!

So I’m quite happy to report that Understand 2.0 Build 466 has searching in graphs. To search in a graph just hit the binocular button and enter in the search text. It is incremental. As you type, it matches. Hit return to move to the next, or use the green arrows. The graph will center to the next match. Searches will find on node labels and edge labels (if the graph has them).

Here I search a large call tree for “inflate”:

31 2008-12-30 13.51

 

Tip – Beautify your code

Thursday, November 6th, 2008

Your code is beautiful, formatted to your liking and spaced just how you want it, but sometimes you have to work with other people’s code – yuck! If only there was something that would make it look like your code, instead of spaghetti. Artistic Style, or astyle as it is also known, is a great open source application that does exactly that.

So you can quickly turn this:

image

Into this:

image

We plan on implementing astyle into the editor at some point in the future, but I’m not so patient, and I decided to use our plugin mechanism to do it now, and will show you how.

(more…)