Live data from Hacker News

I can only think that modern front end development has failed

twitter.com

191–200 of 521 posts

Re: I can only think that modern front end development has failed

#191

I recently lost my internet provider, so while I wait for a new one I'm tethering from my phone. The Verizon unlimited data plan actually throttles me to modem speed, about 56k, so it's actually not unlimited. Anyway, it's been interesting to judge various websites by how fast they load at that speed. Hacker News comes right up. Twitter is acceptable. Facebook is terrible and often does not even load at all. The same…

I travel a lot and have gotten quite used to browsing on airplane WiFi, so a similar low-bandwidth experience (at times).

I'll add a huge culprit to the list: Medium. They have their own "clever" code to progressively load images and I find it absurdly frustrating (because in most scenarios, the images just don't ever load), so I end up with lots of design articles with blurry blobs of color instead of images.

There are so many ways to natively progressively load images that I'm not sure why they've chosen the most user-hostile one. You see blurry blobs of color in no particular order, no indication of which ones are loading, no way to force a particular image, etc. I find myself frustrated often and I end up abandoning most of the stories (or avoiding Medium altogether).

Re: I can only think that modern front end development has failed

#192
post #148

Earlier quoted context omitted.

> build apps that scale easily to hundreds of thousands of users I don't understand this. Frontend dev is about writing a portable software to run on as many runtimes as there are users. There is literally nothing to prevent any frontend software, good or bad, to "scale", because scaling in terms of users is nonsical for frontend dev (unless you consider browser compatibility as scaling, to which statement I'm orthog…

Doing most of the work on the client instead of the server can often make scaling much easier. I read your comment as assuming that the division between the server's job and the client's job is fixed, but as the browser has become more powerful many things have moved to the client.

xamber's point remains valid though -

while code may move to the frontend, the notion of scaling isn't a function of the number of users (as the original op erroneously states).

maybe they meant their front end code scales as complexity is moved from server to client? that would make sense.

Re: I can only think that modern front end development has failed

#194
post #4

Regardless of my tweet, that is a personal opinion based on my feelings, background and experiences, the discussions in the replies are interesting from the POV of understanding what different people think in the programming community. Some will say that critiques are only from old people, in the style "when I was young we had only zeroes! You now have ones and zeroes". Others say that the web is slow because of ADs…

> Others say that the web is slow because of ADs

This is pretty much objective truth in my mind. I might agree with people who hate the web if I always had to browse with ads enabled.

Re: I can only think that modern front end development has failed

#195

What upsets and concerns me the most is when I see poorly developed SPA on really important sites. For example, government service application websites. If reddit or nytimes has a bloated, intermittently failing SPA site, that's an annoyance. When it's a form to apply for unemployment, ACA health care, DMV, or other critical services, it's a critical failure. Especially since these services are most often used by exa…

I am going to :+1: the UK census site - built on code developed by the gov.UK digital service, it has been apparently bulletproof at taking 20 million plus individual households through a moderately complex survey. sometimes it can be done right. And it uses a framework :-)

Which framework?

Re: I can only think that modern front end development has failed

#196

Earlier quoted context omitted.

To be fair, you have to adjust for the relevance of top 100. In the past the top 100 was the only thing most people were exposed to because that's all the radio played. Today Spotify and Youtube and their recommendation algorithms make the top 100 almost completely irrelevant.

The size too: there are far more songs released now than in the 1960s. So it makes sense that the "creme" on the top is more homogenised.

Why does that make sense? More available music should imply a more varied range of good music to rise to the top.

Re: I can only think that modern front end development has failed

#197
Yes and no. I both agree and disagree.

For a lot of it, yes, it is a giant mess.

I'll posit the reason modern front-ends are a giant mess has to do with the fact that everyone tries to hack, slash, and transform the document model into an application model. This means they don't want to reload the page, and they then have the burden of manipulating the DOM in a very crude way.

This creates a predictable empire building game of building a framework to make it easier, and every framework succeed to a certain degree. Now, they succeed in a number of great ways, but then they run in the abstraction leakage which causes them to bend in strange ways. For many applications, that's fine, but as the number of applications grow this creates problems for the common case. So, quality gets harder to achieve.

