Click here to Skip to main content
15,887,027 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Is there an issue? Pin
glennPattonWork33-Jan-24 7:10
professionalglennPattonWork33-Jan-24 7:10 
GeneralRe: Is there an issue? Pin
honey the codewitch3-Jan-24 7:14
mvahoney the codewitch3-Jan-24 7:14 
GeneralRe: Is there an issue? Pin
Nelek4-Jan-24 7:31
protectorNelek4-Jan-24 7:31 
GeneralNo your line is too long. PinPopular
jschell3-Jan-24 5:06
jschell3-Jan-24 5:06 
GeneralRe: No your line is too long. Pin
Mike Hankey3-Jan-24 5:26
mveMike Hankey3-Jan-24 5:26 
GeneralRe: No your line is too long. Pin
PIEBALDconsult3-Jan-24 5:29
mvePIEBALDconsult3-Jan-24 5:29 
GeneralRe: No your line is too long. Pin
Member 118167764-Jan-24 6:52
Member 118167764-Jan-24 6:52 
GeneralRe: No your line is too long. Pin
jschell5-Jan-24 6:04
jschell5-Jan-24 6:04 
Member 11816776 wrote:
There is no unacceptable maximum for either the number of lines in a method / function or the length of a line.


By that argument then every code file you write should be one line.

But the real argument in a business environment is that you are not writing code for yourself. You are writing it for the company. Which is why they pay you.

And unless you are a deity someday someone else will need to modify that code. Matter of fact studies have shown that the cost of maintaining code is between 2 and 100 times as much as creating it in the first place.

And the company must pay that.

So a responsible professional developer should create code that one can reasonably be maintained by a future programmer and not the original author.


Member 11816776 wrote:
There are many times that the most important information in a line of code occurs in the first 20 or 30 characters. The best readability may be a very, very long line because the majority of the time the remainder of the line is not of interest when reading code.


And yet your very statement points out that the rest of the line can be important.

Member 11816776 wrote:
If there is a problem with lines that are too long, get a better monitor


No the solution then is during the code review to tell the author to reformat the line so it is shorter.

I have even seen one review process where long lines could not even be viewed so one had to pop to view the file then find the line.
GeneralRe: No your line is too long. Pin
Dave Kreskowiak3-Jan-24 5:56
mveDave Kreskowiak3-Jan-24 5:56 
GeneralRe: No your line is too long. Pin
dandy723-Jan-24 7:24
dandy723-Jan-24 7:24 
GeneralRe: No your line is too long. Pin
jschell4-Jan-24 3:57
jschell4-Jan-24 3:57 
GeneralRe: No your line is too long. Pin
k50543-Jan-24 6:21
mvek50543-Jan-24 6:21 
GeneralRe: No your line is too long. Pin
PIEBALDconsult3-Jan-24 6:36
mvePIEBALDconsult3-Jan-24 6:36 
GeneralRe: No your line is too long. Pin
obeobe4-Jan-24 1:27
obeobe4-Jan-24 1:27 
GeneralRe: No your line is too long. Pin
bryanren4-Jan-24 3:20
bryanren4-Jan-24 3:20 
GeneralRe: No your line is too long. Pin
jschell4-Jan-24 4:03
jschell4-Jan-24 4:03 
GeneralRe: No your line is too long. Pin
jschell4-Jan-24 3:58
jschell4-Jan-24 3:58 
GeneralRe: No your line is too long. Pin
trønderen3-Jan-24 6:29
trønderen3-Jan-24 6:29 
GeneralRe: No your line is too long. Pin
kmoorevs3-Jan-24 6:33
kmoorevs3-Jan-24 6:33 
GeneralRe: No your line is too long. Pin
trønderen3-Jan-24 7:12
trønderen3-Jan-24 7:12 
GeneralRe: No your line is too long. Pin
MarkTJohnson3-Jan-24 7:21
professionalMarkTJohnson3-Jan-24 7:21 
GeneralRe: No your line is too long. Pin
trønderen3-Jan-24 7:31
trønderen3-Jan-24 7:31 
GeneralRe: No your line is too long. Pin
MarkTJohnson3-Jan-24 8:01
professionalMarkTJohnson3-Jan-24 8:01 
GeneralRe: No your line is too long. Pin
trønderen3-Jan-24 8:34
trønderen3-Jan-24 8:34 
GeneralRe: No your line is too long. Pin
PIEBALDconsult3-Jan-24 10:40
mvePIEBALDconsult3-Jan-24 10:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.