Code understanding

What is the best way to get to know the C # codebase with an approximate size of 200K LOC? Are any tools available?

http://www.program-comprehension.org/ It seems that for this purpose there is a long time.

Thanks.

+7
c # list-comprehension maintenance
source share
3 answers

CodeCity has a really nice code visualization; it uses a metaphor for a city that makes a lot of sense, and also helps highlight the smells of code.

ndepend.com is pretty good for a review.

Atomiq has a nice visualization for duplication. It analyzes your code base and visualizes it using the wheel, where duplication is represented by the spokes in the wheel, and you can hover over each to see the difference on the sides.

Nitriq has a nice LinqToCode thing for quality limits. You can run these rules from the command line as part of the build process.

ReSharper's navigation features are invaluable to find out what it uses. Find-use is very helpful. To study the code base, Alt + F7 is your friend, as it will also save the history of the queries that you launched, so you can jump back and forth in it to save your place.

Visual Studio saves a record of cursor positions / editor points and has ctrl + - and ctrl + shift + - to move the cursor back and forth between them.

You can insert notes yourself if you decide to leave a comment that is normal (for example, // NOTE: blah), and then use ReSharper TODO Explorer to find all such comments (and other templates that you could define), then go to them. For example, we use this for code reviews.

Visual Studio (at least Professional Edition) can generate a class diagram; multi-select files, and right-click, then create a class diagram. I believe that they are more useful as a scribble, as opposed to an artifact, to keep abreast of recent events and in sync with the code base, though, to be honest. He will tell you about inheritance, but he will not very clearly demonstrate the application interface, and will not even try to show the collection or compilation.

+7
source share

As @Peter Mounce points out, NDepend is good, and you can use it for free for non-commercial purposes. You get a lot of nice visualizations like dependency graphs to help you get an overview of what's going on.

Visual Studio 2010 also contains similar tools in the form of Architecture Explorer , although I think you need to add architecture (or higher) to get this. But it is interactive and allows you to delve into a structure that is useful.

+1
source share

I use SonarQube to render the code. It shows the code in various aspects and within 15-20 minutes with the SonarQube panels, you will immediately get to the main parts of the code. Not only that, it shows how much of the code is complex, and where you can attack to get quick wins to simplify the code.

+1
source share

All Articles