Reading Code: So Easy, it feels magic!

You have been just told to look at code you didn’t write?
Worst, it’s in some old language? (while 80’s music is cool, their coding isn’t your thing…)
The guy you wrote it is “long” gone! (Lucky him!)
Feel like you got the sour end of the stick…
It’s Friday night… What can you do?

Well, it’s your lucky day! We do this all the time and we are going to help!

We are giving you our magic potion.

In 15 min (no more!), you will be able to know all there is about that code!

Guaranteed !!!

What happens next?

You download and install our magic tool
– 5 min –

You select where your code is on your hard drive
– 3 min –

You run the analysis
– 2 min –

You run through 5 examples
– 5 min –

What's the catch?

No Catch! We give you a magic potion for 15 days and for FREE (*)

EVEN IF YOU DON’T KNOW HOW TO BUILD THE PROJECT YOU WILL GET RESULTS

(*) You get an evaluation of the tools for 15 days. It should be all the time you need to understand your project. After 15 days, your evaluation will expire and you will need to get an extension or buy the product. Reach out if you have questions.

“If it’s FREE, usually you are the product”

ANOTHER GUARANTEE: NOT HERE !!

We so believe you will like what you see that we will let you contact us if you need help.

We won’t bug you!

BTW, we also don’t like to get contacted when we download something. One of our friends cracked us up when he wrote this article on LinkedIN about unsolicited sales speech… Want to laugh? read it: Click Here to read Mike’s blog entry.

What will I be able to do?

You will get an overview of your project:

What are the big files and what are the complex ones? In one quick look, you can see which files are big (they are just big squares) and which files are most complex (they show up in dark blue)…

Get an overall graph of all the classes and their dependencies.

Fair enough, that may not be that much of a Wow!… but we’ll do this without even compiling the code…

See who calls who:

Who calls a function and who does it call.

Browse the code like if it was a webpage!

  • Click!
  • Jump To Definition!
  • Go Back!
  • Bookmark!

Simple!

Get an overall graph of the project and its internal dependencies:

A Graph will show you what folders/files depend on what folders/files and why?

Create a tree to see what’s going on in a function.

Investigate the flow of a function: Get immediate visual understanding of the code!

PREFER TO DOWNLOAD THE INSTRUCTIONS?
Download the .pdf here.

STEP 1. Download what you need!

Download and Install the code analyzer on our partner web site.

STEP 2. Get your project Ready

Make sure you have all your project source files ready.

Let’s assume they are all in a directory named -MY_DIR-.

You don’t need the makefile: We don’t use them. You only need the source code.

  1. Open the new tool that was installed. It’s called “Understand”! (Understand with Understand, get it :)?)
  2. Run File >> New >> Project
  3. Chose -MY_DIR- as a directory and a name for your project, hit “Next
  4. Select the language you want. If you are using C or C++, use Fuzzy if your code is more than 5 year old, and use Strict if it is more recent…, hit “Next
  5. Select “Add Source Files and Directories Manually”, hit “Next
  6. Now with the “Add Directory” button, add the directory that contains your code. Yes, you can include the whole -MY_DIR-, but I do prefer to include the 1st level directories one by one, making sure not to include any test or unit test directories. They have a tendency to redefine functions or objects for test purposes… Once done, hit “Next
  7. Select “Begin Analyzing Project Sources…”, hit “Finish
  8. Analysis is being done… lot of warning, errors, …etc… well, it’s no big deal, we are just trying to get an idea of what the code look like. Even if our analysis is not perfect, trust me you are light years ahead!

OPTIONAL: Browse the code like if it was the Web!

OPTIONAL: What are the big files? What are the complex files?

An overview of what files are the big ones and the complex ones

  • Select Metrics >> Metrics TreeMap
  • Select Maps metrics for “File
  • Group by “Directory Structure
  • Map Size to “CountLine” (the bigger the square, the bigger the file)
  • Map Color to “SumCyclomatic” (the color will change with complexity)
  • Hit “Generate TreeMap

OPTIONAL: Graphical View of a function flow

  • Choose a function in the Entity Filter (Big list on the left): Note that you can filter by types by setting the “Show” box to “Functions” in the Entity Filter
  • Right-click on the function and click Graphical View >> Control Flow
  • You now see what’s going in the function.

 

OPTIONAL: Who calls what?

  • Choose a function in the Entity Filter (Big list on the left): Note that you can filter by types by setting the “Show” box to “Functions” in the Entity Filter
  • Right-click on the function and click Graphical View >> Butterfly
  • You now see who calls it and who it calls

 

Want to see more depth? Easy: Right click in the grey area and change “Call Depth” or “Callby Depth”

OPTIONAL: Getting a list of all the classes/structures

Select Graph>>Project Graphs>>UML Class Diagram

If the project is “Big”, it may take a while… if it’s too big here is what I do:

  • Right click in the “Grey Area” (not on the classes)
  • Select the Options “Show Class Details” and set it to “Off
  • Select the Options “Layout” and set it “Vertical
  • Optionally, select the Options “Show Solo Class” and set it to “Off
  • Look better, doesn’t it?

OPTIONAL: Getting an overall view of dependencies

Select Graph >> Dependencies Graph >> By Directory Structure

If the project is “Big”, it may take a while… the graph actually shows ALL the relationship in your project…

If it’s too big or looks like a “useless & gigantic snow flake”, don’t panic!!! There are 3 things you can do:

  • you can hide things with this icon
  • you can select to show only the include/import relation
  • you can come to the seminar and I will show you how to use Architecture

Give us FEEDBACK !!!! Positive or Negative!

Feedback:

NOT SO FAST!

CAN I SEE A DEMO?

Yes! And we suggest all of you come to our FREE 1-Hour “Get Started Seminar”. More Information can be found here.

Free Seminar – Click Me!

WANT TO LEARN MORE?

Yes! And we suggest all of you come to our FREE 1-Hour “Get Started Seminar”. More Information can be found here.

Free Seminar – Click Me!

WANT AN EXTENSION?

15 days wasn’t enough?

Please Contact Us and We’ll be in touch.

Your Name:
Your Email:
Your Phone:
Justification:

WANT TO GET BETTER RESULTS?

Check out our article about setting up the headers right. This is important and will improve your project accuracy.

Improving your analysis

If you use Java, look at this article

For Java Users

WANT TO BUY THE POTION (Understand)?

For you or your team?

Need help justify it (still?!?!?)

Talk to us! Email or use the contact form.

Your Name:
Your Email:
Your Phone:
Number Of User: