5 ms·
Um, is this supposed to be a criticism? Because this is MUCH better than sites loading megabytes worth of scripts to do nothing more than render text, have doz
by Aardwolf 8y ago
Um, is this supposed to be a criticism?
Because this is MUCH better than sites loading megabytes worth of scripts to do nothing more than render text, have dozens of floating elements everywhere, auto playing videos that follow you, "use our app" buttons, etc...
JS is the assembly of the web, do you also criticize games written in assembly?
- krapp 8y ago>JS is the assembly of the web, do you also criticize games written in assembly? No it isn't, any more than C++ is the assembly of your operating system. Assembly has the terseness that it does because of constraints that javascript doesn't have -- this javascript looks the way it does because the author wanted it to look like lisp code, not because it has to.
- Aardwolf 8y agoAt least it's the lowest level programming language for browsers I know. So perhaps I should have said "machine language of the web" because assembly isn't the lowest level :)
- erikpukinskis 8y agoAssembly, used this way, just means “the words that create action at the layer below which you cannot go”. Also referred to as “metal”. Depending on where you are starting that could be JavaScript, or it could be Basic, or any of a number of things. In the browser it’s JavaScript. This only makes sense if you can see that there are machines within the machines, within the machines.
- krapp 8y agoFair enough, it's a metaphor, but a fragile one that breaks down easily, as I believe it has here. Using actual assembly to defend terse coding in javascript because javascript is "assembly for the web" doesn't work.
- erikpukinskis 8y agoThat’s true.
- vonseel 8y agomacOS just notified me that one tab in Safari was using so much memory it was threatening performance of my laptop. The website in question? https://idioms.thefreedictionary.com/ https://idioms.thefreedictionary.com/ It was close to 2Gb RAM usage. Bunch of ad-tracking stuff, I assume, as Firefox and its related processes seem to be using less than 1250mb with 6 tabs open, including the site mentioned in 2 tabs. My firefox has uBlock origin installed. Seemed related to the second paragraph in your comment
- always_good 8y agoLast week my bandwidth grounded to a halt which is usually the result of someone uploading on my network. I went to my girlfriend's computer to see if she was syncing with Dropbox or something. Nope. She quit all of her applications just to be sure. Except for a single browser tab opened to a recipe for pita bread. Yep, turned out that a recipe for pita bread was saturating our router because what looked to be buggy error-handling for ad-related network code. I think her ad-blocker only partially maimed it, so it went apeshit.
- richk449 8y agoHow was the pita?
- LiterallyDoge 8y agoFound the Hufflepuff.
- JanisL 8y agoSounds like a PITA recipe
- antisthenes 8y agoThere is a certain irony about a dictionary web-page using 3 times more memory than it takes to store the entire Oxford English dictionary (and accessory publications), that is undoubtedly more complete.
- golergka 8y ago> JS is the assembly of the web, do you also criticize games written in assembly? If it's a typical platformer from 1980s, now. If it's a modern game with a modern game's complexity, it would never be finished in assembly anyway.
- TeMPOraL 8y agoThen again, clones of games from 1980s in modern engines are considered toy projects. The equivalent on the web is considered standard practice.
- vmchale 8y ago> JS is the assembly of the web, do you also criticize games written in assembly? hm
- ceronman 8y agoI don't know if the author is experienced or not. But something I do know, is that the more experience I get, the more I fear dependencies and the more I value simplicity. HN is a simple website. I'm glad that they decided to keep the code simple as well. I love the fact that the code almost fits in a single screen. Zero dependencies. You can understand the entire code in a few minutes. I think new developers greatly underestimate the negative impact of dependencies. Today, something like create-react-app downloads hundreds of megabytes of dependencies. Libraries, transpilers, compiler extensions, and various tooling. Of course all those things come with many advantages, but what most people miss is the huge cost of all that. The increased complexity introduced by dependencies. The unnecessary bloat. Sure, the way you name your variables have an impact on readability. But it's nothing compared to adding thousands of dependencies to your project.
- antidesitter 8y ago> Because this is MUCH better than sites loading megabytes worth of scripts to do nothing more than render text, have dozens of floating elements everywhere, auto playing videos that follow you, "use our app" buttons, etc... False dilemma. Code can be concise and readable. > JS is the assembly of the web No. Assembly is supposed to have a virtually one-to-one correspondence with machine code. JavaScript is far from that. It is a higher-level language. > do you also criticize games written in assembly? I would indeed criticize someone writing a game in assembly if an alternative was available.