5 ms·
This has also unfortunately been my experience, even when working with developers that have several years of experience writing JS. There seems to be a big gap
by gavinray 5y ago
This has also unfortunately been my experience, even when working with developers that have several years of experience writing JS.
There seems to be a big gap in knowledge when it comes to boundaries between the language specification, runtimes, and innate abilities.
People consistently confused about why they can't use JSX without a build-step, not understanding that JSX isn't "real", why doesn't fetch() work in Node, why does code in my Next.js app break randomly (server vs client render context).
Lot of pain in trying to explain to folks that a browser and Node are two different universes that happen to speak the same general language.
There's too much magic in this ecosystem and not enough emphasis placed on taking the time to understand the tools you work with, IMO.
- seanp2k2 5y agospeaking of next.js, it's always fun to watch web tech come full circle back to "maybe we should render this stuff before we send the bits, since servers and CDNs are real real good at sending bits real real fast, instead of making everyone render the same static stuff a billion times per day client-side". https://en.wikipedia.org/wiki/Movable_Type https://en.wikipedia.org/wiki/Movable_Type was generating static blogs back in 2001, and that's still a great idea 20 years later. I'm glad that "modern" JS thinking has finally caught up :)
- irrational 5y agoOne of my tasks at work is to support a website that was built 20 years ago. We keep talking about updating it to modern web standards. It sounds like, if we wait a little longer, our 20 year old site will be using modern web development techniques already ;-)
- o_m 5y agoThe javascript community is starting to move away from that now to just using server side rendering (with hydration). Static site generation works fine on smaller websites but gets really slow as the site grows.
- seanp2k2 5y agoI know it's probably not universally the best approach, but I think that with sensible blocks for content and Incremental Static Regeneration, even sites with many many pages can be statically generated very quickly.
- brundolf 5y ago> Lot of pain in trying to explain to folks that a browser and Node are two different universes that happen to speak the same general language. That's exactly why it's so good that Deno is trying to close the gap. More consistency = fewer surprises
- wly_cdgr 5y agoThus makes me feel less junior than I sometimes feel. I may not have a CS degree but at least I understand a good amount of this stuff.
- hajile 5y agoI sometimes think that a CS degree is part of the issue. The things that make JS unique aren't even mentioned in a lot of degree programs. Larry Wall famously said the three virtues of a programmer are impatience, laziness, and hubris. Not learning JS is at the exact intersection where people do all of these at the same time and meet with epic failure. People seem to think to themselves, "I learned Java and this looks like Java, so it must act like java" and so they run down the completely wrong path.
- hajile 5y agoJS is the only programming language I know of where people read zero docs and still decide they know how to write it. They wouldn't dream of this with C, Java or even python (even though these probably work exactly like other languages they know -- unlike JS), but for some reason perfectly smart developers make this crazy decision all the time.
- ihateolives 5y ago> They wouldn't dream of this with C, Java or even python (even though these probably work exactly like other languages they know -- unlike JS), but for some reason perfectly smart developers make this crazy decision all the time. It's because they can. You can cobble something together and it works or seems to work. It may fail later down the chain but browsers accept all sorts of hackery, because they have been historically doing this for a long time. Before there was Javascript you could write broken HTML, nest elements wrong and browsers still figured out a way to deal with it. The expectations of half-assed solutions has always been there on the web.
- galaxyLogic 5y agoSEE: https://blog.logrocket.com/fetch-api-node-js/ https://blog.logrocket.com/fetch-api-node-js/
- Xenoamorphous 5y ago> why doesn't fetch() work in Node Actually it does now! Or it will soon. https://fusebit.io/blog/node-fetch/?utm_source=www.google.co.uk&utm_medium=referral&utm_campaign=none https://fusebit.io/blog/node-fetch/?utm_source=www.google.co...
- xigoi 5y agoIt doesn't help that JSX feels like it should be a part of the language. I'd really expect the main programming language of the web to have first-class support for HTML.