14
msdsk
4y

"Loops? Reducers? No, we've never have heard of that."

Comments
  • 6
    Perfect implementation out of the corporate code monkeys handbook. 10/10
  • 1
    How would a loop solve this? How would a reducer solve this?

    Aside from the +=, this is perfectly reasonable and understandable code, and I would imagine it's much more performant than using any fancy control logic.
  • 1
  • 0
    @junon Loop over the field names?
  • 3
    Assuming all the other ratings will always be available, as soon as the first one is present... 😂
  • 2
    How about... Just this crazy idea...

    We use... Objects.

    I know... Crazy.

    And now. Deep breath! Darum dum dum....

    Fuuuunnnctttiooons.

    Yeah. Dope shit. Right?

    And if we put the object in the function, do not modify it, and return the correct value...

    Whoooaaa....

    No iffies. No elsies. Nothing like that.

    We could even do fancier stuff, but right now. Start there.

    *shakes head*
  • 3
    Is no one else getting that urge to fix the spacing at the comma ,it's really grinding my gears right now.
  • 1
    Nah, loops are too complicated. Nobody can comprehend what they are doing.
    Reducers? No, no, no. That is devilish witchcraft.
  • 1
    @C0D4 I hate you for allowing me to notice i t

    time for php-cs-fixer
  • 4
    @alexbrooklyn 😅 I can deal with shit code, I can't deal with shit formatting.
Add Comment