3 ms·
Yeah, but I think his example of good code was pretty confusing. I still think it's a good idea to section off your code into smaller modules - each module shou
by pachydermic 13y ago
Yeah, but I think his example of good code was pretty confusing. I still think it's a good idea to section off your code into smaller modules - each module should complete one 'step' of the process (whatever that means for your particular program) - and each module should have a short comment at the begging of the section explaining what it's inputs/outputs are or generally why it's there. Some comments for exceptionally tricky stuff isn't a bad idea, but like other people said they are often ignored and might get out of sync with the code that's actually there.
But I still think some comments are better than absolutely no comments...
- koblenski 13y agoSorry for the confusing code. I took a look back at it after reading some of the comments here, and I found that I or Blogger had mangled the post. Almost half of it was missing right out of the middle. It's updated now, so hopefully it makes more sense.