12

KISS, DRY, Path of Least Resistance, Three Strikes and You Refactor, early returns, no array.map when nothing is returned, only use switch when # cases >= 3.

And using var in javascript instead of let/const to piss off my colleagues (and because I understand function scope well)

Comments
  • 5
    Var?! I'm beyond pissed off, I'm disappointed.

    Luckily our team enforces airbnb styling with pipeline checks
  • 2
    Never heard of the Three Strikes rule, but it's not bad. I'm not a huge fan of dogmatic practices personally, but it's a decent rule nonetheless.
  • 3
    @junon like everything else in life, I feel like these are guidelines rather than rules. I personally have had to force myself to violate DRY for readability, testability, and debugging.
  • 1
    I used to think I understood function scope. Then I started doing javascript. Although sometimes I wonder if I do understand it and this project just sucks.
  • 2
    @alexbrooklyn With all the shitty hires my company has, my code base would be a pile of toxic waste if I didn't have pipelines enforcing this shit.
  • 1
    @hashedram hope they're not on devrant and know your handle ;D
Add Comment