24
C0D4
3y

Same days you just need a duck.

Me: map.get(record.Id)

Code: null

Me: no, map.get(record.id)

Code: null

Me: let's grab this record from the map

Code: null

Me: what the flying fuck, take this fucking ID from this fucking RECORD and find it in THIS god forsaken map.

Code: null

Me:.......

Code: 😉

Duck: did it occur to you the ID exists only AFTER the map is created.

Me: you fucking wha..... oh I'm a dick head.

Comments
  • 0
    type error: not a function
  • 0
    Idk if it's the same but you need a devDuck sometimes. M E R C H
  • 0
    Id? null
    id? null
    ID? null
    Identifier? null
    identifier!

    The joys of crappy languages like JS ^^
  • 0
    @Lensflare ... Having cAsE sensitive varianle names is a con? Since when?
  • 0
    @melezorus34 no. You didn’t get the point.
    Needing to try out names of variables and functions to see if you picked the correct one is a con.
    Ideally, you want your IDE or compiler tell you immediately that this doesn’t exist and suggest the correct name.
    So that you don’t need to execute the whole code.
  • 0
    @Lensflare then your intrepreter or ide suck bro.

    intrepreter:

    Map.prototype.has(id) exists
    <prop> in <object> exists
    Is it a global?
    <var> in globalThis exists

    IDEs:
    JSDOC exists
    TS exists
    Even the small auto complete helps eith reducing typos
  • 0
    @melezorus34 yes, TS helps. And is exactly my point.

    But I wanted to make a general argument about dynamic languages like JS (or python maybe) where you have those issues.
Add Comment