this post was submitted on 01 Sep 2023
329 points (96.1% liked)

Programming

17484 readers
90 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] fkn@lemmy.world 0 points 1 year ago (2 children)

I, too, remember the days before ultra high definition ultra wide monitors.

I thought this argument was bogus in the 90s on a 21" CRT and the argument has gotten even less valid since then. There are so many solutions to these problems that increase productivity for paltry sums of money it's insane to me that companies don't immediately purchase these for all developers.

[–] tatterdemalion@programming.dev 2 points 1 year ago (1 children)

You have a point, devs should be using multiple large monitors. I will often need to have 3-4 files open at once, plus some browser windows. Having some limit on line length helps with this and for fighting code complexity.

[–] fkn@lemmy.world 0 points 1 year ago

The most important thing is comprehension. If something is too long and the length makes it less readable then it is too long.

But if having 3-4 files open at the same time makes it harder for you to comprehend a single file because you can't get the full picture, that's on you.

[–] icesentry@lemmy.ca 1 points 1 year ago* (last edited 1 year ago) (1 children)

I have a massive ultrawide and I still 100% believe in line limits. Long lines are harder to read in general but even with a limit of 100 I frequently have 3 files opened next to each other and I can't read entire lines easily. Line limits just aren't about the size of the monitor and I can't believe people still say that.

[–] fkn@lemmy.world 0 points 1 year ago (1 children)

I understand the concern, but readability and comprehension are way more important than line length. If the length impairs readability, it's too long. Explicitly limits are terrible. Guidelines, fine.

Ultimately, you do you. I still think your crazy and I think your argument is poor.

[–] icesentry@lemmy.ca 1 points 1 year ago (1 children)

Yes a strict 80 character limit would be bad but that's why modern formatters aren't strict and default to 90-100.

I've pretty much never seen code that would have been more readable had the lines been longer than that.

My main argument is still that shorter lines are more readable. I just think it's a bullshit argument to say that long lines are fine because large monitors exists. I don't see how that makes me crazy.

[–] fkn@lemmy.world 1 points 1 year ago

See, I think length limits and readability are sometimes at odds. To say that you 100% believe in length limits means that you would prefer the length limit over a readable line of code in those situations.

I agree that shorter lines are often more readable. I also think artificial limits on length are crazy. Guidelines, fine. Verbosity for the sake of verbosity isn't valuable... But to say never is a huge stretch. There are always those weird edge cases that everyone hates.