When facing new code I often spend time to figure out which classes and methods constitute core functionality in contrary to just ambient stuff. If code adheres to well known architectural design, have visible structure, descriptive names, documentation, unit tests etc. then the task is easier. However that is not always the case. Sometimes the code is just a pasta and God knows what is going on there.
I believe that there are some algorithms that could be use in order to roughly categorize code parts so that the developer can see important things in a glance without manual processing.
For example:
- In case of views and view models the tool could highlight bindings in the later so that the developer could see entry points.
- Using of methods and classes occurs at some level of invocation chain. Some methods have the opportunity to be invoked only deeply in logic (low priority). Others are invoked directly from user action handlers (high priority).
Is there a tool that will be able to filter or highlight classes and methods in Visual Studio depenging on the code importance?
It could look like the follows:
Under importance I understand here that for example the Main
method has high importance because it's a root of everything else. You can go from Main
method to any other method in the code. MethodL2
has low importance because it is just a leaf. Calculation of leaves importance should be also derived from they parents importance. I mean that an importance in this meaning is not only about the level of depth or occurencies.