Entering a new field of study is often overwhelming due to the amount of new information and concepts to grasp. Often, it’s helpful to lean on established best practices that have been tried and tested by experts in the field. However, as you gain more experience, questioning these practices is important to fully understand when to use them and, more importantly, when to avoid them.
An example from my experience as a programmer involves managing file sizes in codebases. In college, one of my classes strictly enforced a rule on the maximum size a single code file could be. The general best practice in programming is to avoid large files that attempt to do too much. As a result, programmers often develop an ingrained belief that large files are inherently bad. However, with experience and a bit of reevaluation, it becomes clear that such a rule may not always apply. Depending on the language and the organizational needs of the code, there are valid scenarios where larger files make sense.
Some other programming best practices I’ve recently questioned include avoiding global states, strictly adhering to functional programming (FP) or object-oriented programming (OOP), and always choosing declarative programming over imperative programming. In certain scenarios, following these best practices can be more detrimental than beneficial, and I could have only truly comprehended this by questioning best practices and intentionally disregarding them during experimentation.