Click here to Skip to main content
15,891,828 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: Kicking the Can Down the Road Pin
Maximilien2-Mar-21 2:06
Maximilien2-Mar-21 2:06 
GeneralRe: Kicking the Can Down the Road Pin
raddevus2-Mar-21 2:43
mvaraddevus2-Mar-21 2:43 
GeneralRe: Kicking the Can Down the Road Pin
honey the codewitch2-Mar-21 3:48
mvahoney the codewitch2-Mar-21 3:48 
GeneralRe: Kicking the Can Down the Road Pin
#realJSOP2-Mar-21 5:10
mve#realJSOP2-Mar-21 5:10 
GeneralRe: Kicking the Can Down the Road Pin
honey the codewitch2-Mar-21 5:14
mvahoney the codewitch2-Mar-21 5:14 
GeneralRe: Kicking the Can Down the Road Pin
#realJSOP2-Mar-21 5:29
mve#realJSOP2-Mar-21 5:29 
GeneralRe: Kicking the Can Down the Road Pin
honey the codewitch2-Mar-21 7:24
mvahoney the codewitch2-Mar-21 7:24 
GeneralRe: Kicking the Can Down the Road Pin
NightPen3-Mar-21 6:45
NightPen3-Mar-21 6:45 
Comments are necessary for one simple reason, "I don't know what you are thinking when you wrote or changed this code". Documentation is removed from the code does not live with the code and can and will be lost. I don't know how many times I have heard, "We don't know what happened to the docs".

Still don't think comments are needed? Ok then try this exercise. Write some code to solve a problem you have today. Ok now put the code away and don't look at it for 6 weeks. In 6 weeks go back to the code and make a change, fix a bug do something to it. Time how long it takes you to 'remember' how the code works and what you need to do to make the fix.

Still not convinced? Perform the same process, but this time put comment headers in explaining what you were thinking when you wrote the code. Put the code away for 6 weeks and then perform the same test again only this time with the comments.

Don't have time for all this process? What to jump to the result? In the first case, it will take you a fair amount of time reading and trying to remember what you were trying to do and how something worked. In the second case, you will find that you can make the update and or fix it in less than a few minutes.

Now put yourself in someone else's shoes. If you went through this with your code and you wrote that code imagine how the next developer to pick up your code will feel? Ever wonder why the next devs end up throwing out, refactoring, or reworking lots of code? Guess what it's not as self-documenting as you want to think.

I learned this lesson back in the assembler days. I wrote a one-off tool to solve the problem I had at the time. A week later (yes only 1 week) I needed the code again to solve the same problem, but it did not work on this 'slightly' different set of data. No problem I thought, I'll just fix the bug. Two hours later I was finally starting to understand how the tool was supposed to work and where the problems were. That was the last time I ever wrote code that did not have comments.
GeneralRe: Kicking the Can Down the Road Pin
#realJSOP3-Mar-21 7:01
mve#realJSOP3-Mar-21 7:01 
GeneralRe: Kicking the Can Down the Road Pin
NightPen3-Mar-21 14:17
NightPen3-Mar-21 14:17 
GeneralRe: Kicking the Can Down the Road Pin
pkfox5-Mar-21 2:00
professionalpkfox5-Mar-21 2:00 
GeneralRe: Kicking the Can Down the Road Pin
#realJSOP5-Mar-21 2:44
mve#realJSOP5-Mar-21 2:44 
GeneralRe: Kicking the Can Down the Road Pin
NightPen5-Mar-21 7:57
NightPen5-Mar-21 7:57 
GeneralRe: Kicking the Can Down the Road Pin
pkfox5-Mar-21 10:15
professionalpkfox5-Mar-21 10:15 
GeneralRe: Kicking the Can Down the Road Pin
Rick York2-Mar-21 6:14
mveRick York2-Mar-21 6:14 
GeneralRe: Kicking the Can Down the Road Pin
#realJSOP2-Mar-21 7:17
mve#realJSOP2-Mar-21 7:17 
GeneralRe: Kicking the Can Down the Road Pin
Rick York2-Mar-21 8:02
mveRick York2-Mar-21 8:02 
GeneralRe: Kicking the Can Down the Road Pin
pkfox5-Mar-21 10:16
professionalpkfox5-Mar-21 10:16 
GeneralRe: Kicking the Can Down the Road Pin
DerekT-P2-Mar-21 6:55
professionalDerekT-P2-Mar-21 6:55 
GeneralNever, Never say 'I know a bit about that' in a stand up Pin
glennPattonWork31-Mar-21 22:40
professionalglennPattonWork31-Mar-21 22:40 
GeneralRe: Never, Never say 'I know a bit about that' in a stand up Pin
Johnny J.2-Mar-21 0:53
professionalJohnny J.2-Mar-21 0:53 
GeneralRe: Never, Never say 'I know a bit about that' in a stand up Pin
20212a2-Mar-21 1:13
20212a2-Mar-21 1:13 
GeneralRe: Never, Never say 'I know a bit about that' in a stand up Pin
glennPattonWork32-Mar-21 1:35
professionalglennPattonWork32-Mar-21 1:35 
GeneralRe: Never, Never say 'I know a bit about that' in a stand up Pin
peterkmx2-Mar-21 3:17
professionalpeterkmx2-Mar-21 3:17 
GeneralRe: Never, Never say 'I know a bit about that' in a stand up Pin
glennPattonWork32-Mar-21 3:18
professionalglennPattonWork32-Mar-21 3:18 

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.