12 Matching Annotations
  1. Feb 2024
  2. Apr 2023
  3. Aug 2022
    1. It's often a good idea to replace common primitives, such as strings, with appropriate value objects.
  4. Jul 2022
    1. It made sense when JS was doing small simple things in HTML - it doesn’t make much sense anymore

      No, it still makes sense.

      Insisting that everyone use === everywhere, on the other hands, makes as much sense as disallowing method declarations that accept a parameter that implements an interface (in favor of formal parameters that insist on a certain class or a derivative), or injecting a bunch of instanceof checks for no good reason...

    2. I have rarely encountered a good reason to use == in JS. Most of the time, or you are relying on it, you are probably doing something wrong.
    3. Easier to just add a new operator that does things the right way and keep the original == operator as is. That way people can transition on their own time

      Stupid myth.

  5. May 2022
    1. typeof v === "number"

      Using triple equals to check the results of typeof is totally unnecessary, and a sure sign that someone, somewhere has unthinkingly adopted some dubious advice; it's a code smell/red flag.

      A standard equality comparison (using ==) does exactly the right thing while also avoiding association with questions/doubts about the quality of the surrounding code.

  6. Mar 2022
  7. Feb 2017
    1. Though black their skins as shades of night Their hearts are pure, their souls are white

      I can fully understand how this poem would help to win over the whites among her crowd, but it seems to be a bit like she is giving in to the idea that white is better than black. It comes off to me that she is stating they are not equals unless the souls reflect as white.