• Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    2
    ·
    edit-2
    1 year ago

    The liberty to not name things that are obvious.

    and that’s yet another way to end up with hard to read code.

    Variables hold values that have meaning. Learn how to name things and you’ll write good code.

    edit: someone just wrote an article along these lines. The only thing I’d change is the cause-effect relationship between bad names and bad code. IME bad names lead to bad code, not usually the other way around. The reason is that by starting from good name choices, it’s much easier to have a well structured code. And not rarely, bad names lead to mangled up code that screams for a refactoring.