• BleatingZombie@lemmy.world
    link
    fedilink
    arrow-up
    15
    ·
    7 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
        3
        arrow-down
        1
        ·
        7 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