Single character variable names are my pet peeve. I even name iterator variables a real word instead of “i” now… (although writing the OG low level for loops is kinda rare for me now)
Naming things “x”… shudder. Well, the entire world is getting to see how that idea transpires hahah
X, y, and z should only be used when working with things with dimensions larger than 1. Indexing into a 2D array, x and y are great uses. I’m also totally fine with i and j for indexer/iterator when appropriate, but I hate when people try to make short variable names for no good reason. We have auto-complete just about everywhere now. Make the names descriptive. There’s literally no reason not to.
I hate short variable names in general too, but am okay with them for iterators where i and j represent only indices, and when x/y/z represent coordinates (like a for loop going over x coordinates). In most cases I actually prefer this since it keeps me from having to think about whether I’m looking at an integer iterator or object/dictionary iterator loop, as long as the loop remains short. When it gets to be ridiculous in size, even i and j are annoying. Any other short names are a no go for me though. And my god, the abbreviations… Those are the worst.
That’s very reasonable, I can get behind that. (my stance is a partly irrational overreaction and I’m totally aware of it lol)
Abbreviations are definitely annoying. My least favourite thing to do with them is “Hungarian notation”. It’s like… in a statically typed context it’s useless, and in a dynamically typed context it’s like… kind of a sign you need to refactor
Hungarian notation makes sense in a dynamically typed usage (which I despise, but this essentially makes them notationally typed at least) or where you’re editor/IDE is so simple it can’t give you more information, which I can’t see ever being the case in the modern day.
Single character variable names are my pet peeve. I even name iterator variables a real word instead of “i” now… (although writing the OG low level for loops is kinda rare for me now)
Naming things “x”… shudder. Well, the entire world is getting to see how that idea transpires hahah
X, y, and z should only be used when working with things with dimensions larger than 1. Indexing into a 2D array, x and y are great uses. I’m also totally fine with i and j for indexer/iterator when appropriate, but I hate when people try to make short variable names for no good reason. We have auto-complete just about everywhere now. Make the names descriptive. There’s literally no reason not to.
vim
Press XN, I dare you.
I hate short variable names in general too, but am okay with them for iterators where i and j represent only indices, and when x/y/z represent coordinates (like a for loop going over x coordinates). In most cases I actually prefer this since it keeps me from having to think about whether I’m looking at an integer iterator or object/dictionary iterator loop, as long as the loop remains short. When it gets to be ridiculous in size, even i and j are annoying. Any other short names are a no go for me though. And my god, the abbreviations… Those are the worst.
That’s very reasonable, I can get behind that. (my stance is a partly irrational overreaction and I’m totally aware of it lol)
Abbreviations are definitely annoying. My least favourite thing to do with them is “Hungarian notation”. It’s like… in a statically typed context it’s useless, and in a dynamically typed context it’s like… kind of a sign you need to refactor
Hungarian notation makes sense in a dynamically typed usage (which I despise, but this essentially makes them notationally typed at least) or where you’re editor/IDE is so simple it can’t give you more information, which I can’t see ever being the case in the modern day.