3 ms·
Thanks for sharing this nice bit of code; we always learn from examples, we should see more of this. I feel the naming is too short, things are just a little t
by sonnyblarney 8y ago
Thanks for sharing this nice bit of code; we always learn from examples, we should see more of this.
I feel the naming is too short, things are just a little too specifically compact and slightly cryptic ... almost like the author is trying to say something ...
I've never said this before about code ... but I think that code is 'smug'!
Like odd facial hair, or one of those valley-specific t-shirts ... the code trying to project how cool it thinks it is!
That code is 'humble-bragging' ...
- SmellyGeekBoy 8y agoReally? It just looks compact and efficient to me.
- smt88 8y ago"Compact" (abbreviated) names are negligibly more efficient when machines read them, and they're wildly less efficient when humans read them. Code is read many more times than it's written, so it doesn't make sense to optimize for fewer keystrokes when typing the code. This is especially true with modern IDEs that autocomplete everything.
- eadmund 8y ago> Code is read many more times than it's written, so it doesn't make sense to optimize for fewer keystrokes when typing the code. That's actually probably not the case with JavaScript, so it may indeed make more sense to write it to be more efficient to execute.
- smt88 8y agoPost-processors do that much better than a human and can also tree-shake. There's no reason for a human to do it.
- PunchTornado 8y agoExactly, those function names hurt my brain: remClass -> does it hurt to write removeClass ? what is vis, ind, posf? I shouldn't have to decipher the function to figure out what its name might mean. Hacker? no. Smug? yes
- e12e 8y agoToo compact? It's the size of an APL implementation, and all it does is some ux... ;)