DEV Community

Discussion on: Don't let that huge codebase scare you! Tips and tools to make sense of other people's code

Collapse
 
bhupesh profile image
Bhupesh Varshney ๐Ÿ‘พ • Edited

Is there any advice you would give
If there is no kind of Documentation available not even readme ๐Ÿคฏ๐Ÿ˜ช

Collapse
 
ssimontis profile image
Scott Simontis

Static analysis tools can be a huge help. You can get a pretty good idea of where most of the code is being tied together via dependencies, which files are most volatile (# of commits vs lines of file), easily reformat things to your preferred style, and generate dependency diagrams. I have been using Jetbrains Resharper for years as a C# developer and recently used NDepend on an architectural assessment, where it was a huge help.

Collapse
 
hatsrumandcode profile image
Chris Mathurin

ReSharper and NDepends are both great tools! I would recommend a tool like ReSharper to every Devs. It's also a great way to learn about best practices and enforce standards.

Thread Thread
 
ssimontis profile image
Scott Simontis

My only complaint with ReSharper (besides resource usage, but that's largely on Microsoft for VS still being a 32-bit app) is the amount of options available. You can spend hours trying to get your coding style set up, and the documentation explaining what some of the options are or why they matter is pretty poor. I wish they had some presets that would let you start off with a common coding style instead of having to tinker around so much.

I feel like there is so much more ReSharper can do that I don't know about, but their documentation seems to be slipping. I have experienced very poor interactions with JB customer service as of late and I hope they can resolve that.

Thread Thread
 
hatsrumandcode profile image
Chris Mathurin

I know what you mean. It does take a lot of resources, especially for very big codebases. The code templates I think can get as complex as you get, but it does have some basic formatting built in. It would be great if they did include more built-in templates for styles and best practices. The newer version of Visual Studio seems to include more and more of the features that usually were only found in ReSharper.

Collapse
 
mjraadi profile image
Mohammadjavad Raadi

Reading the commit messages for the files you're working on and the units tests(if there are any) could potentially help you understand the code better.

Collapse
 
bhupesh profile image
Bhupesh Varshney ๐Ÿ‘พ • Edited

Well in my case I was handed over the code which was not documented & didn't used any kind of version control

Guess, I will die

Anyway I figured out the things to change & it worked

Thread Thread
 
mjraadi profile image
Mohammadjavad Raadi

Oh boy, I totally get what you went through. Glad you worked that out.

Collapse
 
nickytonline profile image
Nick Taylor • Edited

You can always help with documentation. It may mean you need to dig deeper in the codebase, but the documentation that you add will help future developers, including yourself. ๐Ÿ˜‰ I wrote about this earlier this year.