• fkn@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Self documenting code is infinitely more valuable than comments because then code spreads with it’s use, whereas the comments stay behind.

    I got roasted at my company when I first joined because my naming conventions are a little extra. That lasted for about 2 months before people started to see the difference in legibility as the code started to change.

    One of the things I tell my juniors is, “this isn’t the 80s. There isn’t an 80 character line limit. The computer doesn’t benefit from your short variable names. I should be able to read most lines of code as a single non-compound sentence in English with only minor tweaks and the English sentence should be what is happening in most of those lines of code.”