Click here to Skip to main content
15,887,267 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: Code comments - how old is your code? Pin
Cpichols18-Jul-23 3:59
Cpichols18-Jul-23 3:59 
GeneralRe: Code comments - how old is your code? Pin
Marc Clifton18-Jul-23 5:55
mvaMarc Clifton18-Jul-23 5:55 
GeneralRe: Code comments - how old is your code? Pin
sasadler18-Jul-23 6:05
sasadler18-Jul-23 6:05 
GeneralRe: Code comments - how old is your code? Pin
jochance18-Jul-23 6:25
jochance18-Jul-23 6:25 
GeneralRe: Code comments - how old is your code? Pin
trønderen18-Jul-23 7:10
trønderen18-Jul-23 7:10 
GeneralRe: Code comments - how old is your code? Pin
Br.Bill20-Jul-23 14:12
Br.Bill20-Jul-23 14:12 
GeneralRe: Code comments - how old is your code? Pin
Jeremy Falcon18-Jul-23 6:56
professionalJeremy Falcon18-Jul-23 6:56 
GeneralRe: Code comments - how old is your code? Pin
charlieg21-Jul-23 6:05
charlieg21-Jul-23 6:05 
I guess I should have provided context on what I mean as a comment. For as long as I've been writing code, I outgrew quickly code comments that say "increment the pointer" and other trivial stuff. I also like *limited* Hungarian notation: certain prefixes that over time just help me scan the code. Years ago, I picked up the habit that every pointer begins with a lower case p. Key was readability.

As for oxygen and other tools like that, they sometimes help understand the overall system (especially call trees) but development tools have made such advancements that most of the doc has been replaced by tool features (hovering over a variable for example). The best tool I've ever used is Understand from SciTools. Unfortunately, they moved from a perm. license model to monthly fees, pricing it out of my market.

Rather than what, I try to explain why the code does what it does. Example of the table of data - that's what and you can infer why. In my case, I have a piece of common code that runs on 4 different platforms. Thelatest platform has some issues to be worked around, and I found myself trying to explain why. It then occurred to me that I knew the product was reaching end of life, no one will likely read this, just comment in the SVN commit.

After reading all of the replies to my question, it might be wordier, but breaking up the code into 4 different methods (each supporting a specific device) is probably the cleaner approach.

Thanks for the insights.
Charlie Gilley

“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

Has never been more appropriate.

GeneralRe: Code comments - how old is your code? Pin
OldDBA5-Aug-23 21:26
OldDBA5-Aug-23 21:26 
GeneralRe: Code comments - how old is your code? Pin
charlieg6-Aug-23 7:52
charlieg6-Aug-23 7:52 
GeneralConnector standard Pin
trønderen17-Jul-23 10:14
trønderen17-Jul-23 10:14 
GeneralRe: Connector standard Pin
k505417-Jul-23 10:27
mvek505417-Jul-23 10:27 
GeneralRe: Connector standard Pin
trønderen17-Jul-23 15:11
trønderen17-Jul-23 15:11 
GeneralRe: Connector standard Pin
Mike Winiberg17-Jul-23 20:34
professionalMike Winiberg17-Jul-23 20:34 
GeneralRe: Connector standard Pin
Mike Hankey17-Jul-23 10:36
mveMike Hankey17-Jul-23 10:36 
GeneralRe: Connector standard Pin
trønderen17-Jul-23 15:23
trønderen17-Jul-23 15:23 
GeneralRe: Connector standard Pin
Mike Winiberg17-Jul-23 20:35
professionalMike Winiberg17-Jul-23 20:35 
GeneralRe: Connector standard Pin
charlieg17-Jul-23 10:49
charlieg17-Jul-23 10:49 
GeneralRe: Connector standard Pin
trønderen17-Jul-23 15:31
trønderen17-Jul-23 15:31 
GeneralRe: Connector standard Pin
glennPattonWork317-Jul-23 10:54
professionalglennPattonWork317-Jul-23 10:54 
GeneralRe: Connector standard Pin
trønderen17-Jul-23 15:36
trønderen17-Jul-23 15:36 
GeneralRe: Connector standard Pin
mngerhold17-Jul-23 23:00
mngerhold17-Jul-23 23:00 
GeneralRe: Connector standard Pin
glennPattonWork318-Jul-23 9:23
professionalglennPattonWork318-Jul-23 9:23 
GeneralRe: Connector standard Pin
glennPattonWork318-Jul-23 8:38
professionalglennPattonWork318-Jul-23 8:38 
GeneralRe: Connector standard Pin
BernardIE531718-Jul-23 1:05
BernardIE531718-Jul-23 1:05 

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.