38

For the love of God use descriptive variable names. I dont care if it is 15 characters long instead of 5. Besides any halfway modern IDE does auto completion.

"tTime" is not helpful. Target time? Test time? Total time? Tea time? Turtle Timmy? No clue...

Comments
  • 8
    Shit if it has to be this_is_my_variable_name_right_here, that's 100% better than v_name
  • 11
    TempFilteredSalesOperationMonthlyData

    /s
  • 8
    @devTea ...AbstractFsctorySingletonInstanceGetter
  • 3
    @alexbrooklyn your type seems a bit odd. But idk, maybe it makes sense it your domain :)
  • 5
    German notation for the win. IDGAF if the name is three words long and used in only three lines of code, just make it clear what I'm looking at.
  • 6
    @halfflat Well, that's both side of extremes in this case.

    I loved the theory where:

    - for loop - must have single letter.
    - variables should tell you what they store (ex. usersArray)
    - you should go fuck yourself if you thing that list of users according to their last payment type should be called `list` instead of `usersByLastPaymentType`.

    I've seen many cases where variables were so dumb that it actually made it hard to read. Seen cases where they were way too long for what they needed to be. Still made it hard to read.

    So people should meet in-between :D
  • 2
    @alexbrooklyn my life rn, including the typo
  • 4
    Suggest using chinese naming. You can write your whole life story with few characters.
  • 2
    Terry_Pratchet.getDiscworld().getAnkh_Morpork().getMr_Jonathan_Teatime();
  • 5
    Be grateful you're not dealing with my code. I declare an array instead of 10 variables and use each element individually. Helps with job security, reduces cold storage usage, and increases compilation time and electricity usage
  • 6
    Everything should be made as simple as possible, but not simpler.
    —Albert Einstein
  • 4
    For real hell try to figure this out xD

    @highlight
    I = 0.5
    a = "rmkehilowd"
    b = a[4] + a[3]
    c = a[6] * 2
    d = a[7]
    e = " " * 2
    f = a[-2] + a[-3] + a[0]
    g = a[-4] + a[-1]
    O = [b, c, d, e, f , g].join()
    x = random()
    if x < I:
    print(O)
    else:
    print(a[2] + a[-5] + a[-6] + a[-6])
    print(a[1] + a[3])
  • 4
    @python3
  • 2
    walletTransactionComputeResultsForWalletTransactionList
  • 3
    @python3 it is either "hello world" or "kihh me"
  • 4
  • 2
    Maybe t indicates type?
    Not sure why but I've seen some people write
    var xNameOfVar = value;
    instead of
    x nameOfVar = value;
  • 6
    "tTime" is Hungarian notation for timestamp type variable named "Time", it's the most popular variable naming convention in the world. If its used in the base code you're going to modify, you should learn it first.

    https://en.wikipedia.org/wiki/...
  • 2
    tittyTime 🤪
  • 5
    Until the moment you return in JSON array of 10.000 elements and each element has 5 properties named like “totalAmountOfHoursUsed”. And then your JSON is around 50 MB and client’s browser dies
  • 1
    @angrysnekguy
Add Comment