Protip to Dumbtip: avoid over-engineering
Today, I saw this JS code:
var that = (function () {
return this;
}).call(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.
Written by Xavier Cambar
Related protips
2 Responses

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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#