Too Many Cooks

18 Sep 2021

Everybody’s in the Game

The world of coding has an extremely undemanding bar for entry. There are countless integrated development environments (IDE’s) for the novice programmer to download for free from the internet provided they have a somewhat functional piece of hardware. While some are focused on a particular coding langauge, most provide a platform for multiple languages. This is a highly attractive option for the individual interested in learning to code. Similarly, thousands, if not millions of lines of code sit waiting to be referenced online in the form of educational websites, Q&A forums, and even free university - provided courses. Why would it be a bad thing to have such a useful skill available for anyone to learn casually? The issue is highlighted when working with another programmer. Whether this interaction occurs at a hugely developed corporation or is simply an exchanging of ideas and code online, commnication and understanding is key.

Tower of Babel

Imagine a scenario, in the professional world, where one takes over the management of a piece of software previously worked on exclusively by a single software engineer. To the author, everything about the code makes sense. They probably could even recite portions of it because of their familiarity. How then can a new engineer take over the project of the author? The most important task begins with understanding the code. This is easier with code that is written in a familiar fashion. Coding standards, the rules and regulation professionals hold themselves to, provide a framework for understanding any new piece of code. Not only can coding standards assist in understanding, but they can also maintain writing practices that are minimal in errors. If you write something the same way everytime, it becomes obvious when something is unfamiliar or foreign. An easy parallel can be made to spoken languages. A new speaker to the language can certainly learn many vocabulary words with rote memorization but their ability to convey something meaningful is hampered without proper grammatical structure and language conventions. The biblical story of the Tower of Babel shows a united human race that speaks a single language building a colossal tower that could reach heaven. While abstract, this shows the incredible potential common understanding brings. The downfall of this united group of people is the loss of their common language. Without it, their tower and all their hard work comes crumbling down. To draw from this parallel, programmers and engineers that are not using a carefully controlled set of conventions that are universally used can cause suffering in the form of confusion, decreased work efficiency, and broken programs. “Too many cooks spoil the broth.”

Learning Tool Rather than as SpellCheck

Are coding conventions therefore only an annoying dogmatic doctrine of rules? Their benefits extend past minimizing mistakes and providing a familiar base template. Coding conventions provide a format for learning programming languages in the proper way. They instill habits and proper writing conventions that are found across multitudes of programming languages. While some argue that the best way to learn anything new to throw oneself into the thick of things, a proper methodology for learning goes a long way. When learning spoken languages, grammar is taught as a framework for proper speech. When learning a sport, drills for proper movement and knowledge of the sport set a foundation for future success. When lifting weights at the gym, proper form and technique is emphasized as a priorty before lifting heavier and completing more advanced lifts. All of these examples show the strength of having a dedicated foundation and an adherence on technique. Coding conventions can provide the structure for proper learning and pave the way for novice programmers to become successful professionals.