24

Fuckwit tried to lecture me on clean code.

Checked his work, it seems like he writes the spaghettiest spaghetti I've ever seen. Who would have guessed it. At least he knows that something called 'clean code' exists.

Comments
  • 0
  • 0
    I've Seen production code, where a variable gets set via anonymous-map-function AND checked for length afterwards in the same if-condition. in a single line. I nearly died reading that.
  • 0
    @heikomat I'm still trying to comprehend this.
  • 1
    @IAmNotARobot

    ...
    let foundExpands;

    if (createEntityOption.expandEntity && (foundExpands = createEntityOption.expandEntity.filter((expand) => propertyKey === expand.attribute)) && foundExpands.length === 1) {

    const expand = foundExpands[0];
    ...
  • 1
    @heikomat This... this is art! 😁
Add Comment