That’s the neat part: we don’t!
Joke’s aside, while programming is a lot more subjective than one would think, there are still certain patterns and etiquette most people follow when writing code.
Even so, the codebase might be much bigger than you’d comfortably search in. So we use common text editing tools like “find word in whole project” to situate ourselves and, whenever possible, run the code in debug mode, which allows us to stop the execution at any point of the code and check what the program is doing at that point. Or at the very least write-in innocuous test commands that show up on screen so you can gauge where in the execution a certain function is called.
From that point, you can probably tell where in the code your new feature is supposed to go. Now, writing the new feature and not breaking anything is where only experience can help you. There’s no foolproof recipe that works with every code.
Latest Answers