The principle has wide reaching life applications, but these are not relevant here.

Always remove code you don’t need. Remove scripts, snippets, bookmarks, containers, etc. Don’t keep it commented out ‚just in case‘. That’s what git history is for.

Keep things simple and clear.

As I've spent more and more time in software development, the concept of "cognitive load" has become an important topic.

The fact is, that though the mysteries of human mind may never be fully understood, our brains do function in a way analogous to computers. We "load data into memory" when we mentally appropriate all of the context necessary for working in a specific situation, and we process it with the rational faculties of our minds.

The problem is that we don't have nearly as much "RAM" capacity as computers do, and we also tend to hold onto it less well than electrically charged bits of metal in computers. Of course, our ability to hold mental context often fluctuates with our health, how much sleep we got last night, our stress levels, and etc. Some people have more ability to hold onto and explore mental "variables" than others.

But regardless of how well you can do this, you will always benefit from removing the need for mental context gathering and holding by removing distracting and misleading things from your code.

The fewer things sitting in your codebase which require more cognitive load, the more simple and clear thinking about your software will be. From here, you will find more enjoyment and satisfaction with coding.