Comment your code, you'll thank me for that next week.

  • 3
    *thank yourself in a week or two..

    I just love it when people expect to have all the code you've written to have in your ram.. like how the hell should I know from top of my head the details about what I wrote 6+ years ago o.O
  • 2
    @sladuled At times, I've literally written code and looked back at it just a few days later...

    Without the comments, I'd be like: "wait, wtf was I doing here?"
  • 1
    @FinlayDaG33k Yup.. I extend it by WTF were you thinking when you wrote this shit?! Idiot.. // talking to/about my code from 2 weeks ago.. :/
  • 2

    There, I commented it.
  • 2
    You mean tomorrow
  • 1
    @sladuled That part only kicks in when I actually have to change it :^)

    I use comments to find what I need and then when I need to chance a part I often go like: "fuck me up the arse, why did I write it like this?"
  • 1
    In two minds about this. As soon as you write a comment you've suddenly doubled the amount of maintenance required. Also, I guarantee if someone else changes your code, they won't change your comments.
  • 0
    @jonnyknowsbest That's true but then it's up to your superior to reject the MR.

    I'm always quite strict on this:

    - Update code.

    - Update comments along with it.

    Fail to do so and your MR is getting rejected until you fix it.
Add Comment