
79 Characters: Archaism or Engineering Zen?
Anyone who has ever seen a linter (or a colleague with gatekeeper syndrome) highlight the 80th character in red has asked themselves: are we still living in the 1970s?
Spoiler: partly yes.
👻 Ghosts of the Past
IBM punch cards with 80 columns are "legacy" in its purest form. We haven't punched holes in cardboard for a long time, but our tools still live within these constraints. This is a case where form determined content for decades to come.
🛠 Why It's Still Relevant:
1. Side-by-side diffs. When you open two files side by side in an IDE (or on GitHub/GitLab), narrow lines allow you to see code without constant left-right scrolling. If you have a 200-character "wall of text," it becomes inconvenient.
2. Cognitive load. Narrow code blocks are read faster. The eye jumps less along the line. An attentive developer will spot a bug faster if the code isn't "spread out" across the width of your 32-inch monitor.
In reality, it's more pragmatic:
🔵If you use Black (and you should), it defaults to 88. This is the sweet spot between "classic" and the reality of modern monitors.
🔵If you work in a team where flake8 configs specify 120 characters — okay, set it to 120. The main thing is that it should be consistent.
In short, don't obsess over 79 characters for the sake of 79 characters. But don't write sausage-like code spanning one and a half screens either. Good code should be readable, not long.
#так_сложилось
Comments
0No comments yet.