Does Coding with a Column Width of 80 Make Sense in 2024?
Tags: programming, java, coding
Published: 2019-06-28 04:15:41

---
title: Does Coding with a Column Width of 80 Make Sense in 2024?
published: true
description: Now that we have a bigger monitor, does a column with 80 while writing code make sense in 2024 or the coming years?  
tags: beginner, programming, java, coding
---
*Disclosure: This post includes affiliate links; I may receive compensation if you purchase products or services from the different links provided in this article.*

![](https://cdn-images-1.medium.com/max/1000/0*Lq7HMmpc2sBXbjRG.jpg)

One of the oldest [coding practices](https://javarevisited.blogspot.com/2014/10/10-java-best-practices-to-name-variables-methods-classes-packages.html) is to keep line width 80, and many of us follow it blindly but have you ever thought about why we have this practice in the first place?

I believe it was to make your code more readable in the age of small monitors so that the whole content can fit on the screen, or it might have originated from the age of punch cards, which used to be 80 columns wide.

This sounds reasonable when we think about those old days but do you think this rule makes sense in 2024?

We are now living in the age where most of the developers have got [large monitors](https://www.amazon.com/LG-32MP58HQ-P-32-Inch-Monitor-Screen/dp/B01BV1X9DG?tag=javamysqlanta-20), which can show up to 180 characters, ** don't this is wastage of precious monitor space?** It also makes your code unnecessarily long, then it is.

I first came to know about line wrapping at 80 while reading Oracle Code Conventions for the [Java Programming Language](http://www.java67.com/2018/08/top-10-free-java-courses-for-beginners-experienced-developers.html), which was last revised on April 20, 1999, which under indentation says

> *4.1 Line Length\
> Avoid lines longer than 80 characters, since they're not handled well by many terminals and tools.*

> *Note: Examples for use in documentation should have a shorter line length-generally no more than 70 characters.*

source: <http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-136091.html#248>

If I understood correctly (I may be wrong), one goal of this rule is **consistency**. I used to think that 80 was silly, but being able to go through source code written by a dozen different teams over the last 7 years and not needing to re-size my window is a really nice thing. Consistent column width helps with the pace of reading code.

Since I mostly worked with large monitors, like [LG 32MP58HQ-P 32-Inch IPS Monitor](https://www.amazon.com/LG-32MP58HQ-P-32-Inch-Monitor-Screen/dp/B01BV1X9DG?tag=javamysqlanta-20) with Screen Split, I also realize that we are wasting lots of precious space. The consistent column width of 80 is simply too small.

I use 120 unless the project I work on already finalized a column width, in that case, I go for consistency.

[![](https://cdn-images-1.medium.com/max/1000/0*bCmD0oogChKLlaSU)](https://pluralsight.pxf.io/c/1193463/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fwriting-clean-code-humans)

Photo by [Jefferson Santos](https://unsplash.com/@jefflssantos?utm_source=medium&utm_medium=referral) on [Unsplash](https://unsplash.com?utm_source=medium&utm_medium=referral)

One more reason people give for still using a column with of 80 is that nowadays they are working with multiple files at once, mostly in [VIM](http://bit.ly/2yboQ5S) or in their IDEs like [Eclipse](http://bit.ly/2hiXebL) or [IntelliJ IDEA](http://bit.ly/2CSO36A).

For example, if you use standard column width you can fit a couple of files across a reason and can compare them line by line, which I believe is a real benefit.

You can even do a three-way merge inspection on one screen without scrolling sideways. By the way, this should not be done at the cost of excessive wrapping.

I understand that consistent columns make it easier to scan and read through text but it doesn't matter whether it's 80 or 120.

On a closing note, I would say that consistency is nice and you must go for it but 80 or even 100 is too short.

Many developers could probably live with 120 or even 150 though. Our modern widescreen high definition [LCD monitors](https://www.amazon.com/LG-32MP58HQ-P-32-Inch-Monitor-Screen/dp/B01BV1X9DG?tag=javamysqlanta-20) can easily handle more.

It is much more readable than excessive wrapping because I find it much harder to read a wrapped line than just seeing the whole thing in one line. Of course, this is just preference and others will feel different.

> **So, what do you guys think, does this rule still hold or you have already moved on?**

Other **Programming Articles** you may like
[The 2024 Web Developer RoadMap](https://hackernoon.com/the-2019-web-developer-roadmap-ab89ac3c380e)
 [10 Data Structure and Algorithms Courses to Crack Programming Interview](https://hackernoon.com/10-data-structure-algorithms-and-programming-courses-to-crack-any-coding-interview-e1c50b30b927)
 [10 Things Java Programmer Should Learn in 2024](https://javarevisited.blogspot.com/2017/12/10-things-java-programmers-should-learn.html#axzz5atl0BngO)
 [The 2024 Software Architect RoadMap](https://javarevisited.blogspot.com/2023/07/the-2023-software-architect-roadmap.html)
 [10 Tools Every Java Developer Should Know](http://www.java67.com/2018/04/10-tools-java-developers-should-learn.html)
 [The 2024 Java Developer RoadMap](https://javarevisited.blogspot.com/2019/10/the-java-developer-roadmap.html)
 [10 Frameworks Java and Web Developer should learn in 2024](http://javarevisited.blogspot.sg/2018/01/10-frameworks-java-and-web-developers-should-learn.html)
 [10 Tips to become a better Java Developer in 2024](http://javarevisited.blogspot.sg/2018/05/10-tips-to-become-better-java-developer.html)
 [Top 5 Java Frameworks to Learn in 2024](http://javarevisited.blogspot.sg/2018/04/top-5-java-frameworks-to-learn-in-2018_27.html)
 [Is ByteByteGo worth it?](https://medium.com/javarevisited/is-bytebytego-a-good-place-to-learn-system-design-2c1b43c09ac5)
 [10 Testing Libraries Every Java Developer Should Know](https://javarevisited.blogspot.sg/2018/01/10-unit-testing-and-integration-tools-for-java-programmers.html)

Thanks for reading this article so far till the end. If you like this article then please consider following me on medium ([javinpaul](https://twitter.com/javinpaul)). if you'd like to be notified of every new post don't forget to follow[**javarevisited**](https://twitter.com/javarevisited) on Twitter!