News for hackers. Stuff that matters.
Re:Things People Eventually Learn About JavaScript Projects by globuous on Monday August 20, 2018 @04:18PM (#17803559)
Regarding your first point, in side projects, I've started doing things like this:

  for c in customers:
    return c.first_name + c.last_name
or:

  customers.map(c => c.first_name + c.last_name)
I've started doing this because I didn't like having "customers" and "customer", I found this very un-readable. It also makes it simpler to follow what's going on since I have less code to parse.

And because I never use 1-lettered variable names (unless it's a counter like i, j, k), I find it very easy to read when this convention occurs in my code.

Re:Things People Eventually Learn About JavaScript Projects by anonytrary on Monday August 20, 2018 @04:29PM (#17803656)
Using single char variables is fine and IMHO leads to more concise code without sacrificing readability. When you are looping over a set, it's very common to think about it like `for all x in Xylophones do {...}`. For example in a nested loop, I would much rather prefer `i` and `j` over `iterativeAuxiliaryVariable1` and `iterativeAuxiliaryVariable2`. Never using single character variables as a "best practice" is just bad advice. As with pretty much everything in programming, the real answer is "it depends".
Re:Things People Eventually Learn About JavaScript Projects by DogLover_ on Monday August 20, 2018 @04:29PM (#17803653)
Yes, I personally like this style.

Its not a lack of thinking or laziness. Its just easier to read.