Live data from Hacker News

I can only think that modern front end development has failed

twitter.com

261–270 of 521 posts

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

#261

Earlier quoted context omitted.

I thought it was actually around 30kb, after being minified and gzipped?

It's not the size of the React library that is the problem, it's the nesting of components with components within components that is the problem. If you've ever shown source and seen divs 20 to 30 deep, you're most likely looking at html that React produces.

React needs to borrow the idea of 'zero-cost abstractions' from Rust. Too often I've seen five divs used to add five layers of behavior where one (or zero) divs could have had the same effect.

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

#262

I am not an expert chef. I can cook pretty well, and my guests enjoy my food. But it doesn’t compare to what a professional chef can do. I am not an expert abdominal surgeon. If we are in Antarctica and your appendix becomes inflamed, I will try to save you by cutting it out. But you will probably die. I am not an expert front-end developer. I make sites for myself, for others, and have even been paid for it a few ti…

> There is something very strange in the WWW, when a self-taught amateur like me can make a site that is better than the New York Times Would love to see something that does everything the NYTimes does that is clearly and obviously "better."

Easy: take the front page and remove every headline and introductory paragraph that, for some reason that boggles my mind, is repeated, sometimes more than once, sometimes more than twice, on various areas of the enormous page. Now you have a page with the same information that is lighter and easier to find things on. And less stupid.

Another example: sometimes there is a stock ticker near the top of the front page, and the number of digits it displays changes as the ticks go by. But they did it wrong, and when this happens the entire layout jumps. I learned how not to make this kind of mistake near the beginning of my self-education in amateur web design.

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

#263

Earlier quoted context omitted.

I think modern FE won over is primarily because it provides with Decorator OO, which has been recommended for GUI development including by the GoF for ages, which also matches perfectly with a tag-based declarative language such as HTML. As such, ditching the "HTML templates" paradigm was a no brainer for OO devs to start with. For many, "templates", their performance, their restricted mini language and all the boile…

If you adopt microfrontends, you can ship your app as N number of smaller bundles, instead of one monolithic bundle. The Webpack performance in this setup brings me joy. It's not 10ms to bundle, but 2-3 seconds cold boot in dev mode is completely acceptable, with rebuilds nearly instantaneous. This setup is described in more detail in single-spa's documentation.

Exactly, you can see that the webcomponent I linked is microfrontend. Interestingly, I first ported the code to StencilJS, but then it seemed the framework actually got in my way and I removed it, I prefer the code as is now and there's not even a build because it's vannillajs. You just add the script tag in your page and start using the tags with your options. I used the mdn custom element documentation without any framework.

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

#264
There have always been bad developers. Unless he means that he expects that by now, someone would have developed a completely idiot-proof infrastructure for making UIs, we can always assume that there will be people making websites who do not have the time or inclination to learn the tools and technology and make the wrong decision at every turn.

... And even though some idiot-proof frameworks exist, they still require somebody to put enough effort in to discover and use them.

I mean, we can apply the same criticism to the giant pile of crapware in the mobile stores. Some software is good, some ain't.

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

#265
You try writing a UI that:

1. works visually at all screen widths and resolutions

2. returned from a server with zero knowledge of said screen widths and resolutions

3. without shipping redundant assets

4. responds immediately to user input

5. but all visual updates go through this slow and crappy DOM API

6. oh, and it's all single-threaded

7. and there's no standard library for stuff like virtualized lists, modals, etc. so have fun picking your own and shipping it down

8. and your options for navigation are either losing all local state at each navigation, or writing a SPA that some neckbeards on HN hate for esoteric purity reasons

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

#266

I'd like to add a bit more nuance. Modern frontend development provides many opportunities for failure. These failures often make their way into production. I, personally, get great results with modern FE development. My users are happy. I am happy. It's all very successful. All the defenders of modern FE development will likely chime in with the same sentiment. I also get great results with C, which arguably provide…

Personally I think most of the "failures" out there are caused by organisational issues not technology issues. Namely, marketing departments given all the power over what the website does and what's bundled with it (trackers, a bunch of heavy/intrusive marketing tools), and optimisation that values increasing revenue above increasing actual usability. (Sometimes these align; often they don't).

You can make a SPA that's a joy to use and loads and runs extremely fast. Hardware has never been faster; browsers and application frameworks have never been as good as this (I'm talking about the web stack). It's really nothing to do with the tools or technologies that marketing insists it needs mixpanel, GTM, optimizely, hotjar, FB pixel, smooch, and god knows whatever else in order to do its job effectively.

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

#267

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…

At least regarding the US federal government, it was a known issue that (a) the government wasn't willing to spend enough to hire quality software developers and (b) the government bureaucracy lacked a process to determine whether web software was "good." Specifically, no effective methods of software validation based on modern best practices (the processes they used were descended from the validation processes for material acquisition, which look extremely different from software engineering).

I'm not sure if the problems have been fixed, but they were both recognized and a process was put in place to address them after the healthcare.gov debacle.

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

#268
post #242

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 honestly hate SPA's. They're not necessary in almost every single use-case, yet everybody is shifting their shit into one.

It’s because frontend devs are taught to use react, so suddenly every website unnecessarily becomes a react app. If every tutorial and class out there teaches people to use hammers (react) then people start using hammers to screw in a lightbulb or perform surgery.

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

#269
post #121

Plenty of discussion has been had around incentives and I agree with all that, but also there's another angle here: aside from dark patterns, I think the problems of terrible front-end experiences are most prevalent in the middle of the bell curve - the front-end products developed by rather mediocre skill levels and budgets. Which is usually a pejorative, but thinking of it as literally in the middle, not great but…

The implication is rough, but it is part of the truth (not all of the truth). However, I will add that the anointed ‘high-end’, your lifelong long backend devs, devops, data engineers, etc are adding to the problem. Backend people taking up the frontend hat under the fullstack guise create tons of awful end results, and this is even more common because they already exist at the company and are given a blanket ‘competent’ rating (in other words, they get a chance to mess with the curve before anyone else).

All of this is part of the pervasive problem that your post is slightly tainted by (my attitudes are tainted by it as well), which is a general disrespect for frontend. No matter, the truth of these attitudes will show up in all of our products. It’s always obvious to me which teams take frontend seriously and which don’t (the quality is always literally visible).

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

#270
post #252

Earlier quoted context omitted.

I love modern frontend development. I can build apps that scale easily to hundreds of thousands of users. They are fast where they need to be fast, and building components means complexity lives only where it's needed. Static parts are rendered statically, dynamic parts are rendered dynamically. I can write all code for the entire stack in Javascript. The entire workflow is streamlined in a simple way (webpack really…

This entire read seems to be that things are much better for YOU, the front-end developer. And yes, that makes a difference, you can deliver more features, faster, more reliably. But, if those sites just bog down and take double-digit seconds to load, even when properly deployed on scaleable delivery architectures, with fiber-optic speeds, and CAD/gamer-level power machines, they are junk. And I increasingly see exac…

I cant agree more. I could cry. Ive been on a crusade for over a year to scale back diddly js frameworks because 'scale'. Ive heard many bullshit excuses before but sacrificing performance and reliability for being "scalabable" is beyond mind boggling. It gives me a panic attack when medium articles are the chief architect and purveyors of software development truths. I live and work in developing countries and could never understand why sites keep getting slower around 2017 before I stumbled into medium with their React and K8s articles ad nauseum. I realised the juniors and intermediate devs are reading these things as truth and applying it as gospel.

My head hurts just thinking about react.

Post reply on HN