Last Updated: February 25, 2016
· xcambar

Protip to Dumbtip: avoid over-engineering

Today, I saw this JS code:

var that = (function () {
  return this;

Although it is syntactically and programmatically correct, it reveals one common anti-pattern in many devs: over-engineering

Please, stop thinking too much when it is not absolutely necessary.

Think of your goal, then go straight to it.

2 Responses
Add your response


If only they would have used a double-closure. That would have made it much better.

over 1 year ago ·

@nrutman And then obfuscate it.

over 1 year ago ·