4 ms·
This is the first time I'm hearing about this guy, but not sure why there's so much hate. It looks like he came from a non-technical background, and is trying
by AussieWog93 3y ago
This is the first time I'm hearing about this guy, but not sure why there's so much hate.
It looks like he came from a non-technical background, and is trying to make the language more noob friendly.
Compare the pair:
if isEven(n)
{
}
if (n % 2) == 0
{
}
I guarantee you my wife would have no idea what the second snippet even means.
- numpad0 3y agoif !(n & 1) {} // rightmost bit(LSB) is always `true` for odd integers
- extrememacaroni 3y ago[flagged]
- btdmaster 3y agoFor code golf purposes, ~n&1 works fine
- cperciva 3y ago// FIXME: This breaks on negative numbers on ones-complement machines
- MrJohz 3y agoThere's an argument to be made for writing functions like `isEven` and using them instead of n%2. There's an argument that the JS standard library, or other comprehensive util libraries like Lodash or Underscore should include these functions. The problem here is introducing separate dependencies for each of these tiny functions. Dependencies are code that you haven't written, but are still your responsibility. For a lot of things, that's a good tradeoff: if you don't have the expertise in a specific area, or if you can offload work to a dependency that you trust, that's great. But for micro dependencies like this, it's usually a bad deal - you don't get anything in return (seriously, how hard is it to write your own isEven function?) but you have to rely on a third party to be secure, to not push anything accidentally broken, to not change the API, etc. (I think it's also worth pointing out that your wife is not a paid programmer. Software development should be accessible, but this isn't the only goal, and I think it's reasonable to assume that most programmers either understand the n%2 idiom, or know enough to be able to find help on the subject.)
- buttercraft 3y agoThe hate is deserved. This person lacks ethics.
- wvh 3y agoMost professions require some sort of degree or license before you get to practice it. If your wife wants to develop software, she should learn the basics. Especially when her code is included in larger projects and ecosystems. I think the criticism comes from the fact it is hard to avoid driving over badly designed bridges or avoid wasteful dependencies in the Javascript ecosystem due to the way the package management is organised, and it is felt this specific person contributes a lot to that problem. I have no knowledge of this person, but I often avoid Javascript and NPM for exactly that reason. I'm hopeful of Deno though to fix some of that mess.