• BleatingZombie@lemmy.world
    link
    fedilink
    arrow-up
    22
    ·
    6 months ago

    Variable names should be “self defining” meaning you should be able to understand what its doing from the name. The name also shouldn’t be too long. Combining those together makes it difficult to come up with an “elegant” name

      • Strawberry@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        6 months ago

        The most atrocious variable names I ever encountered in code were as a research assistant for a math professor doing game theory simulations. Literally unreadable unless you had a copy of his paper on the subject to refer to