1

As a now obsolete practice in the age of widescreen monitors and resolutions many times greater, do you still enforce line lengths in your code?
If so, what length do you use and why?

Comments
  • 5
    Sure, it doesn't make sense to have long lines, code becomes less readable with growing length.

    And it is often a sign of bad code, that should be refactored.

    The classic 80 characters is too little today, but around 120 character should be sufficient for most cases.
  • 1
    Yup, 120 chars is the perfect length nowadays. Two files open side by side are productive, long lines are counter-productive.
  • 0
    @tits-r-us madlad.
  • 0
    @tits-r-us Ah so you're a python developer. XD
  • 0
    It's absolutely essential IMO. Shorter lines are readable in smaller windows, or larger fonts. I for one have bad vision, so I use 24-28px font size, and I code on a 16" laptop. Also, it's much easier if each line does only one thing, especially with function calls. Control flow is ideally laid out in one dimension. (Yeah, fuck impure functions in ternaries and especially bool operator based control flow.)
  • 0
    I try to stick to the whole Line 80 thing, but as other's have mentioned it's probably closer to the Line 120 area in practice, especially in Javascript (all of those event handlers being passed functions etc).
  • 0
    Upvote for "yes".

    Used to work with guy whose name rhymes with Rohan. He was that guy who always aligned everything to right with the argument space, loved scrolling left and right. To everyone else, it was a nightmare. Don't be like Rohan, respect your fellow devs.
Add Comment