Now, the philosophy that I believe is that we just don't think simple enough. Most people don't think deeply about this stuff (and good thing because we would never get anywhere without people running forward making messes), so what do we do?

Well, I think the real answer may not be to fix front-end development. Instead, I'm coming to the conclusion that we should fix back-end development. Instead of using the tried and true work-horse of request response (i.e. HTTP), we need streams (i.e. WebSocket). Streams let you pair-bond state, and this is exceptionally important.

Ignore the complications of WebSocket for a moment (I don't deny there are problems, but they are solvable; just no good common solution yet).

What a stream lets you do is pair-bond/entangle objects, and this lets you simplify the development model to a great degree such that the front-end object is a proxy to the back-end model. This entanglement then forces you to contend with two things: (1) how do I change the object, (2) how to respond to object changes.

Once you address those two concerns, you can build applications fairly easily. Using this framework, we can then see work towards understanding why modern web development is so painful.

Since objects don't tell you how they change, you have to reconcile that change. This is why things like react have a shadow-dom, but you still have to read state from server then shred it into components for that to work. It's easy to miss an important data point since there is no direct entanglement. Ultimately, you have to take an entire object and then mangle it into a form that is pretty to the user without disruption because the DOM has hidden state (i.e. scroll bars or text selection). Classic web avoids so many problems because that disruption is built in.

Since failures of the request will happen, you further have to deal with partial failures of state changes which is why you generally need a thing like Redux to be an immutable state container so you can rollback state changes. OR, you need GraphQL such that the client only deals with atomic failures. However, most people fuck up GraphQL, so you have to have both GraphQL and Redux.

Things like svelte are better because it uses language techniques to help you shred your data into DOM, but it still suffers.

My claim is that you can simplify front-end development BUT you must also simplify the back-end, and I'm doing this over at http://www.adama-lang.org/ where I'm solving the problem for board games. I claim that board games are a limit point of technical complexity for transactional interactions between people, and partial failures are catastrophic for the experience.

The way that I'm building a game right now is that I have a client which I can connect a giant JavaScript object to the server. There is no proxy, just an object. The server will then get an update, then update the object and tell you about it via a change callback. These change callbacks allow you to synchronize the DOM to the object without an intermediary. The DOM callbacks can safely read the object.

This lets me use vanillaJS without fear.

When some DOM callback wishes to change the object, then all it does is send a message via the stream to the back-end which will (1) authenticate it, (2) validate the change, (3) incorporate the change, and (4) spit out a data change. Much like a database, the UI is a tailer of the log.

The JavaScript library I have is in its infancy since I'm balancing my time between the language, the devkit, the client library, the distributed system design, the game tools, the canvas renderer, and ultimately the first game to launch.... And I'm only working on this 2 hours every evening until I retire, so... it's going to take time.

Re: I can only think that modern front end development has failed

#198

> sites that are unable to obey the most basic rules of navigation and usability, terribly slow despite the hardware progresses. And I can only think that modern frontend development has failed. We have more information and services available than ever before. And it's never been cheaper or easier to start something new. I don't know what "basic rules of navigation and usability" the author is referring to, but I vir…

> And all software gets "slower" as hardware grows faster

Quoting a statement doesn't make it good. It's bad.

Re: I can only think that modern front end development has failed

#199

Earlier quoted context omitted.

I read it and feel it's the same as how we perceive modern music. Everyone says music "used to be better" but that's just survival bias. Just like music, there was a LOT of trash web development back in the day as well. Sites built with tables in dreamweaver best viewed on netscape navigator at 800x600 with animated gifs bogging the download speed existed long ago. What we have today are the same problems with a new…

I definitely agree with the music survivor bias thing. This is also very noticeable in the “computer generated imagery in movies looks artificial” meme: you just didn’t notice all the extremely effective and convincing CGI. But I’m curious, what are the examples of great websites “back in the day” that have stood the test of time and would be considered good web development today?

Craigslist
Post reply on HN