41

Who prefers long descriptive variable names compared to variables that are acronyms?

Comments
  • 3
    This guy
  • 12
    Yes, descriptive names help create self-documenting code.
  • 0
    Yep, me too.
  • 1
    it really depends i am a fan of variables like retVal in functions its fairly obvious whats going to happen to it.
  • 1
    Depends whether I'm writing or reading the code :-D
  • 0
    I lean towards longer descriptive variables but only because my syntax suggestions are absolute 🔥🔥 and it doesn't many more keystrokes..
  • 0
    return_value and return_code are better than ret
  • 3
    I had to debug a 15-year-old C codebase recently. I *wish* whoever wrote it had used verbose variable names.
  • 2
    Depends on situation but in most cases I'm for. We develop security appliaction with realtime alarm console based on websockets and we use there one- or two-letter named variables in order to minimize amount of data sent to the browser.
  • 0
    only and only descriptive names - self explained code, more ease on the eyes and the brains, faster code reading.
  • 1
    *agrees*
    *looks at own code, with variables like: SomeVar, RandoVar, NeuArray, SomeArray*
    "Bloody Idiot"
  • 2
    Acronyms are the devil! Its always perl devs that do this, I swear... If I have to look through one more 10 yr old perl script that looks like hieroglyphics, I'm gonna flip a bitch!
  • 1
    "Clarity is the King", said Uncle Bob.
  • 5
    Yes, of course! But there's a practical limit at which "descriptive" becomes "unreadably verbose." (I'm looking at you, Java...)
  • 0
    @fonfi doesn't minification do this for you?
  • 0
    I do if it's other people's code lol, but I still tend to do acronym vars in my own scripts.
  • 1
    descriptiveNamesAreTheWayToDoIt
  • 0
Add Comment