Lex Fridman PodcastJames Gosling: Java, JVM, Emacs, and the Early Days of Computing | Lex Fridman Podcast #126
CHAPTERS
Lex sets the stage: Java’s impact, concurrency fascination, and sponsor break
Lex introduces James Gosling as the creator of Java and shares how Java shaped his own early programming life, especially around concurrency. He also runs through sponsor messages before starting the conversation proper.
- •Java’s popularity and Gosling’s role as founder/lead designer
- •Lex’s personal connection: learning OOP and concurrency via Java
- •Parallelism as an intellectual “mind-expanding” experience
- •Housekeeping: subscribe/review/support plugs
- •Pre-conversation sponsor segment
Irrational numbers, beauty in math, and the √2 myth
Lex asks about the rumor that √2 is Gosling’s favorite irrational number, prompting a discussion about memorable numbers and mathematical beauty. Gosling connects √2 to the Pythagoreans and the unsettling discovery of irrationality.
- •Gosling’s teenage obsession with “interesting numbers” and their stories
- •42 as a culturally ‘magical’ number
- •√2 as a historical shock to the Pythagorean worldview
- •What ‘imperfection’ in math really means (reframing ‘perfect’)
- •Math as a source of aesthetic appreciation
Math vs programming: logic, structure, and “messy” discovery
The conversation shifts to parallels between mathematics and programming, especially the role of logical structure and searching a space of possibilities. Gosling argues that even great math can look messy, illustrated by an ‘oracle-like’ theorem-prover anecdote.
- •Programming as navigating graphs/possibility spaces to find good solutions
- •The “short program” intuition and elegance vs practicality
- •Math work can be messy despite producing clean results
- •Anecdote: a student who outputs results like “N log N” without showing steps
- •Importance of reconstructing reasoning from answer back to proof
Proving code works: dense formatting, visual thinking, and code-as-machinery
Gosling explains his preference for dense code formatting to maximize what he can see at once and mentally verify correctness. He describes thinking visually—code quickly becomes a ‘picture’ or machine with connected parts—leading to strong opinions about layout and readability.
- •Goal: look at code and convince yourself it works
- •Dense formatting to view an entire function at once (minimize scrolling)
- •Team “interventions” about Gosling’s coding style
- •Self-described visual thinker and slow reader
- •Code transforms into a mechanical mental model (gears/knobs/relationships)
First machines and first programs: PDP-8, teletype interfaces, and building without parts
Gosling recalls learning on a PDP-8 at the University of Calgary and describes its constraints (4K RAM, teletype, paper tape). He frames programming as a way to build complex things without physical materials—especially meaningful when you don’t have money for hardware parts.
- •PDP-8 specs and the pre-monitor era (Model 33 Teletype)
- •Finding an underused machine and ‘just starting to fool around’
- •Programming as building without needing physical components or cash
- •Dumpster-diving electronics, relay racks, and risky tinkering
- •Early programs: assembly/FOCAL-like Fortran, games, and teletype “graphing”
Lisp, parentheses, and Simula: early OOP and coroutine ideas
Lex prods Gosling about Lisp’s greatness, leading to a balanced take: powerful structure, but too many parentheses. Gosling then highlights Simula’s influence as the first object-oriented language and discusses coroutines as a precursor to threads and concurrency models.
- •Lisp: strong language ideas hidden inside heavy syntax
- •The notion of a “friendlier Lisp” that could exist
- •Simula as the first object-oriented programming language
- •Coroutines as ‘almost threads’ with a simpler mental model
- •Concurrency tradeoffs: coroutines vs true parallelism and locking complexity
Writing Emacs in C: TECO origins, Unix needs, and accidental dominance
Gosling tells the story of creating an Emacs implementation in C for Unix after experiencing Lisp-based Emacs on Multics. He explains TECO macro roots, why Emacs felt revolutionary, and how his Unix Emacs spread through the ARPANET-era research community—along with a very different attitude toward security.
- •Editing history: ed/vi ancestry, TECO as a macro-driven editor
- •Emacs as ‘Editor Macros’ and TECO programs as “line noise”
- •Emacs philosophy: programmable, flexible, and visually oriented editing
- •Motivation: Unix lacked Emacs; C was the practical Unix language
- •Rapid adoption via ARPANET; Gosling had logins on many hosts to help installs
ARPANET social life and the internet’s scaling shock
Gosling describes how ARPANET already resembled social media: email and one-line ‘chat’-style messages shaped daily life and relationships. He argues the fundamentals of online communication changed less than people think—the real revolution was the explosive scaling in the 1990s.
- •Early text messaging/chat-like tools on ARPANET
- •Social coordination (lunch, dates) conducted via network terminals
- •Continuity: core online behaviors stayed similar; scale transformed everything
- •Networking technologies evolved while social patterns persisted
- •Early 90s rapid scaling as a watershed moment
Who fought the internet: cable/phone business models, revenue fear, and Kodak’s trap
The discussion turns to institutional resistance: cable, broadcast, and phone companies disliked the internet because it threatened their ad-driven ‘eyeballs’ model. Gosling connects this to broader innovator’s-dilemma dynamics, including Kodak’s awareness of digital’s rise but inability to justify the transition under quarterly pressures.
- •Cable/broadcast/telecom hostility toward an open internet
- •Two views inside firms: serving customers vs selling attention to advertisers
- •Sun-era proposals: anyone can become a publisher (proto-YouTube/Netflix vision)
- •‘No path to revenue’ as the blocking argument
- •Chasm-leaping requires enduring a trough; quarterly reporting discourages it
Founders, vision, and culture: Bezos, Musk, Jobs—and the myth of the “necessary jerk”
Lex asks about high-profile leaders; Gosling credits vision and decisive execution, while noting luck/timing and high failure rates. The conversation sharpens around Steve Jobs’ brilliance and cruelty, and Gosling rejects the Silicon Valley myth that being a jerk is a prerequisite for great outcomes.
- •Vision plus execution vs survivorship bias (many visions fail)
- •Musk as sharp and decisive; bold calls (and some ‘goofball’ ones)
- •Jobs: strong human-product intuition, but abusive interpersonal style
- •Feature or bug: pushing people vs crossing a line into needless nastiness
- •Critique: “jerk leadership” mythology and overlooked kind, effective leaders
Open source without dogma: community benefits, sustainability, and Stallman tensions
Gosling supports open source as a community and collaboration engine but criticizes absolutist ‘information must be free’ ideology. He frames the hard problem as sustainability—engineers need to eat—then discusses practical business models (support/service) and how extreme capitalism and extreme purity both fail to balance incentives.
- •Open source as a powerful mechanism for collaboration and adoption
- •Problem with ‘open source as religion’ and the implied “vow of poverty”
- •Emacs maintenance vs graduating: personal tradeoffs and economic reality
- •Hand-off of Emacs stewardship and the backlash it triggered
- •Monetization realities: support contracts, compliance pressures, and Oracle-style pricing extremes
Java’s origin story: embedded devices, safety/reliability, and escaping C/C++ pitfalls
Gosling explains Java’s beginnings at Sun (1990–1991) as an effort to understand computing outside traditional computers—consumer and industrial devices with processors. The project’s goals crystallized around security, reliability, and developer productivity, leading to design choices that avoided common C/C++ failure modes like pointer bugs and memory misuse.
- •Motivation: computing spreading into appliances, factories, phones, and control systems
- •Research road trips to Japan/Europe/Korea and lessons from consumer electronics culture
- •Reliability and safety prioritized over performance hacks (toast/toaster metaphor)
- •C/C++ pain points: naked pointers, buffer overflows, leaks, use-after-free
- •Java as ‘social engineering’: prevent backdoors, enforce interfaces, boost developer velocity
JVM and bytecode portability: procurement, hardware churn, and lessons from Pascal P-code
Gosling unpacks the JVM as an abstract machine instruction set enabling portability and multiple execution strategies (interpret or compile). He ties the idea to real-world constraints—purchasing teams being locked into proprietary CPUs—and to his earlier experience translating UCSD Pascal P-code to VAX assembly, plus influences from Smalltalk bytecode systems.
- •JVM as an abstract instruction set (and deeper AST/RPN interpretation)
- •Key business driver: avoid vendor lock-in to a single CPU supplier
- •Practical pain: hardware generations and architecture quirks forcing rewrites
- •Origin inspiration: P-code-to-VAX translation project that outperformed C compilers
- •Standardization battles: two’s complement expectations, IEEE 754 correctness, Intel rounding/transcendentals issues
Android, contracts, and closing life advice: risk, ethics, and choosing Star Trek
In the final stretch, Lex asks about Java on Android; Gosling is glad Java was used but criticizes contract violations that led to major legal battles. He closes with reflections on legacy and advice: take risks, learn from failures, and evaluate technical choices ethically—framed as building ‘Blade Runner’ vs ‘Star Trek.’
- •Android: happiness about adoption, frustration about ‘lines crossed’ and legal fallout
- •Java’s broader embedded footprint (smart cards, SIM cards, pre-Android phones)
- •Desired legacy: people willing to take leaps of faith despite frequent failures
- •Advice: accept risk; doing something stupid once (or twice) is part of learning
- •Ethical lens for engineers: choose the future you want (Star Trek over Blade Runner; Data over Skynet)