newsfilter
← Interviews
Lex Fridman5h 15m

John Carmack: Doom, Quake, VR, AGI, Programming, Video Games, and Rockets | Lex Fridman Podcast #309

John Carmack, Lex Fridman, John Romero, Elon Musk, Andrej Karpathy

Interview, Fireside Chat

Programming Philosophy & Tools

  • The "Go To" Statement: Carmack argues that while structured programming is generally superior, goto is not inherently "poisonous" and remains useful when language features are missing (e.g., nested breaks) or for low-level efficiency.
    • Modern high-level codebases rarely use goto, but deep game engine infrastructure often still requires it.
  • Language Preferences:
    • Python: Praised for convenience and rapid prototyping in AI/ML, but criticized for massive inefficiency in loops compared to GPU tensor operations; requires rewriting loops as vector operations for performance.
    • C/C++: The preferred choice for "serious" programming; Carmack favors "C-flavored C++" and avoids complex template metaprogramming which he views as over-abstraction.
    • Lisp/Haskell: Valued for shifting thinking away from mutable state, but the "language of language" nature (e.g., Racket) is seen as a maintenance nightmare for large, long-term projects.
    • Go: Respected for simplicity and ease of adoption, effectively bringing C's pragmatism to modern web/cloud contexts.
    • Rust: Acknowledged as a modern contender but not deeply used by Carmack beyond short exercises.
    • JavaScript: Describes the ecosystem as a "natural evolutionary process" where the sheer volume of code creates a sticky, robust, though inefficient, system; garbage collection is viewed as a net positive for 99% of software despite performance costs.
  • Developer Tools:
    • Debuggers: Strongly advocates for interactive debuggers (breaking the code mentally is insufficient); uses them as a primary companion to coding to inspect state without recompilation.
    • Static Analysis: Believes automated tools (static types, linters) are essential for large codebases to catch statistical errors; "human good intentions" cannot replace automated guardrails.
    • IDEs: Prefers Visual Studio over Vim/Emacs for modern development due to superior tooling and debugger integration, though acknowledges the value of deep customization in Lisp-based editors.

Work Habits & Productivity

  • Hours & Schedule: Historically worked 60 hours/week (10-hour days, 6 days) with a consistent 8-hour sleep requirement; rejects the "20-hour coding" myth, noting cognitive decline after 12 hours.
  • Philosophy on Work: Hard work yields more output, but also deepens skill acquisition ("craftsmanship"); argues that working longer hours is a valid path to mastery and that "marginal productivity" does not drop until extreme fatigue sets in.
  • Diet & Environment:
    • Diet: Maintained a diet of daily pizza and 8-9 Diet Cokes per day for years; now focuses on running/walking (4 miles/day) to optimize morning focus time.
    • Setup: Uses a Kinesis keyboard, multiple monitors (tripled in recent years), and prioritizes IDE debugger integration over specific hardware aesthetics.
    • Workflow: Uses .plan files (an early Unix feature) as a proto-blog to log development thoughts and progress; values "user value" as the primary metric for success rather than technical purity.

id Software & Game Development History

  • Early Days & Softdisk:
    • Started with TRS-80 programming and "Hello World" variations; wrote games in BASIC and Assembly.
    • Joined Softdisk (Shreveport, LA) where he learned low-level EGA graphics and "adaptive tile refresh" scrolling to overcome hardware limitations.
    • Commander Keen: Developed with Tom Hall's creative vision; utilized a shareware business model (Apogee) that split games into three episodes, creating a "free demo -> paid full game" dynamic that revolutionized distribution.
  • Wolfenstein 3D:
    • Pivoted from 2D overhead views to 3D by using the same game logic but changing the camera perspective (first-person).
    • Technical Innovation: Replaced flawed ray-casting attempts with a highly optimized raycasting engine (casting 320 rays per frame) and compiled scalers (pre-compiled scaling code for sprites to ensure performance at close range).
    • Design Philosophy: Introduced "no lives" mechanic in Doom to reduce frustration, prioritizing fun over arcade-era constraints.
  • Doom & BSP Trees:
    • Implemented Binary Space Partitioning (BSP) trees to handle arbitrary angles and complex level geometry, solving rendering order and occlusion problems.
    • Faced "epsilon problems" (floating-point precision errors) with angled lines, requiring careful snapping to integer grids.
    • Released source code and level editors, fostering a massive modding community (WAD/PWAD files) that extended the game's lifecycle indefinitely.
  • Quake:
    • First game to feature true 3D (6 degrees of freedom), QuakeC (a modifiable scripting language), and TCP/IP client-server networking.
    • Retrospective: Carmack admits the project was too ambitious; splitting the networking/modding features from the graphics engine into a second game would have been a better strategy.
    • Hiring: Brought in Michael Abrash to write highly optimized assembly code, which was critical for achieving real-time performance on consumer hardware.

