You might think that in the modern era of programming, everybody has a big ass monitor with loads of horizontal space for the editor. Unfortunately, y

Why code lines still should not exceed 79 characters

submited by
Style Pass
2023-01-23 14:00:04

You might think that in the modern era of programming, everybody has a big ass monitor with loads of horizontal space for the editor. Unfortunately, you are wrong. What is the point of having a big monitor if you have to make the editor cover the whole screen? I have two 24-inch monitors, but I have one of them rotated 90 degrees, which makes the resolution 1200×1920. 1200 pixels is enough for a pretty wide editor window, but I always have two editor windows open side by side, which makes the editor windows 600×1920 pixels and which is about 2×79x120 in visible characters.

I am also old school and use terminal windows, which, as you can guess, are about 80 characters wide. It helps a lot if the code does not wrap inside the terminal window when using version control commands from the terminal.

OK, so far the reasons have been pretty much about the environment and a lot of people have environments that support long lines easily. However, something that is universally bad about long lines is the way they affect the readability of code. Long lines make the code harder to read. If you have to turn your head when reading code, digesting the code will be much harder.

Leave a Comment