Very Secure

How Javascript Came To Be

Many a software developer working the salt mines has had the following unfortunate experience. He wipes the sweat off his brow and smiles as he completes whatever widget he had been implementing for his non-profit.1 He tests his new widget in his browser, likely the latest chrome or firefox. If he’s diligent maybe he checks it on another one as well - say safari. All good.

But, as has become routine, when his boss tries to load the widget everything goes awry. Not only does the widget not work, but half of the web page does not load! What has happened?

To answer this question we must go back in time to the early days of the internet when the competition between different companies to provide web browsers had just begun. During this time, web developers were pumping out their first websites. And likely these web developers were filling their sites with errors according to the javascript spec.

So one day a developer at mozilla decides he can get an edge on his competition by loosening the rules of javascript to accommodate for poorly written code. Specifically, he decides to remove the rule requiring a semicolon at the end of a statement. He accepts new lines as a valid alternative, a la python.

With this new addition, firefox browsers can suddenly display a whole sector of the web that before could not load on any browser. Specifically, firefox can display all websites where their web developer had forgotten a semicolon.2 To the consumer loading one of these poorly coded web pages, it appears that the browsers that follow the javascript spec are broken!

Naturally, the situation became a race to the bottom, each browser loosening its js compiler rules until we reached the state we are in today.

  1. i.e. a company that does not profit - regardless of how the label themselves when they file their taxes. i.e. all of Silicon Valley. []
  2. Sure, sure, one developer somewhere in the world followed the javascript spec down to the T, and wrote the following lines at the end of his function:

    return
    “A very very very long string that needed to be on a new line to prevent him from going over his editor’s character limit.”;


    And because of the genius at mozilla’s new addition, his function now returned null on firefox’s browsers, owing to the magically inserted semicolon after the word return. []

5 Responses to “How Javascript Came To Be”

  1. Naturally, the situation became a race to the bottom, each browser loosening its js compiler rules until we reached the situation we are in today.

    Which tends to be that if you don't have the latest "vaccine" booster updates of brokenness, you're not allowed to read directly. Maybe through archive.is or something, which can be okay for reading, but impossible for other functions. Therefore, you, who tried to maintain stability, have to underwrite their bugs.. or leave.

  2. whaack says:

    Such progress!

  3. Jacob Welsh says:

    To my eye, closer to the core of the matter is that the kind of "developers" or "bosses" who think JS is cool are contributing not to some vibrant competitive marketplace but to a mining cartel, that pushes out all manner of random changes for no particular reason besides fashion signaling, and is run not in the interests of its users but of advertisers because guess who's writing the checks.

    Otherwise, you'd seem to be missing the part about... how JS came to be :P

  4. whaack says:

    @jfw

    I guess including/excluding javascript is the line between offering information and advertising on a website.

  5. Jacob Welsh says:

    If I might add a bit more nuance to the matter:

    Back in the 2000s there was a substantial scene (at least to my eyes at the time) of casual browser-based games, implemented mainly in Java and Flash. From a technical perspective it sucked but it was the right choice for the time.

    There were also the idiots who made you load a .swf just for their basic site navigation buttons to work, because duuude those animations are totally awesome.

    When JS started getting increasingly capable, to the point of being competitive with the plugin-based shit, I had this brief spell of optimism that people would use it to build cool stuff, which would be usefully integrated with the browser's interface and capabilities and would even work in the free software world.

    What looks to have happened instead is that the casual games moved instead to the newly miniaturized consoles (now for some reason called "devices"), PC gaming retreated to the niche of high-end graphics, and the annoying teenagers with the animated buttons grew up, multiplied and got organized into a standing army that's been busily trampling everything that was nice about the idea of the web.

    So I guess as usual it's not the tech that's the problem but the people, with the tech serving mostly as a group signal much like a bandana worn just-so.

Leave a Reply