Virtual Reality (VR) & The Metaverse

  • Metaverse Definition: Views the metaverse as an evolution of interconnected virtual worlds (like Minecraft/Fortnite) rather than a top-down capability-first platform; believes success comes from "building something amazing people love" and expanding from there.
  • Key Learnings from Early VR:
    • Beat Saber Success: The dominance of rhythm games like Beat Saber revealed that VR's true strength lies in hiding controller weaknesses (e.g., solid grip, slicing mechanics) rather than simulating realistic physics.
    • Hardware Priorities: Favors mobile-based, standalone headsets (Quest series) over tethered PC VR for ubiquity; argues that lower cost and weight create a virtuous cycle for adoption.
    • Value Proposition: Believes VR must offer an experience "better inside the headset than outside" (e.g., remote presence, private estates) to be viable.
    • Bottlenecks: Current friction points include latency, user interface simplicity ("one-click" joining), and hardware ubiquity.
  • Critique of Big Tech: Notes that while Meta spent $10B on Reality Labs, large corporations often suffer from bureaucratic inefficiency compared to small startups, though Meta's commitment to long-term funding is a positive differentiator.

Artificial General Intelligence (AGI)

  • Timeline Prediction: Carmack estimates a 50-60% probability of seeing "signs of life" in AGI by 2030; believes the core code for AGI will be relatively small (tens of thousands of lines, not millions) and possibly derived from "buried" concepts in older literature.
  • Core Arguments:
    • No Embodiment Required: AGI does not need a physical body to develop; digital environments are sufficient for training and interaction.
    • Fast Takeoff Unlikely: Skeptical of "instant" AI takeoff due to physical constraints of data center construction, GPU availability, and interconnect bandwidth.
    • Consciousness: Views consciousness as a "flow of associations" with stochastic noise; argues that subjective qualia are not necessary for intelligence.
    • Safety: Believes ethical debates on AI rights should wait until systems exhibit clear "signs of life" (e.g., a learning-disabled toddler interacting with AI); currently dismisses premature safety preoccupation.
  • Personal Commitment: Launched a new company focused on AGI research after a "larval phase" of studying machine learning papers; aims to leverage systems engineering background and a unique perspective outside the academic norm.
  • Comparison to Self-Driving Cars: Bets that autonomous driving will be solved before AGI, but recognizes the "long tail" of driving may require AGI-level generalization.

Personal Insights & Philosophy

  • Hacker Ethic: Emphasizes sharing code and taking joy in others' accomplishments over credit; believes focusing on the "art" (building cool stuff) leads to correct long-term recognition.
  • Mortality: Generally does not dwell on death or legacy; views life as following "gradient descent" (local optimization) rather than seeking a grand purpose.
  • Relationships & Conflict: Reflects cordially on the split with John Romero, attributing it to mismatched work ethics and a lack of modern corporate structure in early id Software; maintains respect for Romero's design contributions.
  • Martial Arts: Judo/Jujitsu provides a humbling perspective on expertise and the "science of leverage"; views it as a way to break through ego and understand physics.
  • Advice to Youth: Encourages "weaponized curiosity" to dig deep into layers of complexity; suggests learning to know "anything" rather than knowing everything, and embracing the "grind" of craftsmanship.