|
Frequently Asked Questions and Answers:
I have seen other code outliners,
and actually Visual Studio code outliner is pretty good. So, what separate Code Summarizer from the others?
Actually, Code Summarizer is doing very
different thing than Visual Studio’s code outlining functionality. One thing important
for Code Summarizer is that it outlines code in a small tool window. You can see
overview and details at the same time. Also you can switch from bare function names
to any level of details instantly. There are Visual Studio AddIns or stand-alone
applications that extract code structures or show flow charts. First of all, our
opinion, flow charts are not quite useful. In reality, a flow chart can look more
complicated than the original code. Some tools give a hierarchical look of code
structures, but they are lack of placement information, it is hard to relate it
directly to where the code lines are. You still don’t have the big picture.
Obviously Code Summarizer is far more than a code outliner.
Just wondering why Code Summarizer is not supporting Visual Studio other versions
like 2003, 2002?
Code Summarizer was initially developed
as a standalone program. This program was mainly released to our service clients as free
program with conditions. We have received very good responses from people who have used
it. We have redeveloped this program as a VS package, and released it as a commercial
product. Visual Studio 2005 provides some nice features which is of our interest. So this
is where the decision was made to support VS 2005 only. Marketing wise, Since migrating
program from VS 2002 or 2003 to VS 2005, we don't think it is a long time before everyone adopting
VS 2005.
It seems Code Summarizer is very cheap considering the features that listed on this website?
Is this a small program? Why the price can be so low?
Well, First of all, any program in
Visual Studio package or Addin is complicated. There are a lot more technical barriers
that we have to overcome than regular program. Pricing is tricky stuff. Rule #1, don’t
make it too high, otherwise people is not going to buy it. Rule #2, don’t make it too
low, otherwise people don’t buy it either. The reason is simple. If you claim you are
selling gold, you have sell it the gold price. Nobody is buying it if you sell it at
silver price. On the other hand, you have to think about how much a regular programmer
want to spend on a programming assistant tool like this. Our approach is: at the point
programmers want to buy, we don’t want them to think twice about budget.
Is there a separate thread doing code parsing which can make Visual Studio less responsive?
No. First, Code Summarizer only works on
open documents, not the whole project. Second, Code Summarizer does not do pre-parsing.
It only parse a document when need it. Mapped document will be buffered to avoid parse
twice. You can force reparse by clicking refresh current map button. The parsing process
is very efficient. You won’t feel it for file of a couple thousand lines.
How can Code Summarizer help with code review?
If you are doing code review, or you are
fixing bugs, you need to reference different parts of the program. You put the functions
you need in collection. Then you don’t need go different places anymore. Everything you
need is in one place. You can do quick browse using tip window. Or go to Visual Studio
code window. With the collection window, you never get lost.
You have mentioned break or avoid deeply nested code blocks. Can you explain how?
Deeply nested code blocks is one of the
major reasons that code is harder to read. A lot of people don’t even think this can be
avoided. For example, in this following code,
CObject a = GetObject();
if(a)
{
if(b > 0)
{
doSomething();
}
}
can be easily wrote as:
CObject a = GetObject();
if(!a) return;
if(b <= 0) return;
doSomething();
Here we eliminated two levels of brackets. For a complicated block, this can be a big
difference. So, the point is at the beginning the function, always exclude some invalid
conditions or conditions that doesn’t need to process. Also do this anywhere in the
function. This doesn’t solve all the problem for sure. Second thing you can do is
transform big blocks into functions:
if(a)
{
bigblock1;
}
else
{
bigblock2;
}
can be easily wrote as:
if(a)
DoOneThing();
else
DoAnother();
If blocks in the new functions are still too deep, break it into functions too until
it is easy to handle. The difficulty lies in the function parameters. You need to
examine carefully how do you need to parse to the function, by value or by reference.
But this pain is just for once. You will feel good forever.
I have files like 5000 ~ 10,000 lines, they still look too long to browse through.
There are a few things you need to know.
Code Summarizer is design to help with long files, but it doesn’t mean any length.
Secondly, any file of this size should be broken into multiple files. Try to limit
your file length to 2000 lines maximum. Don’t be afraid of having more files, since
that’s much better than a file of 10,000 lines. One thing to remember when breaking
up file, if possible group functions by alphabetic order, or by functionalities.
You will feel a lot better if you do so. Event you just break a file by lines, it
still will be better than a long file. By the way, there is no risk in doing so,
since you are not changing anything. The third is, you don’t need to browse a long
file like this. You use function list, or search, or other way to find your points
of interest, then add them to collection.
I really want see the code tip window has syntax coloring feature.
I have to look closely to recognize each line, because it is not color highlighted.
Technically speaking, syntax coloring
is not hard to do in this case. We just didn’t make this higher priority. We hope it
can be added in next release.
I still don’t know what is the viewport. If click on the “show viewport” menu item,
a rectangle area is shown in transparent color and then disappears.
Can you explain more?
This feature is intended to sync the
map view with Visual Studio code window. We just want to give you an idea which area
of code you are working on in Visual Studio code window. Originally, we make it sync
in real time. Means when you scroll on code window. The viewport moves accordingly.
The problem is this movement is annoying. We disabled this feature at the end, but
we want to disable the annoying part, not whole thing. We decide to show it for three
seconds then hide it. This concept applies to caret line. See
Code Summarizer documents for details.
|