Click here to Skip to main content
15,888,401 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.

 
GeneralMessage Closed Pin
22-Apr-23 11:53
Member 1496877122-Apr-23 11:53 
GeneralRe: Need more break, hence more went.... Pin
jmaida22-Apr-23 15:40
jmaida22-Apr-23 15:40 
QuestionRe: Need more break, hence more went.... Pin
David Crow22-Apr-23 17:11
David Crow22-Apr-23 17:11 
AnswerRe: Need more break, hence more went.... Pin
trønderen23-Apr-23 11:19
trønderen23-Apr-23 11:19 
GeneralRe: Need more break, hence more went.... Pin
Richard MacCutchan22-Apr-23 21:14
mveRichard MacCutchan22-Apr-23 21:14 
GeneralRe: Need more break, hence more went.... Pin
jhaga22-Apr-23 23:32
professionaljhaga22-Apr-23 23:32 
GeneralRe: Need more break, hence more went.... Pin
trønderen23-Apr-23 10:50
trønderen23-Apr-23 10:50 
GeneralRe: Need more break, hence more went.... Pin
trønderen23-Apr-23 10:44
trønderen23-Apr-23 10:44 
Many years ago (even years before Linux!) I worked with a company writing their own OS. A complete rewrite was made in a (proprietary) high level language, embraced by the old assembly programmers because "Now we don't have to write comments any more!"

It is at the same level as one introduction to COBOL-60 declaring that with this language, there is no longer a need for specially trained programmers; now anyone can write the solution in plain English language.

With a name like Setup_And_Activate_Serial_Port, there is no need for the comment to explain that this function will set up and activate a serial port. If the arguments have similarly descriptive names, you need not, in the comments, repeat what the name reveals. But I very rarely if ever see function definitions where all and everything of what the code maintainer ought to know can be expressed in the name alone (with a possible exception for 1-2 line bodies). So there is usually a need to document a lot of other aspects.

The comment associated with the function heading I prefer to keep short; it is for the user of the function, not the maintainer. And I love end-of-line comments: At the exact spot it applies to, and it won't cause the function body to spread over multiple screenfuls. (But with all EOL comments running from col 70 or 80, so they don't blur the code, you may need to widen your editor window or use the horizontal scroll bar to see them.) For some reason, most programmers disagree with me.

Generally speaking: These huge comment blocks above the function, essentially repeating information already present in (good) naming, and very little extra info, I think of as plain LOC boosters. They are no excuse whatsoever for not commenting non-obvious issues through the code (although they are often used for that purpose Smile | :) ). Two thirds of all the code comments I see have no value whatsoever, and at least two thirds of the issues that really could need an explanatory comment is left as plain, uncommented code. If I were to grade coders by their comments, very few would even reach a 'C'. Quite a few would flunk.
GeneralRe: Need more break, hence more went.... Pin
Single Step Debugger24-Apr-23 3:13
Single Step Debugger24-Apr-23 3:13 
GeneralRe: Need more break, hence more went.... Pin
jschell25-Apr-23 11:29
jschell25-Apr-23 11:29 
GeneralRe: Need more break, hence more went.... Pin
PIEBALDconsult27-Apr-23 9:31
mvePIEBALDconsult27-Apr-23 9:31 
GeneralRe: Need more break, hence more went.... Pin
trønderen27-Apr-23 11:00
trønderen27-Apr-23 11:00 
GeneralMessage Closed Pin
22-Apr-23 9:43
Member 1496877122-Apr-23 9:43 
AnswerRe: Computing dictionary ( for dummies) ? Pin
abmv22-Apr-23 17:48
professionalabmv22-Apr-23 17:48 
GeneralRe: Computing dictionary ( for dummies) ? Pin
Richard MacCutchan22-Apr-23 21:15
mveRichard MacCutchan22-Apr-23 21:15 
GeneralUmm, Has CP become Stackover flow? Pin
glennPattonWork322-Apr-23 9:40
professionalglennPattonWork322-Apr-23 9:40 
GeneralRe: Umm, Has CP become Stackover flow? Pin
PIEBALDconsult22-Apr-23 9:44
mvePIEBALDconsult22-Apr-23 9:44 
GeneralRe: Umm, Has CP become Stackover flow? Pin
Rick York22-Apr-23 9:57
mveRick York22-Apr-23 9:57 
GeneralRe: Umm, Has CP become Stackover flow? Pin
glennPattonWork322-Apr-23 10:54
professionalglennPattonWork322-Apr-23 10:54 
GeneralRe: Umm, Has CP become Stackover flow? Pin
David O'Neil22-Apr-23 13:42
professionalDavid O'Neil22-Apr-23 13:42 
GeneralRe: Umm, Has CP become Stackover flow? Pin
Richard MacCutchan22-Apr-23 21:21
mveRichard MacCutchan22-Apr-23 21:21 
GeneralRe: Umm, Has CP become Stackover flow? Pin
glennPattonWork323-Apr-23 0:16
professionalglennPattonWork323-Apr-23 0:16 
GeneralRe: Umm, Has CP become Stackover flow? Pin
Richard MacCutchan23-Apr-23 0:46
mveRichard MacCutchan23-Apr-23 0:46 
GeneralRe: Umm, Has CP become Stackover flow? Pin
glennPattonWork323-Apr-23 1:02
professionalglennPattonWork323-Apr-23 1:02 
GeneralRe: Umm, Has CP become Stackover flow? Pin
jschell25-Apr-23 11:31
jschell25-Apr-23 11:31 

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.