The Age of Programming Popularization: Is a Standard Coding Style with High Readability Necessary?

This blog post examines the necessity and pros and cons of a standard coding style to enhance readability and collaboration efficiency in an era where programming has become popularized.

 

With the recent advancement of IT technology, interest in the IT field has grown, leading to an increase in people wanting to learn programming. Whether studying alone with books or taking courses at specialized programming academies for a few months, it’s now possible for anyone to create their own programs, even without deep expertise. This is thanks to the development of various tools that enhance programming accessibility. For example, Google provides the Android SDK (Software Development Kit) for free, enabling the development of programs that run on the Android operating system. These tools provide convenience, helping even those lacking specialized knowledge to program easily.
However, the fact that programming has become accessible to everyone is not entirely positive. The popularization of programming has led to several problems, particularly the difficulty of reading program code written in different coding styles. Coding style is analogous to writing style in the context of writing. While writing may seem understandable as long as the grammar is correct, authors use a style appropriate to the purpose of the text to make it easier for readers to comprehend. For instance, just as an essay requires a concise and clear style rather than flowery expressions, in coding too, even if a program functions with correct syntax, adding an appropriate coding style results in more readable code. Conversely, an inappropriate coding style makes the code difficult to understand.
As programs grow larger, development often involves collaboration among multiple people. Therefore, programmers must consider readability to ensure others can easily read and understand their code. However, non-experts with limited programming experience struggle to write highly readable code. This is because those who learn programming through short-term training focus solely on creating ‘programs that somehow work,’ without learning how to write ‘readable code.’ Code with poor readability not only hinders collaboration but can also cause problems during future code modifications.
To solve this problem, we need to establish a way for beginners to write highly readable code. To this end, I propose the adoption of a standard coding style. A standard coding style refers to regulations requiring programmers to abandon their individual styles and adhere to a predetermined standard style. While most programming languages impose no restrictions on coding style beyond syntax, standardizing coding style can aid code comprehension and reduce readability issues.
Of course, there may be counterarguments to the proposal of establishing a standard coding style. Because everyone has their preferred coding style, a standard style might feel like an inconvenient constraint to some programmers. Coding according to a fixed style rather than your own can be difficult and may increase work time. I’ve actually experienced this difficulty myself. Last June, while working as a grading assistant for the Korean Informatics Olympiad, I had the experience of writing code to provide as a model answer for students. I tried to match the style of last year’s model answers to make it easier for students to understand, but following an unfamiliar style meant a task that should have taken an hour took over two.
While standard coding styles can reduce work efficiency like this, I believe they have positive effects in many ways.
First, standard coding styles are efficient for the long-term maintenance of programs. Companies continuously upgrade programs after release by fixing bugs or adding features. Since programmers often change during this process, readable code is essential for new programmers to understand existing code easily. Adopting a standard coding style reduces the need for individual programmers to individually focus on readability, and the defined style makes the code easier to read.
In fact, some companies mandate their own coding style to improve maintenance efficiency and require all programmers to adhere to it. During a visit to Google Korea five years ago, Google emphasized that all programmers must follow the company’s defined coding style. Conversely, a friend working at a game company mentioned they have no set coding style.
Second, in the current trend where open-source projects are highly valued, a standard coding style would greatly benefit programmers. Open source code is publicly available, allowing not only professional programmers but also non-experts to easily access it, enabling diverse users to improve program functionality and fix inconveniences. Due to this collaborative nature of open source, code written in various styles can become mixed, making it difficult to understand. I frequently utilize open-source code related to computer graphics, and I’ve personally experienced difficulty reading code due to the variety of coding styles. Having a standardized coding style could have alleviated this inconvenience.
Third, standardized coding styles can also enhance efficiency in programming education. This also reduces the burden on educators. Recalling my experience as a programming academy instructor, I spent significant time reading students’ code and correcting issues. Students tended to focus on writing ‘working code’ rather than ‘readable code’. Unreadable code made finding bugs difficult, requiring considerable time, effort, and causing significant stress. If students had written code adhering to a standard style, these difficulties would have been reduced. The Department of Computer Science at Seoul National University also offers several courses that include readability assessments, encouraging students to write highly readable code. Thus, a standardized coding style benefits both educators and students.
From the student’s perspective, standardized coding styles can reduce confusion and boost motivation. Programming books and online courses often use inconsistent styles, and sometimes even teach incorrect ones. As learners, it’s difficult to judge the correctness of these styles, and simply following them can lead to becoming a programmer who writes unreadable code. Having a standard style would prevent this problem.
While we’ve discussed the positive effects a standardized coding style could bring, we must also consider the feasibility of standardization. On the opposing side, due to the mathematical model of programming languages, it can be challenging for computers to process coding style beyond just syntax. Furthermore, there are difficulties in converting all existing code written in various styles to conform to a standard, and debates exist over which style should be adopted as the standard.
Finding a positive solution to these feasibility issues is difficult, but as research progresses, the possibilities are gradually increasing. For example, Python is making efforts to regulate coding style by adding a syntax condition called the indentation rule.
In summary, standardizing coding styles has significant positive effects on maintenance, open-source promotion, and education. Computer science majors, non-majors, and anyone interested in programming need to strive to write highly readable code. While this is difficult in the current situation without a standard style, I believe a standardized coding style is absolutely necessary for these reasons.

 

About the author

Writer

I'm a "Cat Detective" I help reunite lost cats with their families.
I recharge over a cup of café latte, enjoy walking and traveling, and expand my thoughts through writing. By observing the world closely and following my intellectual curiosity as a blog writer, I hope my words can offer help and comfort to others.