As someone who was once a beginner at coding, I tried to search for conventions and tricks to maintain my codebase. How big projects like the kernel or programming languages maintain their code. But those all ended in failure because I could not understand the code and their conventions.

As I continued writing code, I began to learn that how a codebase is laid out is because of yes rules and conventions, but mostly because code changes. Like how you organize things in your own room. Someone else may try to understand why you put something somewhere, and there may be some logic to it, but it’s mostly a result of continuous changes; you have work to do so you move your stack of paper out of the way even though it’s in the wrong place, or you bought a new pencil case so you put it on your table for the time being.

So, to the beginners out there, treat an unknown codebase like someone else’s room. There’s kindof a logic to it, but it’s mostly organic changes.