Search posts, tags, users, and pages
I'm actually disturbed by the idea of people who ENJOY coding JavaScript... it's something that was forced upon us as the ONLY choice in-browser.
... and it catching on outside the browser is little more than the (very attractive) idea that if you HAVE to use it on the front-end, you might as well use the same language on the back end.
That doesn't make it enjoyable -- not by a long-shot. It is a ugly hack-ish language wrought with issues that often just makes simple tasks harder. There are times newer stuff like NPM and node.js in general just makes me want to punch someone in the face. To be brutally frank, a LOT of the recent changes (let, const, arrow functions) are only compounding the problems making it WORSE!
... but sometimes it's all you've got to work with, and sometimes it's just easier to use it for everything rather than mix-match languages willy-nilly.
That's programming -- and even computing as a whole -- in general. It's all about balances and weighing the pro's and con's. JavaScript has its fair share of both. It's not my first choice, but sometimes it's the only choice.
Hey Jason Knight, I'd like to hear more about the whys of
There are times newer stuff like NPM and node.js in general just makes me want to punch someone in the face. To be brutally frank, a LOT of the recent changes (let, const, arrow functions) are only compounding the problems making it WORSE!
Arihant the sheer massive ridiculous size projects get with NPM is a good part of it -- the LACK of quality or anyone double-checking what they "include" contributing to that even further. I keep coming across projects of dozens of includes and hundreds of K of JS to do what I'd be doing in a few dozen k with no includes.
That it's a house of cards as shown by when Koçulu (aka Kik) de-listed his codebase and a slew of projects when bits-up all over a function THAT IF YOU'RE USING NODE.JS ALREADY HAS AN EQUIVALENT BUILT INTO ECMASCRIPT 6!!!
I mean seriously, it was basically a polyfill for legacy IE -- you don't need that on server-side node.js code dumbasses since there's String.padStart()!
So many people working with node.js through npm don't actually seem to -- as I keep saying and keep seeing -- know enough HTML, CSS, OR JavaScript to be using any of them. It's the same problem with people diving for these garbage dumbass ignorant mentally-enfeebled front-end frameworks. The sheer level of STUPID evidenced by the markup ALONE these jokers use is proof enough of that if you know the FIRST damned thing about using HTML properly.
But of course people scoff at HTML saying it's not a real programming language, or it's so easy it's not something they worry about -- whilst seemingly being utterly ignorant of what it is, what it's for, or how to use it! If they can't handle that, their opinion on the topic of JavaScript should mean exactly two things -- and Jack left town.
As to the "improvements" to JavaScript itself being more trouble than they're worth -- arrow functions strike me as creating a pointless redundancy whilst making the language MORE cryptic. JS' flavor of C syntax is cryptic enough without pissing on it even further.
"const" would be nice if it behaved like CONSTANTS, but with them scoped it kind of defeats their purpose and provides no real advantage over either var or just using values direct.
"let" REEKS of "hey look, it's 4K level 1 ROM BASIC for the Trash 80 Model 1" and the whole "block scoping" thing is a confusing mess that only ADDS to memory thrashing instead of reducing it. Though to be fair, I would like to see the option for fixed pre-declaration at the function scope and ZERO further declarations allowed... but I come from a Pascal/Modula/Ada background so I look at programming in a VERY different light.
Even NPM itself can be a royal pain in the ass of dicking around trying to get shit installed that SHOULD be as simple as just copying a bloody file and USING it. Package management for an entire finished program is one thing, but for every stupid little library you include in your program? That's just going full Pakled!
You never go full Pakled.
Mario Giambanco outlined some good points too... the real highlight?
The actual npm website (npmjs.com) is garbage IMO
More than garbage.... since clearly someone doesn't even know the most basic elements of accessible design; like don't use white text on a red background. AGAIN something so malfing simple and easy to check that they are clearly unaware of.
Hence the idiocy of their wasting 57k of markup on delivering 4.5k of plaintext and NOTHING I'd consider a content media item -- less than 10k of HTML's flipping JOB! You'd almost think it was slopped together by someone unqualified to even WORK with HTML using the train wreck of developer ineptitude known as an HTML/CSS framework! Oh... tachyon.io -- right. Nothing like blowing 80k of minified CSS for one page on 48k of CSS FOR THE ENTIRE SITE'S job!
The <link> and <style> tags in body where it's utterly invalid, static style in the markup, gibberish use of numbered headings, endless pointless DIV for nothing, endless pointless classes for nothing, endless pointless scripting on a page that doesn't even do anything to warrant the PRESENCE of JavaScript... LAUNDRY LIST of how NOT to use HTML! and a decent indicator that something is likely horribly banjaxed on the back-end as well!
Since if you don't know what's wrong with the HTML for the bloody site for NPM, do the world a favor, back the hell away from the keyboard, and go take up something a bit less detail oriented like macramé!
Again PROVING that the clowns making this stuff are NOT qualified to be telling others how to use web technologies. If they can't even handle something as simple as a HTML driven front-end am I REALLY supposed to trust something built by them to manage my scripts?
Don't even get me STARTED about their ALLEGED content.
Mario Giambanco, whoa! I actually never really did see the size node modules before, but I had an idea from the size of accidentally copying them in the early days of starting. Also
The actual npm website (npmjs.com) is garbage IMO
Yes! Their cli has slightly better options than their website, which is a little unfortunate on the part of their commitment to their website's ease of use.
Jason Knight — Your answer gave me a lot of insight (and chills) into what is wrong, plus a lot of references few of which I didn't understand 😅. Your answer makes me feel I'm being drawn to the disguised worse (by the collective ignorance of the herd) that I could be heading to, despite the outwardly appearance that I may not be.
I only recently geared up and started putting enough efforts and risks to start working on, what I think, is a real world problem. I've a question to ask in this difficult time after your answer —
How does one do it simultaneously, truly learn how (and should) things work and actually make things.
How does one become a better programmer and problem solver at large at the same time, given that (I) have a wonderful proclivity to self doubt and self deprecate ? I hope this question makes sense.
ignorance of the heard
Herd...
How does one do it simultaneously, truly learn how (and should) things work and actually make things.
By learning to do it WITHOUT frameworks and libraries FIRST, that way you are qualified to know if those frameworks and libraries are competently written, contribute to them to fix obvious flaws, and reject them when they're beyond repair or utterly flawed in both approach and concept.
I also suggest that in addition to learning the underlying languages, you also take the time to learn the INTENT of WHY those languages were created and what they are FOR. This is where the majority of people utterly cock-up when it comes to HTML and CSS as they fail to grasp why HTML was created (device neutral delivery of content following professional writing guidelines), why HTML 3.2 was an abortive mess resulting in most all the crap added to it being removed in 4 Strict, why CSS is a separate specification from HTML, etc, etc, etc.
It leads to failing to grasp why separation of presentation from content is important (to the point many people don't realize that means what HTML and CSS do as separate items. I STILL come across people who think that's some sort of server-side concept like MVC?!?), how to easily implement progressive enhancement so what you create gracefully degrades, failing to leverage semantics resulting in blindly throwing classes at everything, and hosts of other utter and complete monuments to ignorance and incompetence.
Such as when people use JavaScript for nothing, JavaScript to do CSS' job, JavaScript to do HTML's job, or JavaScript where you have little to no business even using JavaScript.
Just look at commonplace mind-numbing asshattery like Dreamweaver's mm_swap routines or 90%+ of the mentally enfeebled garbage on "dynamic drive as proof of that.
Or just the fact that people are dumb enough or ignorant enough to think that W3Schools is a legitimate place to learn how to make websites... when in reality it's the ultimate sucker-trap baiting nubes and rubes alike. There's a reason those in the know refer to it as W3Fools.
... which you'd recognize immediately if you learn the basics of HTML, CSS, and JavaScript, then take a look at their "w3.css" framework. It really herps the derp so hard you'd think the "ermagahd girl" and "bad luck Brian" had a kid together.
To be brutally frank, a LOT of the recent changes (let, const, arrow functions) are only compounding the problems making it WORSE!
Granted, arrow functions can bite you if you're not careful (no "this" or "arguments" for example), and so can "const" if you don't understand what it does—but why lump in "let"??? Block scope is a good thing.
I don't understand why you dislike new stuff like (let, const and arrow) functions. Coming from the an OPP background (java and C++), these sorts of things make JS more reasonable for programmers than how it was when "var" was the only option (which completely neglects the concept of scope) and you had to manually bind functions in a lot of complex scenarios.