← concepts · the commons
variable name
also known as variable names · variable naming
8 moment(s) that assert this concept — showing 1–8 of 8
strong7 independent sources
↣ how this spread over time →Technology Connextras · youtube · en
1Using natural language terms like 'filled orders' and 'back orders' instead of cryptic abbreviations improves code clarity and comprehension.
“why don't we use those terms”
spoken · 268s · 2022-12-25
Computerphile · youtube · en
2The evaluator must split each line at most twice to extract the variable name, equal sign, and expression.
“split the line uh and then split it at most twice that will give me back three things it will give me the variable name the equal sign so I'm going to assign that to underscore throw it away don't care and the expression”
spoken · 499s · 2024-11-19
Computerphile · youtube · en
3A dictionary data structure maps variable names to their values and is used to store and retrieve variable values during program evaluation.
“I'm going to have a very simple python calls this a dictionary you might call an associated instead of having subscripts which go from let's call it zero to something you have arbitrary subscripts this data structure the maps names variable names to values”
spoken · 539s · 2024-11-19
Toronto PerlMongers · youtube · en
4Pearl 6 supports hyphens in variable names, making code easier to type
“you can use hyphens as part of the variable names and it that makes it much easier to type code”
spoken · 227s · 2016-03-31
Lex Fridman · youtube · en
5The use of emojis in variable or function names, such as 'dog cow', is supported in some languages like Swift and reflects a cultural trend in programming communities.
“the dog cow yeah so that's a classical Mac Heritage thing and so he's the dog and the cow emoji together and that could be your variable name”
spoken · 398s · 2023-06-02
The Science Elf · youtube · en-US
6TI-BASIC limits variable names to single letters and restricts color depth to 15 colors over a fraction of the screen.
“TI-BASIC only lets you use single letter variable names. There are only 26 places to store values in the program, and the code is practically unreadable because of it. TI-BASIC also limits you to 15 colors over a fraction of the full screen.”
spoken · 85s · 2022-02-10
PyCon 2015 · youtube · en
7The speaker suggests that shortening variable names can help avoid PEP 8 formatting issues, but acknowledges that this makes the code worse.
“I can save myself some line wrapping if I just shorten my variable names there.”
spoken · 247s · 2015-04-11
Strange Loop Conference · youtube · en-US
8Variable names can exhibit linguistic smells that are not structurally flawed but still indicate poor naming practices, such as using 'isValid' which suggests a Boolean return type but may misleadingly imply additional data like an internal ID.
“if you have an example like this where you have an external ID that is going to be validated, maybe we do some sort of conversion, right, you take our external ID like a customer number or student number, we try to convert it to an internal ID, something maybe we use in the database. If this conversion succeeds, then we have this internal ID, and we try to be smart, we don't just say here's True, we also give this internal ID back. This is easy because then in the call site, you have this ID that you can then use to query the database.”
spoken · 188s · 2022-05-20