When it comes to maintaining code, the key is to keep it greppable. Don’t split up identifiers or dynamically construct them, as this can lead to missed references. Use the same names for things across the stack, avoiding unnecessary renaming that makes it harder to search. Furthermore, flat structures are better than nested ones, as they make it easier to find what you’re looking for. By following these rules, you can ensure that your codebase remains manageable and easy to navigate. Remember, the goal is to make your code easily grep-able for optimal maintenance and understanding.
https://morizbuesing.com/blog/greppability-code-metric/