Permanently Deleted

  • space_comrade [he/him]
    ·
    edit-2
    2 years ago

    I only comment when the logic gets a bit tricky or when I need to do some weird workaround, which is usually a small portion of the codebase, most of it is just plumbing, and if you need to comment your plumbing in length you've probably fucked something up in your design. There are exceptions of course but honestly most software doesn't need that much explanation if you have a few years of experience.

    You should be documenting your public interfaces though.

      • space_comrade [he/him]
        ·
        edit-2
        2 years ago

        If it's not legible it's better to rewrite it to be legible rather than adding more comments.

        Sometimes this is not possible because the code is inherently complex but most of the time it is IMO.

        Personally I don't have a problem with coming back to my sparsely commented code because unless I'm in a hurry I structure it properly so it's fairly easy to read. Usually it boils down to keeping your functions/methods small and doing proper separation of concern.

          • space_comrade [he/him]
            ·
            edit-2
            2 years ago

            The same argument works for other people's code too. If it's not garbage it probably won't need a whole lot of comments.

            Also during my years of professional experience I've decided to just bite the bullet and learn to read other people's code quickly. You're just not gonna get the required amounts of discipline to have nice clean documented code from your average developer because most of them (somewhat understandably) don't really give a shit about it, might as well just roll with it and try to not make it worse with your own code.

            It gets easier after the 10th legacy shitpile you're forced to maintain.