What's with this about "abolish the 80-column rule and write all your text in one line, allowing the machine to auto-wrap"?

I hear it once in a blue moon, and I can understand it for like, mobile phones, but this is a meme, right?

@MutoShack I kind of agree with it myself.. the 80 character rule is prohibitive and often makes for less readable and ugly code.

I either let it autowrap or have a 160 character rule.

@freemo

YOU may not be a lazy man, Freemo, but I am.

Whenever I see a long line of code, I think:
"Perform function N on variable X... Blah blah blah NEXT LINE"

Whereas, when it's broken down into sections, it's not any shorter, but I end up actually reading it.

Also, I think there are *very few* cases in which well-written code actually naturally goes over 80 columns.

One last thing: I have two 16:9 monitors. One vertical and one horizontal. The vertical one pretty much just fits 80 columns (I have a big font) and the horizontal one allows me to have two 80-column frames next to each other.

I know my workflow is more of a "me thing", I just think there are a lot of people who don't have superwide displays.

@MutoShack I generally try to split up my code into whatever is logical and 160 is an upper limit i rarely cross but 80 is impractical in my mind.

Basically the only time it is an issue is if a definition has lots of arguments or inherets from lots of parent classes. In which case each argument gets its own line.

If you cant be bothered to scroll horizontally or use auto-wrap thats your problem lol :)

@freemo

I use autowrap, but of course nothing looks good.

Do you have a public git repository? I want to see this "logical" code of yours! ;-)

@freemo

(But really, knowing you, I'm sure your code is fine. I'm jest messing with you)

@MutoShack This isnt by far my most impressive or most populat project. But nearly 100% of the code was written by me so will be the best example of how I format code:

git.qoto.org/Ferma/Ferma

Follow

@MutoShack I should also say, this was when i didnt care about word wrapping at all, so the lines are crazy wide in most cases. I've become more aware of it in my more recent code.

@freemo

Don't worry, I understand that code quality and style changes drastically over time.

It actually looks good (not that I'm an expert judge, or a judge). I haven't read Java in a while so I'm glad there are so many descriptive comments.

I don't mean to go on, but I better understand what you meant. A good example is in line 90-91 of this file:

git.qoto.org/Ferma/Ferma/-/blo

it's long, but uniform with all the other sections (not how I'd do it, but I can respect it).

@MutoShack Generics in java are really hard to break up in any readable way. As a syntax its really annoying and confusing for many

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.