Posted On: 2020-05-25
When programming, it is incredibly important to understand why a particular solution is a good one. Although knowing how to solve a problem is often the immediate goal of any programming task, understanding the why behind it is essential for the sustained well-being of the project. As programming projects change over time, previously favorable solutions may sour, and old solutions will need to be replaced with new ones that better fit the new circumstances. As those circumstances change, one can (and often needs to) do additional research, but having a solid understanding of the reasons behind the original solution often streamlines the process, as one will be better equipped to know what to keep and what to discard.
Unfortunately, coming to understand the "why" behind something is often quite challenging. Being able to formulate a question about "why" often requires understanding "how" to achieve it. When one is learning from static media, such as training documents or online tutorials, the "how" is often the emphasis, and "why" is only ever explored at the author's discretion. Yet, for the one learning the material, this can be inadequate, as one may have questions that were not anticipated by the author, and thus go unanswered.
Fortunately, there are ways to work around this - provided one has adequate access to them. Personalized training, such as with a tutor, can go a long way for enabling the ability to ask "why". Realtime interactions (both in-person and virtual) can facilitate incremental growth of understanding from one question to the next.
Absent personalized instruction, one can do additional research building upon prior discoveries (by searching for "why do X to achieve Y", for example). Self-directed research can lead to quite a bit more understanding, but it can also run into significant obstacles, particularly when searching for highly situational (or incorrect) information*. In many ways this particular approach is itself a skill that must be learned, and it is particularly valuable in programming, as there is always more that one can learn.
Lastly, modern programming has one more method available for learning "why": experimentation. Programming is (generally) writing a series of instructions that a machine will execute. Thanks to modern hardware and quick compile times, it is often quite simple to explore the counterfactual: to ask "why not X?" by just telling the machine to "do X" and see what happens. While merely trying new things alone is not enough to understand "why", the scientific method provides a template by which one can hypothesize a "why" and then follow through with tests to either confirm or deny it.
It is fortunate, then, that there are so many ways to come to understand the "why" behind particular programming solutions. While working closely with a tutor often yields the fastest learning pace (due to the conveniences of realtime communication) there are other, quite usable alternatives to fall back on. Additionally, since experimentation is available as one of those tools, programming enjoys a bit of an advantage over many other domains of knowledge: if one ever doubts what they have learned, they need only put it to the test.