I'm completely apathetic about spicy autocomplete for coding tasks and even I wonder which terrible code would be worse.
The guy who wrote is even/odd was for ages using a specifically obscure method that made it slower than %2===0 because js engines were optimising that but not his arcane bullshit.
As usual, he's copying someone else who's been doing this for years:
https://www.npmjs.com/package/is-number - and then look and see shit like is odd, is even (yes two separate packages because who can possibly remember how to get/compare the negated value of a boolean??)
Honestly for how much attention JavaScript has gotten in the last 15 years it's ridiculous how shit it's type system really is.
The only type related "improvement" was adding the class keyword because apparently the same people who don't understand "% 2" also don't understand prototypal inheritance.
That's a good point, it's only been around for 30 years, and used on 95% of websites. It's not really popular enough for a developer to take an hour or two to read how it works.
The word "used" is doing some heavy lifting there. Not all usage is equal, and the fact that it's involved under the hood isn't enough to imply anything significant. Subatomic physics is used by 100% of websites and has been around for billions of years, but that's not a reason to expect every web developer to have a working knowledge of electron fields.
Let's compromise and say that whoever is responsible for involving (javascript|electron fields) in the display of a website, should each understand their respective field.
I don't expect a physicist or even an electrical engineer or cpu designer to necessarily understand JavaScript. I don't expect a JavaScript developer to understand electron fields.
I do expect a developer who is writing JavaScript to understand JavaScript. Similarly I would expect the physicist/etc to understand how electrons work.
The issue with this framing is that understanding something isn't a binary; you don't need to be an expert in every feature of a programming language to be able to write useful programs in it. The comment above describing prototypical inheritance as esoteric was making the point that you conflated the modulus operator with it as if they're equally easy to understand. Your responses don't seem to indicate you agree with this.
It sounds like you expect everyone to understand 100% of a language before they ever write any code in it, and that strikes me as silly; not everyone learns the same way, and some people learn better through practice than by reading about thinks without practice. People sometimes have the perception that anyone who prefers a different way of learning than them is just lazy or stupid for not being able to learn in the way that they happen to prefer, and I think that's both reductive and harmful.
Given that they literally changed the language to support the class keyword, I think we can safely assume it isn't just the beginners who never bothered to learn how prototypical inheritance works.
The primary cause of JS bloat is assuming you need JS or that customers want whatever you're using it to provide.
For $client we've taken a very minimal approach to JavaScript, particularly on customer facing pages. An upcoming feature finally replaces the last jquery (+ plugin) dependent component on the sales page, with a custom implementation.
That change shaved off ~100K (jquery plus a plugin removed) and for most projects now that probably seems like nothing.
The sales page after the change is now just 160K of JS.
The combination of not relying on JS for everything and preferring use-case-specific implementations where we do, means we aren't loading 5 libraries and using 1% of each.
I'm aware that telling most js community "developers" to "write your own code" is tantamount to telling fish to "just breathe air".
160K total is impressive. most landing pages i see are shipping 2-3MB of js before the first paint. the "write your own code" approach gets laughed at but when you actually do it the result is faster, easier to debug, and you dont wake up one morning to find out one of your 200 dependencies got compromised.
If at this point you (where you may be a person or a company) still think relying on spicy autocomplete is a smart decision, I can't fucking help you, and you deserve whatever bad things happen to you.
This is akin to saying "we are fully committed to slapping together sql queries directly from request data, but I wonder if it's risky?"
Part of security awareness is knowing when something is simply not worth the risks.
There's an oft repeated claim about "Modern Browsers are some of the most complex projects"
Yeah no shit, when you have browser vendors shipping features that have no place in browser, it's hardly surprising.
Why does a browser need screen sharing built in? Why does it need a vpn client?
You know there's a fucking operating system running under the browser that can run those things without worrying about how they impact on a fucking browser, right?
It's not even "arguably" for me. Of course DNS should be left to the O/S otherwise I'm going to spend half my time diagnosing why the browser is going to the wrong destination.
Y combinator absolutely profits from encouraging group think and positive attitudes about things they're involved in.
How else would you get a large part of the tech world to somehow believe that suckling on the teat of Venture capital until that elusive "exit" is the holy grail of business models?
Regardless of how you think HN makes the service free, I'm pointing out to the OP that he is using a service that is free and he is the product. It seems like he is ok with this concept. So why wouldn't he be ok with he Mozilla free VPN concept.
Seems like a pretty easy solution so many people overlook when coming up with increasingly asinine rube Goldberg like solutions to problems that are inherent to relying on spicy autocomplete.
This whole obsession is like if a large proportion of very loud bus drivers all just decided one day that the way to be better at their job is if they say (both figuratively and literally, very loudly) "Jesus take the wheel".
Then of course they have to deal with the obvious and predictable outcomes, with their own ridiculous solutions. "Are you tired of Jesus running red lights with pedestrians crossing? Install our patented pedshield mattress to the front of your bus today!"
It's never just one mistake. It's usually a chain of mistakes and bad decisions that make the final mistake possible.
I'd estimate that there were likely 77,168,458 mistakes/bad decisions made by individuals before this mistake could happen.
reply