The "hipster hacks" are things you not necessarily use but are fun things to try. Some of these are for fun (like #1) and others (like #2) are day to day life-savers.
The rest are pretty common, I would not consider reduce() or passing an object to a function instead of separate arguments hipster hacks at all. "Options" objects are ubiquitous in corporate SDKs like AWS and Azure. They are the opposite of hipster.
5 comments
[ 3.1 ms ] story [ 22.8 ms ] threadSide note: has anybody ever had to actually swap variables in production code? I thought it was just a fizzbuzz interview question.
Indeed the swap variables is a fun fact.
I did that today to swap the content of two plain objects without altering the references.
It was in Lua but I'll probably to that in JS too tomorrow.
The rest are pretty common, I would not consider reduce() or passing an object to a function instead of separate arguments hipster hacks at all. "Options" objects are ubiquitous in corporate SDKs like AWS and Azure. They are the opposite of hipster.