• SolarMech@slrpnk.net
    link
    fedilink
    arrow-up
    15
    ·
    1 year ago

    Generally, you can replace some comments with variable names or comment names. Which means you must already be in the habbit of extracting methods, setting new variables to use appropriate names, and limit context to reduce the name (Smaller classes and methods means shorter names can be just as expressive, because the context is clearer). It lowers the number of wtfs per minute you get reading code before you even need whole sentences to explain why things are done in a certain way, because the names can be a powerful hint.

    But realistically, you end up needing comments for some things anyways.