6 ms·
To be fair, people have been studying and predicting celestial movements for millennia, and boiled it down to unbelievably precise mechanical formulae. JS is po
by mark_edward 8y ago
To be fair, people have been studying and predicting celestial movements for millennia, and boiled it down to unbelievably precise mechanical formulae. JS is poorly understood in comparison.
I say this to hope you feel better at work. I've been pressed into frontend web work and it's fractal complexity.
- tenaciousDaniel 8y agoJS is poorly understood in comparison This might be the most hilariously ridiculous true statement I've ever heard.
- Tepix 8y agoIn javascript: x == x _ is true. Good. x == !x _ is also true. Oops? And guess what: Array(3)==",," _ is also true. But NaN == NaN _ is false. Math.max()>Math.min() _ is also false! but then again Math.max()<Math.min() _ is true. Madness, I tell you!
- deleted 8y ago[deleted]
- bjoli 8y agoI just looked at the famous left-pad for the fastest way o implementing a pad function in JS. I asked a friend that does web dev and it is apparently pretty idiomatic JS. Pretty appalling. I finally understood why people claimed it was "hard to get right".
- scott_s 8y agoNaN not being equal to itself is true in all languages with IEEE compliance: https://en.wikipedia.org/wiki/NaN https://en.wikipedia.org/wiki/NaN
- conistonwater 8y agoNitpick: NaN is supposed to work like that: the rule is that every comparison of any value against NaN returns false.
- sixothree 8y agoAt least x === x, right?
- dak1 8y agoconst x = NaN; x === x; // false
- SkyMarshal 8y ago:D Many more Javascript WTF's here: https://www.youtube.com/results?search_query=javascript+wtf https://www.youtube.com/results?search_query=javascript+wtf
- joezydeco 8y agoBut they're close to getting two numbers to add together! https://twitter.com/thomasfuchs/status/933447631514169344 https://twitter.com/thomasfuchs/status/933447631514169344
- sandebert 8y agoThey should use jQuery for that. I hear it's good for all the things.
- bitwize 8y agoYes, but you're wading into the JavaScript weeds for what? More CRUD forms? Meanwhile... "With a combination of large ground-based FORTRAN programs and small spacecraft-based assembly language programs, [Real Programmers] are able to do incredible feats of navigation and improvisation -- hitting ten-kilometer wide windows at Saturn after six years in space, repairing or bypassing damaged sensor platforms, radios, and batteries. Allegedly, one Real Programmer managed to tuck a pattern-matching program into a few hundred bytes of unused memory in a Voyager spacecraft that searched for, located, and photographed a new moon of Jupiter. The current plan for the Galileo spacecraft is to use a gravity assist trajectory past Mars on the way to Jupiter. This trajectory passes within 80+/-3 kilometers of the surface of Mars. Nobody is going to trust a PASCAL program (or a PASCAL programmer) for navigation to these tolerances."
- Jesus_Jones 8y agoThose are impressive sounding achievements. I haven't heard of all of those, can you provide references or details about the stories?
- bitwize 8y agoI'd like to, but the original was from "Real Programmers Don't Use Pascal" by Ed Post: http://web.mit.edu/humor/Computers/real.programmers http://web.mit.edu/humor/Computers/real.programmers You would be better off asking him about the veracity of the stories.
- adonovan 8y agoIt's true. Some of the greatest minds have spent 20 fruitless years trying to discover a unified theory of object fields and elementary values in JavaScript.