258

Programmers: Always use descriptive variable names.

Mathematicians: Single letter variable names always, ideally from obscure/dead alphabets.

Src: Twitter

Comments
  • 16
    It's really hard to write a huge equation on a whiteboard when each variable has a name with 10+ characters 😅
  • 7
    Also the combination of letters is ambiguous if you use them, does sun mean s*u*n or the single variable sun
  • 3
  • 12
    Twitter is not a valid source. That's like saying it's from 'The Internet'. Give the person the damn credit they deserve.

    At least you almost tried.
  • 6
    Credit to @DanTwoHundred on Twitter.
  • 1
    Why I hate writing math code. I constantly need to remember a mapping between the single-letter names and my own variables.
  • 2
    @Fydrenak I copied the text, pasted it here but forgot to post it because I got called and after that I continued programming.

    A few hours later I came back to devRant but I forgot who's tweet it was, so I just said Twitter.

    @Zaphod65 yeah, that's him.
  • 0
    Actually I´m both and I HATE too short variable names when coding :D
  • 0
    @configurator how about writing m_a where a is the math variable and using elsewhere normal variable names. So m_ prefix will mean it's a math variable
  • 1
    @Niteraleph I think the problem is the gap between the maths as written in a text book or whatever, and the code. That issue isn't going to go away any time soon...
  • 0
    @Niteraleph somehow you've managed to come up with an even more confusing method for translating math to code.
  • 1
    In mathematics' defence, it's a lot easier to write 3x + 4 than 3randomVariableName + 4
  • 0
    I study maths and it is hard
  • 0
    Also in CS you with with shit tons of variables but in maths it's mostly one.
  • 1
    That is because they don't have autocomplete!!! Muahaha
  • 0
    While I get the reason for using single letter names in mathematics, I do wish they didn't extend it to programming. Haskell, in particular, encourages single letter names (in certain cases), which can produce totally unreadable code. Eg. It's highly frustrating to see a (Parser a f d s) or something type when you're rushing to meet a deadline.
Add Comment