Mozilla’s Fix-the-Internet Incubator
A few ideas off the top of my head. Note that I mostly work on the backend, so my frontend knowledge is at least 5 years out of date. My terms might be wrong, but I think the concepts align closely with how I projected the web would work back in 1995 when I first saw it. Pretty much everything has gone the opposite direction though, and we’ve recreated all of the pitfalls of desktop programming on the web.<p>- A one-shot, partially Turing complete scripting language would be nice. We should be able to include external scripts, position elements, perform basic computation, and then have a guarantee that the script has finished and will no longer run and use resources. Javascript is fine, but the user would have to give permission for it to run setTimeout(), setInterval() and similar ongoing operations. Discussion needed about scripts running post-load, like for clicks are keeping elements positioned (possibly a user-settable instruction, memory or time limit).<p>- I&#x27;d vote to largely retire frontend model-view-control (MVC) patterns. The browser is already the view, so I find most of the approaches introduced by frameworks like Angular.js to be at the very least superfluous, but potentially misguided or even hazardous. See Intercooler.js for declarative alternatives to what we have now.<p>- Instead of hand-rolled scripted pages, browsers need a basic component or window metaphor, in which all GUI elements descend from a base element, can be nested, and have a full life cycle that can be customized at each step. The user would have to give permission to override builtin elements like &lt;body&gt;, &lt;input&gt;, etc, but elements could descend from them with overrides. Discussion is needed about security. For what it&#x27;s worth, I just don&#x27;t think that the various approaches to building components have panned out. I feel like there is a common abstraction here behind things like React that could be generalized.<p>- On that note, the way we include remote resources on the web is broken. We need a way to choose whether the HTML for a component is written in-place, or as a URL (or other address) that includes the remote definition. Similar to if inline data: base64 images correspond to our current markup, then we could replace a block of text with an href to allow reuse. Like &lt;div href=“example.com&#x2F;mydiv.html”&gt;, and mydiv.html would hold &lt;div&gt;something&lt;span&gt;something&lt;&#x2F;span&gt;&lt;&#x2F;div&gt; or whatever. See server side includes (SSI) for an early failed example of this.<p>- Individual requests need to go away and be replaced by a content-addressable caching system where the hash is the address, so we can go back to including individual global sources of truth for things like jQuery or Bootstrap files, rather than maintaining copies of those includes on our own server. See subresource integrity (SRI) as a starting point.<p>- It may be time to scrap build systems. I&#x27;d like to see the world take a step back, and consider architecting a web where more protocols and formats like UDP or Markdown &quot;just work&quot; and don&#x27;t need to be transpiled to whatever brittle&#x2F;proprietary-infested conventions are available. Think of this as how compilers can provide generators by altering the code to work in runtimes that don’t have generators. That concept could be extended to everything, so that the server&#x2F;browser is able to provide features that aren’t yet mainstream, by perhaps running portions of our build pipelines directly under the hood. Basically a turing complete language should be able to run anything, but right now we have wide swaths of computer science blocked to us for security and other reasons, but usually because a proprietary player like Microsoft doesn’t want to implement something. We should be able to run Firefox within Edge, conceptually. And figure out what fundamental capabilities must be provided to allow for something so general. It could be as basic as a general-purpose sandbox where the user decides which system calls and data to allow the executables running inside to access.<p>- Let&#x27;s talk about how to remove undefined and optional rules from the major RFCs and specifications. As an analogy, much of the optional functionality in OpenGL caused the renderer to fall off the fast path back to the software renderer. But since performance is a feature in OpenGL, dancing around optionals caused an explosion in implementation complexity. Today many thousands of developers reinvent the wheel countless times because someone decided way back when to limit video card programming to SIMD (thus barring conceptually simple techniques like ray tracing). A better way would be to have general-purpose computing so we could go back to some kind of cluster programming in languages like Erlang and Go, but I digress. A similar thing needs to happen with the web, where the underlying implementation would be general-purpose and open source (to virtually guarantee that all options are implemented) then we could pick and choose which ones to disable due to security concerns or whatnot.<p>- The semantic web is unlikely to ever happen, but, resource description framework (RDF) triples and concepts like hyperlinks pointing back to the caller could&#x2F;should happen first. This needs to be done by the server or browser in an automated way 100% if possible. Content-addressable links might partially fix this. Basically the gap between raw HTML and the metadata that search engines and advertisers store needs to be formalized. Think of this as taking HEAD requests, REST API descriptions in things like Swagger, and any other information gleaned by spiders or AIs, and making that readily accessible for any page. So when we go on something like eBay, we could look at the page outline and detect any tabular date, contact information, form actions, etc etc and be able to manipulate that page metadata the way we currently examine things like an element&#x27;s styling.<p>- A prerequisite to the above is to be able to download portions of websites or the entire web as a directed graph, and to do that, we need to be able to query the web in something like SQL, only without a search engine. So to use the eBay example, if I had this then I could find my dream car by searching and cross referencing against things like performance, fuel economy, warranty, and so on. The way we might manipulate such data in Excel or a SQL database. Another way to say this is that most sites would lose their search field, and the browser would see the site as a gist or index describing the graph, with common actions suggested, provided by the community of previous searchers. See Neo4j for how something like this might look in practice.<p>- It’s time to talk about retiring the app as a separate concept from a website. No single metric like performance, device accessibility or ease of use exists as a hard limitation, or justifies developers having to maintain 2+ sets of code and get mired in cross-platform development. A path forward here is to provide funding for game developers and other performance-oriented developers to revamp browser rendering engines to run at many thousands of frames per second instead of the glacial pace they crawl now. For example, the DOM diffing of React should have already existed as a feature of early HTML renderers. We need to be looking at things like forking and copy-on-write to enhance the performance of web pages that share the vast majority of their content. There are also streaming techniques that would let browsers access media as memory-mapped data rather than loading files into memory. Browsers could be as powerful as they are now, but run in something like 16 MB of ram rather than GBs, and always react instantly rather than having multi-second delays when many tabs are open.<p>Well that’s 10. I know there are many, many more things I would like to see but maybe this isn’t the best forum for this. I’m temporarily retired from programming after going through the worst burnout of my life last year. All I see around me are these disjunctions between what the world is and what it could be, so it feels like in order to work anymore, I would have to go back to basics and rewrite most stuff from the ground up. That’s with all of tech, not any one area. So I just concentrate on the things I can control, like making rent, getting my car fixed, staying in touch with relatives, etc. Tech is just too much of a time suck for me to justify anymore, when all of the capital has been vacuumed up by a handful of large players that don’t care about this stuff, to the point where winning the internet lottery with a startup is about as likely as being in the NBA.