The “Developer Experience” Bait-And-Switch
infrequently.org
infrequently.org
The web experience has gotten worse these past few years. I don't want a stupid autoplaying video following me around on the damned page. I don't want Facebook to track me endlessly and mastermind what I see.
There are some really cool things the web has gained. WebRTC, ubiquitous web previews, and using mp4s to add cheap animation. I'm also glad Flash has finally been killed off.
We should be focusing on providing well crafted, clean and slim experiences that are thoughtful and not bloated. Get rid of the 10+ trackers, the kitchen sink approaches, and all the cruft that isn't directly useful. At the same time, let's maybe not have a single entity own this slimmed down platform (AMP), but have it be the normal experience.
Before that, our internet experiences were pretty technical in nature. More than the web, I remember being blown away by mail and news readers, like nn or gnus. The things we built were very practical in nature.
Contrast that to the demo scene. To me, the demo scene epitomises the marriage of technical expertise and artistic endeavour. Talk about "well crafted, clean and slim experiences that are thoughtful and not bloated". Take all that and crank it up to 11 :-) Of course, not necessarily utilitarian.
I'd love to see some artistically inclined people respin some of the concepts of the demo scene and build something practical that also has the ability to floor you from a technical and experience-oriented perspective. Of course, you could never fund it (that's why the marketers dominate the web), but the world of hacking has never needed funding. We're "starving artists" who aren't actually starving because we have high paying side gigs ;-).
Those autoplaying videos and trackers are the reason these pages are there in the first place. All the free content and services on the web has to be paid for somehow, and that is the way.
It's not as simple as:
> Get rid of the 10+ trackers
Sites like Facebook can't just do that, that's how they make money and stay in business.
This is a business-model problem, not a technical problem. If anything, new technology allowed these business models to be slightly less annoying and damaging to the user experience.
This is false. We had a perfectly healthy ecosystem before ads invaded the web. In most ways it was better because it was built by people who cared, rather than by companies who wanted to extract money and power from their visitors.
And also, people who care want pay raise too. They enjoy living in better flat, going at better holidays, buying better bicycle for children or eventually have periods of life where it is impossible to have job, family and time consuming hobby at the same time.
Also, both succesfull patreon and succesfull kickstarter require significant effort to pull off. You have to create materials, build community and promote promote and so on. It is a lot of managerial work.
We are not talking about "buy third yacht" level of money here. We are talking about "I can finally afford dentist or something else basic" amount of money here. It makes difference in people's lives.
Nobody said it was easy to raise money. If it was, everyone would do it.
Crowdfunding and donations make plenty if money to afford a dentist or other basic needs. There are plenty of full-time groups making money with it. I don't know why you think thats not possible when it is already happening.
Most crowdfunding campaigns fail. Most pay for medical campaigns fail. Most including those succesfull don't earn enough to be full time.
Inspirational feel good article about succesfull campaign is not representative of average case.
Most advertisement based sites fail. Does that mean we should also abandon that model?
Nobody said that the average campaign should succeed. I definitely don't believe that.
You can't just keep putting words into my mouth and then claim that I am the one changing the topic.
>> This is false. We had a perfectly healthy ecosystem before ads invaded the web. In most ways it was better because it was built by people who cared, rather than by companies who wanted to extract money and power from their visitors.
> But is it sustainable that way?
Yes. It'd be different, but sustainable. Sites like Wikipedia are proof of that.
It baffling that people claim that the web requires ads and trackers to survive when a counterexample is one of the top three links on nearly all of their searches.
It's a question of the content you put in the word "web". As a corrolary: I believe that "TV" would not exist without advertising.
I know that electomagnetic radiation, signal processing, and ray tubes are wholly orthogonal to Kelloggs selling cereal. But the modern television media landscape and its dedication to Brave New World style audience-capture is unfathomable without people splashing money at it to sell things.
So what is "the web"? Telnet, TCP, and HTTP? We don't need your stinking banners! We have oodles of excess server bandwidth and our websites are rarely more than 10K (of gorgeous hand-crafted fully-accessible HTML, natch).
But is "the web" your advertiser-supported newspaper? Your advertiser-supported searches? Your advertiser-supported social media news feed? Your advertiser-supported free phone app? Your advertiser-supported image host? Those things are, so far, only sustainably available through advertising.
Crack the micro-currency and micro-valuation code for everyone online and maybe that "web" can live without ads... we're not there yet though :)
Really? Then I guess sites and creators that are sponsored via donations never got that memo.
We have plenty of money coming in via ethical channels. Sure, not as much as with asdvertising, but IME, most sites have severely bloated budgets compared to what they actually need for sustainability, and thats why we have the problems that exist today.
Sorry, but there are no donation based major national news organizations or donation based search titans with historically large market caps or donation based social media empire whose CEOs political whims shake national elections the world round. Facebook, Google, PictureHostOfTheMoment, and the media giants with traditional business models are the essence of what most people are using their time on online. That's "the web" for most people most of the time.
I mean... Grab a random high-schoolers phone and see what percentage of services they're using are (in)directly funded by advertising and advertisers.
Your observations about the economics of the bulk of web-development are probably correct, but relatively minor compared to the mega-billions in suboptimal efficiency in every other aspect of those organizations... And the issue is always that "sustainability" is not growth, and growing frequently requires actions that are unsustainable in the long-term to achieve. Businesses grow, transition, and reshape themselves within the context of new revenue streams, and acquiring those new revenue streams is how you make owners richer and secure any desired financing.
So yeah, really, as of todays date "the web", a la "TV", is a pure advertising apparatus to capture audience and move product with peripheral benefits in political manipulation. Other models have not been validated by the market, nor consumers. Remember we all want ads, in the abstract.
lol, ok
> Sorry, but there are no donation based major national news organizations or donation based search titans with historically large market caps or donation based social media empire whose CEOs political whims shake national elections the world round. Facebook, Google, PictureHostOfTheMoment, and the media giants with traditional business models are the essence of what most people are using their time on online. That's "the web" for most people most of the time.
Actually, I think you're the one that's moved them. I don't think anyone can claim that we'd get a clone of today's web if we took tracking and advertising out of the picture. However, that doesn't mean we wouldn't get a different web that was good and valuable. We might even get something that's more valuable than today's. Projects like Wikipedia prove that extraordinary valuable things can be built online from volunteer labor and donations. If you personally need every idea to be validated by the market, then that's your validation.
Yes, websites do not have to pay for themselves directly. The idea they should is underlying lots of current web problems.
When even the mighty NYT and WSJ have issues monetizing their Web presence, what hope is there for smaller fish?
Do I read an occasional article from The Guardian or Venture Beat? Yeah, happens every now and then. Am I willing to pay for it? Unlikely.
Maybe they need to ditch the daily blog-feed style of journalism and direct their resources toward building a more cohesive/holistic archive of events that provides some lasting interest and value, so they won't need to desperately squeeze revenue from each article as aggressively as possible before the aggregators drop it.
For the record, I'm not making any value judgement or "argument" here. I'm pointing out that GP's complaining about issues that aren't really technical, but fundamental business practices.
The problem is that news is very expensive to produce; particularly investigative journalism that might or might not pay off. Local news at the town or suburb level has a similar issue, where the market is quite small to begin with. Strip away the expensive parts and you're left with cheapo aggregator papers. But what happens when there's nothing left to aggregate?
Considering the fact that I'm generally not too interested in mainstream news, and somewhat frugal, I imagine there's quite a number of people who spend even more.
This is blatantly false... Significant quantities of digital work product are produced for free with little concern for payment.
Perhaps you meant "most" or "the majority of" or even "significant quantities"?
Get rid of false free.
There are still a few sites which run simple static “someone paid us and we edited in a link using notepad” style ads. Frankly, they’re higher quality and more likely to be relevant than anything that comes through the big ad-targeting networks.
(I’d vaguely hoped GDPR might have this effect. In fact, it just seems to mean business as usual with a slightly increased floor on the amount of process and bureaucracy...)
BTW, back in the 90s there were a ton of free sites, no ads. Mainly hobbyist sites etc. No reason that still can't happen.
The new development is huge sites providing expensive content and services for free, and using ads and tracking to pay for it.
The technical solution would be to introduce a highly optimized first-class browser API "just send everything I do to these trackers" without JS or including remote scripts.
Browser vendors adding thin veneers of security (while also introducing side channels) and web developers finding ways of circumventing these mechanisms, with some of these circumvention mechanisms being standardized again is a bizarre ritual dance that benefits no one. (Add to this the fact that the biggest browser vendor is also the biggest beneficiary of the whole ad racket.)
I'd probably pay for that, again, as soon as they were completely untied from Facebook and had apologized. (Yep, they made a very public promise.)
I'd probably pay similar or slightly larger amounts for a number of other things as well (actually I do, so my point is rather that I'd pay for for stuff :)
Now before anyone thinks: "great, lets paywall all the things!" here's an important catch:
1. I'm happy to pay for my newspaper. I'm happy to buy the occasional newspaper on a newspaper stand.
I do not want to subscribe to every newspaper that anyone shares a link to, just to read one single thing that is relevant to me. I love the idea of blendle but it seems media (and my feeling is even a lot of HNers) don't get it.
2. I'm happy to pay a certain large cloud company that I don't like as much as I used to do for an increased storage quota. I'm happy to pay reasonable amounts for apps, services etc. I'm happy to pay for usage for things I use less often. I particularly like the Jetbrains model of pay-to-own (even if I personally prefer their competitors products. ;-)
I still do not want every app to pretend they are a service that I should pay a monthly fee for.
Also: I don't really mind relevant ads. The other day I actually clicked on one. Because it was relevant.
But there is no reason to track me around the web: most ads I ever clicked on voluntarily (that would be 5 - 10 for the last 10 years ;-) could probably be inferred from context: I was reading a blog post about something related or searching for something related.
Also (and here I go against many HNers), ads should preferably be injected server side.
I use it to read a select few things that I'm really interested in, but I'd love it to be more of an individual aggregation of stuff (think Flipbook) where I don't mind reading lots of articles because they're essentially cheap enough for me to not care. Not going to do that, though, when a 300 word article costs up to 1€.
I was always waiting for more articles to get available on Blendle, but if pricing is going through the roof it will be harder to recommend.
This seems more likely for news sites that are desperate for revenue and use multiple ad networks.
Sites like Facebook and Twitter don't seem truly sustainable, and they aren't free.
I actually think JavaScript video has been worse for users. Flash was easily blockable and worked fine for the majority of users. It was developers and Apple's need for control that killed off Flash.
All that changed is that the UI moved into the browser.
EDIT: Apparently that's not true, you can make a full time income. Godot makes $10k per month in donations. And a month ago it was $8k. Wow.
One could make the argument that ads are as much of a waste of energy as mining on a proof-of-work blockchain. There is an implicit subsidy and externality in both cases.
Calm down a bit with your generalities. If you sell the software (or the platform it runs on), there is no manipulation or trickery involved. It's only the "vast majority" if you look at freeware/ad-based.
I'd argue that's well designed software which is focused (albeit not exclusively) on user happiness.
Apple leaves a lot on the table when determining what to monetize and what trade-offs to make to avoid making users uncomfortable or infringing on their privacy.
Is that benevolence? No, but it doesn't have to be.
I'd like to here about these things, if any. I'll generously assume you aren't seriously referring to "web previews" or animations.
I'm also glad Flash has finally been killed off
No, that's an absolute tragedy. Some of the youngsters here might not be aware, but there was a time when 99 percent of the garbage in a website could be turned off with a single blocker, all without impacting anything necessary.
I was there and I remember no such thing. On the contrary, I remember people building whole sites in Flash. Killing that off is a Good Thing.
I think the problem with the web is too much freedom given by tools for free, which leads to such maddening abuse as Flash was in the past, and modern web development is today. Publishers have too much capability, and too much control over the rendering of content.
The modern JavaScript experience might be a bloated disaster, but at least it's a cross-platform disaster.
Shockwave had much more powerful video and 3D rendering capabilities than Flash, but Director arguably died after Macromedia failed to deliver a timely OSX port.
Like some kind of Single Page App that takes forever to download, breaks the back button and has obfuscated source code? Lucky we're past that phase!
JS SPAs are bad, but not that bad, because browser defaults are sane, and getting around them is hard. Or in other words, web starts working by default, and developers have to work to break it. Flash had no defaults, you started with blank slate and implement everything yourself.
Some of the youngsters here might not be aware, but there was a time when sites could reliably send raw TCP and UDP through a popular plugin that implemented a different, and weaker, version of the same-origin policy than the browser did. (For example, in earlier versions of Flash, any video could send anything to any port > 1024 on its hosting server!)
> A rhetorical substitution of developer value for user value [...] > The “developer experience” bait-and-switch works by appealing to the listener’s parochial interests as developers or managers, claiming supremacy in one category in order to remove others from the conversation [...] The unstated agreement is that developers share all of the same goals with the same intensity as end users and even managers. This is not true. > Shifting the conversation away from actual user experiences to team-level advantages enables a culture in which the folks who receive focus and attention are developers, rather than end-users or the business. It naturally follows that teams can then substitute tools for goals.
Our community is absolutely infested with this attitude right now.
Tell me: When was the last time someone provided battery life impact numbers for React Native? If you use it, was that even part of your evaluation criteria?
The OP is absolutely right: there is massive conflation of _developer convenience_ with _user experience_. The modern frontend web dev scene is merely one of the symptoms. The fundamental assumption that "good for developers" must by definition equal "good for users" is a) usually unstated and b) absolutely unquestioned. I agree with the OP that it is also often c) wrong.
In some cases necessity has caused some developers to internalize and stockholm-syndrome themselves into believing some cross-platform monstrosity or PWA-in-a-mobile-app is better or just as good as a native mobile app. Not because it is, but because they have no choice given their current budget and staffing constraints.
A successful startup requires clear level-headed thinking. Do not mistake expedient or necessary decisions for optimal ones and be willing to re-evaluate your strategy at any time. Above all don't talk yourself into believing user experience doesn't matter.
Of course the developer experience is going to be front and center, when you're trying to start a new product and don't want to invest actual money into it for real developers, you need something quick and dirty to move the project along.
I'm firmly in the camp that javascript 'webapps' are crap and make the web less web-like, the web I came to enjoy. I reluctantly admit that the ship has sailed and I enjoy the web less now.
Our product is terrible and yet we can signing all of these giant contracts. It is a bit disheartening to realize as long our stuff "almost works" and we keep pushing out features then we will keep growing.
If you have an enterprise support model for your product, client turnover would be a leading indication of how successful the software really is. High renewals and good margin is a successful software product. Whether or not the companies that buy it are completely wasting their money doesn't seem to matter much as long as they all don't go belly up at the same time.
It's also important to realize, if your company is so bad, yet getting so many contracts, how bad could those other companies actually be? The answer is: really, really bad. Fortunately, the IT industry as a whole has convinced the entire world it needs to 'go digital' or their competitors are going to beat them to the market with their 'data analytics.' While it's probably true for many businesses, I think the vast majority is companies wanting to appear cool and hip.
Not necessarily, after the original investment and installation there is a least one person and possible several higher ups with a vested interest in the project being a success and ending the support would make them look bad. Going through all that again and replacing your software won't happen until a new batch of managers champion the cause and will possibly happen even if your software is best in class.
I think a better measure would be their willingness to adopt other products your company builds.
I love your attention to UX, but clearly developer experience is above user experience in simply a chronological sense.
My argument is that you should understand when you're choosing to compromise the user experience, why, and how compromised it is. For example, you should know roughly how much worse the user's battery life is because of your decision. That makes the decision an informed one, based on your goals, budget, time to market, and so on.
To claim a decision born of necessity comes with no compromises is delusion. That delusion might not kill you but it points toward muddled thinking. That's dangerous at the best of times, doubly so for a startup.
For better or worse, does seem the days of Apple engineers working weeks on perfecting an animation behavior are largely over.
Surely we're not going to start making arguments that out ultimate UX delivered apps are hand written asembly (at the most absurd end of the argument ;-) )
That is, even non-developers were empowered by the same tools as developers.
That said, I can't but agree with your point and the premise. Worse, how many technological waves today have an implicit "and then migrate all current users" that is completely ignored by the team/developer?
[1] https://www.reddit.com/r/emacs/comments/3tj71x/even_office_s...
For many businesses, it's okay not to sell to everyone. You can sell an Android or iPhone-only app, even though that leaves many people out. You can sell games that only work on some platforms. Sometimes it's okay to sell to businesses assuming they're office workers with desktop browsers and fast connections. You might not have to support multiple languages or international sales. And so on. These things are neither necessary nor sufficient for some forms of success.
Of course there are other organizations that do need to do these things.
If you don't believe this, I suggest you carefully reexamine your assumptions. A number of them are almost certainly false.
That costs an HTTP round trip, which can easily pay for the cost of tens of kB of JavaScript code on each hit.
Since a properly-optimized web app will have all or most of its JS code set to be cached indefinitely, the cost of the JS code is near zero; basically, just the cache lookup time. Contrast the HTTP round-trip, which you pay on each such interaction.
If you can render something on the client side without reaching back to the server, you should.
> plain-vanilla javascript
XHR and the browser DOM are horrid, inefficient APIs, in terms of lines of code per amount of functionality delivered to the end user.
I recently wrote some jQuery code to prototype a user-requested feature which ballooned to about 3x the size when the person managing the project demanded that it be done without any external dependencies. (It was about 2.7x the lines of code and 3.5x the bytes of code, the difference being that the XHR + DOM lines tended to be longer.)
In the same project, a separate rewrite from plain-old-JS to jQuery cut the code size nearly in half.
Since this plain-old-JS code was inline on the page, the user now pays for it on each page load, whereas an aggressively cached static library pull will be paid for only once as long as the user doesn’t toss the browser cache and re-visits the app often enough to keep the cached JS code in the cache.
Developer efficiency and user efficiency don’t have to be at odds. There’s a wide gray area between the article’s cherry-picked examples and a web app engineered for efficiency.
The usual answer I've heard here is to use an SPA, but those have problems of their own. They chew up huge amounts of memory if you use tabs, their UX is worse than if you'd just built normal webpages, you have to deal with making it indexable, and so on.
Honestly, I'd be ecstatic if most pages loaded in two or three network round-trips. A cold request takes maybe 100ms when I'm on a cell connection, but JS-heavy pages I've seen tend to have load times measured in seconds.
https://modernweb.com/is-jquery-too-big-for-mobile/
At the time, your 3 round trips would have cost about a full second, which is roughly the same as the worst case JITting time for jQuery in those same tests. That worst-case result was on a slow Android 2 device.
Cellular network speeds have gone up, but certainly not as much as mobile processor speeds, so if you re-did those tests today with modern networks and devices, it’s probably a net benefit to pull the jQuery once, then JIT it on each page load, as compared to making even a single extra round-trip per page load.
> Processors aren’t getting any faster.
That’s true on the server side as well.
The article talks about externalized costs, but if you just shift the computing burden to the server, how do you pay for that?
You could load the page with more ads, which eats up the network bandwidth and JIT savings you just bought by moving the processing to the server.
Or, you could charge the users more than you currently do, which is economically little different than shifting the computing burden to the users, implicitly requiring them to buy faster mobile devices and better mobile data plans.
Consider also that the number of bugs created per line of code is roughly constant for each pairing of developer and programming language, so who pays for the costs of the extra bugs you’d expect to find in 2-3x more LOC?
TANSTAAFL.
> JS-heavy pages I've seen tend to have load times measured in seconds.
I doubt you’re comparing apples to apples.
There certainly are many very fat JS-heavy pages on the Internet, but what’s your comparison? If the JS-light alternatives aren’t accomplishing the same ends, then it’s not a fair comparison. You can’t compare, for instance, a web IRC gateway app to Facebook, even though you can use both to transmit plain text to another person.
Not that I’m defending Facebook. I’m just pointing out that they’ve got a wholly different thing going on there than the IRC gateway.
How Phoenix.LiveView would do this exactly is still being worked on, but [Drab](https://github.com/grych/drab) will probably offer some inspiration.
Basically you need a full programming language and DOM and events etc like we have now. But I fully agree that it's abused currently.
Full disclosure I contribute to the madness by developing ReactJS applications.
In my experience at least, a ton of the React work I do is quite similar within and across projects, and with many of the 'special bits' I'd be happy to resort to a more standard approach if it allows me to avoid React altogether (not that I hate React, I just love how much simpler everything would be if I can avoid it).
What you lose at that point is latency. A round-trip to even the closest CDN is going to be vastly slower than rendering the next frame on a GPU with direct access to write to your screen.
It's not that things are impossible server-side. It's that clearly server-side rendering is not the universal answer for more-performant applications.
My takeaway from "If you don't believe this, I suggest you carefully reexamine your assumptions." is "If you believe something is true, stop and think critically about _why_ you think it's true. Be open to the fact that this process may lead you discover it isn't true after all".
If OP wants to make a convincing point, the proper way is to propose a convincing argument, not "Think about how you're wrong."
All of the problems blamed on "javascript" in this article aren't a problem with javascript itself, but the improper usage of certain frameworks in certain circumstances. Using a big bulky framework for an internal application where you know the user is constrained to machines that can perform well with that stack is fine. Using that same framework on a public web application that will also be hit by mobile applications is not. The problem isn't the framework, it is that the product team did not properly vet the performance impacts of the development team's choice of framework or did not properly specify the performance requirements for the product. One other option would be that the governance structure for ensuring that those requirements are met before release was insufficient. Either way, the problem isn't "javascript", but the SDLC processes used to build the software.
I’m reminded of all the folks who — in 2018! — try to claim that C is a perfectly good tool for writing large, secure systems. Never mind that it loads a gun, puts it in your hand, cocks the hammer, points it at your foot, puts your finger on the trigger, and pulls back just to the release: the fault is really only yours if you shoot your foot — or so these folks say.
This creates the illusion that the language itself may be safe, if only you do everything right. That last part is often forgotten by the time people make the decision to write something large in it.
There is no problem with safety nets. Good debuggers (extreme ones like Common Lisp, allowing you to rewrite broken code on the fly and resume from that spot). Good type systems (Ada, the MLs, going so far as to eliminate most errors regarding common mistakes like array-out-of-bound exceptions). Good test suites (comprehensive unit and regression test suites, fuzz testers) which are, admittedly, more pervasive across many languages (the option is available, at least). Formal methods (even the lighter weight ones, like design-by-contract). Automation, to minimize the impact of human error and fat-fingering things. There should be no concern about choosing a language which is semantically closer to your problem domain, but perhaps of slightly reduced performance, than a language that is semantically distant (see people writing half of Prolog into their complex code base involving knowledge bases and decision trees). Maybe some people will think you're not tough enough, but at least your code doesn't piss off every user.
We cannot trust ourselves to do the right thing at all times. Consequently we must decide on the language and environmental elements which can enforce the right thing, while minimizing the impact to developing our solutions in a reasonable amount of time.
Citation needed. The only one I'm aware of is SQLite, which has an order-of-magnitude more test code than implementation code and still fuzzers are able to find new memory safety bugs in it.
I'm a web dev since the 90s, and a JS dev for the last several years. I didn't start in JS, and when I'm asked to do different things I will move away from JS without a major fuss. I use it not because JS is my religious zealotry (though I'm not part of the "cool kids hate JS" club by any measure) but because JS is the least painful way to do what I'm being asked to do. Change what you ask, and I'll change my tool selection.
From this perspective, I don't find your example paralleling the situations to be highly applicable.
JS (and, more to the point, heavyweight JS framework code) is more like driving a massive SUV around everywhere because you think having to drive through snow and mud is more likely than having to park downtown, when really, all you do is drive around downtown in the summer. But you don't care, because you have a parking valet.
If the best aren't able to write safe C what to say about everyone else?
To the extent the claims is "JavaScript the language is the problem"... if somehow Scheme or Python had become the de facto scripting language of the browser in the mid 90s, we'd be having the same conversation. If JavaScript is obliterated by WebAssembly... we'll be having the same conversation (in fact, I predict webassembly -- along with every other effort to treat the browser primarily as nothing more than the universal VM that succeeded -- will exacerbate this problem).
If the conversation is about the fundamental problem of the various incentives to utilize the full computing potential of the browser as a platform even when a document model will do, then "JavaScript" is just shorthand for that since it's the primary language of utilization, and it's pretty easy to realize the tool is the role it fills rather than a specific language.
I thought long about this in the past, and I think JS itself is not a problem - it's just a poor language. The problem is JS + DOM API + CSS + bunch of other things that browsers provide. I feel there's too much creative control allowed for on the web. The language itself matters little; what does is that publishers can shove ridiculous amount of code with little effort, and that the user/publisher balance over control of rendering is so heavily tilted towards the latter.
It seem to me that these debates are happening in alternative universe where all programmers work in well organized companies, withoit deadlines, have time to prototype multiple technologies for all projects and are also all seniors in everything.
In real world, programmers work in chaotic companies with little organization, have short deadlines, have short time to decide which tech, make decision based in what allows them to reach result fast or reliably, are often inexperienced and even experiences seniors don't know everything.
That is how it happens, to the extend there is a problem which author did not managed to convince me of.
I'd love to visit that alternative universe. I visit many websites each day, and I could count on my fingers the ones without serious performance problems. HN is fortunately one of them.
> In real world, programmers work in chaotic companies with little organization, have short deadlines, have short time to decide which tech, make decision based in what allows them to reach result fast or reliably, are often inexperienced and even experiences seniors don't know everything.
I know that too well, from experience. It's part of the reason I feel the web needs much less features - as typical companies can't be counted on to use them responsibly.
There's some kind of expectations that you can do anything on a website and there will never be reprucussions. Then the blame is so distributed and faultily attributed such that short term results keep the vast number of bad web advisors helping to mishandle more sites. Eventually, a relaunch is done to try to clean out the aggregate of mistakes without getting to the embarrassing root cause analysis.
Not all that different than the restaurant scene in some embarrassing part of the country.
And yet, if everyone is doing that, it leads to a bloated web overall.
The TLDR posted at the top of this article (i.e., there's too much JavaScript on the web) does not line up at all with the problems presented in the article.
The common denominator for poor web experiences is not JavaScript it's not SPAs, and it's not client-side rendering, etc. It's a poorly managed software development life cycle: ill-defined requirements, poorly architected SPAs, not vetting performance impacts, etc.
JavaScript is a victim of its own success. It is more accessible to novices and easier to implement than ever before. It's to be expected that with the growing accessibility should follow a growing number of poorly designed JS-heavy apps.
> as many or more JS-heavy performance disasters cross my desk in an average month as in previous years.
I don't think that's a refutation of JavaScript itself. An abundance of bastardized JS-heavy web apps built by novices doesn't refute the usefulness of JS-driven SPAs and client-side rendering.
He makes the point that lots of JS frameworks are so large that you're already doomed before you write the first line of real "app code". The framework itself has already blown your performance budget.
Sure, chrome lets you simulate 2G connections and all that, but last time I checked it didn't simulate the slowdown of compiling 2MB of javascript on an old phone. Could be a revealing constraint to put in the developer tools.
Ignoring the costs of maintaining that complexity, it was at best a 2x increase in capability. Accounting for the costs, it was a net loss.
Finally: "same but faster" is a valid capability that people want. I want a compiler that is simply the same, but faster. Once I hit a certain threshhold of speed improvement, then I'll entertain an actual capability improvement (more compiler features like incorporating static analysis or whatever).
Which is a better user experience:
1) Download an enormous framework that also runs slower and slower each year on constant hardware, because developers add more features?
2) Download a tiny page which hands heavy lifting off to the server (if you really do that the pages are only about 8kb plus images), and which requests an equally tiny page when the user does something requiring a server response?
It won’t be the same for every app, of course, but most of the content I see online doesn’t need or even benefit from JavaScript. I’ve literally turned it off by default and generally get a better UX… yes with a few exceptions, but only a few.
The onset of SPA's what contributes to this. It's making server-side content generation leaner, although sometimes at the expense of the user experience with worse page responsiveness during downloads. What's debatable is if the user benefits are worth the increase of upfront UX cost.
If you're worried about how easy it's becoming to track people in the browser, or to track people in the Internet ecosystem in general, that's an entirely different conversation. JavaScript has absolutely nothing to do with the security and privacy status of the web aside from what it is allowed to do per web standards.
Stop blaming a language or the ability to write anything Turing complete when, clearly, it's just a tool and the same problems exist in every single code distribution arena.
There is just an insane amount of tolerance for what's acceptable performance today, and a huge disconnect with the reality of the average user. Here we are with supercomputers all around, and the web is slow. Slower than it was ten years ago. This has nothing to do with javascript as a language.
This is not useful or helpful tone and really does not belong on HN [1]. My comments addressing security and privacy were in response to the current top comment [2].
I fully realize that performance is the goal of the article. What I strongly disagree with is the article's projected viewpoint of the universality of JS being slower.
> despite the best effort of (...) tools that send less JS be default
> Video of a single slow-loading page lands in a visceral way; abstract graphs don’t.
Saying JavaScript is universally slower is as true as saying client side code is always slower. This is obviously not the case. Just imagine if the next CounterStrike game tried to do everything with server side rendering rather than transferring 5GB of game code one time and tiny fractions of that from then on. Obviously the argument is not universal. Costs can be amortized. Code can be cached and intelligently replaced. There are entire industries where nobody would even think to debate that a lot of client side code is the only way to achieve their goals.
I'm not saying everybody does this well, but I'm confident saying that the answer is not going to be universally less JavaScript.
Edited because I had the wrong link. I had posted that exact service earlier as an example of things being feasible but not best for latency, which is a very real component of user-perceived speed.
I once worked for a hardware company which manufactured Set Top Boxes (like TiVO). They could have developed the UI engine in any language, but they chose JavaScript (running on their own custom JS engine). It's surprising how many companies use JavaScript to implement the UI for their hardware devices; to infer that developers only use JS because they don't have a choice is inaccurate.
JavaScript has become a great language. I've programmed in pretty much everything else so I think I'm qualified to say this. In my opinion, if a developer needs to know just two languages today, it's JavaScript and C/C++.
With knowledge of JavaScript and C/C++, you can do anything on any device. A developer who knows JavaScript and C/C++ is usually a pragmatic developer; a good developer.
This is true. Another example is the 2nd and 3rd gen AppleTVs. They were based on iOS but the “apps” for it were all hosted on top of WebKit using Apple’s own markup language - TVML.
While I’m definitely not a fan of the movement toward JS everywhere, I have to admit that of you want to tie your horse to one language, JS is the way to go.
char *ptr = malloc(1024);
And this uses a different evaluation order int i = a ? b > b ? 1 : 3 : 5;
There are other subtle differences when talking about C89 and C++98, let alone when talking about C11 and C++20.Applets, Flash, JNLP, 0install, ClickOnce? JS is the most popular but it isn't unique.
It's a fucking nightmare.
Discover your code has errors that get silently ignored, repeat the whole again, any remaining errors are clearly blessed by said Elder Gods, deploy it, ignore warnings and go onto the next project. :P
Compared to a Rails, Django, Express.js, or any similar more-traditional framework that does server-side rendering with HTML templates, a little bit of JS and AJAX sprinkled in, SPA apps with frameworks like React are significantly more complex and requires more specialized knowledge on the frontend. I'm just starting to dive into React and Redux, and the amount of jargon and complexity is mind-blowing. All to solve the complexities of what? Bigco's massive bloated app with thousands of developers working on it?
Hmm, I don't agree with that at all. I work with Rails and React daily, and they're about equal complexity to me - React just tries to hide it less.
Rails especially can get incredibly complex the second you try to do something in a way that's not the "approved way".
It's changed recently I've heard, but up until recently making a model without using ActiveRecord was a huge PITA that mostly engendered "don't do that" comments.
Any specific concerns I can help with?
This is not what the web is about, at all. The web is not centralised, relying on all-powerful 'developers' to decide to build things for 'users' who are powerless and must accept what they are given. It's the opposite. If people don't like things they can build better things themselves. If something doesn't work for them, they can build something that does. The tools are out there, the knowledge of how to use them is out there and freely available, there are practically no barriers to entry to building stuff assuming you have a computer and an internet connection.
So, yeah, just build things in the way you think is best. If people don't like it they won't use your thing, and will use someone else's thing that serves them better or just build their own. That's both the greatest beauty and the greatest strength of the web.
- A web app that exists as a tool users log into? This kind of thing would have used to be a desktop app. I'm perfectly fine with a 1-2MB JS bundle. The images and other data you're downloading will soon be much greater than that size. App too big? split it up into modules. Targeting users with 3G or worse connections? Ok, lets look at server-side rendering with a simplified experience. I don't think apps like this are really the problem here. If it is a powerful app I don't mind waiting 5-10 seconds for everything to load, so long as there is a good user experience around loading. These are the kind of apps I build in React and they load fast and feel fast, even on cell connections. Our speed issues and optimizations are generally elsewhere, usually on server-side data fetching. Granted I haven't worked anywhere that has users with flip phones in far-off countries. I would probably choose a different strategy in that case.
- A media-heavy web site that displays content for non-authenticated users? These have tons and tons of tracking JS and other things, not to mention the hated auto-play videos and intrusive ads - I think thats the "CO2" that the author is talking about, but the issue is mostly organizational and economical - these companies are made up of large numbers of people who all need "just one more script", or are getting paid to insert garbage into their page. This is a shame and we can complain about it all we want to but until the economics behind web content improve I don't see that underlying issue getting fixed. This is the problem that AMP is trying to solve. I agree that it shouldn't be proprietary, but you can't expect everyone at a media company to think like an engineer and prioritize site load time over the big bucks in analytics and internet chum, unless it gets too bad. Companies will do what they can get away with, whether its CO2 or JS.
For a post that weighs so heavily on the need for evidence, this claim doesn't have any. There have to be cases where bloat has a material impact on a company's finances, but how frequent are they?
Now, you're working at Google, and it's definitely possible you're privy to great evidence that you're not sharing. But saying "you'd be truly shocked" is still not really good evidence.
I know there were the Amazon studies where there's a tight link between latency sales. I don't dispute that latency matters. I personally love websites that load fast, have no JS on my personal site and no more than 20 rules. I just haven't seen actual up to date reasons to believe that modern web development is hurting the bottom line for most businesses.
See also: https://wpostats.com
Nobody owes you data. If you need that data, get out your checkbook and pay for it - $50,000 will fund most studies.
I mostly blame the "JS thought leaders" i.e. people who should know better. They hype one tool after the next with little to no concept of the cost of obsolescence (having to throw out your 2 year old new web app), which is yet another major issue with JS hype. Then employers ask for the tool, then devs _have to_ learn the tool whether they want to or not if they want to match job descriptions. Everyone's afraid of "falling behind" and as a consequence everyone rushes headlong.
Ironically, given that this article is about DX, the JavaScript ecosystem has in recent years been regarded by many as an insane mess of infinite complexity, majorly frustrating many developers who have jobs besides just learning (or teaching) new frameworks. That is to say, I don't think these costs have even bought us good DX. They've bought a "lowest common denominator" environment where you can hire a new dev bootcamp grad to build your website and your app quickly and cheaply and agile-ly and quickly and cheaply and... did I say quickly? Nevermind the mess you'll spend years cleaning up.
Summary: JS (and beyond) thought leaders & framework authors are selling silver bullets and businesses just can't say no.
That's because not only do they load a lot of JS but they load it serially. Each domain requests JS from a new domain and it takes 3+ interactions of noscript + reloading to get anything rendered at all. If they'd just have all the script domains requesting in the first load it'd be fine.
There wasn't much data showing this to be true, and I suspect the opposite may be. If reducing pageload time increased costs, would poor people be happy to pay more for the faster product, or would it just drive them out from being able to afford it? Or in the case of free services that make money via advertising and tracking, would it be better to do more of that to pay for the extra cost needed to produce the good in order to shave off pageload time? I'm not so sure. "Make it better and more expensive" is an easy argument to make if you're a wealthy software engineer, but I'm not convinced that applying "better and more expensive" as a value helps those lower on the socioeconomic ladder.
Focusing on "make it cheaper to be better" seems like it would do more to make experiences more equitable — i.e. we should improve the developer experience of high-performance open-source tools so that it takes less time and costs less to make better products, rather than driving up the cost of production at the (literal monetary or privacy) expense of users in order to produce a faster product.
Edit: Or, y'know, we should pay CEOs less and use those savings to make better products without increasing the costs passed on to our users... But somehow I don't see that happening any time soon.
I took a new job at the beginning of the year. It was to lead development of v2 of an internal app originally written in Angular and convert/upgrade it to React.
I poked around at it a bit before getting started. It seemed fine, maybe a little slow.
My version got to the point where it could get up to a dev environment. It again seemed a bit slow. I took a look at the build process and realized it did not include gzip (express/compression). I added that in and yeah it seemed about right.
I then took a look at legacy production and... you guessed it, in production for over a year this product had no gzip and was serving a JS payload of 5x what it could be, around 5mb. And no one noticed!
My point is people just don't care or maybe they're just inured to it at this point. There's a lot of "oh for every 100ms of loading time Amazon.com loses $xxMM" talk but in the real world? Not what I'm seeing.
Two things are stopping me from actually doing this. Firstly, and most importantly, my boss isn't reading articles explaining why accessibility and quick load times will make him more money. Secondly, I've been present for some absolute disasters that happened because of the combination of AJAX, jquery/vanilla js, server-side MVC, and scope creep, and I don't know which frameworks or development patterns I can use to stop that happening on a project that I have more control over while still keeping that project lightweight.
Articles that give clear and actionable suggestions, or are targeted at the people who make high-level decisions about what features go into a product and how many third-party scripts should be installed, would be more useful than articles about how developers are very naughty for adding 10+ ad trackers and UX tools.
I guess I hope that you're successful, but one would assume that if today's Javascript climate was so toxic and having a tangible effect on your average user (not just the Hacker News user), then...there would already be swarms of clever individuals capitalizing greatly on this apparently obvious state of the web.
In 1954, the biggest issue John Backus had to overcome for FORTRAN was performance: "it is difficult to convey to a reader in the late seventies the strength of the skepticism about "automatic programming" in general and about its ability to produce efficient programs in particular, as it existed in 1954."
But the world went on to use higher-level languages with worse and worse performance characteristics.
We can't blame developers trying to use better tools (we could, but that wouldn't change a thing). DOM, CSS, and the imperative mutation model was a curse on front-end development, ensuring that only companies as big as Google could write something like GMail (for which they wrote their own Java-to-Javascript compiler first). If something needs fixing it is the underlying browser model. Maybe it will get fixed sometime if this trend continues to its terrible but logical extreme, and something finally gives.
This is also purely a matter of cost - if businesses do care about performance then they'll have to put more developers per team, spend money on training, ask for fewer features slower. If performance _really_ mattered, then they'd see a loss in revenue, and as a natural response start talking about performance in their agile meetings, and JIRA cards.
We could solve it if we checked performance like we do unit tests, and held developers accountable to a literal performance budget set by the business.
> Few teams I’ve encountered have actionable metrics associated with the real experiences of their users.
Imagine getting latency numbers on load times, bundle sizes, TTI, and so forth on every commit. PRs that blow the performance budget would be immediately flagged. You could plan for performance like any other business cost.
Even nontechnical business leaders can understand reports like "3s load time", and set tech team goals based on a relationship between load times and lost sales. "Load time must be under 2s, even on old Android + Edge" is something everyone can understand.
The article is right: what's most pleasant for the developer isn't necessarily what's best for the business. If metrics like load times are only being seen by developers, the developers have a moral hazard: either they
1. make choices that benefit themselves, at a cost to the business
2. make their own lives voluntarily worse, without recognition
The article is right again that sometimes, better DX is in fact worth worse performance for the user. As with anything, it depends on the business.
But businesses won't accurately and fairly decide on their preferred tradeoff if only engineers are in charge of it.
We need better performance infrastructure!
How can one even argue that as "less complexity"? Using a framework vastly increases the complexity of a site. (Though it may hide a lot of it under a rug, at least until the first bug occurs.)
We aren't going to make up for the emissions of shipping bottled water in barges across the Pacific Ocean by taking shorter showers. And the issue is not using JavaScript for features. The issue is the gigantic ad and tracking networks that are being included, sometimes 10 or 20 at a time, in projects to rob users of their valuable behavioral data. That also just so happens to be written in JavaScript.
But in a world where one can get entire VR experiences out in less than half a Megabyte of payload, it's ludicrous to think that something as simple as a messaging app should take so much in comparison. But it's comparing apples and oranges. The VR experience isn't spying on you (despite the fear mongering to the contrary).
What a phenomenally articulated phrase with so many applications beyond JavaScript.
The problem is every react codebase I’ve ever worked on in my full time and freelance work have been an absolute mess and downright painful to work in. They don’t even fulfill on the developer promises. Can anyone even point to a successful open source project using it?
I’ve literally made quite a good freelance business by targeting failed react projects and rewriting them with vanilla js.
Things like https://blazor.net/ (though not necessarily the first wave of these frameworks) are going to become more popular, and there are various variants in other languages. I think there will be a slow (very very slow) decline of js
This future isn't better.
Also that is still WIP and doesn't yet make use of .NET linker.
Excited to see how much smaller a good linker can make this.
I can easily imagine asynchronous compilation of Web Assembly modules in background threads as its use increases.
Regardless, as long as you're network-bound in the critical-path, that will only help to the extent that partial execution works well. That is baked into HTML/CSS/JS; not so much with WASM.
I'd point out that the need for better dynamic linking to enable lower TTI is also a problem faced in the bundling/tooling heavy JS community.
Which strongly suggests to me that intuitions about KBs-of-JS vs KBs-of-Wasm are likely to be wrong, especially as the state of wasm implementations improves.
Personally, I might get my hands dirty with Kotlin on the frontend. I'm using it on the backend currently so the transition should be relatively smooth for me and I have some crappy JS code that I would love to get rid of at the earliest convenient moment. I imagine there are also a lot of Android developers that might be willing to work on Kotlin based web apps that like me would prefer to not deal with Javascript.
I imagine short term things will be a bit rough as tooling and frameworks are still evolving. But as that improves, there will be a very sharp increase in the amount of non JS code running in browsers. Currently the big milestones for Kotlin would be the 1.0 release of the native compiler (0.8 is the latest, I believe), related work on WASM support, and the finalization of things like garbage collection in WASM. Looks like that should all be happening over the next 6-12 months.
Projects like this are exactly what the author was complaining about - good for .Net developers who don’t want to learn JS and Rust, bad for user experience.
The developers on my team try to use just enough JS to accomplish what we need, and almost all of the rendering happens server-side.
I think what I'm describing is an under-appreciated piece of the puzzle. How many developers have you met who just loooove Google Tag Manager?