Home Lex Fridman Notes
Lex Fridman · 2021-02-12 · 2h 59m

Brendan Eich: JavaScript, Firefox, Mozilla, and Brave | Lex Fridman Podcast #160

JavaScript creator Brendan Eich on the language's frantic 10-day birth, the browser wars, and Brave's fight to fix the broken privacy economy of the web.

Brendan Eich: JavaScript, Firefox, Mozilla, and Brave | Lex Fridman Podcast #160
The guest

Brendan Eich — Creator of the JavaScript programming language, co-founder of Mozilla (which made Firefox), and co-founder and CEO of Brave Software (the privacy-focused Brave browser).

The gist

Brendan Eich traces his path from physics and Pascal to Netscape, where in 1995 he wrote the first version of JavaScript in about ten days as a 'sidekick' scripting language to Java. He explains the design choices, regrets (the sloppy equality operator, deferred garbage collection), and how the 'worse is better' principle plus first-mover advantage made JavaScript dominate. The conversation covers the browser wars (Netscape vs. Internet Explorer vs. Firefox vs. Chrome), the deep coupling of search engines and browsers as revenue sources, and the accidental rise of cookie- and script-based tracking. Eich then lays out Brave's mission: blocking trackers by default and using the Basic Attention Token to reconnect users, creators, and advertisers with a private, local machine-learning ad system. He closes on monopoly, censorship, leaving California, and his belief that small stubborn minorities can transform the web.

Big reveals

  • Eich admits JavaScript's loose double-equals operator was added AFTER the 10-day sprint to please early adopters, calling agreeing to it acting 'like an idiot.'
  • He names the equality operator and skipping garbage collection (forcing a rushed reference-counting fix) as his biggest regrets from the original build.
  • He says he's proudest of first-class functions, which Java lacked at the time and which helped JavaScript survive.
  • The asm.js breakthrough let Unreal Engine be ported to the browser in four days just by pressing compile, paving the way for WebAssembly.
  • A Microsoft engineer told Eich on a plane they 'should have just killed Firefox in the cradle' with pop-up blocking and tabs.
  • Brave's Basic Attention Token aims to give users 70% of ad revenue in a three-sided, tracker-free ecosystem built on Ethereum.
  • Eich calls Parler's takedown 'egregious' and selective, contrasting it with violent tweets that stay up on Twitter.
  • He reveals the core, slightly sad truth that browsers' main revenue source is the default search engine deal.

Things worth remembering

  • Mozilla is named for 'Mosaic killer' — the monster meant to slay the Mosaic browser.
  • Microsoft's XMLHttpRequest (the basis of AJAX and the modern fetch API) was created for Outlook Web Access after Sun's Java was kicked out.
  • JavaScript was standardized at ECMA, giving rise to the name 'ECMAScript' — which one Microsoft attendee said 'sounds like a skin disease.'
  • Eich hid early JavaScript inside HTML comments via a 'two-way comment hiding hack' so old browsers wouldn't show code as gibberish.
  • Firefox was called Phoenix, then Firebird, then Firefox after trademark disputes; 'firefox' is a nickname for the red panda.
  • An asm.js / Unreal Engine demo at GDC 2013 stunned developers by running Unreal Tournament in a browser with no plugin.
  • The Guardian once bought its own ad space for a pound and received only 30 pence back, the other 70% lost to ad-tech intermediaries.
  • Brave's private ad matching uses lightweight local ML (SVMs and naive Bayes), not heavy frameworks like TensorFlow.
  • The episode closes with Jeff Atwood's law: 'any app that can be written in JavaScript will eventually be written in JavaScript.'
  • Eich's lesson: when people ask you to make a language sloppier with a cute feature, the answer should be no — design is leaving things out.

Recommended in this episode

Books, products and media the guest or host genuinely endorsed here — with the buy link.

Affiliate link — we may earn a commission at no extra cost to you.

RecommendedProduct

HP calculators

Hewlett-Packard (inferred)

“i was really into uh the hp calculators of the early mid 70s these were the rpn they were really strongly built” — guest 00:02:03
Find it on Amazon
Guest’s ownProduct

JavaScript

Brendan Eich

“today javascript is the most popular language in the world why by many measures why do you think that is” — guest 01:23:11
Find it on Amazon
Guest’s ownProduct

Firefox

Mozilla

“but like i remember i fully switched to firefox the moment it was i i remember like the moments of first using tabs in firefox” — guest 01:43:52
Find it on Amazon
Guest’s ownProduct

Brave

Brave Software

“if you give the users a better browser that's faster then you'll get enough users to to give back or support publishers” — guest 02:36:34
Find it on Amazon