Click here to Skip to main content
15,886,919 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
Slacker00717-Jul-23 23:40
professionalSlacker00717-Jul-23 23:40 
GeneralRe: Code comments - how old is your code? Pin
Sander Rossel17-Jul-23 23:43
professionalSander Rossel17-Jul-23 23:43 
JokeRe: Code comments - how old is your code? Pin
trønderen18-Jul-23 6:49
trønderen18-Jul-23 6:49 
GeneralRe: Code comments - how old is your code? Pin
Gerry Schmitz18-Jul-23 5:43
mveGerry Schmitz18-Jul-23 5:43 
GeneralRe: Code comments - how old is your code? Pin
Amarnath S17-Jul-23 21:06
professionalAmarnath S17-Jul-23 21:06 
GeneralRe: Code comments - how old is your code? Pin
_WinBase_17-Jul-23 23:36
_WinBase_17-Jul-23 23:36 
GeneralRe: Code comments - how old is your code? Pin
Gerry Schmitz18-Jul-23 5:46
mveGerry Schmitz18-Jul-23 5:46 
GeneralRe: Code comments - how old is your code? Pin
Mircea Neacsu18-Jul-23 0:51
Mircea Neacsu18-Jul-23 0:51 
charlieg wrote:
Do comments even matter any more, or am I flattering myself?

Comments matter A LOT. Although, going through the previous replies I can see a contrarian trend ("I don't write comments", "code should be self-documenting", etc.). Sorry, but I find it ludicrous, at least in my line of work. Just two days ago I was working on this code:
C++
/*
   Transformation parameters from previous ITRF frames to ITRF-2008
   Data from http://itrf.ign.fr/doc_ITRF/Transfo-ITRF2008_ITRFs.txt
   Epoch is 2000.0. Compared with the source, this table has signs reversed
   because we go from ITRF_xx to ITRF2008, translation units are meters and
   scale units are ppm.
 */
 const double pre_2008[2][14] = {
   // tx       ty       tz       dsc      rx    ry    rz
   {  0.0019,  0.0017,  0.0105, -0.00134, 0.00, 0.00, 0.00,
     -0.0001, -0.0001,  0.0018,  0.00008, 0.00, 0.00, 0.00},  //ITRF2000
   {  0.0020,  0.0009,  0.0047, -0.00094, 0.00, 0.00, 0.00,   //ITRF2005
     -0.0003,  0.0,     0.0,     0.00,    0.00, 0.00, 0.00}
 };
Pray tell me, how would you write this in a self-documenting way? If I wouldn't have put that comment block there, would anyone (myself included) had been able to figure out what's going on?

So, for your own sanity and for the sanity of those around you, please, keep commenting!
Mircea

GeneralRe: Code comments - how old is your code? Pin
Daniel Pfeffer18-Jul-23 1:04
professionalDaniel Pfeffer18-Jul-23 1:04 
GeneralRe: Code comments - how old is your code? Pin
JudyL_MD18-Jul-23 1:59
JudyL_MD18-Jul-23 1:59 
GeneralRe: Code comments - how old is your code? Pin
decaffeinatedMonkey18-Jul-23 2:41
decaffeinatedMonkey18-Jul-23 2:41 
GeneralRe: Code comments - how old is your code? Pin
WPerkins18-Jul-23 3:00
WPerkins18-Jul-23 3:00 
GeneralRe: Code comments - how old is your code? Pin
trønderen18-Jul-23 6:54
trønderen18-Jul-23 6:54 
GeneralRe: Code comments - how old is your code? Pin
kmoorevs18-Jul-23 3:58
kmoorevs18-Jul-23 3:58 
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 
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 

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.