Approaching a New Codebase I

Approaching a New Codebase I

When approaching a new codebase, one of the most important things to do is to bear in mind the codebase's functionality.

So for example, you want to try and understand what each of the aspects of the code is doing.

So you want to look for the most important files - somebody might be able to show you what the most important files are if it is not obvious to you or if you can't figure it out yourself. Then, once you know the most important files, you might want to try and understand what each main section of the code does - for example each of the functions.

What is the purpose of this function? Or of this block of code? Or of this section of the codebase? Then, I have two ways I can proceed from here:

- Writing comments in the code - whether this gets pushed to main or not, writing comments on what each of the aspects of the code does can be helpful. If these are good then they can be pushed to main to help other developers.

If these are annoying, well then at least you have helped YOURSELF. On the other hand:

Another step is to create documentation for the code.

Good documentation - bad documentation - who knows.

Write up some documents

Write up every function

Write up what it does and write up some comments.

If they are useful they can be used. If not then you have learned something.
Three pictures of coding images in pretty colours in the background. Text on colourful shapes in the foreground. Text reads: Tips for new repos. Find the main files. Assess the functionality of each file and what each function does. Write up comments and/or your own documentation.


Comments