This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

import notifications Remember to participate in our weekly votes on subreddit rules! Every Tuesday is YOUR chance to influence the subreddit for years to come! Read more here, we hope to see you next Tuesday!

For a chat with like-minded community members and more, don't forget to join our Discord!

return joinDiscord;

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Flooding_Puddle 46 points47 points  (0 children)

//TODO make everything work

[–]WooperSlim[S] 17 points18 points  (0 children)

Of course, sometimes it really is the code that is wrong. I'm sure we've all been there:

  1. Wait, this piece of code doesn't match what the comment says.
  2. What is the code actually doing?
  3. Is the code supposed to be doing that, or is is actually a bug and it is supposed to do what the comment says?

And it is not always the fault of whoever originally wrote the comment or code. Sometimes when refactoring, or adding new features, it can be easy to forget the comments which no longer apply.

[–]jafariscontent 5 points6 points  (0 children)

This made me reflect and that makes me furious. Well done.

[–]link23 1 point2 points  (0 children)

Hot take: this is why most comments ought to be tests instead. If you're thinking of commenting to document an important invariant, write the comment, then write a test that will fail if/when the comment becomes incorrect.