News for hackers. Stuff that matters.
Re:The End of Localhost by smoochy on Wednesday June 08, 2022 @01:55PM (#31671401)
I was reading your comment and thought of Jonathan Blow's talk. Without even clicking the link, let me guess, that's from Moscow's 2019 conference?

EDIT: yes, it is. He has a very important point there. I recently went on Twitch to see what young devs where coding. One (rather smart, I must say) young lady was creating a simple sign in/sign up page, but there's a twist: with React. Upon me asking, why wouldn't she just code it in plain HTML, she responded with a question: "but how would it connect to the API?". So there you go, ladies and gentlemen. I don't really know what to do about it, but I don't believe we're a bunch of old men yelling at a cloud (quite literally - AT A CLOUD), especially that I don't think we're that old.

Re:The End of Localhost by rolisz on Wednesday June 08, 2022 @04:34PM (#31673647)
I had a similar experience with my sister in law who is getting her programming degree this month. When I asked her what was her final project and some details about it, she told me the entry point to her frontend was Angular. When asked how it was served and how it got to the browser, all i got was confused looks. When I showed her that the first thing that gets to the browser is an HTML file that then loads Angular and her application, her mind was blown.
Re:The End of Localhost by rco8786 on Wednesday June 08, 2022 @05:34PM (#31674595)
I had a similar experience with a family member. When I asked them how their keyboard strokes appeared on the screen, all I got was confused looks. When I showed them that the first thing that happens is a hardware interrupt, her mind was blown.

Seriously, it's okay that people don't know the ins and outs of every little detail. Abstractions are useful, until they're not. And then when they're not, you go figure out the level below.

Even the most advanced, most skilled front-end devs spend 99.99% of their time not caring that the browser loads an HTML page.

Re:The End of Localhost by Mordisquitos on Wednesday June 08, 2022 @05:54PM (#31674844)
I think your analogy would be valid if the previous commenter had, for example, asked their sister-in-law how the browser interprets the JavaScript it receives, or how it builds the display from the DOM. Now that would be asking about irrelevant and unnecessary levels of detail which are best abstracted away. However, knowing that the process starts with the browser receiving HTML over HTTP is essential to understand what's going on, even if you know nothing about the details.

If I may, a truly similar experience regarding keyboards would be this:

I had a similar experience with a coworker. When I asked him how the code that he types appears on the IDE on his screen and not on that of any of our colleagues' screens, all I got was confused looks. When I showed him that his keyboard is wirelessly connected only to his computer, which runs the IDE, and his computer is then specifically connected to his own monitor via a cable, his mind was blown.

Re:The End of Localhost by rco8786 on Wednesday June 08, 2022 @06:04PM (#31674955)
It was just a random example, you can literally pick any level in any number of abstraction stacks that exist and make the same analogy.

Sometimes it becomes necessary to know how the level below works. That doesn’t mean it’s a requirement to be affective at the level above.

Re:The End of Localhost by Calavar on Wednesday June 08, 2022 @06:39PM (#31675322)
> That doesn’t mean it’s a requirement to be affective at the level above.

Not necessarily, but it did have a material effect in the original example. A web developer drug in a complex, unnecessary framework because she didn't realize that HTML forms have the ability to submit post and get data natively.

To me that's like a civil engineer building a suspension bridge over a tiny creek because they never heard of an arch design.

Re:The End of Localhost by joshmanders on Wednesday June 08, 2022 @08:15PM (#31676157)
> A web developer drug in a complex, unnecessary framework because she didn't realize that HTML forms have the ability to submit post and get data natively.

You're making a massive assumption that she didn't already need to use React and may have been confused at how she would make the two systems work together correctly.

Re:The End of Localhost by smoochy on Wednesday June 08, 2022 @08:43PM (#31676335)
Let me settle this debate: as I originally stated, the young developer was not stupid at all. She knew about HTML and forms and everything. She just didn't know how to work with it and, more importantly, she didn't want to get into that at the time, explaining that she didn't "want the site to look ugly" and that it was "a project for the portfolio" (implying that she needed to demonstrate her React skills).

So that's what's really troubled me. The companies responsible for producing this piece of garbage are actually getting into the heads of the younger generation, rendering them helpless without said garbage. I repeat, this is indeed garbage, especially React: in early 2000s we used to laugh at people mixing JavaScript and HTML, but some of them, apparently, decided it was their time to strike back.

The more important issue is, of course, that we have a generation of young people working with these "tools" which isolate them from learning things that actually matter. These levels of abstraction DO NOT add any value. These are "cargo cults" of abstractions, which without their authors knowledge (because those who invented them weren't very smart anyway) serve the purpose of keeping potentially talented and intelligent people ignorant and average. This is probably good news for somebody out there, but certainly not for us as a society.

Re:The End of Localhost by joshmanders on Thursday June 09, 2022 @12:46PM (#31683515)
> serve the purpose of keeping potentially talented and intelligent people ignorant and average

Man I think you're thinking wayyyyy to deep into stuff.

Re:The End of Localhost by cmroanirgo on Wednesday June 08, 2022 @07:15PM (#31675689)
Agree.

I would add that even good old, rock solid assembler isn't a straight entry point into controlling the CPU, but is now just an abstraction over µOPs. Abstractions surround us these days, and for each of us, we find differing levels of what's tolerable vs what should be known about the next layer below.

I'm personally (kinda) ok with not knowing too much about the sub-assembler processes that happen inside the literal black box called a CPU, but I know that for branch optimisation, it's important.

Re:The End of Localhost by Guvante on Wednesday June 08, 2022 @06:34PM (#31675294)
I would categorize things as "does someone on the team need to know this":

* Why does a key appear on the screen when I push a button on my keyboard: no

* How is an HTTPS connection created: generally no

* How is the JavaScript library deployed: 100% yes

You might be able to throw something together that works without understanding that it is a JavaScript library with a bootstrap HTML page but if no one on your team understand that you will eventually need to find someone that does to solve a problem.

Re:The End of Localhost by Kalium on Wednesday June 08, 2022 @07:00PM (#31675539)
> * How is an HTTPS connection created: generally no

I would think that people doing web development probably benefit from a working knowledge of DNS, TLS, and PKI. Without those, I would expect a lot of readily avoidable problems with HTTPS.

In general I advocate that software engineers should have a functional, if abstract, understanding of how computers work on various levels. They might not need a detailed understanding, but people often benefit in unexpected ways from understanding the systems they work with.

Re:The End of Localhost by Spivak on Wednesday June 08, 2022 @08:58PM (#31676424)
In 2022 that person is ops not dev. None of my devs have any knowledge [1] about TLS, DNS, or even TCP. The only interaction devs have with the messy outside world is Rack/WSGI, their DB ORM, their Queue/Job abstraction, and the AWS client libs.

[1] Not like they literally don’t know but that their code has no interaction with it.

Re:The End of Localhost by 10000truths on Wednesday June 08, 2022 @09:31PM (#31676632)
That veil of abstraction gets pierced very quickly the moment you need to debug an issue or regression in your application. I'm working on an internal application that's using Django in my current job, and there are plenty of instances where we've had to run an EXPLAIN on the generated MySQL query to identify performance bottlenecks.
Re:The End of Localhost by xwolfi on Wednesday June 08, 2022 @09:03PM (#31676462)
And one eventually figures it out anyway after one too many blank pages on an angular app :D
Re:The End of Localhost by nunez on Wednesday June 08, 2022 @07:57PM (#31676027)
Not knowing how Angular bootstraps is how you get super huge SPAs that take forever to load on anything that is not a gigabit connection. Technical details matter.
Re:The End of Localhost by rco8786 on Thursday June 09, 2022 @11:08AM (#31682171)
Genuinely do not follow this logic
Re:The End of Localhost by fmakunbound on Wednesday June 08, 2022 @10:18PM (#31676916)
Man that is really sad, but I suspect these code in the cloud schemes will be targeted toward hordes of developers with such a superficial grasp on what’s happening.
Re:The End of Localhost by xwolfi on Wednesday June 08, 2022 @08:56PM (#31676413)
That may say more about her than CS in general. I remember my very first encounter with Angular I made my seniors investigate how the hell double way binding could even work that way to have them confess to me that yes, we had 40k repeating functions running every n seconds to check variable states... for a static website whose double binding was just a first render time convenience. No wonder our mexican clients with shit phones couldnt load the site as well as our iphone-heavy Hong Kong ones. And it was my very first day on Angular.

How can she not be curious, Angular is so wrong and magical, it blows the mind to understand how it builds all that magic. Maybe your sister in law is the kind of persons who laughs at magic tricks ? I d be raging mad myself, I prefer to avoid them or Ill just be obsessed until I understand them

Re:The End of Localhost by flukus on Thursday June 09, 2022 @02:26AM (#31678117)
I like an SPA pile on as much as the next person, but I've seen similar ignorance from asp.net webform developers many years ago. Some of those were even "experienced" developers.
Re:The End of Localhost by NoGravitas on Thursday June 09, 2022 @09:58AM (#31681190)
To be fair, ASP.NET Web Forms obfuscated the relationship between your code and the HTTP request-response cycle almost as badly as an SPA framework.
Re:The End of Localhost by chrisweekly on Wednesday June 08, 2022 @04:23PM (#31673467)
Yeah; knowing about the HTML form tag apparently qualifies you as a senior web dev.
Re:The End of Localhost by onion2k on Wednesday June 08, 2022 @04:47PM (#31673860)
Considering how many web developers get that particular tag wrong I'm not sure that's actually as unreasonable as it first appears. The number of forms out there on the web that are really just used as a way to group collections of input elements, with no consideration for an action, a method, browser native validation rules, fieldsets, a legend, etc makes me wonder if people actually know HTML at all. Every React, Vue, etc form I look at the source for gathers up input into state and then submits it with a fetch, replicating, but also often breaking, the accessibility and functionality built into the browser.

So yes, maybe being able to implement a form tag in HTML is the mark of a senior dev.

Re:The End of Localhost by corrral on Wednesday June 08, 2022 @04:55PM (#31673992)
I'm very much on the "this shit's too complicated, we should fix whatever's making us not use the standard features and tools instead of piling this garbage on top" train, but I think a valid defense of doing things in Javascript that could be done in HTML is that, as soon as you need to do any e.g. form validation in JS, it may be simpler to just do all of it there.

The accessibility issue is, of course, a solid counter-argument to running too far with that line of reasoning, and is part of why I'd much rather we put 1/10 the effort we do to constantly re-implementing basic HTML features into unfucking HTML standardization so we can finally have elements good-enough that we don't need to pile JS on top to get what ought to be built-in functionality. But, that's a whole different skillset from programming, and requires far more organization than thousands of devs all independently, or in small teams, working on yet another NIH version of an image upload input. :-/

Re:The End of Localhost by anyfoo on Wednesday June 08, 2022 @05:46PM (#31674738)
I see web development is still trying to make something fundamentally ill-suited for its task work by stacking shoddy layer after shoddy layer on top of it, just like it did when I left web development 10 years ago and went back to system programming.

System programming also has its warts, but at least most of the time you don't feel like you're working against the machine.

Re:The End of Localhost by NoGravitas on Thursday June 09, 2022 @10:04AM (#31681266)
We're finally getting lots of things (HTML native validation, date and time pickers, etc.) that make JavaScript unnecessary for the things it was commonly used for in the 2000s. Unfortunately, in the mean time, client side scripting has metastasized throughout web applications to the point that things that browsers and HTML actually do implement well (history, keeping your place in the page, accessibility) are generally re-implemented, poorly, by web applications.
Re:The End of Localhost by forty on Wednesday June 08, 2022 @06:36PM (#31675299)
Not knowing about it can also qualify you as a very senior dev (though not very up to date with recent improvements) as the form tag was apparently added to the (then informal) HTML format around 1994 ;)
Re:The End of Localhost by anitil on Thursday June 09, 2022 @12:55AM (#31677689)
All tags are divs these days.
Re:The End of Localhost by com2kid on Wednesday June 08, 2022 @03:28PM (#31672738)
The funny bit being react uses regular browser APIs for network requests! Nothing was even gained, just call fetch!
Re:The End of Localhost by kevlened on Wednesday June 08, 2022 @03:53PM (#31673093)
True! Though the funny bit is you don't need an API at all (at least not a json-driven one). A form post is even simpler.
Re:The End of Localhost by bryanrasmussen on Wednesday June 08, 2022 @04:21PM (#31673451)
What if the API she wants to call doesn't have a form based version?

Suddenly she needs to change stuff on both backend and frontend, and she might only be allowed to touch one of those ends.

Re:The End of Localhost by mwcampbell on Wednesday June 08, 2022 @05:11PM (#31674239)
I think the best solution to this is to eliminate the division of labor between back-end and front-end, for the majority of applications that don't actually require deep specialization in either. As DHH put it, integrated systems for integrated programmers [1].

[1]: https://m.signalvnoise.com/integrated-systems-for-integrated...

Re:The End of Localhost by aliswe on Thursday June 09, 2022 @02:43AM (#31678217)
I've met such (male) frontend developers before, totally clueless when it comes to the DOM and how it works. Not putting any judgment in that really, tbh, because the React development model is superior for anything non-trivial (like a signin form).

In this case though, I believe she isn't confused as to how to call the APIs, maybe not even as to how to handle the response with JS and update the DOM. I think the question sounded more like you're not allowed to use Javascript at all.

Re:The End of Localhost by ericmcer on Wednesday June 08, 2022 @10:58PM (#31677150)
I started in 2008 and I would be hopeless at certain things that I am sure were essential 20 years prior.

Thinking React is essential to make an API call is a bit scary, but a future where we just click a few buttons and connect to a hot reloading syncing dev env with all the dependencies and transpiles obfuscated, seem inevitable, and it will be so reliable that we forget or never even learn how it works under the hood.

Re:The End of Localhost by shkkmo on Wednesday June 08, 2022 @03:48PM (#31673022)
I think this is a question about becoming dependant on abstraction rather than where the abstraction is run.

I don't think that being "in the cloud" makes abstraction that much more pronounced. You can have manually configure dev VMs in the cloud or automatically configured dev VMs locally, the later will probably use more abstraction.

Re:The End of Localhost by rglover on Wednesday June 08, 2022 @02:11PM (#31671705)
> I don't really know what to do about it, but I don't believe we're a bunch of old men yelling at a cloud (quite literally - AT A CLOUD), especially that I don't think we're that old.

I'm working on it: https://github.com/cheatcode/joystick.

The tl;dr is that I'm offering a full-stack framework that takes advantage of vanilla JavaScript and HTML in a front-end framework combined with a plain ol' HTTP back-end using Node.js. The APIs abstract just enough to make you productive but not so much that you can't reason about how it'd work without the framework.

The long shot of the project being to keep the mental model of "how the web works" intact while reducing the burden of doing everything from scratch.

Re:The End of Localhost by c0balt on Wednesday June 08, 2022 @02:34PM (#31672023)
Your project looks interesting. Do you plan Typescript support with stubs vor smth similar?
Re:The End of Localhost by rglover on Wednesday June 08, 2022 @02:45PM (#31672168)
Thanks. If I do, it won't be supported beyond the compiler/build tool (no official recommendation of using it w/ limited support).

It's an unpopular opinion, but I view TypeScript in the same light as I do the OPs assertion about cloud-only development. It's adding yet-another-layer that has some merits but often leads to overcomplicated messes that reduce productivity/add confusion.

I'd rather petition for some sort of structs/arg typing to be included in ECMAScript proper (in a similar fashion as to what happened with a lot of Jon Resig's jQuery DOM selection APIs making their way into ES6).

Re:The End of Localhost by heavyset_go on Wednesday June 08, 2022 @05:02PM (#31674103)
As to you last point, there are proposals to bring typing to ECMAScript right now.
Re:The End of Localhost by heavyset_go on Wednesday June 08, 2022 @07:58PM (#31676032)
Your*
Re:The End of Localhost by rglover on Wednesday June 08, 2022 @01:55PM (#31671414)
Yup