[BidClub_]
Lex Fridman Podcast · · 330 分钟

ThePrimeagen:编程、AI、ADHD、生产力、成瘾与上帝|Lex Fridman Podcast #461

Lex FridmanThePrimeagen

YouTube
TL;DR
  • AI 编程工具奖励有经验的判断力,却可能把新手困在机器的水平上。 ThePrimeagen 认为,这些工具最适合可预测、范围狭窄且文档完善的工作,但在定制化设计、大上下文推理、调试,以及判断某件事是否“感觉对了”方面表现较弱。Lex 表示,AI 提高了他的生产力和乐趣,同时也认同“总有一天你得摘掉辅助轮”。

  • AI 最大的风险可能不在代码生成,而在提示注入、自动化滥用、许可证和市场操纵。 Agent 获得的权限越大,潜在损害面就越广;自动生成的漏洞报告可能对维护者制造“注意力拒绝服务”。ThePrimeagen 还推测,供应商可能通过“高级训练数据”把广告主偏好植入模型行为;两人也提出了 GPL 衍生代码输出尚未解决的问题。

  • 基础设施规模依然是可防守的工程挑战,但不同平台面对的工作负载截然不同。 Netflix 能够预测需求,并通过 OCA 节点预缓存有限的内容目录;YouTube 每天必须吸收约 100 万小时的新上传内容,同时完成排序和分发;Twitch 则要实时接收、转换并转播视频。ThePrimeagen 认为,“Netflix 面对的本质上是更容易的问题”,但仍认可这 3家公司的工程能力。

  • 在成熟公司里,组织接口可能压过技术复杂度。 调换《黑镜》季序需要元数据、存储、服务、电视、移动端和 Web 系统约 20名工程师协作,但 Netflix 通过任命一名拥有充分权限的“队长”,在约 3周内完成了工作。ThePrimeagen 认为,能动性会筛选出多维度工程师,而会议排队和金手铐则可能让优秀员工整天“实际上像僵尸一样工作”。

  • ThePrimeagen 长期有效的生产力公式,是把积累的苦功转化为直觉,而不是崇拜捷径。 他曾两次挂掉微积分预科,第三次拿到 C,却在 30分钟内完成一场 2小时的微积分期末考试,并取得全校最高分;之后,他成为约 400名学生中唯一完成微分方程期末考试的人。他对“聪明地工作,而不是努力工作”的替代说法很直接:“努力工作,变得聪明。”

  • 他的创作者商业路径,是让身份、分发和产品差异化不断复利,而不是把受众当作一夜之间形成的资产。 他曾多年一边在 Netflix 工作一边直播,经常每周 3晚播到凌晨 2点;随后与剪辑师 Flip 以 50/50分成建立 YouTube 收入;最终离开一份安全的 10年职业,全职做内容。Terminal Coffee Company 则通过面向开发者的 SSH-only 下单体验,把这套身份延伸到了商业领域。

  • 个人底色是一段复原故事:信仰、家庭和责任取代了寻求认可与逃避现实。 他 4岁或 5岁接触色情,7岁时父亲去世,之后经历毒品、自杀未遂和学业失败;约 19岁时,他所描述的与上帝相遇,以及良知的出现,成为转折点。他最深的主张并不是纪律消除了所有弱点,而是宽恕松开了仇恨,妻子提供了实用的“作弊码”,而爱让这些工作有了值得指向的地方。

摘要 · 为研究而整理的核心内容

1. 链表让软件显得没有边界

  • ThePrimeagen 认为,自己第一次感受到编程的乐趣,是在 Montana State University 的第二门数据结构课上。当他看到一个 Node 类包含一个指向自身类型的私有成员时,原本“列表只能装 10个或 20个元素”的僵化认知被打破了:“没有尽头。”软件突然像是可以表达几乎任何东西。

  • 他能够想象这种结构“在空间中跳跃”,像根系穿过内存。Lex 将其延伸为一种关于人的隐喻:每个节点只知道自己的邻居,就像人生活在一个更大世界中的局部网络里。

  • 但这种表达力也会带来内存泄漏;如果分配的内存没有释放,结果就是“无限痛苦”。

2. 只有当问题值得递归时,递归才会变得显而易见

  • ThePrimeagen 起初把阶乘和斐波那契数列看成“一个非常复杂的 for 循环”。教材中的汉诺塔例子进一步加深了他的恐惧,让他怀疑自己根本不是程序员;他在实验室花了 8或 10小时试图理解递归。

  • 一道迷宫作业终于给出了正确的问题:向上、右、下、左探索,标记走过的格子,再回溯。他意识到:“我一直都理解递归,只是从来没有遇到过一个适合使用它的问题。”

  • Lex 回忆起深度优先搜索、Lisp、国际象棋引擎和细胞自动机带给自己的顿悟:简单的局部规则,可以生成令创造者本人都感到意外的复杂系统。

3. 编程最深的痛苦不是困难,而是确定

  • 在 Schedulicity,ThePrimeagen 知道自己每天都会取出一个对象、对它做映射,再把它展示在网页上。他并不了解代码库的每一行,但知道每项工作的形状。

  • “编程最糟糕的部分,是你已经知道解决方案的时候。”当工作只剩下把脑中的答案搬运到手上,创造力和不确定性就消失了。

  • 这也是他把自己定位为通才和工具工程师,而不是永久专才的原因。他希望学习下一个陌生问题所需的一切,从 UI、内存到 WebSockets 和构建系统。

4. 编程世界远不止 Web

  • ThePrimeagen 反对 Twitter 上常见的“编程就是 Web”的视角。嵌入式系统、机器人、机器学习、网络、操作系统、性能优化、编译器和开发者工具,构成了截然不同的编程世界。

  • 他建议每个程序员都亲手构建一次编程语言,因为这项练习会揭示:熟悉的语法和运行时行为都是设计选择,而不是自然法则。

  • 2012年和 2013年,他构建过一个能够像 iPad 2一样捏合缩放的浏览器 UI,包括 canvas 和矩阵运算;在 Grunt 和 Gulp 之前,他还手写过 JavaScript 构建系统。在 Netflix 的 10年里,他的大量工作是为其他开发者打造工具,包括电视端的 WebSocket 和 framing 代码。

5. 当交付一个网站不再奏效,DevOps 就开始了

  • ThePrimeagen 对“DevOps”的使用比较宽泛,指的是让已经上线的服务在规模扩大后继续运行的人。一个小型 PHP 或 WordPress 网站可以交给 Linode、DigitalOcean 或其他主机商;更大的服务则需要更复杂的构建、部署、基础设施和可靠性工作。

  • 他承认 platform、cloud、infrastructure 和 site-reliability 工程师之间一直存在命名争议。但在实际语境里,人们听到 DevOps,通常会想到那些管理服务器生命周期和系统可靠性的人。

  • Lex 回忆 Google 的基础设施运维人员像巫师,因为他们能让大规模算力持续运行而不宕机。

6. 失去亲人和早期暴露,塑造了漫长的认可寻求

  • ThePrimeagen 说自己在 4岁或 5岁第一次接触色情,此后直到 20多岁,色情每天都占据着他的思绪。他 7岁时父亲去世;哥哥当时约 11或 12岁,后来陷入毒瘾。

  • 哥哥在他 8岁时让他接触大麻。大麻断断续续持续到约 11或 12岁,之后又重新开始;15至 18岁期间,饮酒变得严重。高中时期,他遭到嘲笑、被孤立,并感觉自己格格不入。

  • 临近毕业时,他曾自杀未遂并住院。之后他使用 LSD、蘑菇和甲基苯丙胺;他还说,摄入过量的酸让自己多年都能在高对比度物体旁看到细小的波纹线。

7. 与上帝相遇后,良知先于成就出现

  • 大约 19岁时,在 Montana State University 的 South Hedges,ThePrimeagen 感受到他所描述的“戏剧性且真实的上帝临在”。他体验到一个选择:是否继续沿着自我毁灭的道路走下去。

  • 改变并没有立即发生。他睡了一觉,醒来时似乎没有变化;但后来,色情、大麻、伤害他人或做错事,突然会带来深重的羞耻。“那天晚上之后,我有了良知。”

  • 学业恢复是渐进的。他拿高中 GPA 2.14开玩笑,也提到一位老师在评语中称他是自己教过的最差学生。他曾挂掉微积分预科,学习了约 1年半,最终发现学习变得容易起来。

8. 高中之所以像永恒,是因为那套等级体系占满了视野

  • ThePrimeagen 给陷入困境的青少年的建议,首先从尺度开始:高中会让同龄人看起来像构成了整个未来,尽管其中许多人后来会成为“你生命中最不重要的人”。

  • 他鼓励年轻人趁后果相对有限时多做尝试。Lex 不赞成去揍别人,而是建议练习巴西柔术或其他身体训练,以建立自信和自卫能力。

  • 他们拒绝认为学校里的低地位会预示人生中的低地位。高中等级体系奖励的是泛化能力、物质信号和本地人气;古怪和内省可能在更晚的人生阶段更有价值。

  • 但他们保留了一个前提:接受挑战确实可以发展自我认识,“只要它没有击垮你”。

9. 社交媒体把青少年地位变成了可见的数字

  • ThePrimeagen 认为,当社会地位变得可以量化时,青春期会更难熬。一个青少年不再只是被贴上“酷”或“不酷”的标签,而是能看到 32,514个粉丝和 12个赞这样的数字。

  • 这种表面上的精确,会让排斥感看起来像是对一个人价值的客观测量。Lex 提供了另一种框架:被浅薄的本地等级体系拒绝,可能意味着某种独特品质正在别处形成。

  • 他们认为,那些在高中占据主导地位的人,通常没有太多理由质疑自己;而局外人可能被迫审视自己的价值观和目标。

10. 色情的伤害隐秘、累积,并发生在关系之中

  • ThePrimeagen 认为,色情比甲基苯丙胺或香烟更难戒,部分原因在于社会不会围绕戒色情形成支持体系。一个人可以私下、短暂地消费色情内容,然后回到日常生活,没有人知道。

  • 他的主要反对理由是道德和关系层面的,而不是统计学层面的:色情训练一个人为了私人欲望而使用另一个人,把人变成商品。他认为,这影响了自己看待曾经交往女性的方式。

  • 他提到多巴胺、反复打开标签页,以及接触性化图片后更糟糕的决策,但他说更深层的问题是:把人客体化,对灵魂是否有益。

11. 性既不是亲密关系的证明,也不是与亲密无关

  • Lex 认为,把性征服作为首要目标,会贬低亲密、友谊和长期伴侣关系。他也认为,一定的性经验可以降低焦虑,让年轻男性意识到,发生性关系并没有找到合适的人重要。

  • ThePrimeagen 同意,性可以提升年轻男性的自信并提供有用经验,但认为更深层的目标是持久的浪漫关系或友谊。Lex 以自己与妻子相处 15年的关系作为对照;ThePrimeagen 则说,自己的妻子以及两人之间的信任,才提供了更深的价值。

  • 性频率是一种不完美的诊断指标:长时间没有性生活可能意味着关系不健康,但频繁性生活并不能证明这段关系有意义或有益。

12. 信任之所以深化关系,是因为脆弱会带来后果

  • ThePrimeagen 说,他尽量不看其他女性或色情内容,让妻子永远不必怀疑他的忠诚。他认为,关系的深度与信任密切相关。

  • Lex 补充说,脆弱是信任的前提或组成部分。相互暴露脆弱会创造亲密感,尽管公开暴露会让风险更大。

  • ThePrimeagen 仍认为这种风险值得承担。他称找到妻子是自己人生中第二重要的事件,仅次于那一夜与上帝相遇、从而启动了此后整个人生的夜晚。

13. 戒掉色情,需要保护一段尚不存在的未来关系

  • ThePrimeagen 不是靠找女朋友来停止色情的。“不能靠替换一个问题来停止它。”他必须意识到,自己的行为正在从一个尚未遇见的未来妻子那里夺走某些东西。

  • 当这一认识从“我的头脑进入我的心里”时,戒断就从单纯的自我优化变成了责任。他并不声称这是放之四海而皆准的万能解法。

  • 他把没有根本改变的化学缓解,比作一种药:它能让人看见田野上美丽的雨,但庄稼仍在死去。Lex 将“未来妻子”扩展为一个可能蓬勃发展的未来,而成瘾可能会阻断这个未来。

14. 毒品强化了体验,却没有提供意义

  • Lex 把死藤水和迷幻药描述为掷骰子。他自己的经历是积极的,但拒绝推荐这些东西,并总体建议人们远离毒品。

  • ThePrimeagen 相信精神世界的存在,并说致幻剂带来的体验,从深刻而美丽到怪异而糟糕都有。他不会抹掉自己的过去,但也认为,没有人需要这些经历才能明白人是有价值的。

  • 对他而言,甲基苯丙胺像没有最初 15分钟“舞会狂欢”的可卡因:取而代之的是持续约 12小时的躁动强度。它适配了他的高能量气质,却仍没有带来他所寻找的东西。

15. 在毒品和工作中,逃避都可能伪装成目标

  • Lex 认为,酒精部分是一种社交道具:手里拿着饮料让人有事可做,也传递出人们应该享受生活的信号。但他把这种作用与“有意义的互动必须依赖酒精”区分开来。

  • ThePrimeagen 把自己的吸毒归入逃避,以及对毒品无法提供的某种感觉的追逐。编程可以带来满足和兴奋,但他怀疑,大多数程序员都不可能在工作中找到完整的人生目标。

  • 分心最终会开出账单。眼下的交换可能感觉划算,但延迟支付的成本会变得巨大。

16. 重复练习把数学不及格生变成了考试第一名

  • ThePrimeagen 上过 3次微积分预科:前两次挂科,第三次拿到 C。之后,他用 30分钟完成了一场 2小时的微积分期末考试,取得全校最高分,并在微积分和微分方程中拿到最高分;在约 400名学生中,他还是唯一完成微分方程期末考试的人。

  • 他的办法是反复练习。他参加课程,去数学学习中心,针对教材奇数题后的答案做题,直到三角代换和 Taylor–Maclaurin 级数等技巧变成自动反应。

  • 他需要先看具体例子,才能理解抽象理论。最初这些工作压得他喘不过气;后来,随着机械操作退到幕后,编程和数学变得更像演奏乐器,而不是完成苦差事。

17. “聪明地工作”掩盖了识别聪明工作的经验要求

  • ThePrimeagen 痛恨“聪明地工作,而不是努力工作”,因为这句话假设一个人已经知道什么叫“更聪明”。大多数困难工作都始于不确定性,因此高效方法往往只有在持续投入之后才能被发现。

  • Lex 同意,这句话可能暗示那些正在挣扎的人只是错过了某个显而易见的捷径。有经验的工程师也可能忘记,自己后来获得的效率曾经依赖怎样的苦功。

  • ThePrimeagen 的替代说法是:“努力工作,变得聪明。”聪明工作是对早期劳动进行压缩后获得的能力,不是劳动的替代品。

18. 好的目的地应该配得上旅程

  • 抨击“旅程比目的地更好”这句话的是 Lex,而不是 ThePrimeagen。按字面理解,这句话意味着每一步都在走向一个更糟的地方。

  • 他更喜欢这样表述:“享受旅程,庆祝目的地。”重点不是否定过程,而是否定那些贬低完成本身的空洞格言。

  • ThePrimeagen 则用关于进步和原地打转的丧气海报来回应。

19. 他的母亲提供了持续努力的范本

  • ThePrimeagen 说,父亲去世后,母亲每天工作 18小时,让家庭继续运转。当他决定在学业和个人生活上重新站起来时,他把母亲作为内在动力的来源。

  • 他后来许多努力,都与希望母亲知道自己感激她所做的一切有关。他在附录结尾说:“谢谢你。爱你,妈妈。”

20. 失败的创业项目,训练了 Netflix 后来识别出的技能

  • 看完《社交网络》后,ThePrimeagen 决定用 PHP 5.2 和 jQuery 创业。他经常每天编程 12小时,有时连续 24或 36小时,代价是损害了自己的亲密关系。

  • 他的短信营销公司 Via Text 在 2010年前后运营,当时他称约 80%的手机仍是功能机。公司在短信营销普及前失败了;他认为这是时机不佳,而不是自己具有先知般远见的证明。

  • 他的父亲在 1991年或 1992年前后尝试过预付费长途电话卡公司,约 6年后,类似服务才开始流行。其他项目还包括名为 Grief Feed 的 Facebook 生日自动化工具。

  • 真正留下来的收益,是持续探索、技术练习、完成项目,以及在企业环境中沟通的经验。

21. Netflix 招聘的是 5年的准备,而不是一次面试表现

  • 创业失败后,他在 Schedulicity 和 WebFilings 工作,每周通常约 60小时。他积累了 UI 状态机、矩阵密集型界面、构建系统和 RxJS 经验。

  • 2013年,Netflix 经理 Jeff Wagner 亲自发信,邀请他参与电视端 JavaScript 和 RxJS 工作。ThePrimeagen 遵循一条规则:只要面试邀请确实是私人发出的,就绝不拒绝。

  • 面试期间,他打电话给妻子,因为两人必须决定是否搬去 California。他已经觉得自己拿到了这份工作,因为面试考查的正是他 5年来每周约 80小时持续练习的技能。

22. 加入 Netflix 在纸面上安全,在现实中却充满风险

  • 搬离 Montana 前往 Los Gatos 时,他的妻子已经怀孕 36周;他们在那里谁也不认识,也没有医生。第一个孩子很难照料,而缺乏家人支持让妻子承担了更重的负担。

  • Netflix 当时的文化手册强调“快速招聘,快速解雇”。他在面对分娩以及巨大的文化和地理变化时,离开了一份稳定工作,加入一家要求很高的公司。

  • 他欣赏 Silicon Valley 的活力,因为那里的人都在尝试创造东西;但他也承认,把生活的大部分内容商业化是有代价的。

23. Netflix 的电视技术栈奖励愿意进入丑陋底层的人

  • Netflix 给了他一台 PlayStation 3,让他学习电视端代码。较新的电视应用叫 Darwin;老设备使用 Plus UI。

  • 中间层用 Groovy 编写,旁边还有一个自研响应式实现 WX。他说,在约 40名工程师中,没人真正理解 Groovy 系统是如何工作的。

  • 测试 Observable.sleep(1) 时,他发现这个号称多线程的系统可能让线程死锁。重复测试后,他让 staging 环境整个下午都锁死了。

  • 他花了一天阅读语言参考文档,补上缺失的工作,最终成为唯一理解这个被忽视层的人。

24. 推荐场景需要再多一层间接关系

  • Netflix 的一次改动,把电影对象列表改成了推荐对象列表。同一部影片可以因为不同原因出现在两行中,例如因为用户偏好 Bruce Willis,或者偏好“硬汉做硬事”。

  • 如果把解释直接附在视频上,每次出现都会继承同一条证据。推荐对象则允许每个展示场景携带自己的解释。

  • 这个例子体现了 ThePrimeagen 偏好的工作范围:产品含义、数据建模、响应式服务和电视端代码,并不是相互隔离的专长,而是一个相互连接的问题。

25. 打印调试用稀疏证据绘制地图

  • ThePrimeagen 在学校编写政府机器人时,培养了 printf 调试方法。他的教授提供了一台电脑、一个机器人、不完整的手册,以及涉及 flash、Ethernet 和行星煎饼电机的任务。

  • 在 Netflix,代码可能运行在他无法直接访问的 AWS 机器上。打印输出和日志让他能够重建发生过什么、检验直觉,并推断边界情况。

  • Lex 把这种方法比作在黑暗房间里用手摸索。ThePrimeagen 认为它取决于上下文;游戏开发者可能从交互式调试器中获益更多。

26. 重写旧代码,往往会重现隐藏在其中的原因

  • 在开发 Falcor 时,ThePrimeagen 认为另一名工程师写的请求去重代码很奇怪。他删掉代码,开始进行更干净的重写。

  • 每个边界情况都解释了原设计中的一个奇怪选择。最后,他几乎重现了相同的设计,并得出结论:“在这件事上,我才是白痴。”

  • 他仍然建议为了学习而从零实现系统,例如创建 TCP socket 并解析 HTTP;但他把这种练习与随意替换已经解决的生产代码区分开来。

27. 一个 Falcor 请求就能让一台 Netflix 机器失效

  • 这个漏洞的正确名称是 Recursive Grizzly Attack,而不是“Repulsive Grizzly Attack”。Falcor 路径可以用很短的请求表达行、列和属性的范围。

  • 一个请求如果申请最大到 10,000的范围,再进行实体化,就可能创建数十亿个 JVM 对象,随后还要尝试序列化它们。一个请求就能杀死一台 AWS 机器。

  • 如果 UI 由 50台机器提供服务,大约 50个请求就能让 Web、电视和移动端的导航失效。已有的视频流可能继续播放,但用户无法进入新视频。

  • 这个问题已经在生产环境存在多年,因此回滚意味着最远退回到 2011年。团队只能向前修复。

28. 安全上,攻击者只需找到一条被忽视的路径

  • ThePrimeagen 区分了高流量洪泛攻击和让单个请求成本最大化的输入。一个病态正则表达式可能让每个请求耗时约 10秒,因此几百个请求就足以拖垮服务。

  • Cloudflare 像外部的“强壮保镖”,可以过滤流量,降低被入侵设备造成的影响。

  • 他认为,社会工程学是长期的重要攻击向量。打电话的人只要提供一个假的 PIN,就可能诱使对方纠正它,并说出真正的 PIN。

  • 攻击者的优势是不对称的:找到一条可利用路径,比证明不存在任何路径容易得多。

29. AI Agent 扩大了最不为人理解的安全攻击面

  • ThePrimeagen 预计,AI 会让社会工程学变得廉价且可规模化。提示注入之所以困难,是因为语言本身可能跨越设计者原以为会由指令守住的边界。

  • Lex 把更大的软件能力描述为刀锋边缘:能力越强,可能造成的损害也越多。ThePrimeagen 的阶段性建议是,在理解攻击面之前,不要给系统太多权限。

  • Lex 还指出,YouTube 的上传和自动化接口已经创造了技术、审核和法律攻击向量,包括违禁材料,以及被错误标记为适合儿童的视频。Agent 只是给这些既有风险增加了一个更灵活的语言接口。

30. 生产事故不可避免,部署纪律必须匹配系统

  • ThePrimeagen 误解了 PHP static 的生命周期,导致数据在请求结束后仍然持久化,让用户看起来像是来自错误的国家。

  • 他曾破坏 Lady Gaga 的倒计时揭晓:广告牌停在 0,除非用户刷新页面。他还在“Add to My List”中引入了死循环,导致页面冻结;人工 QA 同样没有发现后一个问题。

  • 直接部署到生产环境,适合了解整个产品的单人开发者。对于有许多贡献者同时工作的规模化公司,这会非常危险。

  • 测试应该遵循耦合度和爆炸半径。视觉上隔离的改动,与深度耦合的库代码不同;后者的变化可能在其他地方产生连锁影响。

31. 无聊的技术栈可能胜过时髦架构

  • ThePrimeagen 尊重 PHP、jQuery 和 SQLite,因为创业公司未必需要昂贵的服务、最新的 React 或时髦的基础设施。大量软件都是老旧而不完美的代码,却仍然包含困难的维护问题。

  • Lex 指出,现代浏览器 API 已经覆盖了许多当初促使人们使用 jQuery 的场景。ThePrimeagen 的回答是,熟悉会消除未知的未知,使老工具成为最快的选择。

  • 代价在于表达范围:另一种语言可能更自然地表达某个状态或问题。他偏好的平衡是深度熟悉,加上有意识的探索。

32. YouTube 不断变化的内容目录,让 Netflix 的缓存问题显得有边界

  • ThePrimeagen 提到,YouTube 每天有超过 1000亿次观看和超过 10亿小时观看时长,每天约有 100万小时视频上传。

  • YouTube 必须决定在每个观看者附近缓存哪些新鲜、个性化且多分辨率的内容。新鲜度会影响相关性,因此平台不能简单地预缓存一个已知的发行目录。

  • Netflix 知道发行计划,可以通过 OCA 节点预缓存有限内容,例如在需求到来前预缓存《Stranger Things》第 5季。

  • Twitch 则必须接收直播视频、转换格式和码率,并几乎同时完成分发。所有系统都很难,但它们的不确定性位于不同位置。

33. 大型组织会把一次下拉菜单反转变成系统工程项目

  • 在 Netflix 发布自己的《黑镜》第 3季版本前,负责人不希望观众首先看到第 1季第 1集。反转季序需要修改元数据、存储、服务层,以及 Web、移动端和电视客户端。

  • 同一能力还必须支持反转单集顺序、隐藏季号或集数,以及 Chelsea Handler 等日播节目的内容。

  • 约 20名工程师参与其中。ThePrimeagen 成为队长,从每个必要团队招募工程师并负责协调,项目耗时约 3周。

  • Lex 指出,自主权伴随法律和产品风险,但两位嘉宾都倾向于保留足够的能动性,以便快速行动并修复错误。

34. 能动性会筛选出能够跨越代码边界的工程师

  • ThePrimeagen 认为,拥有授权的工作会筛选出那些既能写代码、解释问题、说服他人,又能动员团队的人。这些能力与实现能力同样有价值。

  • 等待高管会议数周,可能让优秀工程师离开、停止贡献,或者只剩下金手铐和舒适却毫无意义的日常。

  • 他把一个没有理由尝试的工作场所称为自己的“死刑”。危险不仅是交付变慢,更是把有才能的人变成整天“实际上像僵尸一样工作”的人。

35. 长期副业让创作者转型变得可承受

  • ThePrimeagen 在 2018年 6月左右开始直播 Fortnite,部分原因是为了学习游戏机制,以便参与 Netflix 的 Extra Life 慈善活动。该活动支持儿童癌症研究,并允许他选择一家医院。

  • 一场关于 Vim 的编程直播吸引了约 30名观众。他在 Netflix 工作期间继续直播:工作、吃饭、给孩子读《指环王》或《霍比特人》,然后每周 3晚直播或打游戏到凌晨约 2点。

  • 在 Streamer Awards 上,Pirate Software 给了他一枚挑战币,并鼓励他全职做主播。最终,他在前一年 4月离开 Netflix;那时他在那里已经接近 10年,因为随着年龄增长,非同寻常的机会会越来越少。

36. 创作者独立性用企业安全交换了受众波动

  • Netflix 提供了有挑战的工作、喜欢的同事、好的老板,以及在舆论转向反对他时的退路。全职直播则让受众波动成为他收入的一部分。

  • 这份工作很孤独,因为没有产品团队、经理或工程师群体供他观察他们如何解决问题。

  • 剪辑师 Flip 提议全职合作。两人同意将 YouTube 收入 50/50分成,并在收入几乎为 0的那些月份继续合作多年。

  • ThePrimeagen 最怀念的,是观察其他工程师用意想不到的方式解决问题,并从他们的方法中获得新的工具。

37. “ThePrimeagen”成了对无趣技术地位的拒绝

  • 这个名字来自《Turok 2》,游戏最终 Boss 叫 Primagen。访谈没有确认该游戏的副标题。ThePrimeagen 小时候也曾在 Graal Online 使用这个名字。

  • 2017年或 2018年前后,他重新启用这个称号,因为他认为技术文化自命不凡、排斥他人,而且痴迷于展示聪明。

  • 他希望新手可以提出愚蠢的问题,为了学习而重复造轮子,构建奇怪的东西,而不把缺乏经验当成道德失败。

  • 这个不寻常的名字最终成了他想创造的、以乐趣优先的反文化的鲜明符号。

38. 胡子先于策略出现,后来成为品牌

  • 胡子始于 No Shave November。直播时,观众对胡子做出反应,把“mustache time”变成了一个反复出现的玩笑。

  • 他刮掉胡子后,想念它带来的能量;尽管妻子并不热情,他还是重新留了起来。一个临时笑点变成了可识别的人物特征。

39. 学习一门语言,需要同时构建它并阅读它的设计决策

  • ThePrimeagen 的动手方法是直接开始构建,遇到障碍就逐个搜索:main、条件、函数、模块等等。风险在于,程序员可能只是把另一门语言的习惯翻译过来。

  • 受 Mitchell Hashimoto 启发,他也会完整阅读语言参考文档。Zig 参考文档大约需要 8–10小时读完,并配合小实验把概念内化。

  • 初学者应从小型、具体的程序开始;有经验的程序员则可以先用参考文档建立设计决策索引,再开始实现。

40. AI 可以个性化学习,也可能把理解过程自动化掉

  • ThePrimeagen 把 AI 看作 Google、Stack Overflow 和书籍解释的更个性化继任者。AI 可能比通用教材更快为他找到那个能解锁递归的迷宫问题。

  • 危险在于习得性无助:询问错误,修改建议的那一行,然后继续前进,却没有记住解释。

  • Lex 建议生成简单代码,再逐行修改以观察行为。ThePrimeagen 补充说,阅读生成代码并不等于亲手写出代码;他阅读 C++ 的能力强于凭记忆生成 C++。

41. JavaScript 是最广泛的第一门语言,但不是最终语言

  • ThePrimeagen 推荐 JavaScript 作为第一门语言,因为初学者可以画出并动画化一个方块,发起网络请求,构建后端,使用数据库,以及渲染 2D 或 3D 图形。

  • Python 擅长数据和机器学习。Lex 和 ThePrimeagen 推测,许多 Python 库底层依赖 C 或 C++,但没有把这说成已确认的普遍事实。

  • HTML 和 CSS 可以参与构建图灵完备的系统,但 ThePrimeagen 对编程语言的实际定义要求它具备函数、条件或循环。

42. 有用的语言组合应该跨越不同约束

  • ThePrimeagen 不接受一份普适的 Top 5语言榜单。C 或 C++适合游戏和嵌入式工作;C#、Java、JavaScript 或 Go 适合后端;Python 在数据和机器学习领域占据重要位置。

  • 他建议先探索一种动态语言,如 Python、JavaScript 或 Lua;再探索一种约束更严格的语言,如 Rust、Go 或 C++。

  • Lex 认为函数式编程是自己的知识空白,并提到想探索 Swift、Elixir、OCaml、Lisp 和 Odin。ThePrimeagen 说,Elixir、Odin 和 OCaml 都拥有热情的社区。

  • ThePrimeagen 实际使用最多的是 Go。Jai 和 Zig 是他的副业项目;Jai 需要手动处理 Berkeley sockets、DNS、TCP 和 IRC 解析。

43. 基准测试领先,可能体现的是表达方式而非语言魔法

  • Lex 提到一项覆盖近 100种语言的测试,其中 Zig 看起来最快。ThePrimeagen 提醒,Zig、C 和 C++可以共享 LLVM 后端,因此速度差异可能反映的是表达目标算法的方式不同。

  • 在另一项基准测试中,加入 noalias 告诉编译器传入内存没有其他指针指向它,从而允许一次优化,使 Zig 版本比 C 版本更快。

  • 他认为 Zig 处于 C 和 Rust 之间:C 提供广泛的能力和危险,Rust 提供更强的安全约束,而 Zig 提供 optional 和部分安全性,同时保留更多底层控制。

44. Rust 把内存安全绑定到作用域,并让可变性显式化

  • ThePrimeagen 看重 Rust 把所有权与作用域连接起来。当栈变量离开作用域时,相关堆内存会自动清理,不需要垃圾回收器,也不需要手动记住 free

  • 他也喜欢显式可变性:变量必须标记为 mut,才能被修改。

  • Rust 的安全性限制了表达能力。C 能表达的东西,Rust 可能无法表达,因此这种保护也可能根据问题不同而显得束缚。

45. 元编程在仍然使用同一种语言时最优雅

  • ThePrimeagen 认为自己是元编程初学者。C++17 元编程功能强大,但很难调试。

  • Zig 的 comptime 让编译期编程仍然处于普通语言之内。程序可以在编译期构造素数,并在运行时使用结果。

  • 他有兴趣用 ChatGPT、ElevenLabs、客户端和 WebSockets 测试 Zig 与 Jai,尽管他承认 Jai 需要更多手动网络工作。

46. Twitch 聊天通过变成嘈杂的分布式控制器击败了 Doom

  • ThePrimeagen 把 Doom 的 ASCII 移植版发送到浏览器,让 Twitch 聊天控制游戏。多数人按下 W 时,角色会向前移动 150毫秒;F 负责开火。

  • Twitch 本身有约 5秒延迟,因此游戏状态被放到另一个网站上,典型延迟约 70毫秒。1,000至 1,400人帮助通关了第一关。

  • 为降低向大量观众发送彩色 ASCII 的成本,他尝试了四叉树、游程编码,以及基于亮度选择字符的方法。

47. 平台会产生不同类型的受众行为

  • Twitch 拥有共享文化,梗和表情会跨频道传播。ThePrimeagen 报告称,自己在 Twitch 上约有 1,500–3,000名观众,在 YouTube 上有 800–2,000名,在 X 上约有 50名。

  • YouTube 更加碎片化:每条视频都有自己的小型社区,人们可能先“游”到不同时间戳,再回应聊天。Lex 看重 YouTube 对游戏文化之外人群的开放性和可访问性。

  • X 正在形成共享文化,但直播受众小得多。两位嘉宾都认为,平台设计、排序方式和用户预期会塑造最终形成的话语环境。

48. 软件设计大约从 5,000行开始暴露成本

  • ThePrimeagen 把 1,000–5,000行视为小型项目或功能。到了 5,000–10,000行,早期决策开始要么释放项目,要么拖累项目。

  • 他会在这个阶段测试设计质量、测试策略,以及系统扩展到 20,000行的能力。百万行代码库很少是一个整体,通常包含来自不同时期的不同风格。

  • Lex 补充说,随着系统增长,调试会揭示这些选择的后果。

49. 断言把不可能状态变成即时证据

  • Lex 主张使用断言,让本不该存在的状态直接触发崩溃。ThePrimeagen 将其与 John Carmack、NASA 式严谨性,以及 TigerBeetle 的 Joran Greef 联系起来。

  • 按 ThePrimeagen 的说法,TigerBeetle 使用精确的整数大小、始终开启的断言,以及确定性模拟测试,能够运行约 200年的随机事件。

  • 他把类似技术应用于反向代理和一款游戏,发现了游标位置以及其他此前未测试状态相关的漏洞。在接近无效状态时崩溃,会让故障变得可行动。

50. ADHD 管理始于拒绝服从第一个冲动

  • ThePrimeagen 说,成熟帮助他在 ADHD 状态下阅读。当他意识到自己没有吸收某一页内容时,会重新阅读,有时重复 18遍,而不是接受停下来的冲动。

  • 编程之所以成为他的优势,是因为它能让他保持注意力 10、12甚至 15小时。安排牙医预约和准备孩子的饭,仍然很困难。

  • 他的妻子消除了许多分心和混乱的来源,因此他拒绝说自己独自克服了 ADHD:一位充满爱意的妻子就是“作弊码”的一部分。

51. 注意力是一项训练出来的技能

  • 两位嘉宾都描述过注意力飘走时重新阅读或重播有声书。ThePrimeagen 可能会把同一段内容听 5遍,直到记住每个词。

  • 即使内容是积极的,社交媒体也会制造更多焦虑。现实中的鸟与 Instagram 上的鸟感觉不同,这可能导致更多滑动,以及越来越混乱的思绪。

  • ThePrimeagen 将其与冥想联系起来:有意识地专注于一件事,包括呼吸或存在本身,是一种需要学习的技能,而不是被动状态。

52. 专业能力减少了支线任务,直到代码变成直接表达

  • 早期编程充满支线任务:屏幕闪烁引出双缓冲,渲染引出新的设备问题,每个答案又打开另一条分支。

  • 多年练习后,ThePrimeagen 可以在飞机上连续编程数小时,写出约 1,000行代码,并预计其中约 98%是正确的。

  • 他用一条规则限制配置工作:除非插件故障迫使他紧急修改,否则每年只进行一次大规模 Neovim 改动。他花了约 100小时准备自己的配置,然后宣布它已经足够好。

53. 他的工作台减少的是视觉搜索,而不是击键次数

  • Kinesis Advantage 的凹面设计和拇指按键区,让符号、Backspace、Enter、Control 和 Shift 更容易触及。ThePrimeagen 说,当手臂疼痛让他担心自己可能无法继续编程时,这套键盘帮助他保住了职业生涯。

  • 他使用一台主要的 27英寸显示器,通常只能看到约 25行放大的代码。Lex 更喜欢 3台显示器,其中 2台竖屏,因为眼睛可以扫描更多信息。

  • ThePrimeagen 使用 Linux 和 i3,通过单键组合映射应用,用 tmux 管理终端,再用模糊搜索进入项目。他的目标是消除搜索疲劳。

54. Harpoon 把活动代码库转化为 4个强力文件

  • Harpoon 把 alternate-file 的理念从 2个文件扩展到 3或 4个固定文件。ThePrimeagen 使用 4个 Dvorak 主排键,直接跳转到正在编辑的文件。

  • Harpoon 2已经完成,但仍停留在自己的分支上,而主分支继续提供 Harpoon 1。这避免了大量开源支持问题涌入。

  • 他说,这个项目主要是为自己的工作流打造的,也可以扩展到终端、函数和服务器请求。

55. Vim 的优势,是一套可组合的编辑语言

  • ThePrimeagen 区分 Vim 动作和 Vim 应用。命令可以把操作与文本对象组合起来:删除一个段落周围的内容、删除到某个字符、修改引号内部、复制一行,或者打开一个带缩进的新行。

  • Normal mode 负责导航和编辑;Insert mode 负责输入文本;Escape 返回 Normal mode。学习曲线很陡,但掌握后,大量文本操作不再成为瓶颈。

  • Lex 指出,其他编辑器也能支持类似操作,但它们的默认设置可能不会鼓励用户去发现这些能力。

56. 工具掌握程度揭示了程序员与手艺的关系

  • Lex 使用过 Doom Emacs、Spacemacs 和普通 Emacs,持续约 1年,之后转向 VS Code 和 Cursor,因为他预计 AI 相关编辑器功能会快速发展。

  • ThePrimeagen 说,如果另一种工具更适合自己的“乐器”,他会离开 Neovim。他使用 Neovim 并不是因为热爱这个品牌,而是因为热爱这套工作流和动作体系。

  • 两人都认为,一个人如果要编程数万小时,就应该深入学习编辑器。这个元问题同样适用于打字、会议、钢琴、吉他和柔术。

57. Terminal Coffee Company 把分发变成产品笑话的一部分

  • ThePrimeagen、TJ DeVries、Dax、Adam、Liz 和设计师 David Hill 想做一种既不是空洞周边、也不是高风险软件推荐的产品。他们选择了咖啡,并把 SSH 做成下单接口。

  • 付款目前通过终端流程中的 Stripe 完成;移动端二维码结账原计划推出。访谈没有确认具体的 terminal.shop 域名或命令。

  • 产品结合了开发者幽默、精品供应链和刻意反常的界面。ThePrimeagen 说,他给家人买了 16袋咖啡,已经“对自己的供应上头”。

58. AI 最擅长的是下一步工作可预测的场景

  • ThePrimeagen 的规则是:可预测的任务适合 AI。TypeScript 和常见 API 在训练数据中覆盖充分;文档较少的 Zig 工作表现更弱。

  • Nat Friedman 看过一段 Twitch 视频后,给了他早期 Copilot 访问权限。一次正确预测 if 语句的经历让他觉得不可思议。

  • 持续使用带来了漏洞,也让他意识到自己是在“自动驾驶”,而不是协同驾驶。他感觉自己更像审稿人而不是作者,同时强调,这可能是个人能力问题,并不一定是普遍结论。

59. AI 让编程更快,也可能是因为它让编程不再孤独

  • Lex 使用 Copilot 和 Cursor 处理 API 交互、类似样板的工作、空函数,以及那些否则可能会拖延的任务。他说,收益体现在真正完成、测试并上线的工作量上。

  • 生成代码也会创造类似结对编程的互动。Lex 经常删掉生成结果的大部分,但仍然觉得这个过程更投入,也没那么孤独。

  • 有效使用需要知道系统能看到哪些文件和事实,把假设明确说出来,并把模型当作一个不了解隐含上下文的实习生。

60. Prompting 已经成为一种编程邻近技艺

  • ThePrimeagen 使用 AI 给 Twitch 聊天生成合成声音。他先定义一个叫 Randall 的人物,提供从聊天中提取的想法,生成 10个候选问题,再让模型挑选并改写其中一个。

  • 迭代太少,得到的只是原始聊天;迭代太多,又会让回复偏离最初想法。

  • 他还制作过一款 Zig tower-defense 游戏,并比较 Claude 3.5 与 OpenAI。白天时段 Claude 表现更好,夜间则是 OpenAI 更好,原因他无法解释。

61. 模型会完成任务,但还不会在乎成品

  • ThePrimeagen 想要的是一个“在乎的实习生”:它会重新审视结果,发现弱点,带着更好的设计回来,而不是只满足字面上的提示。

  • Lex 将“在乎”描述为不安与品味的结合——不断改进,然后知道什么时候结果已经对了。

  • 两人都认为,这是当前系统缺失的品质,而不是断言 AI 最终不可能发展出更好的迭代行为。

62. 窄 Agent 能工作,模糊 Agent 会制造昂贵的审查

  • ThePrimeagen 喜欢 Devin 背后的理念:给它一个代码库和任务,让它自行探索、做出修改、提交代码,并解释自己做了什么。

  • 他的实验在任务狭窄时效果最好,例如添加一个图标并记录一次点击。要求更宽泛时会产生奇怪输出;过度具体的规格同样可能失败。

  • 他经常重写结果,最后发现,直接学习相关工具可能更快。真正的衡量标准是总审查和纠错成本,而不是代码第一次出现的速度。

63. 调试仍是当前 AI 能力最清晰的边界

  • Lex 称调试是编程真正的艺术,尤其是面对罕见逻辑漏洞和边界情况。它需要上下文、直觉,以及在不确定性中坚持下去的能力。

  • AI 可以创建日志、处理追踪,并从语义上定位可疑代码,因此是有用的助手,但还不是首席调试员。

  • ThePrimeagen 讲到,curl 维护者会收到自信满满却不可能成立的安全报告。模型可能标记一个看起来危险的操作,却忽略前面让所谓路径根本无法到达的条件。

64. 生成的安全报告可能攻击维护者的注意力

  • Lex 把更广泛的模式称为“注意力拒绝服务”:虚假的漏洞报告和其他生成式需求,即使不直接破坏软件,也可能淹没维护者,让他们士气低落。

  • 他把这一风险与 Polyfill 事件联系起来:持续施压和一次看似有帮助的收购之后,恶意代码取代了软件包。

  • 因此,底层安全边界不仅是代码,也包括人的注意力。一份生成成本很低的报告,仍可能让维护者付出高昂成本去检查和驳回。

65. AI 的商业层可能操纵答案,却不把它称为广告

  • ThePrimeagen 预计,公司会通过付费植入或“高级训练数据”影响木工工具等推荐问题的答案。

  • 担忧在于,输出可能看起来像中立的助手回复,而不是一则可识别的广告。

  • 他还担心,纯粹追求生产力会让用户用持久知识换取即时速度,使新手无法处理独特或定制化的问题。

66. 训练数据所有权可能变成企业代码负债

  • ThePrimeagen 询问,有多少 GPL 许可代码进入了专有模型的训练数据。Lex 则提出,生成代码可能为封闭产品带来义务。

  • 两人推测,未来可能出现一项法律,要求公司移除可能源自 GPL 的生成代码;这可能造成大规模代码甩卖,因为来源很难重建。

  • 两人都没有解决法律问题。他们把当前环境描述为一片荒野,涉及训练许可、生成输出和不确定的授权边界。

67. AI 可能先改变编程,再消灭程序员

  • ThePrimeagen 拒绝给出“最终会怎样”的时间表。在遥远的未来,编程作为一种硬技能可能变得没有必要,但他无法预测那会是什么时候。

  • 近期障碍包括公司政策、隐私、可用算力,以及处理更大规模问题的困难。Lex 补充说,过去计算能力的提升,往往增加了工作量和软件数量,而不是消除需求。

  • ThePrimeagen 预计,未来系统可能会使用一种更结构化的伪语言,因为自然语言存在歧义。那仍然属于更高层级的编程。

68. 当一个人能够指挥更多 Agent 时,硬技能会更有价值

  • ThePrimeagen 建议开发者理解更多技术栈,管理更大的项目,并构建包含相互作用约束的系统。

  • 一个全面的工程师,可以让一个任务面向前端,另一个任务通过命令行工具推进,然后审查、修正并整合返回的工作。

  • 他对年轻人的警告是绝对的:不要接受“硬技能已经不重要”的建议。没有硬技能,一个人的上限就是模型的上限;拥有硬技能,持续改进的系统就会变成杠杆。

69. 调查中的热情与低信任并存

  • 他们回顾 Stack Overflow 的调查,注意到约 61%的人表示使用 AI,约 25%的人表示没有使用且没有计划使用。超过 90%的受访者看起来持积极、非常积极或无所谓的态度。

  • 约 81%的人把提升生产力列为首要收益。Lex 认为调查遗漏了乐趣:更低的摩擦和更快的学习,可以让编程变得更享受。

  • 只有 2.7%的人表示高度信任 AI 的准确性。两位嘉宾都认为怀疑是健康的。ThePrimeagen 还指出,“复杂”是相对的:对新手而言,快速排序可能很难;但对一个在大量样本上训练过的模型而言,它可能很容易。

70. 职业建议始于热爱重复练习,但不要崇拜工作本身

  • ThePrimeagen 建议,找到一种能让自己每天回来并不断积累重复次数的语言、项目或 AI 辅助工作流。

  • 他也修正了自己的经历:连续编程 24或 36小时、忽视妻子,确实帮助塑造了他的技能,但既不健康,也不明智。

  • 危险在于沉迷其中,为创业或财务成功牺牲健康、关系或道德。他仍然希望自己的孩子学习编程,即使许多当前技能最终消失,因为新的领域会出现。

71. 责任增加时留下,恐惧让工作变得机械时离开

  • 一份糟糕的 C# 实习让 ThePrimeagen 极其痛苦,他甚至用一个学期把专业改成机械工程;后来他意识到,自己不喜欢的是工作场所,而不是计算机科学。

  • 他反对自动执行“两年一跳”。一家好公司可以让责任、沟通和权威不断复利。

  • 当恐惧或舒适让工作变得机械化时,离开是合理的。仅仅因为害怕改变而留下,可能让一个人几乎无法获得新的能力。

72. 家庭可以集中野心,而不只是与野心竞争

  • Lex 观察到,一些生产力极高的人拥有孩子,并可能因此更有效地使用有限时间。ThePrimeagen 同意,成为父亲改变了他分配精力的方式。

  • Lex 强调,对孩子的爱在性质上不同于对宠物的爱;他和妻子都不会在拯救孩子时犹豫牺牲自己。

  • 重点不是每个人都必须选择同一种生活,而是没有经历过为人父母的人,无法准确估价所谓工作与生活权衡中的家庭一面。

73. 企业道德应依据激励机制和行为判断

  • ThePrimeagen 对 Microsoft 的批评集中在生态锁定:VS Code、GitHub、Copilot、远程工作区和 CI 可以形成很高的切换成本。但他仍然认为 VS Code 是一款好产品。

  • Lex 不愿把每一项有用的免费服务都简化为操纵。Gmail 可以制造生态依赖,同时也确实有价值。

  • 两人同意,企业本身并非天然善或恶;真正相关的道德选择来自运营它们的人。他们也承认 Microsoft 支持开源,而 Meta 的开源工作很难只用短期利润解释。

74. 信仰为宽恕提供了机制,而不只是命令

  • ThePrimeagen 把自己早年的生活描述为事实上的无神论,而不是强烈的宗教生活。他认为,与上帝相遇是一个转折点,让大学、婚姻、家庭和重视他人成为可能。

  • “我们之所以爱,是因为他先爱了我们”这一基督教理念,消除了通过性、地位或成就获取认可的需要。他感觉那些标准已经有人替他付过了。

  • 他写下高中时期怨恨过的人的名字,并选择宽恕他们。仇恨“太黏了”;宽恕是他找到的唯一解药。

  • 他的结论是:爱推动宽恕,而宽恕让人从仇恨的持续纠缠中释放出来。

75. 在地位、性、成瘾和成就之下,真正的需要是爱

  • ThePrimeagen 把《Love Is Blind》描述为“爱情角斗士”:在戏剧性表象之下,参赛者寻找的是被了解和被爱。

  • 他区分了情色之爱、友谊之爱、父母之爱,以及 agape 或神圣之爱。他认为,这些爱以不同方式都是必要的。

  • Lex 描述了一种深层的孤独,以及渴望归属于某个更大事物的愿望。节目最后,ThePrimeagen 感谢 Lex 的积极性,并说这种积极性激励他成为一个好人、创造一些东西。

Lex Fridman

What do you love most about programming? What brings you joy when you program?

#461

I can tell you the first time that I ever felt love in programming, or felt that joy and excitement. It was in college, in the second class on data structures. The teacher, Ray Babcock, was talking about linked lists.

You had to learn Java at Montana State University when I went. He was explaining this whole linked-list thing, and then he showed us some code. In the code, there was an abstract class called Node, or whatever it was—I can't remember exactly. It had a private member, and that private member was of type Node.

I'd never seen that before. It was a class called Node with a member that was itself. For the first time ever, I thought, “Oh my gosh, there's no end. There's no way to iterate. This isn't a set of 10 items. This is a set of infinite items.”

My mind exploded in that moment. What you can express is huge. I can see what memory looks like. I can see this kind of hopping through space.

Up until that point, everything was just, “All right, I have a list of 10 items. I have a list of 20 items.” It was very rigid and small, and the things I built were really small and trivial. All of a sudden, I felt like I could build anything.

It was so amazing. I remember sitting in class—I don't even remember how long those classes were—but I was completely and profoundly impacted by this notion. I just sat there and watched.

I had the exact same experience in, heavens forbid, my software engineering class when we talked about the decorator pattern, where you can keep constructing these objects in a recursive way. Not that I think that's actually a good idea to do, but watching that and realizing there are so many weird and unique ways you can solve problems—you can create anything your mind can think of.

I remember getting so excited about the possibility that anything is possible.

Lex Fridman

Yeah, let's wax philosophical about a linked list. It is pretty profound. For people who don't know, a node in a linked list doesn't know anything about the world it's in; it only knows about the thing it's linked to—its neighbor.

Maybe that's symbolic, a metaphor for all of us humans. There are billions of us on this planet, and we only know about our local little network.

ThePrimeagen

Yeah. It's kind of beautiful. In that little, simple data structure, you can construct arbitrarily large systems. They're like roots that go through memory.

Of course, that's where you get all the programming languages that allow you to dump junk into memory and have memory leaks, thereby creating infinite pain as you try to figure out where that unfreed memory is.

Lex Fridman

For me, it's probably so beautiful, the way you put that. Linked lists are indeed beautiful. Recursion is also beautiful for me, when I finally wrapped my brain around what it means to write a recursive function.

What was the thing that taught you? I think we all probably did factorial, where you just do a quick factorial. It doesn't hit home. What was the thing that made it hit home?

#461

I don't remember the first. I remember mine first.

Lex Fridman

How do you not remember your first? It was magic.

ThePrimeagen

I've had so many that—

Lex Fridman

You were a Lisp guy. You're probably pretty used to recursion.

ThePrimeagen

Yeah.

Lex Fridman

All I remember is being surrounded by a sea of parentheses. That's probably when I was in high school. I think it was either Java or C++.

How do I not remember that? It must have been C++. Then, in college, the generic, bullshit software-engineering classes were Java. But the renegades, the cool kids, were all using Lisp.

That's when you were doing the AI—the “AI,” as it was called at that time. That was Lisp. If you wanted to write a chess engine, you would use Lisp.

For me, the moment I really fell in love with programming was probably Lisp, writing AI programs and chess engines—all kinds of engines that played a game, and then I could play against that thing and it would beat me.

The joy of being destroyed by the thing you've created. Game of Life, too—cellular automata. That's less about the programming language and more about the system you create. That filled me with infinite joy.

Similar to the linked-list situation, you create a system where each individual cell only knows about its neighbors and operates according to very simple rules. But when you take that system as a whole and allow it to evolve over time, it can create infinite complexity.

Those were many profound moments when I was looking at the beautiful complexity that can be created with cellular automata. That filled me with infinite joy, for sure.

But all I remember from my first experience is parentheses. My first memories are drowned in a sea of parentheses.

#461

Mine was in Java. My first experience was a little more rigid—a corporate experience.

Lex Fridman

Cold and meaningless?

ThePrimeagen

I was in a lab. Everyone was using CentOS at that point—or CentOS, however you say it. I always call it CentOS, the Freshmaker.

Lex Fridman

That's nice. Thank you.

ThePrimeagen

I was in this cold, rigid environment with my Microsoft keyboard, programming away in Java. I still have this memory of despair because I loved programming. This was after the linked list, and I couldn't figure out recursion.

I went to the university store and bought a book. It was Deitel and Deitel's Java: How to Program, and it had a section on recursion. I opened it up and started reading it, but it just didn't hit home.

I started spiraling into this feeling of, “Maybe I'm not a programmer. Maybe I'm not worthy enough to enter this circle of people who can figure out what recursion means.”

I still remember the exact phrase from Deitel and Deitel: “Every young, budding developer solves this recursion problem.” It was the Tower of Hanoi.

I don't know if I can solve the Tower of Hanoi to this day. It's a very hard recursive problem. I just sat there and thought, “Oh my gosh, I'm not going to make it.”

I sat in the lab for 8 or 10 hours doing these exercises. I was so worried. It was the week of recursion. We had to do a lab assignment, and I wasn't going to be able to do it.

I remember being genuinely worried about that. My big problem was, “Okay, do factorial. Why not just use a for loop? What about the Fibonacci sequence? Why not use a for loop?”

I didn't understand the purpose of recursion. I didn't understand it yet. It seemed so powerful, but why? It looked like a really complicated for loop.

Then the lab came that day. The assignment was: “I'm going to give you a 2D array. You have to read it from a file. This is what a starting position looks like. This is what an ending position looks like. This is what a wall looks like. I want you to find a path through the maze.”

I sat there and thought, “Okay, I guess I can just go up and create a visited grid so I know not to visit those places anymore.” All of a sudden, it started clicking.

I thought, “Wait a second. I don't know the maze, but if I just go up, right, down, and left, and hop back every time I've been to that square, then don't visit it again. It won't just go forever.”

I realized in that moment, “I actually understand recursion. I've understood recursion this whole time. I just never had a problem where it made sense to use it.”

That was my big downfall. I was measuring my understanding against the problems I had available, which were just list traversals—not a good use of recursion.

I remember that freeing moment. Recursion was a great moment in my life.

Lex Fridman

It does require, to be fair, a leap of faith. The conformist, dogmatic Java instructors will tell you that it's important to understand recursion, but it takes a leap of faith that this is a different way of looking at the world—and a powerful way of looking at the world.

I actually remember my first now. I think it was depth-first search for one of the games, maybe something like that. Understanding that you can search trajectories through the space of states and do that recursively was mind-blowing.

ThePrimeagen

Just imagining that you can see the possibilities.

Lex Fridman

Yeah, just like numbers flying. It was like A Beautiful Mind. That's when I also discovered conspiracy theories. I saw the truth.

So what were we talking about? What was the most painful aspect of programming for you? What memories do you have of deep, profound suffering in terms of programming in the early days?

ThePrimeagen

I would say the biggest one that I can really hold on to had to be one of two experiences.

The first experience was when I was at a place called Schedulicity. Am I not allowed to say the place? I’m not sure if they’re even operating still at this point, but there’s something funny about the name. I’m sorry—Schedulicity.

The name was so bad that, when you looked at their paid Google ad terms—the terms they would use to make sure they were at the top of the list—the spellings were just insane because no one knew how to spell the word Schedulicity. The Google optimization for that was hilarious.

But going back to the thing that kills me the most about programming, what I actually consider the worst aspect of programming is when you know everything. When I was at this job, every single day I’d come in and there were no surprises. There were no questions.

I didn’t understand the codebase—that’s fair. I didn’t understand everything about the codebase, but I knew I was going to go in and generate some sort of object from the database. I was going to take that object from the database, map it over, and display it on the web page. There was no creativity. There was nothing to it. It was almost factory-line kind of work.

That was a very difficult moment for me, because I didn’t enjoy programming when I knew everything about it. I already knew exactly what I was going to do that day. I knew all the hurdles I was going to have to get over. There were no unknown unknowns, if you will. It was just known at all times.

For me, that is the worst part about programming: when you already know the solution and it’s just a matter of how fast you can type and get it out from your head to your hands.

Lex Fridman

So, the absence of uncertainty, the absence of challenge, was the pain. That’s pretty profound.

Prime, I’m more than just good looks. I want you to know that it’s a low bar. What do you identify as? I’m enjoying asking the general question.

#461

Thirty-eight, male, husband of a beautiful wife.

Lex Fridman

Okay. You stream about all kinds of programming, but what kind of programmer are you? Are you a full-stack developer, doing web programming? Can you lay out all the different kinds of programming and then place yourself in that in terms of your identity—your sexual identity as well?

#461

Yeah, I can get it. We can put it all in there. Obviously, those two are very tightly coupled. I have seen you on the border of being sexually aroused by certain languages. I think you got real excited about OCaml.

Lex Fridman

Let’s go. Thank you, Dylan Moyward. Okay. Wow. Yeah, I did not expect that. That escalated quickly. Anyway, what do you identify as?

#461

First, let’s do the previous—or the in-between—question, which is the different kinds of archetypes. I think that’s a really interesting question, because if you go on Twitter or you’re new to programming, your thought is probably that there’s just web programming, and maybe there’s some other stuff, like game programming. But you do game programming in JavaScript and on the web, you know?

There’s this very myopic view of the programming world. I bet if you ask a lot of people these days what the most popular form of programming is, they’d probably say web. If you said, “What contains the most repos? What percentage of repos on GitHub are web-based?” they’d probably say 90% or some huge number.

But the reality is that there’s an entire embedded and robotics world. You’re familiar with the machine-learning side of things. There’s networking, performance, operating systems, compilers—there are huge amounts of variation in all these different types of programming verticals that you can be in.

We often talk about programming from the perspective of web or something that’s pretty narrow. I think that’s just a social construct of Twitter more than anything else. I don’t believe it’s representative of the entire programming world out there.

A lot of programming is really, really fun. There’s some really great stuff. Building your own language is just a very fun experience. Every programmer should do that once, just to have a completely different perspective on how things work in life.

As far as what I do, I’ve always looked at myself as a tools engineer. At my jobs, typically I would start off on the UI, and then they’d be like, “Okay, we need a library for this thing.” So, I’d be the one writing the library.

In 2012 and 2013, I was writing a UI library for the web that could behave just like an iPad. You could pinch and zoom on it, but it was still a web page, because we didn’t have any of that stuff back then. It was a canvas. I had to do all the matrix operations and everything to make it feel like you were on an iPad, even though it wasn’t on an iPad. This was for the iPad 2, by the way, so this was a long time ago.

Every single time I got into a job, it was, “Okay, we need a library. Can you work on a build system?” Back then, there was no Grunt, there was no Gulp, there was none of that. I had to hand-roll my own JavaScript build system.

I always fell into these positions of building tools for developers to be successful, and I’ve always really enjoyed that area. When I went on to Netflix—I spent 10 years there—I’d say the majority of my 10 years were spent building things for developers to use so they could be successful at their jobs.

I’ve always really enjoyed that aspect, because your stakeholders—the people who use your program—understand programming, and they’re going to say, “Hey, I need this.” Typically, the thing that they need is actually what they want.

With people, what they actually need versus what they actually want are often separated. That’s like the old Henry Ford quote: “I just want a faster horse.” He says, “No, what you actually want is a car.” You have to play this game of trying to really figure it out.

Whereas with developers, it’s like, “I know you know what you’re doing. I know what you want. Let’s figure it out together.”

Lex Fridman

That actually gives you a really nice big-picture view of programming in general. I love the idea of starting at the interface—you need to pinch and all that kind of stuff—and then figuring out everything required to make that happen, including the side-quest tooling: how to make it more productive and efficient, all that kind of stuff. The entirety of the thing is really cool.

So, that would be full-stack by the general definition of full-stack, meaning starting at the interface, versus a systems engineer starting at the bottom and trying to optimize a specific thing without seeing the big picture of what the resulting interface would look like.

A lot of people in web programming never go beyond the front end of how the thing looks. They always assume there will be somebody—a grunt in the shadows, in the darkness of the basement—who will implement the back end. Some Gilfoyle out there will be doing the back end.

#461

I like to call myself a generalist. To give some idea, at one point at Netflix I built the WebSocket connection. For TVs, the code for how WebSocket works is something I just wrote. I built the framing thing.

Before that, I was doing stuff with memory, and before that I built the UI for a tool. It’s just like, I can do the thing. You tell me the thing to do, and I’ll go do the thing.

I don’t try to get super good at one specific activity. I don’t want to be a Kubernetes engineer who’s the world’s greatest deployer. But if I had to go learn Kubernetes, I’d go learn it, learn how to deploy some things, and then hopefully move on to the next thing, if that makes sense.

Lex Fridman

I posted about the fact that I’m talking to you on Reddit, and there are a lot of wonderful questions. Somebody mentioned that I should ask you about DevOps. Can you explain what DevOps is? Is it a kind of special ops for programmers? Is it SEAL Team 6 of developers? What’s DevOps? Can you define it? Are you a DevOps engineer?

#461

People keep telling me DevOps isn’t real. They say you actually want platform engineers, cloud engineers, or infra engineers. I often think the easiest way, if we’re doing some basic nomenclature, is that DevOps are the people who make sure that when you launch a service and all that, it doesn’t just disappear, right?

It’s all the backbone of being able to operate something at scale. If you’re just writing a mom-and-pop website—people doing PHP, WordPress, and all that—they’re going to build something and hand it off to, I don’t know, Linode or DigitalOcean or some company. They don’t really need a complicated build, deployment, and all this. It’s just someone with a simple website so they can sell their goods.

They don’t really need that. That’s kind of how I think of DevOps: when things need to scale, that’s the kind of person you hire.

Lex Fridman

Yeah, those people are actually amazing. Of the time I spent at Google, it was like, “Oh, yeah, there are all these fancy machine-learning people,” but the folks who are running the compute and the infrastructure—who make sure the shit doesn’t go down—they’re like wizards. They’re an incredible vertical of the job.

Obviously, I’m using a very broad term to describe what I’m sure is a bunch of different roles, because making sure stuff doesn’t go down—you could also say that’s an SRE, a site reliability engineer, whatever.

#461

You know, the ones that wear the bomber jackets at Google.

Lex Fridman

When we say DevOps, I think people get very particular about terms, specifically in this category. They're like, “Well, actually, you're mentioning infrastructure engineer versus site reliability engineer.” It's just like, okay, yes, I hear you. But generally, when someone thinks DevOps, they think of somebody who manages the servers, their life cycles, and the reliability. There's DevOps. Is it real? I'm not sure. Did Vercel kill DevOps?

#461

You're almost a journalist. That's a headline.

Lex Fridman

Let's go back to the beginning. All right, Baby Prime. So, you mentioned Netflix. You've—

#461

Oh, I worked at Netflix, by the way.

Lex Fridman

For people who don't know who ThePrimeagen is, he mentions the fact that he has been very successful and has worked at Netflix basically every other sentence.

#461

Correct.

Lex Fridman

Almost as much as I mention Neovim.

#461

Oh, great. Tell me more about Neovim.

Lex Fridman

No, please don't. So, Baby Prime, at the very beginning, you've had one hell of a life, and I think it's inspiring to a lot of people. You've gone through a lot of painful low points, including meth addiction and loss, and, like you mentioned, you've come out of that to become a successful programmer and a person who inspires a huge number of people to get into programming and just to find success in life. So, maybe I would love it if you laid out your whole life journey from the beginning.

#461

If we're going to start with this whole journey, I think it's probably best to start when I was about 4 or 5 years old. That was the first time I was ever exposed to pornography, and it kind of earwormed me for a large portion of my life. I don't think there was a day that didn't go by, from when I was a very young lad all the way up until I was 20-something years old, where I didn't think about porn on a daily basis. It was a very mind-consuming, time-consuming, thought-consuming thing that plagued me, starting at a very young age.

When I was 7 years old, my dad died. That was a really tough period of life. I still think about this time that I went over to China, and there were some rules that we were given. One of the rules was, “Hey, don't talk about God, and if you do, use the word ‘dad’ instead.” I was just like, “Okay, dad.” It was the first time I had said that word in 17 years, or some long time. It was so weird to say that phrase. I was just like, “That was the strangest thing I've ever said in my entire lifetime.” It felt so weird.

As I got older, I was obviously very good at computers, good at accessing porn, of course, and played video games on the internet. Fun side-quest story: I think the guy's name is Lord Talk [?] on Twitch. I can't quite remember his name, but he built this game called Graal, G-R-A-A-L, Graal Online. When I was a young lad, it was just like Zelda, except it also had a level editor and a scripting language. That's how I discovered how to program: I looked at these symbols, figured out what they meant, and was able to make things happen in the game. That was my introduction to programming, so thank you to that guy, whatever your Twitch name was.

As I got older, I was super bad socially. I was not a very great social person. High school was brutal. I got made fun of a lot. I wouldn't say I had a great time during high school. I definitely felt very out of place, or offset, or maybe misplaced, if you will. I'm not sure what the right word is. At that point, I always wanted to be accepted, to fit in, and all that.

I did forget to say one side story. After my dad died, my older brother started getting into drugs, and along with that, he exposed me to pot. So, at 8 years old, I was smoking marijuana for a while, until maybe 11 or 12, and took a break. Then I did a lot of that again as I got a little bit older. I got a lot of these exposures fairly young: 15, 16 through 18, a lot of drinking and all that.

When I was graduating high school, I had such sadness. I was very sad about how everything went. I tried to commit suicide. Obviously, it was a very poor attempt, and I'm still here today. I'm very happy about that. I'm glad that I didn't follow through with anything. I had to go to the hospital and all that.

When I was done, I still remember coming out of the hospital. At that moment, it was kind of like something broke in me. Have you ever read the book Wheel of Time? It's 14,000 pages or something like that, but right around page 12,000, Rand, the main character, has to intentionally kill a girl. That's the moment he breaks, and he gets into hard Rand, Cuendillar Rand, if you will. Those who know Wheel of Time will appreciate all that. For those who don't, it's very confusing, and I understand. Not the Amazon TV show. Not that—not that Wheel of Time.

At that point, something broke in me, and I just didn't care anymore. All the social awkwardness, if you will, died away, but so did everything else. I started using a bunch of drugs—LSD, mushrooms, meth—and did a bunch of that stuff. Then I went off to college and continued to do a bunch of stuff. I took too much acid, to the point where for quite a few years I had little squiggles on the side of my eyes whenever I'd walk by high-contrast objects. That whole period of life was marked by poor decisions.

Sometime when I was about 19 years old, somewhere in that range, I had one evening where I felt the very dramatic and real presence of God. I had this choice, like Frodo on a razor's edge, where if I go either way, I'm going to fall off, and I need to change my life. You just get to make the choice now: do you want to do that or not? I remember going, “Okay, I do want to change my life. I don't like this experience. I don't like what I'm living. I am still very sad. I still feel very desperate. I still feel all those things. I'm just pretending to be this other person.”

Then I went to sleep that night. Nothing changed in my life. Everything was still the way it was. I woke up the next day the same person, and I was just like, “That's such a strange, weird kind of experience.” I went about my day. I think that evening I looked at porn, and all of a sudden I just had a deep, profound shame. I was like, “I've never felt shame in my life. I have no idea what's happening now.”

When I smoked pot, I just felt deep shame. When I hurt somebody or did something wrong, it was like I got a conscience from that evening. That's what my gift was, if you will. At that point, I didn't even have a choice. I had to change my life because, for whatever reason, I had been changed in that moment.

From there, I started actually trying in school. I always joke around that I got a 2.14 in high school. I had a teacher handwrite me a note saying I was the worst student she's ever had, all that kind of stuff. I was not a really great student. Then, in that moment, it was like, okay, now life's changed, and I started trying to learn. I tried to become a good student, and it turns out it's really hard. I was really bad. I still got C's.

I went and took precalculus and failed precalculus. I was like, “Oh my gosh, I used to be the smart math guy, and now I'm kind of the idiot failing.” I was questioning myself and all that. I spent hours upon hours studying in a math learning center, and then, at some point, about a year and a half into this journey, something clicked. I went from being the worst person to immediately becoming the best.

Everything after that is just—I don't know what happened. All of a sudden, I was the best person at math. I started going into my computer science classes, and I just really got everything. Years after trying, everything all of a sudden became easier. I'm not sure if it happened over the course of weeks or when it started getting easier, but it was first predicated by a huge amount of difficulty.

That's where I started really desiring and loving the process of learning: when things started getting easier after all those years. I was motivated by this desire to do something, not thinking it was going to get any easier. Then all of a sudden it started getting easier, and it was great. That's really where I started having the biggest parts of my life change.

At that point, I started really wanting to never look at porn again because every single time there was such shame, and I really wanted to stop. That was by far the hardest addiction to quit. Smoking cigarettes was also a really hard addiction to quit—shockingly hard—but porn by far was the worst of them all.

I think by about 22, I was finally done with all kinds of addictions, if you will. For a year, I just worked and did all that. I think it was right around 21 and 3/4, somewhere in that range. I'm not really sure when I stopped all the addictions, or at least the outward addictions. At some point, 6 months later, a year later, I met my beautiful wife.

Things just started falling more and more into place. I loved work more and more. I loved programming, and I started programming 12 hours a day.

I watched The Social Network. After that, I was just like, “I’m doing a startup.” That night, I started my first startup. It was in PHP, by the way—PHP 5.2 or something like that. It was great. Great times.

I was so motivated to do that, and sometimes I would program for 24 or 36 hours straight. I just wanted to do that nonstop; that’s all I wanted to do at all points. I think my wife got a little sick of me. She would be like, “Can you drop me off at school?” and I’d be like, “No, I’m programming.” I was not a very nice person. I didn’t think through things that well, and I was just so into it. I did it nonstop, and that’s kind of how I became me. That’s the story, if that makes sense.

Lex Fridman

Let’s try to reverse-engineer some of the pain and some of the triumph. You made it sound easy at times. Let’s try to understand it better. Maybe when you were 7 years old, what do you think about the pain you experienced losing your dad? What kind of impact did it have on you? What kind of memories do you have of that time?

#461

The best way I can put it is that I just never knew what a dad was. I was young enough that I could maybe repress things, or just have the capability of remembering things long-term, because I know most people don’t remember a lot from when they’re young. I’m not exactly sure.

I probably was at one of the best possible ages—if I’m going to lose a dad, to lose a dad. If you’re going to lose one when you’re 11 or 12, it’s a terrible age. That’s what my brother was, and he fell into drug addiction and never got back out. I just have more of a fuzziness and a longing. I wish I had a dad.

Lex Fridman

What impact did that have on your evolution, on your life, sort of having that longing?

#461

I think that’s why I was so bad socially, in the sense that I was looking for approval, right? I needed approval. I think a lot of people desire that approval or that loving figure, and I just didn’t have that. I think I looked for it in everything else.

If I were to psychoanalyze my actions during that time, it’s not like I was actively thinking that, but I always wanted something to fill in whatever it was I felt.

Lex Fridman

I think a lot of people listening to this will resonate with your experience in high school—being the outsider, being picked on, struggling through a lot of different complexities at home. What advice would you give to them?

#461

Man, the worst part about high school is that you’re surrounded by a bunch of people your age, and it feels eternal. You feel like the people around you are the people who will be there for the rest of your life. At least, that’s what I thought, and I didn’t really realize until many years later that they are going to be some of the least consequential people in your life, which is very shocking to think about, especially if you’re in it right now.

Right now, they are everything that you’re experiencing. One day, it all stops, and then real life begins. That’s such a shocking thing, and if I could just tell myself that, maybe I would have been a much different person.

Lex Fridman

That’s so beautifully put. I mean, it’s a trial run—like at the beginning of video games, there’s a little tutorial. That’s what that is.

#461

Yeah. And actually, that should be a chance to try shit out, to take risks, because real life will begin where there are more consequences after that. Here, if you like a girl, ask her out. Try shit. If you get picked on, hit that guy back. Try shit out.

Lex Fridman

I’m not going to condone punching another person. I will beat the shit out of them. Take some jiu-jitsu and learn how to take them down. And then that girl that rejected you will be like, “Hmm, maybe I’ll give that guy a second chance.” Be a bad motherfucker. It’s a chance to try stuff out.

#461

This is a very motivational speech for kicking ass.

Lex Fridman

It is true, though. There is something very true about that, especially—I mean, I have no idea what the girls’ experience of high school would be like, but as a guy, there are definitely a lot of physical requirements in high school. There’s a lot of physical measurement, at least where I grew up. I think that might not be true in all high schools, but if they’re filled with boys, it’s probably true.

It probably does help to do those things, to go to BJJ, to do any of these activities, because even if you don’t ever kick someone’s ass, just having some level of confidence in yourself is probably a very valuable thing. But just remembering that this is such a short, tiny moment in your life is just a huge help.

#461

I mean, the way you phrased it is exactly right. That’s what it feels like: these are the people who will be with you for the rest of your life, and this is the whole world.

Lex Fridman

And so that means there’ll be a tremendous amount of impact. If somebody picks on you, or if you fall somewhere low in the status hierarchy of this high school, that means you’ll be low in the status hierarchy of the world, and you’re fucked for the rest of your life. That carries a tremendous amount of weight.

It’s just why, psychologically, it’s extremely difficult to be a high schooler. I think it’s underrated often by parents and by society how difficult it is to be a high schooler, how difficult it is psychologically, and how it actually makes sense that some people would suffer from depression and be on the verge of suicide. It’s very, very difficult.

Speaker 2

Yeah. I think it’s even harder today than it’s ever been, in the sense that people always say, “Back in my day,” and so on. When I was a kid, there was a classification of people, meaning, “This is a cool guy; this is not a cool guy.” Today, there’s a quantification of people: you have 32,514 people following you, you have 12 likes. People can visually inspect your exact social value on whatever platform you’re on, and that has to be so much harder.

I can imagine that there’s a lot of weight put on that. It probably feels way worse and way more damning to be uncool because you have an exact number of how uncool you are.

Lex Fridman

Yeah. The challenge there, and the task—the quest—is to remember that just because your social circle on social media and in high school thinks you’re uncool, it actually might mean you are cool. You need to find that cool and grow it and let it flourish so that when real life begins, you can fucking come out of the gate firing on all cylinders.

Speaker 2

That’s a great way to put it. I think, if anything, high school is really bad at picking out the cool people. Whatever system or hierarchy forms, it’s such a basic-bitch hierarchy. You’re good at very generic shit—that’s how you rise. Your parents bought you an expensive car.

Lex Fridman

Expensive car, right? Materialistic shit.

Speaker 2

Yeah, exactly. It’s a greedy search. They didn’t have a proper search, so they’re just hitting that local optimum. But the heuristic—I mean, even the objective function for that greedy search—is just a really shitty one.

Those people that win the game of high school are very often not going to be the people that win the much more exciting, beautiful game of life. So, do epic shit and try stuff out. The weirdos are the ones that are going to succeed.

The weirdos in high school probably get bullied, and they get tormented more psychologically. They get to explore their own minds and think through what it means to be a human being more. If you’re winning in high school, you’re not being challenged. You’re not self-reflecting. You’re not trying shit out. There is some degree to being tormented, as long as it doesn’t break you.

Lex Fridman

The porn addiction—that’s another powerful one that I think will probably resonate with a lot of people. It’s interesting that you say that’s one of the hardest addictions to overcome.

Speaker 2

Let me say it this way: some addictions have a much bigger societal stigma, and porn is just not one of them, which makes it super hard. None of your friends are going to cheer you on if you go on Twitter and say, “I quit porn.” They’re going to be like, “Well, that’s good for you, but not everybody has to.”

No one makes that argument with meth, right? No one’s going to be like, “Well, not everyone has to quit meth, okay? It’s actually a fine industry, and the people who are producing it are good also,” right? No one’s going to make that kind of argument. Whereas with porn, you’re going to have a whole thing, and friends are going to think you’re dumb for doing it or whatever.

It’s a much more difficult one in just that it feels accepted. I think it’s also an addiction you can practice privately and hide from the world. There are certain addictions that are harder to hide from the world for prolonged periods of time. Porn addiction is probably one you can just have for many years, and then it can deepen. That’s probably a serious issue.

Lex Fridman

Boy, am I glad I grew up before the internet, because porn is so accessible, so easy to go deep into that addiction. What can you speak about in terms of what impact it had on your life—maybe some of the low points, but also how to overcome it?

Speaker 2

I’d say, as far as impact goes, you will have such a long and broken view of women. From the most basic perspective, porn is that you use another person for your own desire or your own want.

It's not something that's deeply needed. There's no need for porn. It's purely a want-based activity, or lust, however you want to phrase it. It is purely an objectifying activity: someone else is on display for your own enjoyment.

I do think that I looked at the women I dated during high school, and the women I dated after high school and in college, as a means to an end. I think porn greatly shifted that perspective in my head, so I did not give another person the value they deserved. It really devalues humanity in general, in my perspective, and it makes people into commodities. I don't think people are commodities. I think everyone has value.

For me, that's the greatest effect of porn: it's consumerism gone wild, or materialism, maybe you could argue, gone wild. It's extremely hard to quit, just like you said, because I can look at porn and then go out to lunch.

Lex Fridman

Mhm.

Speaker 2

No one's going to know. No one's going to have any idea. It's very private. It can be a very short session. It doesn't have to take a long time. You can't take acid and then go out to lunch, right? Your whole day is going to be a very different day.

It's very quick, easy, and accessible. Then, obviously, there's all the science and statistics. Men make worse decisions for some period of time after looking at or being exposed to sexualized images. There's the whole dopamine effect, where you constantly need more and more dopamine. That's why people typically don't just watch 5 minutes of porn and call it a day. There's the hundred-tab joke that's always made on the internet. It's because you're in this constant dopamine cycle.

All that stuff is great to say, and I'm sure statistics and science are really great arguments for some people. But for me, it just comes down to: is it really a good thing to do? Is it really something we want—to value people in such a profane or disregarding way? I just really think it's bad for the soul.

Lex Fridman

Yeah. You have to look at the long-term, big-picture psychological impact it has on your relationships with human beings in general. That's my more general point, beyond just porn.

My problem with the quote-unquote manosphere is that I think sleeping with a bunch of women is great, wonderful, but the problem is making that the primary objective of your life. It's similar with porn: you devalue one of the most awesome things, which is intimacy. That's true for deep friendship. That's true for relationships. I think porn does that in its purest, darkest form, where the thing that matters is the sex, not the deep connection with another human being.

Again, going back to high school and the manosphere, if the objective function is to get laid, which helps with status and confidence and all that, that's wonderful. I think, again, it can be an addiction. But the thing that's even more awesome for a lot of people is a deep friendship or deep intimacy with a romantic partner. That's also fucking awesome, and both of those are great.

There is no universe in which—or, really, no possible argument that—a guy who has meaningless sex has a better or more meaningful life than, say, my wife and me, who've been together for 15 years. We have a relationship where I can depend on her in all circumstances. Whereas if you live that other life, sure, it could feel great, but there's no meaning to it. There's no value—no actual, real value—to it.

Speaker 2

That's absolutely correct. I do think that getting laid can have a tremendous positive impact on the confidence of a young man. I think there's a certain number of sexual partners from which you can collect a lot of data, and it can free you from being so nervous about the opposite sex and from being so nervous about human interaction.

That will allow you to see the world more clearly and to actually find that one partner with whom you could be deeply intimate. Sometimes the nervousness around the socially constructed value of getting laid can cloud your judgment. If you just release that by getting laid a bunch of times, then you could see the world clearly: getting laid is not nearly as important as finding the right human, including—not just a romantic partner—but deep, lasting friendships.

Lex Fridman

Well, I think you're right that our society puts a lot of emphasis on getting laid. I'm sure that's true among any group of males at any point in history. I'm sure that's a very common joke that's never actually stopped at any point. So I'm sure that exists, but there's probably some truth to the sense that after you've—

Who was it? Jim Carrey: "I hope that everyone can get rich so they realize that money solves none of your problems." The realization that this thing society told you was hyper-important is actually not the important part.

It is a great sign that your relationship is healthy. If my wife and I were to have no sex at all for months on end, something's gone wrong, which means we're no longer on the same page—something. But it's not a good identifier, either. Just because you're having a lot of sex doesn't mean you're having a good relationship.

It's kind of a unique way of looking at the problems. Our society puts so much emphasis on it. Maybe that's why porn was so hard to quit, but my guess is it's just the dopamine effect.

#461

For me, the most important part, and the thing that actually has a real reward, is having just my wife. I do not look at—I try desperately not to look at—any other woman. Hopefully, I'm not going to get caught like Mark Zuckerberg at the White House like that.

I don't look at porn. My wife has complete confidence in me; there is not going to be a situation in which she has to question me in any sense. That builds a much deeper relationship, I would argue—a very deep relationship—because the trust is that much bigger. I think the depth of the relationship is probably proportional to the trust you have in each other.

Lex Fridman

Mhm. It's very hard to have a deep relationship with no trust.

#461

Yeah. Probably a prerequisite, maybe a component of trust, is vulnerability, where you take the leap of being vulnerable with another human being. That vulnerability, when reciprocated, builds this really strong trust, and it's a beautiful thing.

Lex Fridman

Yeah. Personally, given my position, that's even more challenging. Being vulnerable with the world means there are a bunch of people out there who want to hurt you for it. But I think it's worthwhile anyway to be vulnerable. It's always worth the risk in some sense. Obviously, everyone has a different kind of life they have to filter their actions through, right? The person who has no social following or anything, their risk-reward profile could just be local impact, which could be just as damning or harmful to them.

#461

The risk is always worth it, in my personal opinion, because finding my wife has been the most impactful, or life-changing, thing in my life. Or second-most. I'd argue that one night with God would probably be the most impactful thing that led to everything else, but then my wife would be the next most impactful.

I mean, I'm cleaning up after myself and stuff now. Changed man.

Lex Fridman

Can we try to reverse-engineer that moment of you finding God? What was it, at 19? Because it feels like that was a big leap for you—to escape the pain, to escape the addiction, or the beginning of that journey. What do you think happened there?

#461

I think it just felt like there was no line that I wasn't willing to cross. Everything was fine, and then all of a sudden, in that moment, I had some sort of deep fear and understanding: I am going down a path. Is this really the path you want to go down?

I don't know what the result of that path would be or anything like that. I don't tend to speculate on things I don't understand. I just know that in that moment I had the option, and I chose not to. I didn't want it anymore.

Lex Fridman

Right.

#461

It's kind of mixed into this whole thing where I had no value. I wrapped up all my meaning or value in having sex or getting laid. I had all that stuff—all the things we just talked about—and that was where all my worth was. That's just such a terrible place to have your worth. It kind of all came to a point.

I can't tell you the day of the week. I can't tell you anything other than that it was nighttime and I was in South Hedges at Montana State University. Go Bobcats.

That's about it. Yeah, that's the sign that we do at football games. Don't worry about it. But that's all I can really tell you, because that night was no more or less special than some other night. The specialness was that I got at least a chance to make a choice.

Lex Fridman

What advice can you give to others? There's probably an endless number of people struggling with porn addiction, not just young people.

What advice could you give to them? How do they overcome it?

#461

For me to overcome it, I had to realize that I was taking something away from my future wife. Some people are like, “Oh, well, once you get a girlfriend, then you can stop.” And it’s just like, “No, because you never stopped the problem. You don’t stop a problem by replacing it.”

I didn’t have a girlfriend. I didn’t have any of that. I just realized that I was truly taking away from something for my future wife. I didn’t even know my current wife at that time. She wasn’t in the picture. I’m not even sure if she was at Montana State University at that point.

Once I made that realization, I think it went from my head to my heart, which they say is the greatest distance in the universe. I finally got it, and that’s really where things changed.

As far as what’s going to help you change, I don’t know if there are silver bullets. If someone could offer you a drug—I forget who says this phrase—but there’s this really interesting phrase that goes something like this: He was a very depressed man who was struggling with suicide, and he writes about this in his memoir. He goes to doctors, and the doctors effectively say, “Well, here are antidepressants. They’re going to help you.”

He says the problem was that scientists told him he could just touch his brain and make himself happy, and that was it. They could reach in, configure some things, and he would be happy. He says it was a lot like going out into a field and being able to take a drug to see the rain. You could look out and see the rain falling; it would be silvery and beautiful, but all the crops would still die because there wasn’t actually any rain.

I had to discover how to be happy myself. For me, the reason why I looked at porn is because I was unhappy. I was trying to find meaning. I was trying to find value in something that was supposed to finally give me this ultimate satisfaction, and it just does not.

No matter how hard you try and no matter how much you think it will, there is no escape. There is no pornography that will ever give you the satisfaction you’re looking for. That’s the reason why it’s addicting. That’s kind of my explanation for why you shouldn’t do it.

But how to get out of it? I only got out of it by realizing.

Lex Fridman

I think that’s really brilliantly described. You knew that this thing you were doing was preventing you from finding your future wife. “Future wife” could mean, more broadly, this path to a flourishing, beautiful life.

I think what’s really nice to do is to imagine, just like we said with high school, that there are a bunch of trajectories in life where you’ll be truly happy. You need to construct your life in a way where you have the chance to travel down those paths. There are a bunch of addictions and choices that prevent us from traveling down those paths.

Just believe that you’re going to have an awesome life, and remove from your life the things that are preventing you from walking down that path, which is essentially what you did. It’s a leap of faith that if you let go of porn, a better life is waiting for you on the other end.

#461

I definitely can’t say how long it will take to have a better life, but for me, there’s no way in the universe I could have had the relationship that I have without first taking those steps. I couldn’t value my wife in the way that was proper for who she was. I would have valued her through the index, or the lens, that I was looking through at the time.

Lex Fridman

I’ve got to ask. I’ve never done math. I’ve never done meth. That was a great segue, by the way. I don’t know what the fuck I’m doing, honestly, with this interviewing thing.

Yeah, meth and LSD. I did ayahuasca, and I did shrooms a bunch of times.

On this topic, I should say that there are a lot of people on Twitter and in the tech community in general speaking negatively about ayahuasca, and some speaking positively. I think it’s such a roll of the dice. I had incredible experiences, but I don’t think I want to recommend it to anyone. It’s a risk. It’s a serious risk.

It really is a roll of the dice. You could meet your demons and they could destroy you, or you could meet your demons and let go of them. Or you could have experiences like I did, which is that apparently I don’t have demons. I’m pretty sure they’re somewhere in the basement, but I’ve never met them on drugs.

I’m always really happy. I’m a happy drunk. I’m a super-happy ayahuasca user, just full of love. I don’t understand where the demons are. But that’s my biochemistry, whatever that is.

For some others, one trip could be amazing, and the next one could completely destroy them and wreck their life. I don’t know what the recommendation from that is. Maybe avoid it, but then all of us die, and life—you know, I tend to lean into adventure.

Drugs are different. If you fuck with the biochemistry of your brain, you can really destroy yourself in a way that’s going to torment you. I would generally recommend that people avoid drugs altogether, probably, unless you’re a crazy motherfucker.

Hunter S. Thompson. What an intro to this topic. I’m sorry. What’s meth like?

#461

That is—it’s a great intro. I like—you are very correct in the sense that, at least when it comes to hallucinogens, there’s no guarantee of what you’re going to experience. Just because you buy the product doesn’t mean you’re going to have a good time.

Personally, I believe in the spiritual realm. I believe demons and angels exist. I believe God exists. That whole realm is—I don’t know what it opens you up to—but it’s a much, much different experience.

Some people are like, “Oh, it’s just a bunch of chemicals in your brain. They all get mixed up.” LSD just takes all of your pathways, and they all get scrambled up in your brain. It’s just like, yeah, the experiences are profound.

I had some really bizarre, very cool, very awful experiences. I’ve had all the experiences in them all. I can just tell you that I personally always say the same thing: the choices that I made, I can never take back. I would never take that away from myself, because I don’t know if I would be who I am today without all those experiences leading up to it.

But if you have not had that experience, I’m on your team—or at least partially on your team, maybe more severely. I don’t think you need those experiences. I don’t think they’re going to help you. You don’t have to put yourself through that to make good decisions or to realize that people have value. You don’t have to do that.

As far as what meth is like: if you’ve ever done cocaine, cocaine starts off with a 15-minute dance party. It’s just so intense, it’s so great, and then it’s followed by about 5 hours of just feeling wiggly. I don’t know how else to describe it.

Meth is like that, except I didn’t get as much dance party—or any dance party. Instead, I got that part for about 12 hours. I did a lot of skateboarding and a lot of running around.

Lex Fridman

Would you say it’s a pleasant feeling, or is it more like an escape from the loneliness of life? Is it pleasant or negative? In the actual moment—not the consequences, but in the moment.

#461

This is a very interesting area, because you can’t say that universally. Often, you’ll find that there are two groups of drug addicts: those who like opioids and those who like uppers. They typically don’t like both. There are very few people in the drug world who do both. They find their side, and they go for it.

So, is meth something that everybody’s going to enjoy? Categorically, as you can see from how people experience drug addiction, no.

For me, it feeds into the ADHD nature of this, because you’re high-energy and always in the moment. You’re in the moment, but it’s like, “Oh, I’m in the moment.” Everything is just so intense. You really want to be in the moment, and so you’re experiencing that constantly.

Was that great? Some people—my wife always tells me this—find that being nervous, or the anxiety of a situation, can also be the same thing as a thrill. I forget the exact way she puts it. She’s probably super disappointed that I messed this up.

You could perceive those 2 experiences in very different ways. Some people get in front of a crowd and it’s thrilling. Some people get in front of a crowd and it’s the worst experience of their lifetime. They would literally rather die—which is a crazy thing to think about—than stand up and speak.

For me, meth was that thrilling side, but at the same time, it still didn’t quite give me that thing I wanted. Whatever I was looking for, I used it to try to get that thing I wanted, but it never gave me that thing.

Lex Fridman

Yeah. For me, I’ve had all really wonderful experiences. I don’t recommend them, but is it a YouTube policy, by the way, that you have to say, “Whatever you do, don’t engage in illegal activity”?

I had great experiences, but don’t—whatever you do, don’t do it.

Mr. Primeagen, I have no master. I don't have YouTube or whatever. I'll say whatever the fuck I want. But seriously, I don't give a shit about YouTube or anybody. Honestly, I'm careful about the words I say because, just because I had positive experiences, I don't want young people listening to this to think they should try the experience. I think the much more powerful message is that life is awesome even without that.

That's something I definitely experiment with on the alcohol side. For me, I'm an introvert. I'm afraid of the world. Social interaction fills me with anxiety. Alcohol is definitely a thing that helps with that sometimes. But honestly, I don't think it's even the alcohol. It's having to do something while a person is talking to me. I could just drink a liquid.

#461

Yeah. Mm-hmm.

Lex Fridman

There's a social thing with a beer. It's like, "Yeah, uh-huh, yeah, we're having fun." I think it works for me. It works the same as if the liquid actually looks like alcohol; it serves the same purpose often, because if you have a whiskey- or beer-looking thing, it kind of sends a signal that we should be having fun. So we're socializing, right? We're fucking getting crazy. That means you don't actually need the alcohol. You can get fucking crazy without the alcohol substance.

But there is some kind of social signaling that happens when you have a drink in your hand. I've been to get-togethers where I'm not drinking, but I'm just doing a fake-drink situation, and I can also have fun. That said, traveling across the world, there are times when you need to down a bottle of vodka. That's very essential for my line of work.

But that's almost like a cultural experience versus a necessary component of a successful social interaction, one that brings you happiness. Not drinking—I think you can have fun and not drink too.

So, all of this, man, I'm so careful saying drugs have had a good effect on my life because I think for most people—no, for the majority of people—they will, in the long term, have a negative effect. If you were to choose one or the other, just no drugs, and no drinking means one day you can be the president of the United States, kids.

And I should say—oh, man, his funniest line: "Diet Coke is great." That's his funniest line, which is, "You would hate me if I drink." That just tickles me to no end. Oh my gosh, that is such a funny line. Self-awareness and humor are wonderful there.

#461

But I am on your team. All of the reasons why I used drugs and all that were a form of escapism. I'm sure that would be the archetype or the box I'd put that into, or the pursuit of trying to feel something that cannot come from them.

It's like trying to find meaning in your job. You can find satisfaction in what you do. That's a very good thing. You can find satisfaction and be happy with what you've created. You can be thrilled by the experience. But I doubt you can find purpose. Maybe some people in specific jobs—obviously, this is very broad strokes I'm painting with. If you're an EMT and you save someone's life, maybe there can be purpose in that whole experience.

I'm not saying all things, but as far as programming goes, most programmers cannot simply find their purpose. It's the same with drugs: you cannot find that thing you're looking for, but they are a very great distraction. And then, at some point, that distraction comes with a heavy cost.

I think Dr. F.A.[?] would probably know best about the heavy cost, but you're making one trade for another. At some point, the bill comes due, and that bill can be very, very large.

Lex Fridman

The other moment you mentioned that I think is really inspiring is that you failed pre-calculus, really struggled in school, realized that school was really hard, and then eventually were able to persevere and break through that wall of struggle. Can you, by way of advice, figure out what happened and what kind of advice you can give to people who are struggling?

#461

Yeah, I'll paint it in a clearer picture—a very fast speedrun of it. I took pre-calculus, failed. I took pre-calculus again, failed, took pre-calculus again, and got a C. So I took it 3 times.

Then I took calculus over the summer. Calc 1—in that one, the final was a 2-hour final. I finished it in 30 minutes, and that was the highest score in all of the school. I proceeded to have the highest score in all of calculus and differential equations. I was the only person out of 400 people to finish the differential equations final, and I got the highest grade. So I was like, "I got really good."

I somehow went from really bad to really good. The only thing that I did is that I had to win. It was not an option. It was not like, "Oh, this would be really great." It was, "I will not graduate. I will not finish my stuff if I cannot do this."

Every single day I got up, went to my class, however many hours it was, and right after that I went straight to the math learning center and did those problems. When I got home, I got the book—it had the odd answers in the back—and I would try to work through the problems over and over and over again until I absolutely got it.

It just became this thing where simple rote memory took over. It was like having the times tables, but for calculus, all stuck in my head: inverse trig substitution, trig substitution, doing Taylor-Maclaurin series. All those things, over and over and over again, eventually became easy. They became very easy. It's just that I had to cram it in there.

Some people, you hear these stories where they barely show up to class and get A's. I've never been that person. I've always been the person who has to sit down and read through everything. I'm bad at abstract concepts. I like the concrete into the abstract, not the abstract into the concrete. I'm very bad at talking about things theoretically and then trying to apply them. But if I can do it once, literally, then it's really easy for me to go into the abstract.

For me, there was no substitute for the hours. If I were to give advice, it's just that you have to have time in the saddle. Hour after hour will make you slowly better. At first it's crushing, it's defeating, and it's not fun because you are bad at it. But then, at some point, you're just not bad at it if you can do it long enough. You'll start getting okay at it, and then at some point you might even get good at it.

When you get good at something, it feels amazing. There's an exploratory thing. If you've ever played a musical instrument, you stop having to think about all the little, teeny things you have to do to be able to play something correctly, and you start thinking about how you can explore that space. It's a completely different problem. Programming has an identical kind of feel to it. You'll cross that barrier, and it becomes magical as opposed to a chore.

Lex Fridman

Yeah. Once you cross that barrier, somehow other things become easier. But then, if you want to have a truly successful life, you find the next barrier.

#461

Yeah. I've always been the same. Everything's come really hard. I've had no free lunches. Everything's just been a lot of pain and struggle.

Lex Fridman

I think somebody said that, on this topic, "Work smarter, not harder" is a phrase that you dislike. Somebody on Reddit told me this.

#461

I don't just dislike it. I hate that phrase.

Lex Fridman

Okay, tell me about your hatred. How do you feel?

ThePrimeagen

The reason why I dislike that is that there's a hidden suggestion there, which is that you already know what "smarter" is. So just do that. It suggests that things should be easy. You should not have to try that hard. You should just do the quick, easy, obvious path, and boom, it's done.

I've never experienced that in anything I've done. Everything is actually really hard, and most of the time I don't even know what I'm doing. Therefore, I don't even know what smart looks like. For me, the only way I can learn how to work smart is by working very, very hard and knowing that there are no shortcuts. Then, when I finally figure out what smart is, when I work smart and work hard, it is that much better.

Lex Fridman

I think there's a deep, profound truth to that. There are a lot of these phrases that just drive me nuts in our society. But that one is really accepted. If we can just linger on it, because it really bothers me as well, one really nice thing you said is that the presumption there is that things should be easy, and you're a failure if you don't see the easy path. That's kind of the "work smart" dogma: Why are you putting in all those hours? It makes a lot of people who struggle feel like they're a failure.

ThePrimeagen

Yeah, because I don't see it. And then the choice I have is, "Well, I'll just take the L. I'll just be lazy, and then maybe the profound truth will come to me somehow."

I don't think I've ever—and I don't think I've met great engineers that find the smart way without the extremely hard work. The annoying thing about those great engineers is that, looking back, they forget the hard work because they remember all the joy they now are experiencing from all the efficient, smart work they've figured out how to do.

They forget. So when they give advice, they give the stupid fucking advice of, "Well, just do it the easy way, and here's the easy way." But no, no, no, no, no, no, no, no, no.

Lex Fridman

You have to put in the hours. Musical instruments are a beautiful example: guitar and piano. I’ve put in I don’t know how many thousands of hours. Now, when I’m explaining stuff—jiu-jitsu as well—I sound like one of those people saying, “Just relax.” By the way, “just relax” is a really wonderful thing for physical endeavors like piano and so on.

But learning how to relax your hand, how to relax your mind and your body, and use the biomechanics of your body to apply the correct kind of leverage and timing—that takes thousands of hours of learning. Just learning how to relax takes a lot of really hard work. In jiu-jitsu, that takes many months of getting your ass beat over and over until you ride the bus home crying, your ego completely shattered and destroyed. Then a little element is figured out late that night or the next morning.

From the depression, there’s this little plant that grows, this flower of insight. You use that insight to get your ass kicked again all next fucking month and year. Then you grow and grow and grow, and from that you discover how beautifully simple jiu-jitsu or judo is, just speaking for myself, or piano or guitar. The profound truth, or the mastery of a skill, feels simple when you finally arrive at it, but the path for most people is going to be a hard one.

#461

Can I? I think I should make an addendum to the phrase. I think the phrase should be, “Work hard, get smart.”

Lex Fridman

Nice. That’s a T-shirt.

#461

That’s what it should be.

Lex Fridman

Yeah, agreed. Okay, that was a tangent of a tangent. Can I say one more cultural phrase that I absolutely hate?

#461

Yes.

Lex Fridman

“The journey is better than the destination.”

#461

Right. Everyone’s heard this, right?

Lex Fridman

Mhm. Just take 1 second to apply what that means. That means forever, starting from now, you are only going toward a place that’s worse. That literally is what it means, right? “Enjoy the journey, celebrate the destination”—that should be what it is. But people say these phrases everywhere. There are these very shallow phrases that have no logical bounds to them. You’re just like, what does that mean? Why would the journey ever be better than the destination? Because you’re always—this might even be a C. S. Lewis quote—like, no, this is terrible. The journey is not, in fact, better than the destination.

#461

I love the demotivational posters. “Progress moving forward is better than moving backward, even if you’re still going nowhere.” There’s one—I feel that one so much, being in California for a few years. That is painful.

Lex Fridman

“Positivity: If it doesn’t break you today, don’t worry. It will try again tomorrow.” It’s just a lot of really great posters.

#461

I didn’t even know this was a thing. This is a thing. Oh my gosh, I want that.

Lex Fridman

Yeah.

#461

One thing that I forgot to mention in this podcast, which feels so foolish to me for forgetting, is what a big role my mom played in my life. She had to work 18 hours a day after my dad died. She really made it possible for our house to survive. I always looked up to her and always thought she was amazing.

When I decided to get my butt back in gear, she was someone I looked to as an internal inspiration to keep on going, because I really wanted to make her proud. After all those years of high-energy effort, I really wanted to make sure that she knew I was so dang appreciative of it. So I just wanted to say, thank you. Love you, Mom.

Lex Fridman

For people who don’t know, you worked at Netflix, by the way. How did you go from the hardship that we mentioned—from the struggle, from the addictions, and so on—to a place where you were working at this incredible engineering company and building cool shit there? Tell the Netflix story.

#461

I kind of alluded to it earlier: I wanted to do my own startup. For 1 or 2 years—maybe 2½ years—I built a startup with PHP and jQuery, everyone’s favorite languages all put together. You can solve math stuff with jQuery. I was totally into doing that nonstop, breathing it in and breathing it out, and that’s what I did all day, every day.

Ultimately, that startup failed, so I had to go get a real job.

Lex Fridman

Can you say what the startup was?

#461

It’s so wild thinking about it in the past. Before I tell you what it was, I want to tell you one quick thing about my dad. In the early ’90s, around 1991 or 1992, he was building a phone-card company where you’d be able to pre-purchase long-distance minutes.

If you remember the ’90s, around 1997, 1998, 1999, with 10-10-220 and all those different dial-around services, all those companies where you could pre-purchase long-distance minutes came out and were very, very big. My dad was about 6 years early to that notion. Ultimately, his startup failed, but he was really early to something that would catch on very, very big in the telecommunications space.

Me, as I grew up and did my own startup, I did one in text-message marketing. This was in 2010, when you could receive texts about various deals and all that kind of stuff. Of course, 10 years later, you don’t stop receiving texts, and text-message marketing is all the rage. So, much like my father had a startup in the telecommunications space that was just about ½ a decade too early, I did too.

Lex Fridman

Is it fair to say you’re almost always ahead of your time, that you’re a visionary of sorts?

#461

No. In fact, I am not ahead of my time. I just got unlucky in that situation, although it seemed so obvious to me at the time when I was doing it. Eighty percent of phones were dumbphones. Most people had flip phones when I went out and sold Via Text, which was the name of that specific product. We had the shortcode Via Text, too.

I only had a flip phone during that time. I didn’t even have a smartphone, because they were kind of untenable for a lot of people. It was pretty clever, right? Six digits. It was just wild times to think about.

But after that, obviously, I had to get a real job. We were living in an apartment right next to campus in Bozeman, Montana. The guy below us must have been on some amount of drugs. He threatened to kill us several times, would just scream, and would lose his marbles all the time. He was a very unhinged man. “Angry downstairs man” is what we called him.

One time, my wife dropped a battery—a double-A. We’re not talking about a B battery or a D battery; we’re just talking about a double-A. She dropped it, and it landed on the ground. “I’m going to kill you!” Absolutely unhinged behavior down there.

So I had to go get a real job. We needed to move out of there and start our life. I worked at a small place, which I kind of talked about—the boredom there. Then I got to go to a place called WebFilings, where I worked tons and tons of hours.

I was still trying to figure out startups. I did one where you could pre-write your friends’ birthday messages, and then it would automatically send them via Facebook beforehand. We called it Grief Feed. It was pretty clever.

I say all that because everything I was doing involved exploring, building, finishing things, working, learning about corporate life, and learning how to communicate in corporate life. I learned how to be successful at a job and learned about a bunch of technologies that were around. One of the big technologies during that time, specifically in 2013, was RxJS, if you remember that one.

Lex Fridman

RxJS—that’s LINQ from C#, kind of ported over to JavaScript. For people who don’t know, I guess C#: what is its closest neighbor?

#461

Java. They obviously just took Java and ripped it off at one point, but now it’s such a dynamic, interesting language that it seems like it could be a really cool balance between practical and not practical.

Lex Fridman

I’m not really into wearing pleated pants while programming at a Microsoft house.

#461

So, are pleated pants a requirement?

Lex Fridman

I think so.

#461

Okay, we’ll get back to this. Can we just get back?

Lex Fridman

All right.

#461

WebFilings was where I had to do all the matrix-y stuff and build systems and all that. It really pushed me, because they also wanted me to do 60 hours a week. It was not a very healthy work-life balance; it was very hard work. Going into cutting-edge stuff and really understanding the world made it so that I was able to talk about things very commandingly, because we had to build really complex state machines for the UI we were building.

When I started getting on LinkedIn and all that, inevitably, just because I had touched all these technologies and had some sort of paper trail showing I’d touched them, Microsoft—dang it, Lex. Pleated pants. Pleated pants reached out. No, Netflix reached out and said, “Hey, I see you’ve done RxJS. We do a lot of it. Do you want to come and interview with us?”

I was always told that you should never reject a handwritten, personal invitation to interview. This was way before bots, and even then, the bots were pretty obvious to tell that they were bots.

This was a manager at Netflix, Jeff Wagner, my first manager ever. He just wrote a really nice note: “Hey, I see you’re doing a lot of these things. We really need help with JavaScript. I would love for you to come interview. We’re even using a lot of RxJS, if you’re interested in that.” So I was like, “All right, I can come and interview.” And lo and behold, the interview went on.

I called my wife, I think halfway through the interview, and I was just defeated, absolutely crushed, because I said—and she might remember this—“We now have to make a decision. Are we actually going to move to California or not?” I already knew I had the job at that point. I was just knocking them out of the park. I was doing a great job, so I knew for a fact I was getting a job at Netflix.

There’s this thing that people always get so freaked out about when it comes to interviews, and I luckily somehow avoided this. I don’t get test anxiety. I don’t get any of that, because when I go into these situations, my only goal is to show the things I already know. I walked into this situation having prepared for it 80 hours a week for the last 5 years. I just walked in and showed the things I knew.

It was a perfect fit for Netflix at that time, in the early JavaScript days on television. It just worked out perfectly. I got hired there.

Lex Fridman

So where in California was Netflix?

#461

Los Gatos.

Lex Fridman

So, if you’re familiar, this is the classic symbol people do: this is San Francisco.

#461

Yep.

Lex Fridman

Oakland, San Jose. Los Gatos is just like a little bit—

#461

Yep.

Lex Fridman

Kind of a little bit below—

#461

A little bit south of San Jose. Same megacontiguous city.

Lex Fridman

Yellowstone is a Montana—Yellowstone, the show?

#461

Yeah, yeah.

Lex Fridman

With Kevin Costner riding on a horse? Is it basically like that? Were you riding on a horse to campus?

#461

No. No. But I love those stereotypes, actually. To be completely fair, when I was 15 years old, I was driving around on what is now a very busy, populated street, shooting gophers out the window of our car with a .22. Montana was a different place at one point than it is today.

There are plenty of parts of Montana that are still very rural, still kind of more of that old world. You can get whatever you want from Montana, as far as the culture goes. I’m not really sure the best way to put the difference between California and Montana. It’s just different expectations.

One thing I can really appreciate about California—or at least when I say California, I mean Silicon Valley, because obviously Los Angeles, California, and Silicon Valley have very different attitudes and very different mindsets. You can’t really compare one to the other. One thing I can say that’s really positive about the Valley is that everybody is operating on this idea of trying to build or create something, and there’s an energy to it that’s very exciting.

You meet somebody, and they have a startup, and they’re working on the startup, and it’s very exciting. There are a lot of negative aspects to that, and we can all agree that our entire life being commercialized has probably not been that great. But the experience of being there, with everyone excited to build something, is a really cool experience.

Lex Fridman

Yeah, it’s great. It’s really great—the excitement, the energy. I have a romantic admiration for shows like Yellowstone, being out in nature. It’s beautiful.

#461

Yeah, I like riding.

Lex Fridman

Somebody also said Reddit is full of wisdom about you. Some of it could be fake news, but there was something about horses and this kind of thing. You like horses? You like riding horses?

#461

We have horses on our property. Our neighbor had much hillier land, and one of their horses broke its leg, so they had to put it down. We just said, “Hey, we’re on much flatter land. You can just have your horses on our property.” So we have horses that run around on our property.

Lex Fridman

What about milking cows? Somebody asked about cattle and cows.

#461

I’ve only had open cows. If you don’t know, “cow” means female. “Open” means they’ve tried to get the cow pregnant, but the cow did not get pregnant on the first try. They’re culling that cow; they’re getting rid of that gene. The open cow is going to go out to pasture for the year and then get turned into delicious T-bone steaks and various things.

So we would house open cows on our property. No, there’s no milking of open cows. They’d be very upset if you tried to milk an open cow, because they’re not milking cows, right? You have to get that cow pregnant, and then once you get it pregnant, you have to put it into this permanent state of milking and all that.

It’s a little bit more complicated than what we did, which was just cows eating grass, and I didn’t have to touch them.

Lex Fridman

Okay. Well, that’s wonderful. Reddit is not a great place for wisdom about me. They’re going to give you the craziest answers.

#461

We will return to Reddit time and time again, my friend.

Lex Fridman

So, yeah, you took the leap into Netflix. What was that like?

#461

This is one of those things where, when you talk about it, people love to trivialize it because it’s like, “Oh, you’re taking a leap of faith by going into a FAANG company in 2013.” It sounds super risky.

My wife was 36 weeks pregnant. We had to travel to a place where we didn’t know a soul. We were about to have our first kid, and we didn’t even have a doctor. If you don’t know, having a baby means you kind of want a relationship with a doctor. There’s a whole thing that goes on there.

It was a really hard and great experience. I went to a job where they had a culture deck. During this time, Netflix still had that old Generation X feel to it. Their culture deck was “hire fast, fire fast.” It was very in-your-face about how they operated: you don’t meet the standards, we kick you out.

I was leaving a place that was more secure to go to a place where I didn’t know anybody, to a job that was bold in its claims about firing everybody, with a wife who was just about to have a baby. I’m from Montana, and everyone in Montana is born with a natural dislike of California. There were all these things flowing into it, so it was like, “Wow, this is going to be a very intense experience.”

It was hard, for sure. It wasn’t just some easy, simple experience where we were like, “Oh, I work now at a FAANG company.” We had to work through that. Having a kid was very difficult. Our first kid was very difficult. Not having any family around to help you took a much larger toll on my wife than on me, for sure.

Lex Fridman

What was the technical learning curve for you? You showed up in your pleated pants, all dressed up. What did you have to learn about the stack? Netflix, I imagine, has this incredible infrastructure. It has to deliver a huge amount of data. I’m blown away by Netflix, but also by YouTube—these companies that have to serve a huge amount of bits.

#461

Netflix has it easiest out of all the companies, by far. Even though we have—you could say maybe we beat YouTube in view hours. I’m not sure if we do, but let’s just pretend Netflix has 5 times more view hours than YouTube, whatever it is. Netflix has a fundamentally easier problem than all other companies.

Let me first tell you about the stack, but I’ll tell you why it has a fundamentally easier problem. When I first got there, they gave me my PlayStation 3. My boss said, “Go learn some code. Come back to me in a couple of days and tell me what you’ve learned. Then I’m going to start giving you bugs to fix.”

Lex Fridman

Wait, PlayStation 3? What are you talking about?

#461

I was on the TV team. I had to plug in a PlayStation and start launching programs onto the PlayStation 3 and figure out how to make Netflix work on a television device.

Lex Fridman

Oh, so you had different kinds of devices. Why PlayStation 3s? Other 2013 devices that plugged into the TV?

#461

Not as many TVs had Netflix, let alone what they called their Darwin app, which was their new application. If you bought a Vizio earlier that year, you’d get the older one. It was called Plus UI.

Not as many devices had the newer version. We no longer supported Plus—we never actively developed on Plus. We only did things on Darwin. So I had to learn that whole stack.

The middle layer between the actual back end and the front end was written in Groovy. If you’re not familiar with Jenkins, then you’ve probably never interacted with Groovy. Groovy is a JVM language. It’s a very interesting language.

But here’s what the AI says: “Apache Groovy is a powerful object-oriented programming language that runs on the Java Virtual Machine, released in 2007. It has evolved to become a versatile language that combines both static and dynamic typing capabilities.”

All right, so the AI is kind of lying to you. Groovy is not a powerful, great language. Nothing in that statement makes it seem way cooler than it actually is. You will meet 1 out of 100 people who have touched Groovy who say, “Oh, yeah, Groovy is great.” The other 99 will be like, “Heavens forbid you ever have to touch that language.”

When I got there, nobody—not a single soul at Netflix—there were 40-some engineers, and nobody had any idea how Groovy pretty much worked. Somehow, people had just hacked together these scripts and put them all on there, and it worked. All this was before there was an RxGroovy port.

We wrote our own version called WX. It was a nightmare. Observables—all these things. I remember one time they told me, “Oh yeah, with Rx, it’s really easy. You just say what you need to do, it maps out, and boom, boom, boom, boom, everything will run multithreaded and all that.”

I was like, “Oh wow, really?” So all I did was go, “Observable.sleep(1),” because I just wanted to see it sleep and then do the next thing. It turns out when a thread sleeps itself, no thread can wake it up.

Then I turned off all of staging because I ran it like 10 times: “Oh, it’s not responding. Oh, it’s not responding. Oh, now it’s not even coming back.” I broke all of staging for everybody, so no developer could work for the rest of the afternoon because I locked up all the instances. It turns out, no, it was in fact not multithreaded. Every assumption we’d been told was a lie. No one had any idea what they were doing. It was a wild time.

So I just naturally gravitated toward that because I’m good at printf debugging. I’m good at doing those things, so I was like, “Here, I’ll just figure this out. I will do this.”

I had to rewrite how we did the data structure on the front end for the TV, from what was called a LoLo—a list of lists of movies—into LoLo, which is a list of lists of recommendation objects for a movie. Why would we need to do that? Think about this: you have 2 lists. One has Live Free or Die Hard because you love Bruce Willis. The other one has Live Free or Die Hard because you want tough men doing tough jobs.

Well, during those days, we only had one way we could show evidence for why you wanted it. So we couldn’t say, “Oh, because you liked this other movie.” You’d go to that one and say the same thing. We had to add one level of indirection where we could decorate the video with the recommendation information.

Lex Fridman

Okay. So you can abstract away into the space of recommendations versus the space of movies, right?

#461

Yeah. So you can’t hang it off the video because obviously then it would be the same for everything that shows that same video.

Lex Fridman

So that’s amazing.

#461

I had to do all this, and I wrote it in Groovy. I just did it, and people were like, “How did you write this in Groovy?” And it was just like, well, I read the language reference for a day and then programmed it.

Lex Fridman

What do you mean?

#461

It was a very radical language, shall we say. I simply became the person who knew these things, so they just gave me more and more jobs doing that. That’s kind of how I excelled: being the person who was willing to do the thing that no one else was.

Lex Fridman

Can you actually speak to printf debugging? You walk into a system, and there are a lot of systems in the world like this. Twitter was like this when Elon acquired Twitter, and he rolls in and there’s this old, janky codebase. You have to basically do printf debugging. What’s the process of going into a codebase and figuring out, “What the fuck? How does this work? What are the flaws? What are the assumptions?”

You have to reverse-engineer what all these other engineers did in the past—the mess across the space of months and years—and figure out how all that works in order to make improvements.

#461

The reason why I’ve always been good at printf debugging is that one of my first side-quest jobs was writing robots for the government when I was still at school. I did this contractually for so many hours a week. My boss, Hunter Lloyd—a great professor, by the way—just said, “Hey, here’s your computer. Here’s the robot. Here’s how you plug it in. Here’s how you run the code. Can you write the flash driver, the Ethernet driver? Can you write the planetary pancake motor? Here are some manuals. I’m missing some. Just figure it out. I’ll be back.”

That was government work for me. I was like, “Okay, I’ll figure all these things out.” And I figured them all out. The only way to really get anything out of the machine was to print, so I had to become really good at printing my way through problems. That kind of became a skill I adopted: I can just print-debug my way through a lot of these problems.

Obviously, I’m not a game developer. Probably a different world; probably you should use—I think John Carmack was on here and talked about how great the debugger is. Different world.

When I was at Netflix, there were machines that existed somewhere on AWS. I’m not logged into them. I don’t even know how to log into them. I’m not even sure if I have credentials to log into them. They run once somewhere, and I have to figure out what happened and why it’s happening.

So I’m going to become—this is what I’ve trained for. I’m a printf-debugging champion. I can just run through these things really quickly and figure out why they’re happening the way they’re happening.

Lex Fridman

You’re a special human. I think that’s an incredible skill set to have: to be able to drop into any codebase, drop into any situation, and do printf debugging. You’re in a dark room and you’re feeling around that room to try to figure out what the room is.

#461

Well, I had the code, so I could kind of blueprint what was happening. I didn’t understand the services or anything that was happening, but you can start guessing pretty quickly as to what’s going wrong, right?

Lex Fridman

But then the printf side of that helps you confirm your intuitions, test your intuitions, and build up more and more information. Then you start to accumulate this bigger picture from that—what the edge cases are that break the system.

I think that kind of situation is intimidating for a lot of engineers. They break down at that point. I think this really is a powerful thing, to be able to come into a codebase. It’s generally a skill set that very few of us start from scratch with.

#461

Yeah. Actually, this is the fundamental problem of web development in general, where they’re like, “I don’t know what’s going on. I’m going to write my own thing from scratch,” as opposed to actually doing printf debugging in the space of languages, in the space of problems, because there’s a lot of wisdom and solved problems already in this codebase.

It’s a much more important skill set to learn from the mistakes and the wisdom of the past, of the ancestors that came before, and build on them, as opposed to throwing it all out and starting from scratch. This is something you obviously see a lot with JavaScript frameworks, where a new one comes out every single day.

So I have a great story about that. This is what I think has shaped me the most in my perspective of other developers. There was this developer, and he always just wrote things in what I thought was such a bizarre and weird way.

This had to do with Falcor, our data-fetching library for Netflix. This would run on mobile, so I had to write in Objective-C. It had to run on television, and it had to also run on the web. So it ran on everything, and one other person and I were responsible for making this thing work.

On the request side, we had to dedupe the information that we already had, the requests that were pending, and the new data. So I had to figure all that out based on what someone was requesting, and then optimally request only the stuff that we didn’t have.

He wrote it in such a goofy way, and I was thinking, “Man, this guy’s just—what a goofball.” So I deleted it all and started writing it. I’m like, “Look at how much nicer this is. It’s looking so good.” Then I’m like, “Ooh, there’s that one edge case.” Okay, I can see why he wrote it this one way. That’s not a big deal, though. The rest of my code is really great.

By the end of it, I literally almost line for line reproduced what he had already written. It was slightly different toward my style, but I just wrote the same code. And I’m like, “I’m an idiot. I am the idiot in this situation,” because it was already a solved problem. I just didn’t take the time to learn what he did. Instead, I relearned what he did by rewriting the entire thing.

I highly recommend starting from scratch if you want to understand a concept. You don’t know how an HTTP server works? Create a TCP socket. Learn how to parse HTTP. It’ll become very easy, and you’ll go, “This is the reason why whenever I get a request, I have to await the text. I now understand why the text is, for whatever reason, not there. I get it. I now understand it.”

You gain these new perspectives just by simply parsing something out.

Lex Fridman

All right. Back to the wisdom of Reddit. Apparently, there are memes and legends about your programming arc at Netflix. This Falcor system you mentioned—somebody, I think it was Teej. How do you pronounce his name, by the way?

#461

Teej.

Lex Fridman

Teej. Okay, Teej.

#461

TJ would be his name, but we call him T, or Telescopic Johnson.

Lex Fridman

Oh wow. So many names. You know DDoS, distributed denial-of-service attacks.

You apparently were able to accomplish the simplified version of that, of just DoS attacks.

#461

That’s a legend.

Lex Fridman

So you basically broke down the system somehow?

#461

Yeah, yeah.

Lex Fridman

So can you tell the story of that?

#461

I’d be glad to. So there’s this Falcor business, right? I discovered the bug before anybody else, and I reported it to security. It was so bad it actually got its own name: Recursive Grizzly Attack. They even give examples of how to do it.

Effectively, what it means is that there is a request that targets both memory and CPU and will destroy it.

Lex Fridman

There you go. Look at that: “How Netflix…” The next one down was the article that was actually written.

#461

I don’t get mentioned, which is a little upsetting, considering I was the one who discovered it and told everybody how bad it was. Anyways, I had to write the fix for it, or the first fix.

So this is how it works: you can do something pretty similar, I believe, with GraphQL as well. It has the same kind of danger. Any of these kinds of RPC frameworks, where you can request as much or as little of the data as you would like, are vulnerable to this kind of attack.

With Falcor, what you do is give it an array. This array is called a path, and that’s the path to the data. But sometimes you don’t want to have to write out, “I want movies. I want rows or lists, or row 0, column 0, title. I want row 0, column 0, description.” You don’t want to have to write out all that.

Instead, you could say, “I want rows 0 through 10, columns 0 through 10, titles and descriptions.” You can write it in a very compact, nice little format, and it’ll give you all that data. It’ll go to the server, the server will fill that all in, and give it to you.

“Oh, dang it. List 3 only had 3 videos in it.” So what happens when I try to request the data again? I need a way to be able to tell my system that you have requested the data and there’s nothing there. This is called a boxed value.

It’s going to be like, “Type: something, value: there’s nothing there. We’ve already requested it, and there’s nothing there.” They call it a sentinel value, if you will—a boxed value. We have this little special flag we pass called “materialize,” meaning that when you ask for a path, we’ll make sure we fill it out so we don’t accidentally erase anything.

At the very end, we’ll say, “Okay, the request you’ve made has already been made, and there’s nothing there.” What happens if I request rows 0 through 10,000, columns 0 through 10,000, one more item through 10,000, and then a whole bunch of properties, and then ask it to materialize?

Well, I’m about to go create billions of objects in the JVM. What happens to the machine? It stops running. And then, if we try to JSON-serialize—even if it could create them all—it’s not going to do it, right? It’s impossible.

That was the attack vector. A simple while loop would have taken down and held down Netflix for a very long time, because one request would kill one machine on AWS. If we had 50 machines serving the millions of requests, it would only take 50 requests to shut down the entire UI. This was on the website, on TV, and on mobile. This was profound.

Here’s the worst part: it was in production for years. So we couldn’t even roll it back. There was no, “Oh, crap, let’s just roll back to 2 weeks ago, and we’ll kind of fix forward and figure it out.” No, it’s like we could roll back to 2011. That’s our option: 2011, and that’s it. So we had to figure out a way forward and all that. The amount of problems that would have happened if someone had discovered this is unthinkable.

Lex Fridman

Just to be clear, the infrastructure that’s serving the videos would shut down?

#461

Yeah. The UI—you couldn’t perform any actions in the UI. You surprisingly could still stream video, but you would never be able to get to a video to stream, because every action you would take would be completely shut down.

It wasn’t a DDoS, because you didn’t need a bunch of computers to try to overwhelm the system by making a bunch of requests. One request, one machine. If we had 50 machines serving the millions of requests, it would only take 50 requests to shut down the entire UI.

Lex Fridman

Isn’t it possible to do DoS attacks on basically any software system? Defending against all the attack vectors is probably really difficult. If you take any sufficiently complicated software system, there are probably so many ways to overwhelm it.

#461

Yeah. This is why people use Cloudflare. I think DHH said it best: we have our website, and we have a strong bodyguard on the outside.

Cloudflare has a bunch of utilities all built in, because obviously this is why everyone hates all these IoT devices that connect to the internet. They just turn into attack vectors, where people use them to do DoS or DDoS attacks on other sites.

You don’t need something sophisticated. You just need a bunch of requests to come in, and you can take down websites. That’s why these front ends are really good at discovering where these problems are.

But DoS is a bit different, because it doesn’t have to be overwhelming by using resources with a whole bunch of requests. It really just means that there’s a denial-of-service attack.

One example is a ReDoS attack that existed where Cloudflare actually did it to itself and shut itself down. There’s a ReDoS, or regular expression denial-of-service attack, where, given the right kind of regex, if you know someone’s running a specific regex, you can provide input that is maximally bad, and that thing goes into super-processing.

It takes 10 seconds to process a single request. Then you only need to make hundreds of requests, and you shut down the whole service. It’s not like you need some giant machinery to make 1 trillion requests. You only need a small amount to completely destroy a service. The web is an extremely difficult place to do correctly.

Lex Fridman

This is super fascinating. I also wonder how many ultra-competent black-hat hackers there are versus the good guys, versus the bad guys—how many bad guys there are, and what the distribution of skill sets is on the bad-guy side, constantly trying to attack.

I assume there’s probably a huge number of really simple ones: script kiddies, right? Just people trying to do things. And then there’s a huge amount of social engineering that goes on, where hacking is done not with a computer but just by—one of the classic ones Kevin Mitnick had in his book was that you’d call up somebody pretending to be like, “Charlene, we’re doing some auditing, and I think your PIN is out of date on file. Is it 2323 still?”

They’re like, “No, it’s 4747.” You’re like, “Thanks, Sharon.” Boom, you just hacked them, right? The classic: people love correcting bad information. This is standard.

So there are all these ways people hack. My assumption is that there are really great white-hat hackers and really great black-hat hackers, but in the vulnerability space, the hard thing is that discovering a vulnerability—and not letting anyone know about it—means the white-hat hacker still has to make that same discovery.

#461

Yeah, and that’s where I think the real thing is: black-hat hacking, in some sense, has a fundamentally easier job, or at least a job in which they can take advantage for much longer periods of time. One is the process of discovering who’s breaking the system; the other is trying to figure out how to break the system.

It seems like most software is held together by toothpicks and glue, and there are a lot of dangers in every piece. Also, the social engineering aspect—that’s a real attack vector. I think that’s the attack vector that will do the most damage in the world in the long term, especially as AI tooling becomes easier and easier to convince people at scale to do that kind of scam, email grandma.

I think that’s a really serious attack vector: human psychology and all that.

Lex Fridman

I kind of assume whenever there’s a girl that approaches me, it’s some kind of social engineering project—some attack vector, some intelligence agency. In fact, I’m pretty sure we’re back to A Beautiful Mind, aren’t we? A Beautiful Mind.

#461

Yeah, I have a whiteboard upstairs where I calculate everybody’s trajectory and every move.

You’re not wrong with the attack vector, especially in the age of AI. One thing that I don’t think a lot of people are talking about as we integrate more and more AI is that prompt injection is an extremely hard thing to defend against, because it’s not really clear how you defend against it.

If it’s just a word calculator—make a word come out—if you can figure out the proper word-calculator input, it might just break its bounds and start doing something it’s not supposed to do. And there’s a whole future where there are all these products that are going to be vulnerable to things they never thought about.

It’s one thing when you forget an edge case while you’re programming. Now you have to guess what people might be able to think of making something that has access to a system be able to do, right? And you don’t have a way to reason about it.

Its reasoning came from Reddit and other words that it’s read, and how to put things together. This is a massive space that’s going to be happening. It’s why I’m personally thinking, don’t give too many powers yet. We don’t know the attacks that are about to happen.

Lex Fridman

Yeah, the more power we give to software systems, the more damage they can do. That certainly is the case. But the more awesome they could do—and that’s the knife’s edge that we all walk along as a human civilization, together, hand in hand.

Will we flourish or destroy ourselves? Folks on Reddit—the good folks on Reddit—demanded that I ask you about the time you broke production. Is this related to Falcor? Did you break production?

#461

I've broken production quite a few times. I've broken production for so many stupid reasons. One time, I broke production because I came up in PHP, and in PHP, static means static for the lifetime of PHP, while PHP's lifetime was the lifetime of every request, right? That's why PHP was so inefficient: every request was its own instance, and therefore static memory was for the lifetime.

Lex Fridman

I guess I never put that together.

#461

And so I had some objects that I made static because I thought, “Oh, I just need this for the lifetime of the request.” Lo and behold, those weren't for that lifetime. A whole bunch of bad data got all over the place. People were showing up saying they were from all these different countries, and everything was wrong because I just—whoopsie-daisies—made a whole conundrum with that. So that was one time I did it.

Another time, I took down production. If you were on the homepage of the website waiting for Lady Gaga's video to come out and watching the countdown go down, when it reached zero, the billboard would freeze and wouldn't work. If you refreshed, it would work. But the reveal, the big reveal, I screwed that up, and my boss got real upset. Other people in Hollywood got upset about that one, too. That was a “my bad.” Sorry, Jeff Wagner, again.

Lex Fridman

I remember that one. I remember that one specifically.

#461

One time, I released a bug where, again, on the billboard, if you pressed “Add to My List,” I had accidentally programmed in an infinite loop, and your whole webpage would just freeze.

Lex Fridman

Are some of these bugs difficult to discover until you start using them? That one seems really easy, looking back at it.

#461

An infinite loop, yeah. During those days, we had manual QA that was supposed to go through everything. I didn't feel as bad because my manual QA counterpart also missed it. We all missed it. But it was just so simple: you just press that button, boom, it completely freezes the website.

Lex Fridman

Polluting the code with global variables that are holding values, as PHP, I think, allows you to do. That's a tricky one to discover because you rely on it, but then there could be somebody else assigning a value to it.

#461

Data races everywhere. I just didn't understand. In my head, static was like, “Oh, this is for the lifetime.” I was so locked into the PHP world at that time that I just made such a mistake. Looking back on it, it's so obvious, but during the time, it was hard.

Lex Fridman

So, in general, pushing to production—I talked to Pieter Levels about this. He's obviously operating as a mostly solo developer, but he often ships to production on websites that thousands, not hundreds of thousands, of people use. He pushes to production, meaning just no testing, just push to fix. What are the pros and cons of that approach in general, to you? What do you think?

#461

It's obviously much easier the smaller your organization is. I think no one would argue with that sentiment. If it's just you working on a singular project, it's obviously much easier for you to push directly to production because you're the only one working. You know all the ins and outs, and if something were to break, you would discover it. So, to me, that makes sense. I think the way he operates is perfect for what he does.

You couldn't take what he does and move it to, say, Microsoft, Netflix, or Google, because that would obviously just be a disaster due to the number of people all pushing to production. I personally love that. I think you have to gauge both the application you're building and its complexity, what you're pushing, and how many people are working on it. I think all of those go into how you can do that, because not all applications are created equal, either.

That application I was making with zooming and scrolling, where we had all of our own everything, was a very deep, logic-heavy app. Regardless of what was happening on the website, most of the code was library code, and that becomes way harder if you don't have a good test suite and things to run before you push it out. When you squeeze that ball, different things come popping out in different areas, and that's a much harder problem than, say, if you're doing more of a heavy visual one. With a heavy visual one, you're affecting just this one area's visual stuff; you can test it, and that's normally the end of it. It depends on the coupling and everything.

I love his approach, by the way. I have such mad respect for anyone that operates that way because I think it is a great way. It breaks this notion that tech Twitter has: “You have to use all these expensive services. You need to use all these kinds of things because if you don't use all this kind of stuff, if you're not using the latest version of React, if you're not using the latest version of this, you're simply not going to make it as a startup. It's impossible.” It's just like, no, no, that's not software. Most of software isn't the new stuff. Most of software is old, crappy software that someone has to maintain, and it actually is really, really great and has lots of really hard problems. If you look at it differently, it's actually fantastic.

Lex Fridman

For people who don't know, his tech stack in terms of web development is PHP, jQuery, and SQLite. Yeah, all great stuff. I'm just surprised he still uses jQuery, given the fact that at this point, on the modern web, everything is—I mean, you have `document.querySelector` and `addEventListener('click')`, right? It pretty much has everything you already need. It had `DOMContentLoaded`. All the reasons I used jQuery back in the day were that adding a click to a button was hard. You had to deal with IE7, IE8, and IE9, right? Those were hard differences. Whereas now, it's just so easy. I'm just surprised it's even that.

#461

That's definitely a trade-off. I still use the exact same stack: PHP, jQuery, and different flavors of SQL. But the question there is, you keep using jQuery because you can get the job done really fast, and there's no significant performance hit that you detect. So why switch to something else? But it's always, as we'll talk about, good to explore and to learn. Not all tools are great at solving all problems.

What you run into is this kind of trade-off: you have some tool belt that you're very adept with. You know all the ins and outs. There are no unknown unknowns, and there are no surprises. You know what you're building and what you're getting into. You will be able to solve the problem.

But if you ever use a different language or a different experience, you can find that some things are able to represent states more easily and in a more efficient way, and you can solve problems really efficiently in one versus the other. If you don't take the time to explore as well, you could be missing out on something that makes you twice as good on this one specific problem or subset. I value being able to look at all problems, and I don't want to get stuck on one thing, though I see why people do, which is for efficiency's sake.

Lex Fridman

Let's return to the infrastructure of the platform—Netflix, Twitch, YouTube. Anytime I use any of these services, I'm just blown away by the infrastructure it takes to deliver this service. YouTube and Twitch are unique versus Netflix, where the creators can roll in themselves and upload stuff.

#461

Yeah. On the consumption side, YouTube has over 100 billion views a day and over 1 billion hours of watch time. But on the creator side, 1 million hours of video are uploaded every day. One million hours. You have to service both, and you have to deliver everything. It's incredible to me.

Lex Fridman

Can you maybe speak to your own intuition, just zooming out on what it takes to deliver that kind of infrastructure?

#461

For me, the thing that I find vastly complicated—and I can't imagine the engineering hours—is how do you even create an edge in that situation? What I mean by an edge: when people say this phrase, if you're inexperienced, an edge is where you deliver data. You want that edge to be as close to the customer as possible because that's where the data lives, and then the communication between the customer and what you're doing is really, really small.

Obviously, the speed of light adds up, the number of hops adds up, and the number of services that you have to remotely call adds up. They all add up, and they all add inefficiencies to the system. Something like YouTube wants to be able to serve that data as quickly as possible, but its data changes constantly, and relevance is almost directly tied to the newness of the item. So, how do you even cache these things out? How are you doing this?

They must have such an incredible caching network that I can't even fathom what it takes to do that. To me, it's just so impressive. A million view hours in how many different resolutions, with how much data? What is 1 million view hours? Is it 4K million-view hours, along with 1080p, 720p, and 1440p? That number is insane.

Lex Fridman

Actually, it is brilliant what you said: for YouTube, often the new thing is extremely important to show to everybody, and so you can't rely on caching or trivial caching. You have to deliver the new thing as quickly as possible.

#461

Yeah.

I mean, it’s incredible. There’s the entire system—the recommendation system that knows each individual human watching YouTube—and it has to integrate the new thing into that while also caching this incredible cluster of possible videos that you’re potentially interested in. It also has to integrate ads, right?

In the case of YouTube and Twitch and so on, it’s a really tough problem because you have to think: What is the cache hit rate on this? The problem now actually comes down to space. Space becomes a real problem. How many hundreds of petabytes do they have to figure out what to cache and where to cache it?

They have to think in terms of gigabytes or maybe megabytes, but probably much larger units of bytes. I don’t even know the name for it. It’s such a different problem, and that’s why I said Netflix has a much easier job when it comes to caching.

If you’ve never looked it up, it’s called OCA. We know what videos we’re releasing, and we know what videos are hot in specific areas. It’s a very limited set. We’re not going to suddenly get, “Oops, we got a million new view hours,” right? We don’t even have to worry about that as a problem.

Instead, it’s, “Okay, we know Stranger Things season 5 is about to drop. We’re going to pre-cache Stranger Things season 5 in every single OCA across the world because that thing’s about to get hammered.” It’s able to make such a different kind of decision from what you have to do with something like YouTube.

Twitch is even more wild because now you’re actually ingesting video and trying to make it go out for everyone at exactly the same time. You have to transform that video from whatever format and whatever the bit rate is into something that’s more efficient in the system. Hats off to Twitch engineering, because that is some serious work.

And here’s some asshole Lex coming out and tweeting about YouTube features. Listen, you’re not wrong about the features you ask for, though. I think this is an engineering problem: How do you allow fast iteration and the addition of features that shouldn’t have to be integrated into or impact the whole codebase?

At the edges of the codebase, you should be able to improve certain features without having to consult the mothership of the code. It’s the large team, right? That’s the fundamental problem. When you get to YouTube’s size, there’s a team or organization that deals with data warehousing, a team or organization that deals with delivery, and a team or organization that’s the middle layer.

There are going to be little microservices that talk to all these places. Then you have the front-end engine. For a small feature, you have to get the middle team, the backend team, and all these other teams involved.

Lex Fridman

That’s really interesting. There’s got to be a way to accelerate that. The natural scaling of a company and the bureaucracy that grows slows that down. Just having seen Elon work a lot, his teams are still able to keep things very fast even as the company grows.

There’s got to be a process for doing that, especially for the Pig Fucker episode. I don’t know where that is on the priority list, but for important things like that, you should be able to do it quickly. Can you speak to how you would do that?

#461

Well, I can first tell you how it was done. Remember, at a place like Netflix, there would be—I think at that point it was called a product called Dexter. I can’t remember. There’s an actual movie metadata warehouse that’s going to be highly integrated with Hollywood, and that’s where that side is able to manage all of it.

I’m like, “Hey, you need the ability to mark things that need to be reversed, because we’re going to run into this a bunch.” We did. We ran into quite a few topical shows that all needed to be reversed.

We needed to be able to reverse episode numbers and season numbers. We needed to be able to hide season or episode numbers. In the case of the Chelsea Handler show, it was a daily show, so you don’t need episode numbers. You just need the latest one. There’s this whole problem that exists.

You need to work on that for your UI over there. Then you need to be able to store that data. Then we need to be able to go to the people who can actually get the video metadata out of that and provide it to our service layer. I need to go talk to them and convince them that they need to give me the new methods and everything to do that.

Then I need to write the methods to get it down. Then I need to go to the UI and make that accessible. Now I need to go to the website people, the mobile people, and the TV people. You can see this thing snowballing.

For us, the big thing that Netflix did so well was that, after I met with these high-level people, I was the captain.

Lex Fridman

I’m the captain now.

#461

So I went to all these teams and said, “Hey, manager, I need an engineer. We need to get this done within the next couple of months because we’ve got Black Mirror coming out.”

She would go, “Okay, here you go.” I’d say, “The MAP team—I need someone to help me get data out of the LMO for this.” She’d say, “All right, you’re working with this engineer.” I’d go to the VMS team and say, “Okay, I need this engineer.” I’d go to the Billboard team and say, “I need this engineer.”

I’d go to all these little places to get all these little pieces of data. Then I was the captain, so I was like, “You’re working on this. You’re doing this. You’re doing this. I’m doing this. Let’s go.”

That worked, and we were able to move pretty fast for a big company. The fact that it required about 20 engineers to do such a simple task—we were able to do it in, gosh, I’d say about 3 weeks’ worth of effort. I thought that was amazing, comparatively, given how many people were involved.

Lex Fridman

Well, because you have the freedom and the agency to do it. You said you were the captain of the ship. That’s really powerful for big companies. It’s a risk, because you can fuck it up. You might not see the bigger context legally, or the bigger context of the impact on the industry, or all the contracts that are in place.

It’s a risk. It’s a risk you have to keep taking. If you fuck up, you fix it and maybe pay the legal cost for that, whatever. But in the long term, that risk pays off because you’re going to keep creating a better and better product, evolving toward where the industry is going, constantly innovating ahead of where the industry is going, and so on.

#461

Yeah. And not only that, I think one thing that is so important is that, yes, the product will get better, but the people that you hire and the people that you keep around are better because they’re the ones who show maturity. They’re the ones who can be given something, rally the troops, and make something happen.

That’s a great group of people to hire. You also naturally select for great engineers who aren’t simply good at coding. They’re good at coding, they’re good at explaining, and they’re good at convincing. You have to create a very lean organization that can move fast.

For great engineers, having to wait for, “Okay, let’s schedule a meeting for next Wednesday with the VPs,” destroys their soul. They either don’t want to contribute anymore, they leave the company, or they tune out, take the golden handcuffs, buy a nice house, and focus on the family.

I feel like I would die under that. Honestly, that is my death sentence: a place where there’s no reason to try and no reason to do anything. I’m just going to go in there, effectively zombie through my day, and call it a life. I don’t want to live like that. I want to feel like I’m trying to do something.

Are you familiar with the dystopian Black Mirror?

Lex Fridman

Yeah. Yeah.

#461

Okay. Season 1, episode 1. Do you know season 1, episode 1? Everyone who watches Black Mirror typically knows this episode.

Lex Fridman

Okay. Yeah, I don’t remember what it is.

#461

Forgive my language, but they call it the Pig Fucker episode.

Lex Fridman

Oh, yeah. Of course. Once you’ve seen the episode, you’ll know which episode it is.

#461

Well, when Netflix adopted it, I got pulled into a room. There were a few VPs and a product designer, and they said, “Hey, we’re about to release our own version of Black Mirror season 3, I think, at that time. We need season 1, episode 1, not to be the first thing people see. So let’s just reverse the season order.”

That required me to gather about 20 engineers to make it happen. That’s the problem with big companies: eventually, every little thing has to become its own team. There’s no such thing as a small feature.

Reversing the order of the dropdown that selects the seasons is a meeting with a bunch of VPs and engineers.

Lex Fridman

That’s really interesting. There’s got to be a way to accelerate that. The natural scaling of a company and the bureaucracy that grows slows that down. Just having seen Elon work a lot, his teams are still able to keep things very fast even as the company grows.

There’s got to be a process for doing that, especially for the Pig Fucker episode. I don’t know where that is on the priority list, but for important things like that, you should be able to do it quickly. I don’t know. Can you speak to how you would do that?

#461

Well, I can first tell you how it was done. Remember, at a place like Netflix, there would be—I think at that point it was called a product called Dexter. I can’t remember. There’s an actual movie metadata warehouse that’s going to be highly integrated with Hollywood, and that’s where that side is able to manage all of it.

I’m like, “Hey, you need the ability to mark things that need to be reversed, because we’re going to run into this a bunch.” We did. We ran into quite a few topical shows that all needed to be reversed.

We needed to be able to reverse episode numbers and season numbers. We needed to be able to hide season or episode numbers. In the case of the Chelsea Handler show, it was a daily show, so you don’t need episode numbers. You just need the latest one. There’s this whole problem that exists.

You need to work on that for your UI over there. Then you need to be able to store that data. Then we need to be able to go to the people who can actually get the video metadata out of that and provide it to our service layer. I need to go talk to them and convince them that they need to give me the new methods and everything to do that.

Then I need to write the methods to get it down. Then I need to go to the UI and make that accessible. Now I need to go to the website people, the mobile people, and the TV people. You can see this thing snowballing.

For us, the big thing that Netflix did so well was that, after I met with these high-level people, I was the captain.

Lex Fridman

I’m the captain now.

#461

So I went to all these teams and said, “Hey, manager, I need an engineer. We need to get this done within the next couple of months because we’ve got Black Mirror coming out.”

She would go, “Okay, here you go.” I’d say, “The MAP team—I need someone to help me get data out of the LMO for this.” She’d say, “All right, you’re working with this engineer.” I’d go to the VMS team and say, “Okay, I need this engineer.” I’d go to the Billboard team and say, “I need this engineer.”

I’d go to all these little places to get all these little pieces of data. Then I was the captain, so I was like, “You’re working on this. You’re doing this. You’re doing this. I’m doing this. Let’s go.”

That worked, and we were able to move pretty fast for a big company. The fact that it required about 20 engineers to do such a simple task—we were able to do it in, gosh, I’d say about 3 weeks’ worth of effort. I thought that was amazing, comparatively, given how many people were involved.

Lex Fridman

Well, because you have the freedom and the agency to do it. You said you were the captain of the ship. That’s really powerful for big companies. It’s a risk, because you can fuck it up. You might not see the bigger context legally, or the bigger context of the impact on the industry, or all the contracts that are in place.

It’s a risk. It’s a risk you have to keep taking. If you fuck up, you fix it and maybe pay the legal cost for that, whatever. But in the long term, that risk pays off because you’re going to keep creating a better and better product, evolving toward where the industry is going, constantly innovating ahead of where the industry is going, and so on.

#461

Yeah. And not only that, I think one thing that is so important is that, yes, the product will get better, but the people that you hire and the people that you keep around are better because they’re the ones who show maturity. They’re the ones who can be given something, rally the troops, and make something happen.

That’s a great group of people to hire. You also naturally select for great engineers who aren’t simply good at coding. They’re good at coding, they’re good at explaining, and they’re good at convincing. You have to create a very lean organization that can move fast.

For great engineers, having to wait for, “Okay, let’s schedule a meeting for next Wednesday with the VPs,” destroys their soul. They either don’t want to contribute anymore, they leave the company, or they tune out, take the golden handcuffs, buy a nice house, and focus on the family.

I feel like I would die under that. Honestly, that is my death sentence: a place where there’s no reason to try and no reason to do anything. I’m just going to go in there, effectively zombie through my day, and call it a life. I don’t want to live like that. I want to feel like I’m trying to do something.

Lex Fridman

I should also mention, on top of that, you’ve brilliantly laid out how incredible the challenge is that Netflix has to solve. On top of that, with YouTube, the moderation thing is that users are able to upload video, and there’s an API where they can upload automatically and change all this kind of stuff automatically.

Every one of those things is an attack vector, as we mentioned. That’s something they have to consider seriously on the engineering side and on the legal side. They can get into trouble in all kinds of ways.

So they have to consider all of that. That’s fascinating. The legal side is obvious, but I would never have initially thought someone would upload images that they’re not allowed to own or have, but I guarantee that happens.

Then you have the whole kid side, right? Think about when you mark something as kid-friendly. How many times have they snuck porn into a Taylor Swift video or whatever it was? That was a few years back. There was that whole Taylor Swift thing, or whatever—I forget what it was. I thought it was Taylor Swift, but there’d be these mock videos that come up, and then boom. That is such an awful problem, and I’m so happy that’s not a problem I have to try to figure out.

So, yes, YouTube, Twitch, and Netflix are doing an incredible job. You eventually chose, the madman that you are, to leave Netflix and start on the new journey of being a wolf pack of one and start streaming. What was that? What was the story of that?

#461

I’ve been streaming for almost 7 years now. It started at Netflix, actually. We did a charity event called Extra Life. Shout-out to Extra Life for starting my streaming career. Effectively, you stream, and whatever money you raise goes to kids with cancer research. They’re a great charity in the sense that they take no overhead and raise their own donations for their website and everything, so it’s a very straightforward charity. I really love what they’ve done.

It was super cool because I live in South Dakota now, but I could actually choose a hospital directly where the money goes. There’s a direct impact from A to B, so it’s a pretty cool organization. My friend Guy Sereno—“Nice Try Guy” is what I like to call him—was probably the single greatest engineer I’ve ever met in my lifetime. He was just like, “Hey, come do this. We’re all going to do this.” So I played Fortnite.

Before I did that, I thought, “I better learn how to stream first. I better get affiliated so I can take subscriptions, and if anyone gives me a subscription, I’ll also pay that forward.” In June 2018 or something like that, I started streaming some Fortnite, ended up getting affiliated, and ended up doing the whole Extra Life thing. I really enjoyed it.

At that point, mind you, I was a Fortnite streamer. I started really enjoying it and kept doing it. Then one day I decided I was going to do some programming because I really love Vim, and I think I’m fast at Vim. Maybe people would think programming was cool, because there really wasn’t a programming section at that point. I did it, and I had about 30 people show up, which felt like incredible numbers at that point.

I was like, “Oh my gosh, there are 30 people watching me program.” It kept going and growing, and I did it year after year. I would do my job, come home, eat dinner with the kiddos, and read them The Lord of the Rings and The Hobbit. During that time, I’d read to them for half an hour. Then I’d set that down, and 3 nights a week I would program until 2:00 in the morning or play video games until 2:00 in the morning, streaming and building up this whole side thing. I did this for a long, long time.

Eventually, it kept working out so well. I started making YouTube videos, and that started getting better. It was a long, long grind until April of last year. I went to the Streamer Awards, and I got to announce the programming category. Pirate Software won. It was awesome; it was a great time.

During that time, he gave me a challenge coin and said, “You just have to go for it. Just go full-time.” I just sat there, and my wife can attest to it. It was an emotional turmoil thing, and it took a lot out of me. It was pretty awful, because Netflix is a very safe option. It was very fun, it was challenging, I liked a lot of the people I worked with, and overall it was a really great thing.

I had a really great boss. I really appreciated him. I still text him every now and then; he’s a really great guy. So it was like I was leaving all these things for something that was unsure. The reality is that with streaming and all these things, people love you one day, and they could hate you the next day. There’s all this stuff that goes into being on the public side.

I had Netflix as the backing, so if the public hated me the next day, I’d be like, “Deuces, I’m out.” I don’t care. Now I’m going to do this as a job, and so there was a huge emotional turmoil to this whole thing. Eventually, I just said, “Okay, I’m going to make this.”

It resonated with me when I first made the decision to join Netflix. I’m getting older, and there aren’t a lot of chances to do something unusual like that. Those chances go down constantly as you get older. This might be the last crazy thing I get to do. Let’s just try it.

So in April, I went full-time, and I guess I haven’t looked back. I’m not even a year into doing this as a full-time gig, and it’s been a lot of fun. The biggest thing is just being able to really explore and do these things on stream, where people really enjoy watching and engaging. It’s been a great, hard, fun, amazing, difficult experience.

Lex Fridman

I mean, it’s a really inspiring leap. It’s a really hard one to take for many reasons, like you outlined, but also because of the loneliness of it. I think it’s a pretty lonely pursuit. It’s just you and the camera and the audience and the ups and downs of that. There’s not really a team.

#461

I do have one lucky thing. My editor, Flip—shout-out, Flip. He said it would mean the world to him if I said, “Shout-out, Flip,” but I love you, Flip. I love you.

He had nothing going for him. He had a really hard upbringing. A lot of rough life decisions have gone into his life, and he’s kind of crawling back out of it. He just said, “Hey, I will edit full-time for you.” So I said, “All right, 50/50. Whatever I make on YouTube, you get. We’re going to do this together.”

We did that for years, making pretty much $0 a month. That was an incredible jump. Now we get to work together, so I do get that one team aspect that I think is really nice.

But it’s not like it was at Netflix, where I could hear about the stuff people are building. I don’t have a team. I don’t have product or cycles. I don’t have a manager that I have to try to make happy. It’s very lonely, and I don’t think a lot of people realize how lonely it actually can be.

Lex Fridman

Yeah. So combine that loneliness with, in my case, I don’t know how many people attack you. I have a shockingly low attack rate, I feel like.

#461

Yeah. Your people generally—I mean, sometimes it’s fun, sort of teasing that kind of thing, but it’s mostly just really—I mean, you give so much love to the world and inspire so many people, even when you’re making fun of stuff.

Lex Fridman

Yeah, but with me, taking the loneliness of it and combining it with really intense attacks, it’s tough. It can be rough psychologically, really a tough journey. You miss working with a team, even from a software engineering side, where you can share code or talk over code, or, yeah, the collaborative aspect of it?

ThePrimeagen

Yeah. Multiple things there. First, hey, we love you, Lex, so don’t let the things get you down.

Lex Fridman

Thank you. I love you, too. Thank you. Hey, a little bonding moment you’re going on.

ThePrimeagen

But you know what? One thing I really miss—not in a sexual way, just to be clear—is the team.

Lex Fridman

The tension is a little tense. I’m getting uncomfortable.

ThePrimeagen

Yeah. Anyway, team—it’s just the one thing I really miss, even when I hated how people did it: seeing how other people solved things. It’s really amazing, just the raw creative power so many people have, and being like, “Wow, I would have never done it this way. Crazy. This is awesome.”

You internally process this, and you’re like, “I now have a new little tool in my tool belt.” At some point, it’s really hard to find a mentor when you’re young and just starting out programming. Anyone with a couple years of experience will be not just a little bit better than you, but infinitely better than you. It feels crazy how much better people are. So you have to get mentors and learn from people.

As you get better, that amount of availability gets really small. It’s something I really do miss: the forced, hard problem-solving together.

Lex Fridman

I think there’s also a skill to mining the wisdom from other people. I generally try to approach even junior people, young folks—mentally, at least, for me, it works as a hack to assume they’re the smartest person in the world, way smarter than me. I take every single word they say as potential wisdom, and that helps me mine for potential wisdom there.

Because it’s so easy as you get older to judge, to be like, “Oh yeah, okay, okay. I’ve been through that. I remember feeling like that. I remember thinking that. That’s incorrect.” Whatever. But just assume that you don’t know what the fuck you’re doing and the other person is this sage. From that kind of interaction, I think you can actually learn a lot. My favorite interactions are when we both think that way.

ThePrimeagen

That, from there, I think, is a catalyst for a great collaboration and interaction. It also makes everything much nicer. It really stinks to work with someone who’s combative and negative.

I don’t mind combativeness if it’s, “I’m trying to figure out what’s best to do right now,” versus combativeness just because you’re a negative person and things have to be one particular way. If they’re not that one particular way, it’s the end of the world, and that’s actually really hard for me to work with.

Lex Fridman

What’s the origin story of the Prime name?

#461

The origin story of the Prime name was—are you familiar with a video game called Turok? Nintendo 64. Turok had Turok 1 and then Turok 2. Turok 2 was a brutally hard game.

This was back when first-person shooters would only give you a certain amount of health, and you had to go discover health and get that health. You had to beat the whole game without effectively dying. That’s an old game. That’s like the first version right there: Turok 1, then Turok 2.

Yeah, there you go. So, in 1998, there you can see it right there. The difficulty was very, very, very high. When I got it, it came in a black cartridge, not like your standard gray Nintendo 64 cartridge. It was a black cartridge. It was a badass game.

I got it, put it in, and played and played every day for about 10 hours a day for a month straight. I beat it, and it was such an incredible, great experience. The final boss of Turok 2 is called the Primagen.

When you’re a kid in fifth grade, that’s a super-cool name. It’s like being named after the bad guy. For a long time, on any internet thing, like Graal Online, which I mentioned earlier, I was ThePrime.

I became an adult eventually, and it was just like, “Okay, I’m an adult. My name is Michael Paulson.” That’s what I was on the internet for a long time. I remember how bad the tech world had become around 2017 or 2018. It was just this super-pretentious place, with tons of dick-measuring. Everything was the worst.

Ken Wheeler got canceled over playing the circle game. It’s so hard to describe to people who weren’t there, but it was just the worst place to be. Tech was extremely unfun and extremely awful.

Everything was just so awful. It wasn’t academic because it was research. It was like, “We’re building the most sophisticated things, and this is for the smart people. Everyone else is the dumb people. Don’t worry, we’ll design for you, dummy. We’ll show you how to make the perfect architecture.”

I remember changing my Twitter handle because I got so upset. I went back to my video game name because I was like, “I want things to be fun. I want this to stop.” When I started streaming tech, my goal became to destroy whatever that tech mentality was.

It includes nobody. Everyone thinks that they’re the smart people, and they design for the dummies. It’s like, no. I want tech to be a place where people feel like they can be creative and excited and actually build something.

If you’re new, it’s okay to be dumb and ask dumb questions. Learn from your dumbness. No one’s expecting you to be smart. Pick whatever you want, actually do something, and have fun building your crazy ideas.

“Oh, you’re going to reinvent the wheel.” Reinvent the wheel. Understand what you’re doing. Learn it really well and interact. It’s just so different from what was out there.

Arnold Schwarzenegger talks about this thing where, when he first started acting, his name was the thing that people hated. He once said, “You have a strange voice, you have a strange body, and your name—your name’s unpronounceable. No one’s going to pronounce it. No one’s going to remember that.”

And he said, “But now the name is the strong part.” For me, I’ve always felt akin to that. My name’s not nearly as cool, nor am I as popular as Arnold, nor am I as tough or good-looking or successful.

Nonetheless, the name represented this counterculture movement within myself, in which I hated what was there and wanted to defeat it. This has been the thing. Now people remember me so well because of how weird my name is.

For whatever reason, it became its own thing. Now I would never change it. Back then, I would never change it because it was my rage-against-the-machine moment, if you will.

Lex Fridman

Yeah, I love that as a symbol of rage against the machine, and the rage being fun.

ThePrimeagen

I just want people to be creative and have fun again. It’s okay.

Lex Fridman

What about the mustache? It’s an epic mustache. It has a life of its own. Is there an origin story, or did you guys discover each other at some point? Did it emerge from the darkness of the struggle that is your life? Where does it come from?

#461

The original mustache was from No Shave November, back before it became Movember. It was No Shave November back in the day. After No Shave November, you had all this hair, and what’s the natural thing you’ve got to do? You’ve got to sport a mustache for a day, right?

Whenever I’d forget to shave for a long time and let it start growing out really big, I’d just go, “Oh, this is kind of funny. I’ll have a mustache.” One day when I was streaming, I just didn’t shave, and then I started letting it go. I got kind of a beard, and then I just had a mustache.

When I did it, people were just like, “Hey, it’s mustache time.” I was like, “Heck, it feels like it’s a lifestyle decision, right? This is the fun times.” All of a sudden, it was exciting to have a mustache.

I shaved it off and was like, “Oh, okay.” But part of me was thinking there’s this weird energy that comes from just having a mustache. I was like, “I’m going back.” I told my wife, “Forgive me.” She was very much not thrilled about my decision to have a mustache long-term, but I decided to have it back.

It just felt like it was the right thing. The mustache has always been part of the energy that I had. It was always there; it just never was visible until later on, it feels like.

Lex Fridman

Yeah. We were chatting offline about how one of the components of a successful relationship is sacrifice, and your wife was willing to make the sacrifice of allowing you to have a mustache. I clearly was not willing to sacrifice not having one.

You do this incredible thing where you try a bunch of different programming languages when you stream. You go all out on certain programming languages, like Rust and then Go, and then try to pick a new one, but you’re also experimenting constantly.

Maybe one question I could ask is about learning. What’s your approach to learning a new programming language, and what’s your advice on learning a new programming language when you begin that journey?

#461

I’ve tried a lot of different ways to go through this learning process. Something that’s obviously successful is to just start building something. Put your hands on the keyboard, especially if you already know how to program.

You’re like, “Okay, I’m now using Zig. How do I do a main function so I can just run the program? Okay, I now know how to build. How do I do an if statement? What does it look like? How do I declare my own functions? How do I do modules?”

You just Google your way through it to get to the end product and build something. It’s a great way to do things because I find that repetition—rote learning—is obviously the best way to do this. You have to go over it a bunch, and you can definitely get out and build a lot of stuff with that.

I like that initial getting-used-to-things process, but on top of it, I find that by doing that, you also fall into traps. You Google and try to solve a problem in the language based on all of your previous experience.

You don’t have what makes that language special. You have what all the other languages make special. You end up not really being able to use it very effectively, but you can certainly learn it and get good at it.

The second approach I’ve been doing lately, inspired by the creator of Ghostty, Mitchell Hashimoto, is to start by reading the language reference—the whole thing. Lately, I’ve been going through and reading the entire manual for these languages.

With Zig, I’m almost done with that one. It’s like 8 to 10 hours of just sitting down and reading. I’ll take out my computer and practice a couple of the things from the actual documentation.

That way, I can learn all the things. Then, when I start building again, I remember, “Okay, I know there’s a thing over here. Let me go reread about it,” because now I have it indexed somewhere in my brain that I’ll kind of remember.

I don’t think there’s a right or wrong way. At the end of the day, the right way is always that you have to build something eventually. You cannot just read about it. You have to put your hands on the keyboard.

#461

You have to build something out. And then, once you do that, that's where you really discover what makes it painful or what makes it great. If you don't have the breadth of what the language offers, you may make it painful simply by being bad at it.

Lex Fridman

What exactly are you reading? The language reference?

#461

The language reference. It goes through every feature from top to bottom, every way it's described, all the different things. I think Zig is a decent size, but it's not just about reading the words. You want to internalize each concept as well, so it takes a long time. I'm a slow reader.

Lex Fridman

So you're building, in AI terms, a background model? I don't think you can just start building once you're done reading, because you probably forgot. You know how to do a for loop, but you kind of forget the specifics. You're building up the design choices, the set of features available, the strengths and weaknesses, all that kind of stuff, and then you start building. That's really interesting. It's probably not the thing you would recommend to a junior developer, somebody who's just starting out.

#461

If you don't know what an if statement is, that's not a good way to learn. To me, the best way to learn that is hands-on, at the keyboard, building extremely simple things and slowly growing in complexity. Understanding what a class, methods, and instances are versus the blueprint, which is the class, versus functions, modules, and all that stuff—it just takes time to learn. That's a completely different style of learning.

Lex Fridman

I wonder, because for me, learning right now, AI is a huge help, but I already have a lot of experience. I wonder if you're starting from scratch whether that's a good idea, but I still think it's probably a really good idea. Basically, generate some code using AI and figure out what it's doing by playing with different parts. Maybe you can comment on that aspect—the use of AI as part of the learning process?

#461

This is where I have both the hopeful and the doomer take at the exact same time. It's the same thing with Google or Stack Overflow. It's all the same kind of take, which is that it's just making things more democratized in some sense. I get to ask questions in probably the most personal possible way, with my own voice and my own words, and it's able to produce answers and hopefully help guide me, regardless of its errors and incorrectness. Ultimately, using it as a learning tool and being able to formulate and read answers in your own voice, I think is super powerful, and I think it's super amazing.

But the part that I think is going to be really difficult is that we don't value remembering things anymore as a society. Since the internet came about, it's, “I can just look that up. I can just look that up.” No need to memorize your times tables, right? You can just use your calculator. You can just do all that. I remember I was sitting on an airplane and watched someone do the world's most simple addition and subtraction 10 times on their phone. I'm like, why are you not just—you should already know these? You should be able to do these things.

I realized that we kind of offload our brains, right? “I don't need to know these things because I can look them up.” That's not a bad answer in some sense. I can understand that. I don't need to remember every last thing. But then it also makes me realize that you kind of develop this learned helplessness. A new error comes up: “I'll just ask the AI.” AI says, “Oh, okay, I've got to fix this line.” I fix the line. You didn't actually learn anything. You just used it as a quick means to get something out and move on.

And so you sacrifice knowledge for speed, which is a great thing in some cases. We have to make those trade-offs all the time in engineering. Sometimes you have to move fast at the sacrifice of knowledge, and I'm totally on board for that. But I worry that what we'll create is an entire generation of incompetent programmers who can do some amount of things well, but anything that is unique, bespoke, or requires some extra little elbow grease might become very difficult. It might cause a whole chasm where juniors remain juniors forever, and I don't want to see that.

I want to see people grow. I want to see people actually be able to take this as a craftsmanship thing. That's both my hope and my worry: AI can do both, really. If you could ask whatever question you want and you don't have to rely on, say, a book to give you that exact answer—and if the book just said it wrong and you can't understand, it's just, “Sorry, you don't get to learn what this is”—like recursion, for me, I spent way too much time until someone gave me the right problem to understand recursion.

You could imagine AI could have solved that for me way faster, because it could have given me the right problem and walked me through it much better. But what if I just always have recursion solved by it and don't learn it myself? If I ask AI to generate code to do a certain thing, a large percentage of the time, most of what AI generates is going to be correct for me. But some percentage of the time, it's not—fundamentally not.

For me to recognize the difference between those two, I think it takes a lot of experience. To learn that skill of knowing, “No, no, no, a different, new, out-of-the-box solution is needed here than the one you're providing. You're missing the point”—that's a skill. How do you learn that? You learn it by building from scratch. So both are probably really necessary.

Lex Fridman

But I think as a first step of learning how to program, it's pretty nice to generate a function, generate for loops, and all that kind of stuff, and then just fuck with the different lines—modify them to try to adjust the behavior of the program. From the way the behavior of the program adjusts or bugs are created, you learn about the syntax of the language, the behavior of the language, all that kind of stuff. I think it's a super powerful way to learn, but, yeah, you also need to write from scratch.

#461

Yeah, at some point you have to take off the training wheels. I think what you're really spotting is the difference between reading and writing code. I can read a lot of languages very well. I can see what's happening; I can understand it, but I would not be very good at writing them.

I can understand a lot of things about C++, and I can read it, but I'm just not that good at it because I haven't done it in so long. I can't remember all the semicolons and colons. You do public and private, and how should you do naming conventions? All those things kind of add together, and then you're just like, “Oh, I'm really bad at writing it,” though I can read it. There's a skill-gap chasm that exists between those two.

Lex Fridman

All right. Let me talk about the various languages. The cheesy, ridiculous question of “What's the best programming language?” Let's say, what's the best programming language that everybody should learn? Maybe let's go with the top 5. I'm going to pull up the Stack Overflow Developer Survey, because I think we have—

#461

You don't like them?

Lex Fridman

No. No, those aren't. You've got to remember, because I mean, you're a data guy, right? You know about biases in data. What does Stack Overflow naturally bias toward?

#461

Well, they have different slices of professional developers, junior developers—they have different slices.

Lex Fridman

Okay, what's the bias?

#461

I hear you, but who fills out a Stack Overflow survey? Someone who participates on Stack Overflow. Who's participating on Stack Overflow? Largely very, very new people, and that one guy who loves answering questions. So I'm not sure Stack Overflow is a great place to get data. It could be a very biased set of data.

Lex Fridman

Is it really only new people? I mean, that's who's using Stack Overflow.

#461

All right.

Lex Fridman

Most popular technologies on this: JavaScript, HTML, Python, SQL.

#461

SQL.

Lex Fridman

SQL is one of the more general categories. I'm sure they're not doing the individual flavors of SQL. By the way, do you pronounce it “SQL” or “sequel”?

#461

It's “SQL.”

Lex Fridman

“SQL?”

#461

“SQL.” I think that's the correct way.

Lex Fridman

“SQL.” I said “sequel” because I didn't know the audience. I don't know if they can handle the truth.

#461

Okay, which is it?

Lex Fridman

SQL.

#461

The SQL of choice is SQL: SQLite, MySQL, PostgreSQL.

Lex Fridman

By the way, I had a lot of joy from earlier saying “pig fucker” for some reason.

#461

Speaking of such, I mean, can you believe that? That was a real conversation that I had.

Lex Fridman

TypeScript, Bash, Java, C#, C++. It largely aligns with the world you'd expect, but, like, Assembly—why is Assembly more popular than Ruby?

#461

Who is writing just Assembly by hand? No one writes Assembly by hand other than maybe that one guy who's developing TLS 1.3 and hand-rolling a cryptography algorithm to be the fastest possible algorithm, right?

Lex Fridman

Yeah, Assembly is a weird one. Maybe people write it in school, but even in school now, for an operating systems course or something like that, or systems engineering, I don't know if they write Assembly anymore.

#461

They—I don't think so.

Lex Fridman

Yeah. Anyway, Swift and Ruby being less popular than Assembly seems ridiculous. But nonetheless, you get my ideas behind that. As far as the top 5 languages go, that's probably too broad because you could just name so many. I think you should probably archetype it by what you want to do.

#461

So if you want to get into game development, perhaps C or C++ could be good choices, or JavaScript and doing canvas games. I could see that also working, but you're limited by using JavaScript, obviously, because you can't do as much—the language just isn't fast enough to do as much. It's a good thing to remember.

If you're going to be doing backend stuff, if you want a job, if you're looking for a job, maybe C#, Java, JavaScript, or Go would be great choices. If you're looking to do embedded, you probably want to do C.

Lex Fridman

Mhm.

#461

C++ would probably be a good choice. You have to first determine what you really want to get out of it. If you're just curious about programming, I talk to a lot of people who consider jobs, but basically their question is, “What's the first language I should learn, and what are the several languages I should explore?”

Can I say something that's going to make a lot of people angry?

Lex Fridman

Yeah, sure.

#461

I think the first language people should learn, if they have no idea about anything, is JavaScript.

Lex Fridman

Why would that make people angry?

#461

Because people just—first off, I'm not supposed to say anything nice about JavaScript.

Lex Fridman

Yeah, usually that's the meme: that you hate JavaScript, right?

#461

Yeah. No, JavaScript's a beautiful language, and it has a lot of things that are great about it. One of them is that you can express anything with very little effort.

For someone who's new, I think it's really great to be able to draw a box and move a box. You get to see it visually. I think that's one thing that's really great about JavaScript: you can do that.

Then you can go, “Okay, I want to learn about the backend. I'm going to make a request now.” You can write a quick backend, and now you're starting to get familiar with programming a little bit. You can save something to a database, bring it down, put it on a screen, animate it all around, and even put it on a canvas and render it in 2D or 3D. There's so much variety in what you can do with JavaScript.

It's a great way to get introduced to programming, but then at some point you have to say, “Okay, I now need to learn more about this whole thing.”

Lex Fridman

I mean, yeah, just like you said, you can make games, and you can do frontend and backend for web development. You can even do embedded.

#461

They actually have—Wes Bos is building his Roomba or something and programming it with JavaScript and React, which is just the world's worst language to choose for embedded, but you can still do it.

Lex Fridman

Also, in terms of applications, anything that relates to data or machine learning, Python is the leader there.

#461

Yeah, that's a great one. Python, CUDA, and C++ would be a dynamite combination because a lot of these Python libraries, I assume, are just smuggling in C++ underneath the hood, or C.

Lex Fridman

Okay, so JavaScript. I'll say Python. Python's a great one, too. You can get quite far with it, but you can't write the frontend. What if you love the frontend? What happens if you really just want to design things and you didn't know that?

#461

Well, it's okay. For that, JavaScript is a good choice, but you can't do the machine learning stuff in JavaScript nearly as easily.

Lex Fridman

Do we count HTML and CSS as programming languages?

#461

I think there's some technical definition where, if you use a certain amalgamation of CSS and HTML, it can actually be a Turing-complete language.

Lex Fridman

Yeah, but for practical purposes, no. HTML is not a language.

#461

For me, listen, yes, Turing completeness is a good one, but for those who don't want to be as academic, if I can't write a function, an if statement, or a loop, I don't feel like that's a programming language.

Although modern HTML has a lot of features. It's crazy how much it has, but it's more of a specification than anything else. I specify it to be a pop-up. I specify it to have this kind of accessibility and this kind of look. Under these conditions, look like this, transform like this, and move down here.

Lex Fridman

I kind of like these popular programming languages on this list. I like JavaScript. You like Bash?

#461

Well, yeah, I like Bash a lot.

Lex Fridman

Why? Bash is kind of one of those where it's like, do you really like it? Do you really like it?

#461

I like it up until I need an array.

Lex Fridman

Oh. As a programming language, no, but I like the command line.

#461

Okay, that's what I like about it.

Lex Fridman

No, nobody likes Bash.

#461

Someone is so offended right now.

Lex Fridman

Do you use it a lot?

#461

Yes. It's good to learn. It's good to be comfortable on the command line because it's a bit of a superpower.

Lex Fridman

I think I follow FFmpeg on Twitter. Great account. There are certain Twitter accounts that are just legit.

FFmpeg has all these parameters that you can add on the command line. It's one of those cryptic languages that only a few wizards understand. Once you begin to slowly understand it—and I'm only at the very beginning stage of that journey to mastery—the powers you gain at every step grow exponentially.

FFmpeg is this incredible library system. The people behind it must be brilliant masterminds because they have to work with all these codecs, all these containers, and all the mysteries of the media-codec universe. They're masters of it, and they understand compression, which is another super-fascinating set of technical problems.

FFmpeg fills me with joy that it exists, but you need that Bash-type comfort, that command-line comfort, to work with it and really unlock its power.

#461

Yeah, I think FFmpeg is probably one of the most consequential libraries of our day, and the Twitter account is so unhinged. It's the most amazing thing to see because I think FFmpeg does not get the love it deserves.

Lex Fridman

Yeah. Every single application—OBS probably has FFmpeg underneath the hood. All the professional stuff, everything has FFmpeg underneath the hood, and yet they do not get the love they deserve.

#461

I just love it. I just think they're the best.

Lex Fridman

I would say JavaScript, HTML, CSS, Python, and SQL.

#461

I mean, SQL—“sequel”—is a programming language.

Lex Fridman

Yeah, SQL is an incredibly sophisticated programming language.

#461

SQL is interesting. I believe you can classify it as a programming language. It has CASE statements, and it's pretty crazy what you can do with it. You can do functions, you can do all that, and you can do stored procedures. That's how you make your life hell.

I will say that all the top languages right there are not strict, statically typed languages. Even TypeScript—you know, I don't like `any`. For people who are learning, doing something that's much more strict would be great: something like Go or Rust, or even C++. Anything that changes your perspective on types is really helpful to go through.

They're not getting nearly as much love on this most-popular-language list, but I think they're fantastic.

Lex Fridman

All right. If I put a gun to your head: the top 5 languages. Let's list them out. There's a bright-eyed 20-year-old asking you what the top 5 languages to learn are.

#461

If I were to pick 5 languages that I think people should learn—or at least, let's restate it this way: I'm going to say a couple of languages, and you should at least explore some of them.

I think you should explore a loosey-goosey language, like Python or JavaScript, where there is truly only one type, which is a boxed value with multivariant types underneath the hood.

Lex Fridman

A loosey-goosey language, right?

#461

It's a dynamic language.

Lex Fridman

Okay.

#461

I think it's really good to explore one of those two. I'd put Python or JavaScript right there. Even Lua—throw Lua into the bunch.

I think you should explore a strict language. I'd do something like Rust or Go. I think those are both really great. You can do C++, too. You can do some type erasure in C++, and you can do it with Go as well, but for the most part, C++ is a great language to do that in.

It can get a little wild. New C++ seems great. Everyone keeps telling me new C++ is great.

Lex Fridman

Mhm.

#461

It has every feature you've ever wanted and all the features you don't want.

Lex Fridman

Yeah, exactly.

#461

There are smart pointers, dumb pointers, and all kinds of pointers. There are no memory leaks; it's not an issue. There are footguns and segfaults—there's everything in there. Unless you like memory leaks, it has those, too, if you want that kind of thing.

Lex Fridman

Okay, how about this one? Languages that I actually want to really learn, or that at least sit in my curiosity bank. There are 3 languages: Swift, Elixir, and OCaml. Then I'm going to throw Odin in there, just because Ginger Bill is great.

I don't have a strong functional language under my belt. That's something I genuinely lack.

#461

Yeah, I've heard incredible things about Elixir, Odin, and OCaml.

Lex Fridman

Obviously, I'm a person who, as you know, loves Lisp. I've never done Lisp. Lisp could be in that category, too. Clojure is what everyone tells you to use at this point.

#461

In the case of Lisp, I don't want to speak negatively about Lisp, but it's important to think about the modern community and what the community looks like. It seems like there's an excited, maybe small but excited, community around Elixir, Odin, and OCaml.

That helps. You can post something on Twitter like, “I accomplished this,” and people get excited. It's nice.

Lex Fridman

It's a good feeling. You can post something on Twitter and get 1,000 likes if you do something cool in Elixir.

#461

Yeah. Which is a pretty big amount of people to like a post for such a niche topic. Programming is already a pretty small topic. Then you get into functional programming. That's a small topic in a small topic. I don't get that much. If I post something about Emacs, I'll get crickets. If I proudly use Neovim, there'd be a lot of people like, “Yeah, good job,” because it is the best editor.

Yeah, maybe it's just hype. Come back to the Civil War, Lex.

Lex Fridman

Yeah, sometimes you have to sacrifice and go from the superior editor that is Emacs and choose Neovim just to be popular. You sacrifice integrity, values, and quality for just popularity. So, choice you made. I love how you put it.

ThePrimeagen

Okay. Anyway, what were we talking about?

Lex Fridman

I like how you're doing this in bunches. That's great.

#461

Right now, the side honeys that I'm exploring aren't my mainstay. Go is kind of my favorite one to build a web app in. If I'm going to build some sort of backend with a lot of complicated logic, Go is just so convenient, but I get really frustrated with its ability to express everything that I need. If you have a list—a heterogeneous list, a list that contains 2 types—Go's just really not that fun to use.

One of the ones I'm exploring is Jai, or J, as Jonathan Blow says, and Zig. Both of them have a lot of power to them. They're both very interesting. They definitely have footguns in them. They don't take it easy on you. Zig seems like it's a really amazing language, and so does Jai. They're both very cool.

Lex Fridman

Yeah, actually, I saw Dave Plummer's testing of close to 100 languages for speed, and Zig came out on top.

#461

Yeah, that was a mistake. I mean, when I say “mistake,” I have nothing against Dave Plummer. He's an extremely talented engineer. It's just that Zig, C, C++, and all those languages that were being tested are all LLVM backends, right? That's the thing that actually turns the code into the executable. If there's a variation in speed, it just means that in one language you didn't quite express what you were supposed to correctly.

There's the language benchmark that's been bouncing around on Twitter. Zig was like 6th or 7th, below—I forget what languages. I played around with the example and added the word noalias to the argument, which means that the piece of memory coming into this function has no other pointers pointing to it, so the compiler can make these really cool optimizations. I made it faster than the C version. It just means that it's not correctly specified. That's all that means.

Lex Fridman

But it's still exciting to me. The competition between Zig, Rust, and C++ is really interesting: part of it is speed, and part of it is how easy it is to write performant code.

#461

I will say something. The reason why I think Zig is so interesting comparatively to, say, C or Rust is that C is the ultimate language. It can do anything. You have preprocessor macros, and you can do quite a bit with it. But it's also really difficult, and it's also really simple, and you can learn it. So it's kind of its own unique beast. When you get really good at C, C is a magical language, and people are really great at it. People speak very highly of it.

Rust is this ultra-safe language. What you can do in C, you just can't even express in Rust. Rust is going to be that safe man that holds you at night, keeping you warm, right? It's going to be just the greatest. But somewhere in the middle lies Zig. Zig has optionals. If you're not familiar with optionals, that simply means there's a value here or there's not, but you first have to check that before you can use it. So it prevents that whole null-pointer-dereferencing segfault problem.

That's not available in C just by default. You have to kind of build that thing in. It is the only option in Rust. But Zig says, “Hey, if you have a pointer, you can't express it as null unless you mark it as something that can be null.” There are ways around it. There are other types of pointers and things like that that can do that, but for the most part, Zig will give you safety for the most part, right? So it's a little bit of safety, but more like C. It kind of gives you everything you want in that region, where you can express safe code and unsafe code.

It's very easy to write. It's very pretty, or at least the idea behind it is very pretty. The language itself is bland, but wow, there's beauty in everything.

Lex Fridman

Prime, you've programmed in Rust a lot. What do you love about Rust? What are the strengths? What are the weaknesses? Maybe you can speak about the memory management that you already mentioned—the challenge of memory management that several of these languages address. What do you love about Rust?

#461

What I love about Rust? I love that the ability to free the memory that you're using is directly tied to the stack. Whenever you create something, there's a stack variable, or there's some amount of stack memory, whether it's a pointer off to the heap, or a pointer and a length. So there's some amount of memory on the stack and then some memory on the heap, because a string is not all on the stack. It's some on the heap, some on the stack.

When that stack variable goes out of scope and gets cleaned up, it also cleans up what's on the heap. So it kind of simplifies this whole idea of, “Whoops, I forgot to free my memory.” It just does it for you. So it's not a garbage collector, which will do it sometime later. It's not like C, where you have to call it yourself. It's somewhere in between.

There are a lot of strategies people use—arenas and all that—that make that C part much easier. I'm just not even mentioning it, but it just makes it a lot easier. But Rust does that really beautifully, and it's just a really cool idea. I really like that.

The second thing that I think Rust does really well is that the mutability of something has to be specified. You don't just create a variable and then mutate it. You have to say, “This is not only a variable; it's a mutable variable.” I think that just makes code really readable and understandable, because anything that does not have the word mut next to it, you know for a fact it cannot change. There are some rules around that, but you get the general idea.

Unlike most programming languages, you have to explicitly state that this is going to be changed.

Lex Fridman

Yeah. That's really interesting. I mean, it's safe. It's trying to be, and this safety might create limitations. Let us consult the AI overlords.

“Rust is a blazing-fast, memory-efficient systems programming language that emphasizes performance, type safety, and concurrency. The language enforces memory safety without using a garbage collector, as you said, instead utilizing the unique borrow checker that tracks object lifetimes at compile time. This prevents common programming errors like null-pointer dereferencing and memory leaks,” and so on.

You've also spoken about metaprogramming. Which of these languages do you like for metaprogramming?

ThePrimeagen

I love metaprogramming in C++, but it's a giant mess, at least when I program in the C++17 standard. It's just a mess, especially a mess to debug.

I would consider myself kind of a metaprogramming newbie. I've only solved some amount of problems with it. That's kind of what this year is for: for me to really see where the ends can go in that. So I don't have a strong opinion on this one.

One thing I really like about Zig is that the metaprogramming is also the language itself. You don't have an alternative. With Rust, there's an alternative: when you create a macro, you have to use the macro syntax. With Zig, it's just the thing. You just program it. You add the word comptime if you want it to be compile-time only.

You can create a list of prime numbers at compile time in Zig, which is kind of an interesting, unique thing. You have code that executes at compile time, and then you can take advantage of the result of it at runtime. So neat, right? That's how I'd look at it. But again, I haven't used it to the point where I feel like I can speak super authoritatively about it.

Lex Fridman

What language are you going for this year?

#461

I'm going to keep Go as my mainstay. My 2 side honeys, I'm going to explore and try to build out a service in them that can do a bunch of talking to, say, ChatGPT and ElevenLabs, send stuff down to the client, and work with WebSockets. I want to make sure that I see how they perform in this realm.

I may be using the language incorrectly. With Jai, I'm not exactly sure; it's not really been designed for the web world. I just got done writing the ability to read Twitch chat, and it required me to do Berkeley sockets.

If you're unfamiliar with Berkeley sockets, it's like the old way of doing it. It's how you do it in C, so you have to go through the whole nine yards of creating your own connection. I had to create my own connection. I had to read from the socket, then parse out all the IRC. You have to build it from scratch.

There's not a new TCP connection to this server. You have to be like, “I'm creating a socket. You're going to be of the IPv4 family and TCP, and you're going to do—I'm now going to have to take your address, look up your address with DNS, get that address back, and then connect it with TCP.”

#461

So, it's a lot more manual still. It's a lot more raw in that area, but it's fun.

Lex Fridman

What are some epic projects you've built on stream that jump to memory?

#461

My favorite project—

Lex Fridman

Sorry for interrupting you. Sorry, I'm getting really jazzed right now. Let's go.

#461

Okay. So, jazzed. Jazz hands. My favorite project was the one I did last year. Someone built a Doom ASCII port, so you could play Doom with ASCII. That means you could play it in your terminal. Very fun, very exciting.

Then I took that Doom ASCII and sent it to the browser so people could play Doom ASCII in the browser. But then I made it so Twitch chat could control that instance of Doom ASCII by piping in Twitch chat, taking the average of the movements over a certain amount of time, and replaying it as if it were a controller. I had Twitch chat beat level 1 by spamming it.

The fun part was that I used a bunch of encoding techniques. I used quadtrees to take smaller amounts of data and run-length encoding. I tried to create my own compression algorithm, because if you're sending out a bunch of ASCII, it's still pretty expensive. You have to represent color, and color is not cheap on top of that. You have to represent what it looks like. What does the ASCII look like?

I realized there are all these fun techniques you can use for compression. The shape of the ASCII you send down in a lot of these engines is actually just proportional to the luminosity of that pixel. You'd use an 8 or a pound sign to represent white, but for black, you're going to want to use a period, a comma, or a bar—something smaller.

I developed all these different compression algorithms to turn a bunch of data—which could take, I forget how much, gigabytes upon gigabytes—to send out to thousands of people, all seeing the same image at the same time and interacting with Doom at the same time. I turned it from gigabytes into kilobytes by trying to figure out how to make it as small as possible and send it all out. It was super fun. I absolutely had a great time.

Lex Fridman

So, you're actually sending it to all the people in chat. Where's that pipe, that pipeline, where chat is able to control the Doom thing?

#461

Twitch chat. They would press W, and if the majority of people during that time period said W, it would hold down W for 150 milliseconds.

Lex Fridman

Nice. How are they getting the input of where you are on screen?

#461

Originally, I was going to send that through Twitch, but Twitch is about 5 seconds behind. That's why I piped it out to a website. Everybody could see it from my computer on the website, and the typical lag was right around 70 milliseconds.

Lex Fridman

Mhm.

#461

They could mostly see what was happening in that short period of time. It was pretty exciting. I had somewhere between 1,000 and 1,400 people smashing W, pressing F to fire, and turning. We killed some zombies. We blew up the barrel at the very end of level 1 to kill the imp.

Lex Fridman

How are you getting the Ws from the Twitch chat? Is there an API?

#461

IRC. I was using IRC—a little TCP socket—and then you just parse out IRC.

Lex Fridman

Okay. And there's very little lag there.

#461

Yeah, I think it's a couple hundred milliseconds, though. It's enough that it actually made it a little bit difficult, because people would often overturn, then go forward and miss the door, and then they had to go back.

Lex Fridman

That's awesome.

#461

It was awesome. That was my favorite project of all time, just because I never got to do a lot of encoding. Encoding is kind of like, what do you normally do? “Okay, I need to send something down. I don't know, gzip it. The server will just do it. The server just does the right thing. I don't need to think about it.” Instead, it's like, “I think about it. I'm going to send the right thing.”

Lex Fridman

Yeah, you have to think about the compression.

#461

Yeah, and there you go.

Lex Fridman

That's some more love towards FFmpeg. They have to think about that a lot.

#461

Ultimately, it was inspired by FFmpeg and its awesomeness.

Lex Fridman

Can you speak to the chat community in general? A big part of what you do in terms of streaming is the humans that are communicating with you live. Can you talk about the different chat communities? First of all, which is the best chat community: YouTube, Twitch, or X?

#461

This is where I feel bad for YouTube, because I do think it's technically the worst, but it's not YouTube's fault. Let me explain why.

Lex Fridman

And then I will explain why you're wrong, but go ahead.

#461

I know you love YouTube, but let me explain why. When you go on Twitch, you go to anyone's channel, and they have this cultural human-centipede thing happening where all the memes flow through all of Twitch, and Twitch kind of reacts and morphs to all those memes. Every channel you go to has the same culture. There are a lot of similar emotes and everything, so it's very tight-knit.

When I stream, I get all the same jokes that you would see if you watched Sodapoppin, Asmongold, or Pirate Software, or whoever is streaming. All the same memes would flow through the exact same kind of pipe. It's a very holistic kind of community, so every time you're making jokes, you're making jokes that are in the ether.

Twitter kind of has that, too. Tech Twitter has a set of jokes, so you can kind of see it. The problem with Twitter chat is that there's just nobody there right now. Typically, just to put it into perspective, I have somewhere between 1,500 and 3,000 people on Twitch, somewhere between 800 and 2,000 on YouTube, and about 50 people on Twitter.

The difference is massive, but Twitter has that same thing developing, where there are memes constantly flowing through it, so they're very highly connected. YouTube just doesn't seem to have that. It's just a bunch of people, and people go to YouTube for various reasons. “I'm going to YouTube to learn.” They come in and want to learn, so they're not on the meme train. They're not in this cultural zeitgeist train. They're just like, “But why would you use this if statement when a switch statement is better in this one particular case?” You're just like, “Well, that's not what I'm trying to do here.”

Lex Fridman

Yeah. You want to captain the meme train, or you want to ride on the meme train.

#461

Yeah, or you just want to be able to create a culture on your chat, because your chat is going to be some variation of that kind of zeitgeist flowing through Twitch. It kind of is very contiguous between X and Twitch. It just feels really out of sync with YouTube.

YouTube particularly does a bad job—and some people would argue a good job—because you can swim. “Swim” means you can actually change what timestamp you're at. All of a sudden, you'll be like, “Oh, yeah, something about driving to soccer in my minivan,” and then 20 minutes later you'll be talking about Zig. Someone's like, “I personally use whatever to drive to soccer,” and you're like, “What are we talking about?”

YouTube is a very disjointed chat as well, because it depends on where they're at within the video.

Lex Fridman

“Swim” comes from Netflix, by the way. It's called “swim.”

#461

Swim, the term?

Lex Fridman

Yeah, that's what people said: “swim.”

#461

Oh, so you're okay swimming through the—

Lex Fridman

Yeah.

#461

So, you're not just making up the term. Thank you. Wow.

Lex Fridman

But it's probably made up, and probably only 10 people said it at Netflix, so no one's going to know it, and they're going to be like, “Yeah, right, that thought happens on Netflix.”

#461

Going back to projects, what projects—on stream or in general?

Lex Fridman

No, you need to answer why YouTube chat's the best chat.

#461

Well, you kind of convinced me.

Lex Fridman

Why YouTube is the best chat? I think I'm just a hater. That's basically what it boils down to. I'm just talking shit, and I'm probably just shooting from the outside, because Twitch is such a fun culture of memes. It's fun to shoot from the outside, throw eggs at the house of Twitch, and then sit back in my lawn chair with the small YouTube community, just talking shit.

#461

No, you're absolutely right. There is a real sense of community that Twitch can form.

Lex Fridman

But I just like the openness of YouTube. It's better at opening things to the world. It's more accessible, easier to share, and it's just a more established platform. For the open world, I can send it to people who don't usually watch video game streaming or anything like that.

If you send a Twitch link, they're like, “I don't like video games,” and you're like, “Well, actually, it's not a video—” That conversation happens every single time you mention Twitch, because Twitch does have a perspective about it that YouTube does not.

I was just on Joe Rogan's podcast, and I think it came up. He asked something like, “Is Twitch still a thing?” That just gives you an example. Then Jamie said, “Yeah, yeah, it's definitely still a thing. It's still growing,” and so on. There is just a big slice of humans who don't participate in the Twitch sphere.

#461

Yeah, I just like talking shit.

Lex Fridman

So, yeah, that's a beautiful answer. It's cool that you make it accessible on all these different platforms. I have high hopes for X, but feature-wise, it still has a lot of growing up to do.

Just like, why do people use X? You typically go there for a text-based interaction that you want to look through. I also think they have a user-expectation change that needs to happen, and that just takes a while.

#461

You know, that's going to take a little bit before people get to it. I think their idea of audio first is a great first step, where people can listen to it and have the phone away. Maybe there are a lot of changes that have to happen before X can be successful. I mean, X is this incredible comment section, just like Reddit, right?

Lex Fridman

No, no, you said “incredible.” That’s not Reddit.

#461

Comment section.

Lex Fridman

Correct. Comment.

#461

Yeah, incredibly dynamic and vibrant.

Lex Fridman

What is the technological platform like? How does the interface and the technology shape the discourse? It’s fascinating, because X has a different style than Reddit, a different style than Facebook, and a different style than Instagram.

#461

It’s interesting, and all those comment sections are different technologically: how the sorting is done, how easy it is to build a community around it. YouTube is not really a community. Every single video on YouTube has its own mini-community. You’re all talking shit on just that 1 video, but you can’t jump across them. There’s not like, “Hey, Bill. Hey, Jordan.” There’s no cross-talk that happens across multiple videos.

Lex Fridman

Yeah, but community is awesome. I love community. I love the feeling of community, and I guess that’s what Twitch really provides.

#461

YouTube also does have it, though. They have an aggregate community. There are a lot of fun comments and all that on the videos, and a lot of thumbs-up. Then you see the fun discourse that happens, and that’s the community. It’s just that only a certain slice sees it. I think that’s even more so on YouTube for live streaming. All the same folks show up and talk shit. They celebrate. They’re all like, “The meme train arrives.”

Lex Fridman

So, what projects shaped you as a programmer, whether the ones you streamed or offline?

#461

For me, I don’t know if there’s 1 project I can point to, but I can point to a specific spot where I think it happens and where I think you can learn a lot from. Any small program you write will be somewhere between 1,000 and 5,000 lines of code. I consider that a pretty dang small project. You can correlate this to any feature within a larger system as well. A specific feature on a website could be 1,000 lines, a couple thousand lines.

There’s a point at which all of your choices add up, and I typically find that right around 5,000 to 10,000 lines of code. The choices you’ve made either weigh you down or free you up. That’s where I feel like I learn the most, because I love getting to that point in a project or in some small part of the codebase. At that point, I get to test, A, how good my initial gut decisions were about how I designed the software, but B, now I need to go back and think about how I’m going to do testing across this in a more effective way.

How can I scale this out to 20,000 lines of code? How can I do all these things with what I’ve got, or do I need to rethink it? I find that’s really where the best learning happens. Everybody probably has a different number, and as you get to each one of these numbers—or however broad or holistic you want your project to be—I think you’ll come up with different numbers. That number should just get bigger as you get more experienced, because there are projects that are 1 million lines of code, but they’re most certainly not holistic, right?

Every part of the codebase is from some age, some capsule of time, with some sort of programming style. Some is more functional, some more class-based, and God help your soul if it’s preprocessor macros in C++, right? There are all these different kinds of things you’ll find throughout time. That’s why I try to think about it as the feature or the thing you’re working on. It’s usually about 5,000 lines where I find that things get to, “Did I make good or bad decisions?” That’s where I do all my learning. I’m trying to get it to the point where I should be able to shoot from the hip and do 20,000 lines without being upset about it.

Lex Fridman

So, first of all, there’s just the joy of creating the thing. Around there, you can sit back and see all the parts dancing together. For me, there’s also debugging: you get to see the choices you make materialize in how easy it is to debug. I’m a big proponent—I think you’ve mentioned this in the past—I put asserts everywhere.

#461

No, you’re the reason why I do that. Yeah, you’re like the first one.

Lex Fridman

Keep on going. Sorry.

#461

Really? Okay. So, for me, one of the joys—whether it’s try-catch blocks, whether it’s asserts, whether it’s testing—is that I get to see the payoff of the minefield of asserts I’ve laid out before me in my kingdom, based on how quickly I can debug a system as it grows larger. I can, first of all, discover errors before they become real bugs, and also see how quickly I can solve those errors. That brings me joy.

For me, a lot of the joy of programming is creating powerful systems that don’t break down, that work correctly in the majority of cases. Stress-testing the system and getting all the signals from that system that everything is working correctly is something that fills me with joy and makes sure that the system actually works. I don’t know if it’s 5,000 to 10,000 lines of code. If it’s Java or C++, it’s millions of lines of code. But in Python, I would say 10,000 lines of code. That’s when you first get to see the magic.

Lex Fridman

But anyway, you were saying—okay, so you and John Carmack had a conversation about asserts.

#461

Yes.

Lex Fridman

You talked about this idea of putting asserts everywhere that effectively crash the program when you have some state in your program that should not be represented and you’ve made that choice actively.

#461

Mm-hmm.

Lex Fridman

I’ve never done that before, and I know this is an old technique. I obviously must be too young or too dumb to know that this was something people did. I grew up in Java, and I think that’s probably why I didn’t run into this. So I saw that and thought, “I’m curious about how to use asserts more.”

Then I ran into a person named Joran Greef. He’s the CEO and creator of TigerBeetle, the world’s fastest, greatest financial database. It was spawned out of a company that needed to do a bunch of financial transactions, and it’s written in Zig. What they do is deterministic simulation testing, and they just use NASA’s kind of guarantee for creating really great software.

They don’t use usize; they specify the exact size of the integer they expect everywhere. They do all these kinds of things to be very specific, and one of them is that every function should contain 2 asserts, whether it’s positive space—these things should happen—or negative space—this pointer should never be null. You’re programming into things that should never happen. Normally, you just never specify that. You never think about that.

Every single function everywhere has all these asserts. These asserts run both in production and in testing. They’re always on. Then they take deterministic simulation testing and run about 200 years of just random data, complete slop going through the system, and see how far it goes. When an assert happens, they say, “Here’s the input that caused it. Here’s every last little bit that happened.” Now you can identify where this went wrong.

It was so cool. So, between you, John Carmack, and Joran—and I’ll throw NASA a bone as well—that’s where I thought, “Okay, I’ve got to really try this.” I built this big reverse proxy for myself while trying to do some game development stuff, and I went ham on the asserts. Then I built a whole simulation-testing thing that could do everything deterministically. Even the results of requests would all come in specific orders, and I found a bunch of bugs that I just would never have found.

Then I did it for a game I was making. I found some bugs where my cursor went offscreen, and it would cause all these different problems because I just never tested them. It was super fun, and it’s a really great way to program.

#461

Yeah, I think it’s a skill set you grow over time. It’s not just that you have to specify the preconditions, everything that has to be true. It’s also adding things that you might not even think about. You have to anticipate really weird things. If you add asserts, especially in complicated functions or in complicated classes that are able to catch really weird things, that’s going to save you so many headaches, and it’s going to help you learn about your own code.

This is one of the things—I think it was Jonathan Blow who either said it in conversation with you or in a presentation. He said that when he’s starting on a project, he usually doesn’t know how to implement it or how it’s going to work. I think he was saying that he wants a programming language—this might have been a criticism of C++, I’m not sure—that makes it as painless as possible for him not to know what he’s doing or how he’s going to implement it, and to quickly get to a place where he figures it out.

I think there’s a fundamental part of programming that is building stuff while not really knowing what the next thing you’re doing is. You have a loose design, maybe a strict design, but really, you’re solving puzzles that are not—this is a dark room in a fundamental sense. You have to anticipate the kinds of weirdnesses that might emerge while not really knowing everything, just this full fog of war.

That's a real skill: anticipating the kinds of issues that might arise and putting asserts on top of them. Spiritually, for me, it's also been a really nice way of programming, of building, of living life: having very strict asserts that say, "You're going to fix this problem if it ever arises." You can't just look the other way. It's this idea of treating warnings as errors, like making sure your code compiles without any warnings.

That was a big leap for me. It's like, "But there are so many of them, and it's not really that important." It's like, "No, no, no warnings." Make sure you treat every single problem—even fuzzy problems—seriously, because in the long term, that's going to create code that's much easier to work with, much more fun to work with, and much more robust and resilient to all kinds of weirdness. It's a different way of approaching coding, probably more NASA-like versus web-programming style.

But it has made programming much more fun for me personally, because one of the most painful things about programming is when you get past 10,000 or 20,000 lines of code and you have to find a bug. That bug can take hours; it could take days to find, and that's torture.

Lex Fridman

Yeah, when your system gets sufficiently large, some of these bugs are just very difficult. I bless anyone's soul who's working on million-line codebases, because I can't tell you how many times I've spent multiple days just trying to figure out the root cause of a bug—not even the fix, just why it happens. That's hard.

So I love that. I just love the asserts, because I'm not good at them. I can see that it's definitely a skill that I don't put into practice constantly, which means it's not muscle memory. It's one of those things I just love. It's such a fascinating way to approach a problem, because I would have never thought, "You know what? If I'm wrong, I'm going to crash this thing. I'm going to crash it right here, because I should never be wrong."

But instead, you're like, "Oh, actually, that makes perfect sense. I should crash this thing. I've done something terribly wrong here. Why would this ever exist?" Then you're like, "This is going to solve a whole class of problems."

#461

Yeah. Especially if it's in production, users are going to see this crash. It's like, yeah, you should minimize the number of times any user ever sees the crash—not by having a nice blue screen or whatever the fuck, but by actually stopping everything. That's going to create an incentive for you to never have that happen. You're actually going to put in the time to make sure it never happens.

The nice part is that with the web and all that, you can always give them a nice message and then log it all so you can see it and measure how often you're doing it. I understand that there's a bit of interestingness to a web project. Do you always want to crash a server? There's a bit of a gamble if you release a bad version and crash all your servers constantly. That's a pain you're going to have to accept. I think this is more applicable to single systems, like robots and so on.

Lex Fridman

You have struggled with ADHD. I think a lot of people are really inspired by the fact that you're able to be productive and flourish while having ADHD. How did you overcome it?

#461

There are a lot of things that ADHD affects, so I'll start with some of the easiest things because they're directly applicable, and then there are these collateral-damage things that happen. One thing that has really helped me with ADHD is maturity. I think that's just a thing that everyone needs more of.

I found myself getting so wiggly and out of control when I would try to sit down and read that I just couldn't handle it. I'd read a page and realize I hadn't read anything. The part of me that said, "Oh man, I just can't even do this," I had to simply quit listening to. I said, "Nope, I'm rereading this page." I remember reading some pages in college 18 times in a row, just saying, "I'm going to force myself to do this the correct way."

There's an aspect of maturity that really helps, no matter what. I will do the thing I'm going to do, and I'm going to do it well. Maybe it takes me a lot longer, and that's okay. That's not the point. The point is that I'm doing it. That's the point. Generally, emotional resilience is an important aspect that helps, whether you have ADHD or not. I think that's been a large part of what really helps me.

There are things that I still obviously struggle with. It's clear where I'm really bad at stuff, and I'm trying to think through all the different things I'm bad at. There are more things I'm bad at than I'm good at. Programming, obviously, is something that allows me to remain focused, and it's a strength of mine. I started off being able to do it for just a little bit, and then, through that emotional resilience, I was able to start doing it more and more.

Now I can do it for 10, 12, or 15 hours at a time, and I absolutely love it. It's become a joy. It's like playing a musical instrument; I'm really into it. But if it came down to, "Hey, you need to schedule your own dentistry and go do all these other things, or make sure the kids have this type of stuff ready for the meals you need to pack throughout the week," I'm historically very bad at that and will probably continue to be very bad at that.

I must say that one of the reasons why I excel so much is because I also have a wife who's so good to me. She helps clear out a lot of the things in my life that cause me to get snowballed into a weird spot where I'm distracted and getting nothing done. She's really helped me, so it would be foolish of me to claim that I've defeated ADHD by myself.

Instead, I find that in the places I can really control, I've done a very good job. The things that I obviously need to do much better at, my wife has helped me with a whole bunch. So I've kind of cheated. Maybe I found a cheat code—a loving wife—but that has been the thing that's really helped.

Lex Fridman

You said a lot of interesting things. On the reading—and for me, it's also the audiobook side—I do the same thing, and I've gotten much better at it. I tune out mentally, and I read a page without understanding anything. You didn't actually read it, and I force myself to reread it or relisten to an audiobook. That's a much more common problem for me now, forcing myself to really pay attention, because I often listen to audiobooks when I run and it's so easy to tune out.

#461

Yeah, it's a skill. I didn't realize how much of a skill listening to an audiobook is, especially when there are other sensory inputs, like when you run. I have to force myself to really pay attention to every single word. If I tune out and don't remember what I just listened to in the past 30 seconds, I force myself to relisten to it.

Sometimes that means five times, until it's like punishing myself: "You're going to listen to this boring shit over and over until you get good at that little skill of zooming in." You're like, "Yeah, there are people doing stuff, and there's nature, but it doesn't matter. You're listening to every single word and loading it in," trying to stay focused even when there are so many distractions all around you.

It's definitely a learned skill, and it takes a lot of time. When I say, "I was able to go from here to here," I'm speaking over the course of five years of doing this every day. It's not something small.

The nice part about that decision, though, is that you can make it today. You can make it right now. You can say, "From here on out, I will never make that mistake again. I will read 50 pages. I will sit down and read 50 pages, and when I get distracted, I'll go back to the last place I remember and start again."

That's a decision you can make. It's a mature, non-emotional decision to make, and you can do that. It may be really painful for the first couple of years of making those decisions, but then it gets easier, and then it gets easier, and it becomes more natural to change yourself.

Lex Fridman

With every medium, with every platform, I think it's a new skill. For me, using social media has been that. I end up doomscrolling too easily on platforms. One solution is not to look at it at all, which is what I lean on mostly these days, but I feel like I should be able to check it, just read, feel a thing, learn a thing, and then put it down.

#461

Yeah.

Lex Fridman

Versus having this glazed look over your eye, where you're not really paying attention anymore, you're dead inside, and you feel horrible afterward.

#461

I don't understand. The horrible aftermath is very serious. I've definitely noticed that I'm a more anxious person the more time I spend scrolling.

Lex Fridman

Yeah. I can just feel it. It's like something inside of me that's kind of—I don't know how to say it other than that it wants to get out, but I don't really know what that is. It's not anger, but it's not—it's very anxious. It's the opposite of the feeling I have when I wake up in the morning, I'm feeling good, I look out at nature, look at the sun, and there's a bird chirping and this kind of thing.

#461

Like scrolling through social media, even if it’s super-positive stuff or whatever, it’s still not the same feeling as a bird chirping. Bird chirping on Instagram is different from a bird chirping in real life. Because with bird chirping on Instagram, I’ll start swiping until there are demons of different types fighting inside my head, and then—different anxiety, insecurity, whatever the hell. It’s just the mixture of chaos versus the bird chirping in real life. That’s beautiful.

Again, that’s the same thing as with the audiobook. It boils down to, man, these people who talk about meditation, I think they’re onto something, because that’s what it is: being able to focus calmly and deliberately on a thing, whether it’s reading, an audiobook, or existence. When they sort of observe the breath, you’re able to silence out everything else and remove everything else from focus.

Lex Fridman

Yeah, that’s a skill. What can you say about the skill of achieving focus in programming? Do you have a process for how you sit down and try to approach a problem? So, all the different—not just distractions, but the challenges of starting a project, of thinking through the design, how to maintain real focus, because it’s a really difficult intellectual endeavor?

#461

I guess at this point I’m lucky. But when I first started, I can remember that every last part of programming I had to go look up. I had to go read. I had side quests all the time. Every step was a side quest. Why is my screen blinking when I’m trying to render this thing out? Oh, I didn’t know about double buffering. Why is this happening? How do I even write to the screen? Everything was a question. I had more questions than answers.

As I learned my instrument very, very well, I didn’t have as many side quests. I became more and more able to just focus on the thing I wanted to do, and I find that to be super, super useful. When I say I’m kind of lucky, I mean I’ve spent so much of my life preparing for this moment that now, when I have the opportunity to do something, I can just do that thing.

I can be on an airplane and program for hours. I don’t have to look up a single thing. I don’t have to do anything. I don’t even have to test the code. I can write 1,000 lines of code on an airplane, and I’m very confident that it’s going to be 98% pretty dang good. I’m very happy about that because it allows me just to be in the moment solving the problem I’m trying to solve. Then I have 100% of my brainpower solving a problem.

This is also the same reason why I recommend learning how to type and learning your editor so well that you don’t even have to think about the action. Even if you just look down, that’s still mental processing power you have to spend looking at a keyboard on which you already know where the key is. At this point, if you’ve been typing for thousands of hours, you know where the key is. Just stop looking down. You’ll learn really quickly.

So, it’s this thing where I’m not going to spend all that time and mental effort looking up the thing. I’m going to memorize it, get it in me, and then I can go fast, and it feels good. That’s how I kind of defeat that, because now I get to do something where there are no more questions. It’s now me just expressing myself into this medium, and it feels really good.

Lex Fridman

I’m sure there are still things that pull at you—curiosities, distractions. “I wonder how...” Anytime you have access to the internet, you’re going to get curious about stuff. Twitter’s a big one on that one. You’re going to get curious about stuff, including—I guess you’re speaking about everything in the editor being optimized, but you’re okay, you can always improve stuff. You can always find better plugins and macros.

“Oh, let me spend the next 5 days creating a plugin for my editor or whatever the fuck to remove this one tiny pain point I just found,” when you should have just kept going, as opposed to taking the side quest.

ThePrimeagen

So, I have a rule, which is I do not edit my RC other than some kind of cataclysmic thing, like someone updates a plugin and I didn’t know they updated it, and now there’s a hard error in my editor and I have to move forward. I have a rule where I will edit my RC, my Neovim RC, or anything once a year. If something bothers me, I will write it down. I’ll remember it. I’ll be like, “Okay, I want to change that,” but I will just not go back to it.

Every now and then, I’ll break that rule if I know, “Oh, I want a new remap to be able to do this one command,” and that takes literally 13 seconds: copy, paste, do this, bop, done. Okay, I have this new remap. It made perfect sense in this situation. But I don’t go plugin exploring. I don’t try to solve every problem. I don’t want a perfect editor, because that is a pursuit that will never stop. I just go, “This is a good breakpoint. I won’t do it again.”

I spent last month—I probably spent 100 hours just editing every possible thing I could about how I start up my system. I can have a computer from 0 to 60 in almost no time now, everything exactly the way I want it. Neovim, everything perfectly set up. I’m happy enough. I’m not going to touch that system again. Maybe I’ll touch it next year. Maybe I’ll take a year off. I’m fine with that. I’m fine with not being perfect.

Lex Fridman

All right. 0 to 60. Let’s talk about the perfect setup. What’s your perfect programming setup? Keyboard, operating system, how many screens, chair. I like all these ideas. Let’s go.

#461

So, keyboard. You’re using my favorite keyboard right there: the Kinesis Advantage. Saved my career. Beautiful keyboard. Concavity and thumb clusters are just so important because, if you really think about it, especially if you’re using QWERTY, when you’re pressing the symbols on a standard keyboard, you’re just doing this the whole time: backspace, enter, symbols. You’re just doing this. It just screws up your wrist, constantly doing this. And when you’re constantly doing Control and Shift, it’s just messing you up. So, it’s just right here. That’s so much nicer in life.

So, keyboard, most important. I’d say get that one done.

Lex Fridman

For people who don’t know, the Kinesis keyboard, I think the thing that you experience the most is exactly the thing you just said, which is the backspace is really easy to press.

ThePrimeagen

Yeah.

Lex Fridman

Versus what it is on normal keyboards. Backspace in general symbolizes that you’re deleting a thing. It symbolizes a mistake. Not symbolizes—it usually means a mistake. So, not only did you just make a mistake in what you were typing, you also have to take a physically painful, annoying action to fix that mistake. And for most of us, we make a lot of mistakes. So, Kinesis just makes it pleasant and fast and easy physically to correct a mistake. I think that’s probably, for me, the number-one reason for Kinesis. Everything else—yeah, super-plus with the macros and the positioning, the concavity, like you mentioned—but the mistakes are pleasant.

ThePrimeagen

Yeah, I’m on that team. That’s why I love that.

So, that’s, I would say, one of the most important things. The next thing I find to be very important is that one monitor. I’m a one-monitor kind of guy.

Lex Fridman

What, really?

ThePrimeagen

So, when I program, when I do anything—now, when I stream, I obviously have a second computer that runs the stream because I sometimes crash my computer, I have to restart it, or whatever. So, I do have a second screen there that I put stuff up, but most of the time, you’ll notice that even when I’m streaming—you’ve been there—I have to physically switch to the streaming chat channel for me to read it. And that’s because I’m operating off of one screen.

I have this whole style in which I like to navigate, inspired by StarCraft. I believe in the “press one key, go where you want to be” mentality. Everything about my setup is “press one key.” When I want to go to Twitch chat, Alt+2: Twitch chat. When I want to go to my browser, Alt+1: that’s my browser. Alt+3: that’s where I go to my programming. That’s pointer finger, obviously, and big middle finger right there. Just smash it down.

Alt+6 is going to be GIMP, my GNU Image Manipulation Program. So, if I want to draw, I go there. When I used to have Slack, it was Alt+5. If I have a spare terminal where I need to run some extra things, that’s Alt+4. I have everything mapped out perfectly to a single key.

Then, when it comes down to using tmux, I have all my terminals in one single terminal, and now I’m able to switch between them.

Prefix 1 goes to my Vim editor. Whatever project I'm in, it's always the first tmux tab, if you will. I'm not sure they call it a session, but I'm not sure how else to describe it if you're not familiar with tmux—a tab, maybe. The second one is my spare terminal, and the third one is my long-running process terminal. My fourth one is another long-running process terminal.

I have it all set up so every project I go to automatically spawns session 1, a Vim session; session 2, a spare terminal; session 3, a long-running process terminal; and session 4, another long-running process terminal. Everything is just ready to rock. Everything has been optimized so that when I go to a project, I can get started immediately. If I want to go to a project, pressing F in any terminal brings up a fuzzy-find list of every folder on my operating system. I can go to one with just a couple of keystrokes, and boom, I'm in it.

It's very oriented toward finding where I need to be as quickly as possible via the keyboard. In Vim, I developed a plugin called Harpoon, where I press 1 button and pin one of the files to a temporary buffer. I think Projectile is potentially close to this in Emacs. I can't remember—Projectile. I think Projectile is closer to my sessionizing script.

Now I have 4 pinned files, and I can go to any of those pinned files with just a single keystroke. Every time you develop a feature, usually you have 3 files you're primarily working in, and I can fuzzy-find the other files. Usually I have these 3 power files that I'm always swapping between. Everything is just optimized: I want to go to the browser, that's 1 press; I want to go to my workstation, that's 1 press; I want to go to a specific folder, that's 1 press.

Sometimes you work between 2 different projects. In tmux, prefix, capital L, swaps between your last 2 projects. I can even swap between projects in pretty much 1 key. It's just like, “Dude, dude, dude.” I'm trying to optimize everything so I don't have to think as much, because search fatigue is a massive failure. When I see people on a Mac do this and then explode all the different windows, that gives me anxiety. I'm like, “Why are you using your eyeballs to search for what you want? Make it into a key press and never think about it again, ever.”

Lex Fridman

You're making me think a lot about whether I can live with your system and whether it's better, because it feels better. It at least intellectually feels better. It may not be great for some people. There are a few profound things you said: the number of windows or tasks you're switching between, whether it's programming or the number of files you're working on, is small. At any one time, in any 20-minute period or something like that, you're working on a small slice. That's a profound truth.

Sometimes we think, “I need the full freedom to search,” but you don't. You usually work on a very small slice. But I guess the trade-off there is that I always have 3 monitors—not when I'm traveling, but my happy place is 3 monitors. Do you really need all of them to be present there? You're turning your head. The monitors I have are 2 vertical ones, which is better for certain kinds of content. They're positioned vertically so you can read. You can use your eyes to scan quickly.

ThePrimeagen

Interesting. I don't even do that. I have it so zoomed in that I probably only have maybe 25 lines of code at any one time on my 27-inch monitor.

Lex Fridman

Yeah, I think that's okay. I feel fundamentally constrained when I can't see more, because your eyes are just good at jumping. You could search; you could press a couple of keystrokes. Control-U, Control-D: jump up and down by a half page. The ape visual system was designed to load in a lot of information. What if every time you had to investigate this table—what's on this table—you had to press a keystroke? You could develop the skill set that integrates that information, but there's an effective thing where, if you have a sheet of paper like this and I'm looking at it, my eyes are able to load in the structure of the information—the topics of the information. You can just do it faster.

I think there's a big cost, because you need an extra monitor, but some stuff benefits from being vertically positioned. Code is an iffy one, because with code, you really need only 25 lines at a time. I think you can do a lot with this for articles, especially with visual information in them, or documentation. You can just jump faster.

I'm trying to figure out, as you were speaking so eloquently, whether I'm deceiving myself that I need that. Can I just keyboard-shortcut everything and have everything on 1 monitor? That's something I should probably try, because I'm a big proponent of automating everything with the keyboard. You can just move really, really fast. You don't have to think.

I also do creative stuff, whether it's recording music or video editing, and some of these programs don't make it super easy for you. On Windows, with AutoHotkey, you can do quite a lot, but there are still limitations on how much you can do with the keyboard. That's the thing: it really is a pain. You have to use the mouse. But you're really making me think.

Even the text-reading setup—I fundamentally think I agree with you. You can see a lot more, and you can look up and down and see those 2 things. In articles or things like that, if there's a graph that's really big and takes up your whole screen, plus text, I can see why it would be beneficial to zoom out and have all that information.

#461

For me, I can only look at about a square inch. That's really all my eyes can focus on. When I'm reading, I'm right here. Then I have to structurally pattern-match what I think the information looks like, and then I have to start reading it. I'm not exactly sure I get any real benefit from having a lot of stuff on screen. Instead, I can relax my eyes so much that I don't even have to focus. The words are so big.

I actually program pretty zoomed in. My text is bigger than this when I program. It's so comfortable that I don't have to exert any effort to read the code. But you have to train your brain to know that you can navigate spatially using keys. Yeah, Neovim, by the way. Maybe it has everything to do with Neovim. Okay, all right.

Neovim is obviously the next big one. I love Neovim. The reason is that you can make all the arguments you want about which editor is the best, but I do not think you can make an argument that Vim motions aren't superior.

Lex Fridman

Here we go. Can you explain Vim motions? What is this?

#461

Vim is an old-school editor. Neovim is a modern take on an old-school editor.

Lex Fridman

Yeah. And what's ELI5? What does it take to work with Neovim?

#461

I thought you were talking about a Vim motion there. That's how you know that I know Vim motions. There's that meme that's like, “Hey, Jarvis, can I tell you about Vim motions?” They can't fit anything else in their head because they only have Vim motions. You said ELI5—explain it like I'm 5—but in my head it's, “E is jump to the end of the word, L is 1 more.” I'm so broken. When I hear letters, I think, “Okay, Vim motions.”

You can think of it like this: Vim has a language to describe movements in text, because its primary mode of operation is manipulating or editing text. It is a well-thought-through set of movements—deleting, yanking, pasting, copying, and all that kind of stuff—that go into motions optimized for working with code.

A good example: say you have 3 lines of code you want to delete. In VS Code, take your beautiful little mouse, highlight those things, and press Backspace. That's lovely. Your hand left the keyboard. It's very simple to do, though, and it's very beginner-friendly. I was a huge Vim hater, by the way. I want you to know that before we go into this. I was probably the biggest Vim hater. If there is a Saul to Apostle Paul, I am the Saul to Apostle Paul of Vim. I just want you to see how big the gap was.

Or you can do something like—I don't know what the VS Code shortcut is, but I'm sure there are keys you can press to delete the current line you're on. Delete, delete, delete. Right? You can just do that in Vim. I can go D-A-P: delete around paragraph. All contiguous code in that thing is going to be deleted. D, and then I can choose my motion. I want to take A-P, around paragraph.

Maybe I want a D-F. D-F means jump to the next character that matches the next character I'm going to press. So D-F, opening parenthesis, will delete everything from your cursor up to the first opening parenthesis. You get to describe your motion in these little keystrokes.

As you get really good—you've seen people who can master Fortnite—it's the same thing with mastering Vim motions. When you get so good, you no longer think about each individual movement. Instead, you're just like, “Get rid of the paragraph. Jump here. Jump this. Highlight this. Yank this. Do this.” It becomes so fast that you can edit text at a very high rate.

There comes a point where, when you know your language really well and you know the problem you're working on really well, editing text and getting code out actually becomes one of the many bottlenecks. People always talk about how most of the time I'm not thinking; I'm programming.

I know what I want to do. I want to go as fast as possible because I've been doing it for so long and I'm so familiar with the general space that it becomes a huge problem for me. I cannot tell you how many times I've been purely bottlenecked by the fact that I just can't type fast enough. I just need to get it out of my head and onto the text editor. That's why I think Vim motions are superior in all aspects: you keep your hands on the keyboard, on the home row, and you can manipulate text in very wide and fast ways.

Lex Fridman

Oh, so this is not just about writing text. This is about modifying text.

#461

It's primarily about modifying text.

Lex Fridman

Yes. And I'm sure that most editors, including Emacs and VS Code, can do all those same things. But there's something about them: they just don't encourage you to discover those things.

#461

Yeah, that's an important thing about a lot of technologies and programming languages: a lot of them can do a lot of the same stuff. But there's something about whether it's the community, the style of the language, or anything like that that encourages you not to be lazy in the beginning and to learn the fast way to edit text, in this particular example.

Lex Fridman

Yeah. How to use the keyboard. That's a fascinating reality of how technology is used. You want to be encouraged to find the fast thing as quickly as possible so that, long term, it's efficient and fun to use.

#461

It takes a long time for the dividends. A long time. But on top of that, notice I didn't say Vim. I'm not saying, “Go use Vim.” I'm saying Vim motions. Let me give you one more example.

Lex Fridman

Okay, I'm a big fan.

#461

Let's say you have a line that contains some variable, some function you're calling, or something that takes in a string, and you need to do that again. You would typically copy that line, paste it below, go into the string, and change the string. Let's say it's calling some sort of configuration. You need to call it 3 times with 3 different configuration strings.

In Vim, I like to do Shift-V to highlight the whole line, then Y. Some people do Y Y, but I don't like to do double Ys. I like to be able to use 2 different fingers because you can do that way faster than 1 finger twice. It's just a little optimization for me because you can't press that as fast.

So, I'm very optimized in my approach. I yank the line, paste the line, use C-I with double quotes, which will delete everything inside the first occurring string. Then I can type the string, press Escape, and save. It's so optimized that I can jump so fast in between that, whereas copying and pasting the line is probably the same speed, but navigating to the string and deleting what's currently in the string—that's such a fast motion in Vim. I just do that all the time.

Lex Fridman

To backtrack, really dumb question: C-I—what's the difference between typing the letters and using the letters to navigate and edit? How do you switch between the 2 modes?

#461

Insert mode means that you're just putting in text.

Lex Fridman

Yep.

#461

Normal mode means that you're moving your cursor.

Lex Fridman

How do you switch between the 2?

#461

Escape. Escape goes from insert mode into normal mode. To go into insert mode, press I to take your current cursor and go to the beginning, A to go after your cursor, capital A to go to the end of the line, capital I to go to the beginning of the line, O to put a new line below and then put your cursor at the proper indentation for the language, and Shift-O to shift your current line down and then put a new line in.

You can see I'm pressing Escape a lot.

Lex Fridman

Yeah. I mapped mine. I do Ctrl-C, except for in 1 edge case. People hate that. I got used to it because I was using IntelliJ, and I really hate pressing the Escape key, so I just got used to it.

#461

That seems like an essential thing to do if you're using Neovim: map Escape to something. Caps Lock would be the standard go-to.

Lex Fridman

Oh, yeah. I map it to Ctrl.

#461

Cool, I got you. Yeah. Then it's just really easy to press it. Boom, boom, boom. Not a big deal at all.

But yeah, I think that if you're willing to learn it, the motions are superior. But if you're not willing to learn it, then they're not superior. You should just not do it. If you're willing to endure pain, it's good. If you're not, it's actually way worse. It's 100 times worse.

Lex Fridman

So, if you like pain, you use Neovim.

#461

Totally.

Lex Fridman

Yeah, now you get it. If you like joy, you use Emacs. Did Emacs ever get a good text editor? I know they're a great operating system, but I never caught up on whether they got a good text editor.

#461

Operating system? I think you've been miseducated, my friend.

Lex Fridman

At least 30 minutes on Emacs versus Neovim is what Reddit requested.

#461

Have you actually used Emacs in order to be able to talk so much shit?

Lex Fridman

No, I used it for a year.

#461

You used it for a year?

Lex Fridman

Yeah. Doom Emacs, Spacemacs, and regular Emacs.

#461

But you don't know Lisp, so did you really use it?

Lex Fridman

I kind of hacked my way through it. It was like, “Okay, so this is how the configuration works.” You kind of get your way through and do all that.

So, you recommend mastering Neovim and really learning the depths of it, but Emacs is okay to just kind of use before making a judgment?

#461

You got me on that one.

Lex Fridman

And what's Neovim written in?

#461

It's written in C, but you have Lua for configuration. Lua is just a dead-simple language. Anyone can program Lua.

Lex Fridman

I actually don't know why I went with Emacs. I think it's because of my love for Lisp.

#461

I think you just choose a path and walk down that path. Because there's such a vibrant, intense battle between the 2 communities, you just start fighting because everybody else is fighting. Then one day you're like an old warrior on a horse, wondering what this was all for.

Lex Fridman

It's quite sad, in all seriousness, that I haven't to this day tried Neovim. I think it's because there's a learning curve.

#461

There's a learning curve to a lot of these editors. Yeah, to really learn it. I think this is some of the criticism of maybe VS Code, Sublime, or Atom: it's so easy not to learn it, to just half-ass use it. There's a big benefit to having editors that force you to have some learning curve, where you take the art, the science, and the procedure of editing seriously. You spend so much time in it; you might as well learn how to use the thing.

My big takeaway—really what I'm trying to say with all these words—is that I honestly don't think the editor makes the programmer. But I think it says a lot about your character as a programmer if you don't know how to use your editor well.

There's something about a person who's willing to commit their life to programming and spend literally 50,000 hours doing an activity over the course of their lifetime, yet never take the time to learn their editor through and through. It just seems strange. You'd never see that in another world, where people would be able to build something or do something and completely forget how those things work, focusing on only one part of their craft.

To me, it doesn't matter how you use it. I want to see the person who just knows how to use it, and knows how to use it well. When there's a problem, they can say why the problem exists and go fix it. To me, that's it. You've done it. You now know your tool. Go forth and conquer with said tool.

Lex Fridman

Especially for tools you use a lot, you have to look at your whole life. If you're a developer or anything, what is the thing you do a lot?

#461

Meetings.

Lex Fridman

Yeah. Ask the question: how can this be done a lot better? Every single day, you do this for hours a day. How many hours did you spend thinking about how to do this better—or whether to do it at all, in the case of meetings?

It's surprising how often people just show up and do jiu-jitsu or martial arts the same way over and over and over. They invest a tremendous amount of energy, but they don't ask, “How do I do it differently to improve faster?” The same is true of jiu-jitsu or any kind of sport. It's the same with practicing the piano or the guitar.

People religiously put in a lot of time and derive a lot of joy from getting better, but they don't often ask the meta-question: how can I do this better? With editors, it's surprising how often people do just that.

#461

Yeah. With typing, it's surprising how many people do just that. Like you said, they're pecking or looking down. The quality-of-life improvement you can have by learning to touch-type, by typing without looking, is immeasurable.

Lex Fridman

You're bringing a lot of joy to your life because all of us are typing a lot.

#461

Yeah.

Lex Fridman

The reason, by the way, I was extremely efficient with Emacs—I’m sure, all jokes aside, it feels like Neovim has more room for the kind of efficiency I've had with Emacs, to be able to move really fast as you're describing and edit. There is a real joy. It's not just efficiency; it's a freedom that you can get when you get really good with an editor.

The reason I chose to go with VS Code is that it felt like there was going to be an acceleration of features that Neovim or Emacs would not be able to catch up with—not in the next 5 years, but in the next 30 years. It felt like I almost wanted to take the pain of constantly learning new editors, switching, and learning, because I was getting so comfortable in Emacs with this keyboard, everything, and all the shortcuts.

Because I know how to program, it felt like Neovim might not be here in 50 years. It possibly might be—I don't know—but it felt like you want to learn these constantly changing technologies. Cursor is a great example of that. I'm primarily using Cursor now. I'll go back to VS Code and Cursor.

The skill of using AI is a real skill, from the shortcuts to the timing, to the layout of the windows, to how I think about where, when, and how to use AI so that it doesn't distract me, that it empowers me—not just for the fuck of it or for the fun of it, but for the actual measure of productivity.

#461

It's a skill. I feel like I would be stuck in a local maximum of comfort if I stayed with Emacs. Maybe the same should be true for me with Neovim. I should try it. Seriously, I'm sure there's a plugin, like a Copilot-type situation, that you could set up with Neovim. I should possibly consider that.

But Cursor is doing a lot of really fascinating stuff on the IDE side, not just generating code and editing that code manually. It's continuously able to rewrite code. It's the idea of tap, tap, tap, tap, moving the cursor around, but also modifying parts of the code and doing the diff really nicely. Whether it's Cursor or VS Code that wins that battle with Copilot, I don't know.

Lex Fridman

That feels like a fun, different experience from the really efficient, joyful experience that you just described. You're selling me on this as Neovim that doesn't have an AI in the picture, obviously. Immediately—but you can—

#461

Yeah, absolutely. I would 100% agree that Cursor seems like such a cool product. I actually think there's a lot of really neat things coming with all that. I could change from Neovim. I don't use Neovim because I love Neovim; I use Neovim because I love the instrument I play. If Cursor can meet those needs, I could see myself moving over. I don't have some sort of obsessive attachment to it.

I am curious, though, because every time I use AI, I think I just have skill issues. I think I'm so riddled with skill issues when it comes to using AI. I've yet to be able to use it in a way that I really love.

Lex Fridman

We'll talk about it, but before then—

#461

Oh, a ball to sit on. I forgot to say that. A ball to sit on. My desk needs to be at the proper height. I have 1 monitor, and I should be two-thirds of the way up the screen. I don't like to turn my head. I prefer my hands in a pistol-neutral position. And there you go: a ball to sit on.

Lex Fridman

Yoga ball?

#461

Yoga ball.

Lex Fridman

What's that about?

#461

It just helps maintain good posture, because when I have something to lean against, I do this.

Lex Fridman

So you're sitting for hours without—wait, what are you doing?

#461

I sit on a ball, and then I bounce.

Lex Fridman

Is your back leaning on something?

#461

No.

Lex Fridman

What the fuck? You're the only person in the world sitting on a yoga ball as you program for hours. You do realize this, right?

#461

It feels great. The problem is that whenever I get a backache, I just slouch, and I find myself getting uncomfortable. I'm like, “Why am I uncomfortable? My shoulders are getting goofed up. I'm chicken-necking constantly.” It's just—

Lex Fridman

But you're able to keep your posture for hours on a yoga ball?

#461

Yeah. I can just do that, and then if I find myself slouching, I'm like, “Okay, nope. Got to get back.”

Lex Fridman

You have incredible back muscles or what?

#461

No. I don't think it takes incredible back muscles to keep your posture and remain upright. I would not consider myself a strong person.

Lex Fridman

Yeah, basic human function.

#461

I don't know.

Lex Fridman

Facts and logic. Okay, cool.

#461

With 1 screen, Neovim, and the operating system Linux, just because I want a good window manager. That's the whole thing: press 1 button, bring up Chrome. I just use i3. I'm sure I could use something better than i3. People always tell me all these window managers are really great, but I just have those 3 screens I switch between, so it doesn't really matter. I don't really care what I use, as long as I can press 1 button and go.

Lex Fridman

Yeah, I'm the same. So, half and half: half Linux, the other half Windows, with Linux meaning WSL.

#461

What's that?

Lex Fridman

Windows Subsystem for Linux.

#461

Weasel. Weasel. See, no, there's got to be a better one that's more positive. Weasel just seems right up Microsoft's alley. That seems perfect.

Lex Fridman

People often accuse me of being a shill for somebody, sometimes dictators. If I'm a shill for anybody, it's for Windows.

#461

There you go. I get paychecks every week from Bill Gates.

Lex Fridman

Well, he's not Microsoft anymore.

#461

Ballmer. Developers, developers, developers.

Lex Fridman

No, I'm just joking.

I think, man, I need to try Mac. I need to try. I'm surrounded by people with iPhones. I use Android.

#461

I use Android.

Lex Fridman

Yeah, there you go. See? We're losers together. Losers on a sinking ship.

Okay, so, just to stay on you for a second and to give love and a shout-out to your friend TJ. He streams, by the way. He's a streamer, and I'm subscribed and have been enjoying it. My allegiance is slowly shifting from you to him. The quality is far superior with him—the looks, the intelligence, the skill set, everything is just far superior.

#461

No.

Lex Fridman

Okay, so he's—you know, you're making his day.

#461

All right.

Lex Fridman

He mentioned that he loves Neovim because it gives him the ability to eliminate having to do things he doesn't like. It's just a nice way to frame the automation process that you described: automating away, assigning shortcuts to things that are painful. I wonder if you agree with that.

#461

I fully agree. We have very similar mentalities when it comes to using Neovim, why people should use it, how to use it, all that kind of stuff. He definitely takes it to a further degree. He spends more time automating and all that.

I don't necessarily derive a lot of joy from getting the perfect setup, but there's a lot to learn from him. He's very, very good at what he does. He's 30 years old, he's been programming for not too many years, and he is one of the most talented developers, for sure. It's very shocking to see how smart someone can be.

Lex Fridman

So people should check him out at TJ DeVries?

#461

Yep, TJ DeVries.

Lex Fridman

His name—his last name is DeVries?

#461

D.

Lex Fridman

Oh, it's not “a developer.” Okay, cool.

#461

Yeah, yeah. So it's just TJ. That's just his name, just spelled kind of fun.

Lex Fridman

What do you love about him?

#461

Wow, how much did he pay you to ask these questions?

Lex Fridman

Thousands of dollars.

ThePrimeagen

Just so many. I can't even count that many dollars.

Trust, obviously. Trust is the biggest thing, especially in the streaming and YouTube world. It's very easy to find people who want to be a part of stuff. People tend to latch on to things, and it's very hard to find someone whom you can really, really trust. He's somebody whom I can genuinely trust. He will always tell the truth. He's all the right things for a good friend in this kind of endeavor.

Lex Fridman

So, as a good friend, he told me questions I could backstab you with.

ThePrimeagen

Okay, I hate him. I forgot how much I don't trust him.

Lex Fridman

Speaking of Harpoon, you mentioned it. He said to ask you about basically how many years or decades it's going to take to transition to Harpoon 2, to actually release it, develop it, and so on. Can you describe what Harpoon is and why you seem incapable of finishing a single project?

ThePrimeagen

Okay, that was a lovely framed question.

Harpoon 2 is actually done. This is what I did to avoid the swirl and the thousands of questions I will inevitably get: I kept the master branch as Harpoon 1, and I have kept Harpoon 2 as the Harpoon 2 branch. People who don't read the README and say that I just use Harpoon 2 now, that's their fault. That's it.

I just don't want to answer hundreds of questions about open-source stuff. I used to love doing open source and all that, but I kind of got my soul crushed during the Folke years, so I guess I'm just kind of allergic to being a really active maintainer. I built everything just for me. Harpoon's literally just built for me. I spent 3 months trying to figure out the most optimal navigation for files, and that's what I came up with.

Harpoon is a take on alternate file. If you're familiar with alternate file, typically you'll have this in all editors, where you can go back to the file you were just in. That means you can have effectively 2 files you swap back and forth. You've probably used it a bunch. It's a really fast way to navigate, a pretty nice thing to do.

I wanted alternate file, but with 3 or 4 of them. That's all Harpoon is: just being able to pin a file. I have 1 button to press to go to 1 file, another for another, and another for another. I can have up to 4. I just have my 4 power fingers for Dvorak.

Lex Fridman

What is that?

ThePrimeagen

That's H, T, N, S. If I go Ctrl+H, Ctrl+T, Ctrl+N, or Ctrl+S, it goes to 1 of the 4 files. That's it. That's all it is.

You could technically make it so you can add in functions and execute things externally. You can open up terminals, send requests off to servers, and do anything you want with it. I just have it primarily designed for opening files.

Lex Fridman

Since you mentioned it, what keyboard layout do you use? You use Dvorak.

#461

I use Dvorak, but I use a custom version of Dvorak. The reason why I used it is that in 2017, we were just having our second kid. It was Christmas, and I was having so much pain in my arm. I was sitting there freaking out, like, “Oh my gosh, is this the end of my career? Am I done programming? Is this all over?”

So I decided that I was going to create my own keyboard layout, optimized to prevent the pain I was experiencing. I used Dvorak as the base and then laid out the symbols in a symmetrical, reasonable way, so that it's opening, closing, opening, closing, opening, closing, right? They all are right here.

I actually have to hold Shift to press a number, so symbols are actually the first thing I get to press. It's very optimized for a laptop keyboard layout, so I can use my laptop in a very efficient, nice way. That's how I got started on Dvorak and all that. I wouldn't actually recommend it, because I didn't have a Kinesis at the time.

I didn't even know Kinesis existed at that time. When I discovered Kinesis in 2017, I was like, "Oh, okay."

Lex Fridman

Would you recommend Kinesis to people?

ThePrimeagen

I am technically sponsored by Kinesis, so it's hard for people to believe someone who's sponsored by it. But I used it before I ever became sponsored. They're the only sponsor I ever reached out to and said, "I need a sponsorship from you. You are the key. I'm going to use you either way. You can say no, but I really love it."

For the first 3 years of using Kinesis, they gave me free Kinesis keyboards as my sponsorship. Kinesis. Yeah, I'm always torn. I tried to leave so many times.

Lex Fridman

You can't. It's too good.

ThePrimeagen

But I have this absurd situation of traveling with it.

Lex Fridman

I relate.

ThePrimeagen

Yeah. I mean, I'm literally going to the war zone in Ukraine with a Kinesis keyboard, a laptop, and just a few other small things, and that's it. Is the Kinesis keyboard really going to be 30% of the volume that you're bringing to a war zone? It looks like the answer is yes.

Lex Fridman

Like, do you really derive that much value from it?

ThePrimeagen

I think it's probably spiritual or psychological for me. It feels like home. There's comfort associated with it.

Lex Fridman

Yeah. I try to leave, man. I love this experience. It's like a relationship you have with the thing.

ThePrimeagen

It is. I'm trying to figure out if it's a toxic relationship or not.

Lex Fridman

I think it's mostly love. I think it's love, like all relationships. There's some push and pull, some complications. But they say that distance makes the heart grow fonder, so maybe sometimes the Kinesis keyboard needs to stay at home and the laptop keyboard can be the one you use, so that your heart grows even fonder and that connection grows even deeper.

ThePrimeagen

I already miss it, as you said. I don't know. I think it's coming along on all the trips. If it breaks down, though, I was worried that Kinesis would shut down as a company. I'm like, "What's the business model here? Who actually uses these keyboards?"

Lex Fridman

Right? But apparently, it's still going strong.

ThePrimeagen

Who uses these keyboards?

Lex Fridman

I use the keyboard. I have to take it with me everywhere. I wonder who uses these keyboards.

ThePrimeagen

Yep.

Lex Fridman

I should mention that one of the things that first made me a fan of yours was hearing you talk about coffee and the terminal. I still don't understand what you're talking about, by the way. I need to actually use it. But you run, among many things, a coffee company. This smells so good.

ThePrimeagen

This one is Dark Mode, dark-roast whole coffee beans. There's a single-origin one. There's a bunch of stuff on there that's very developer-, server-, and web-oriented.

Lex Fridman

Can you legitimately order coffee via SSH?

#461

As of right now, the only way you can get the coffee is by SSH.

Lex Fridman

Can I get the origin story?

ThePrimeagen

Yeah. I was going to do some kind of command-line command to request it, like `coffee --help` or something, or `man coffee`.

Lex Fridman

Man coffee.

ThePrimeagen

Okay, so TJ and I—again, shameless TJTV plug, by the way—had some very amazing designs done by David Hill. They're very, very good.

Let me give you the basic idea. It must have been about a year and a half ago that TJ and I were talking: "Every one of these people who have some sort of following, some sort of online presence, are always selling something, but I have nothing to sell. I don't really want to do merch. I've never really enjoyed doing merch. I just don't find it as much fun."

I don't want a tequila. I want something that I really don't feel bad about selling. There's a lot of people who will go on the internet and shill a whole bunch of products: "Try this. Try this." This is why I've only ever really done Kinesis. I can point to something that was really bad in my life. I was very scared, and now it's not bad anymore. So it's like, "Okay, that one made sense." But everything else has always been harder for me.

We talked for so long, and we love Neovim. We were just laughing: "What if we could do something from Neovim?" Ordering from Neovim is so ridiculous. Then, at some point, we were like, "Wait a second. Maybe we could do coffee." Every developer loves coffee. Maybe we could figure out this coffee business.

I have a good friend named Dax, thdxr. Dax is the sassiest man alive. He has a lot of sass and a beard. He does SST and a lot of other stuff. He's a very talented guy. We'll call him a DevOps engineer. He's more than that, but he's very talented.

He and another person named Adam—vegan, by the way, great guy. We take him to Korean barbecue all the time, and he eats nothing—and Liz, who has been super important to the Terminal Coffee Company. I don't think we would have been able to do what we've done without her. Then there's David Hill, the designer. He designs for Laravel. He's a very talented designer.

We all came together and were laughing about how we could do something that's just ridiculous.

Lex Fridman

What was the moment?

ThePrimeagen

That was from the Mike Tyson fight.

Lex Fridman

All right, Mike. It was literally that night. Mike Tyson kissed the reporter and then walked out.

ThePrimeagen

Yeah, without any clothes. We did an ad for somebody.

Lex Fridman

Nice.

ThePrimeagen

We decided to make a coffee shop, and then we thought, instead of just making it Neovim, what if we made it SSH? Everybody has SSH. You have VS Code. Launch VS Code, and you can order coffee from within VS Code, right? Your little bottom terminal has access to SSH. Bada bing, bada boom. It's kind of fun.

We wanted to do something where there's no level of the world in which I feel bad about selling this and people buying it. It's good, ethical coffee. We developed the entire supply chain and everything. It's all packaged, it's all boutique, and it's really high-end coffee. It tastes really, really good.

At this point, I don't like drinking other coffee. I get upset about it because it's not as good. It's kind of funny that I've fallen for my own stuff. I'm high on my own supply pretty hard right now. I just got done ordering 16 bags and gave them to my family to try to convince them.

It's something where I didn't sell you a software product that's going to influence your startup and could potentially lead to disaster. I didn't convince you to do a bunch of stuff that's going to change your career. I just said, "Here's some coffee." It's a fun experience.

Lex Fridman

Yeah, it's fun. The humor on it is great.

#461

If you can't use SSH, you probably should just not worry about buying our coffee. That's the whole point.

Lex Fridman

Well, you can learn. If you're active and you're a computer person, and you'd like to launch the terminal and feel like a hacker, go for it.

#461

We even have subscriptions.

Lex Fridman

How do you handle payment?

#461

Through Stripe. One of the things we'll be adding is a mobile checkout that will show a QR code in the terminal, and you can check out on your phone. Right now, you enter your credentials and it goes to Stripe through the terminal.

Lex Fridman

SSH obviously stands for secure shell. It uses elliptic, quantum-safe algorithms to ensure that your data is not being intercepted. But does he use AI?

#461

I'm pretty sure Dax uses AI.

Lex Fridman

You said quantum, so I don't know. Quantum AI. Can this even be a company if it's not using AI?

#461

We have some crypto chains with some quantum AI that's powered by Fusion. So it's pretty wild.

Lex Fridman

What I would love to see—and I think this came up in the Cursor conversation—is an AI agent doing this. Anthropic's computer use, or something like that, could actually take the action of ordering the coffee while it was programming.

#461

Yeah. Like, "Hey, order me some coffee," and it actually goes off: "Give me dark roast. Order coffee." It could go through the whole flow of ordering.

Lex Fridman

The whole flow. But even better, if you didn't ask it to order coffee and you asked it to do something, and as a tangent, as a side quest, it did that. Computer use does that, right? They showed that it's able to go to Google for some images, take a pause, and then continue doing other stuff.

Anyway, super cool idea. I love it. Speaking of which, let's talk about AI. You've been both positive and negative on the role of AI in the programming and software engineering experience as it stands today. What's your general view about AI? What is it effective at, and what is it not so good at?

#461

My general view comes down to something that's pretty simple: if you're doing something that is very predictable, AI is really nice.

When you're doing something that is just not predictable, AI is not very nice to use. If you're using anything that's more cutting-edge, AI will not be using it, or AI won't be very good at doing stuff with it. It's not great at Zig because Zig is less documented. It's really great at TypeScript.

I think there's a lot of interesting things that are going to come down through AI that a lot of people aren't really prepared for or thinking through. TJ is kind of the genesis of this idea, but the idea is that I think there's going to be a lot of market manipulation, if you will, through AI. Meaning, you want to research, say, the best woodworking tools. Well, someone's going to be buying an ad spot. Someone's going to be buying premium training data, right? They're the ones that get the big boosts in the LLMs, but LLMs don't really have to market it as an advertisement because it's not directly an advertisement. They just have a more premium spot, per se, in the training data—a little bit of extra learning to it.

There are a lot of things about AI that I fear are upcoming. A lot of it just comes down to people not learning or making the trade-off where productivity is the only thing that matters. I don't think productivity is the only thing that matters. If you want to build something complex and difficult, productivity is not the only thing. You actually are going to have to do deep learning and pursue it beyond the basics.

I see AI as this really cool thing. It feels like a magic trick. I remember the first time I used it. I got early access to GitHub Copilot. In fact, Nat Friedman saw my Twitch clip of me asking GitHub for it, and he sent me early access himself. It was awesome. When I used it, it predicted an if statement correctly, and my mind was absolutely blown because I had nothing before then. It was the first time ever, and I remember thinking, “Man, this is going to change programming so much.”

The more I used it, the more, personally, it kept introducing bugs, and I couldn't figure out why. What I realized is that I wasn't co-piloting well; I was autopiloting much better. My ability to read code versus my ability to critically think and write code—those are definitely different skill levels. I don't consider things as well when I just read code as opposed to when I write code, and so I struggled there. I do think that's a skill set.

Lex Fridman

Yeah, skill issue for sure. “Skill issue,” for people who are not aware, is like a hashtag thing sometimes used mockingly.

#461

In this case, there are several layers.

Lex Fridman

Mockingly, but also seriously.

#461

Yeah, meaning the criticism is grounded in the fact that you lack the skill versus some kind of fundamental truth.

Lex Fridman

Yes. I think that's the reason I use Copilot and Cursor a lot: to develop the skill of editing AI, so I can learn how to do that better and better. Because I think as I do that better and better, I start to utilize AI better. At this time, it is a bit of a boilerplate-code thing, but you can do out-of-the-box, novel design decisions or tricky design decisions from scratch, fill out stuff using AI, and then learn the skill of modifying.

I personally just find it more fun to program with AI. Even when I delete a lot of the code, it's more fun. It's less lonely. It's what I imagine pair programming to be like, and I've never done it. It just feels like the friction you get when you're staring at an empty thing—an empty function, an empty class—is not there. It's just more fun and less lonely.

I do think that a lot of the easier types of coding really benefit from it, like interacting with APIs. Basic things that I would usually have to look up on Stack Overflow are just really fast with AI. For example, interacting with the YouTube API: the YouTube API documentation is not very good, and you can just load it all in there and ask it to generate a set of functions that access the API and do all kinds of read and write operations. It figures it all out.

You do have to read and check everything, and you start to develop the skill of understanding where it misinterpreted the task. So what is that skill? I don't even know. You have to be empathic about what the AI is and what its limitations are.

A lot of the time, that has to do with prompt engineering. You have to, at the same time, understand what the AI is aware of—what you actually gave it as data to be able to generate the code. A lot of times, we don't realize that we're not giving it enough information. You have to actually think, “Okay, these are the code and the files it's aware of; this is the specifics of the question you asked it.”

You have to imagine you're an intern that doesn't know anything else. Oftentimes, we want the AI to figure out the things that are left unspoken, but it can't know those things. You have to specify those things, so you have to actually be much more deliberate and rigorous in the things you specify—to spell it out.

I have this sea of prompts that I've saved up, and I'm building this library of different templates for prompts. It's a mess, and I'm sure there are a lot of developers who have this similar kind of mess. A lot of it, in the long term, has to do with the tooling that's going to improve that.

One, the systems are going to get much more intelligent, so you don't need the nuance. Two, there is going to be tooling that allows you to specify those things, load them in correctly, and give all the context that the system needs in order to make good decisions. Maybe the system asks you follow-up questions: “Wait, here are the things you didn't make clear.” All that kind of stuff.

A lot of that has to do with the interface, with the actual design of the tools. Like we said with Cursor, it's going to keep getting better and better and better. My sense is that developers in general should be learning this, to see how they can use it as a superpower—to not be left behind, and to boost their productivity, effectiveness, and joy of programming—rather than see it as a competitor to them or something like that.

For me, already, it's been a big boost to productivity—actual productivity, if you measure how quickly you're able to get a thing done. It's been a big boost measured not just across minutes and hours, but days as well. Sometimes there are things I have to do that are not that important, and out of procrastination I'll push them off. AI helps me actually get them done—actually write the thing, get it done, get it tested, and ship the thing.

Maybe it's just because it's less lonely to work with an AI. I don't know. I don't know if any of that made sense.

#461

It all made perfect sense. I really do like that phrase: it makes it less lonely. I think there's something to that that's kind of interesting, having just some level of interaction that's not just an LSP autocomplete. You're like, “Oh, wow. That's a way different approach I would have taken. Hey, that's kind of cool. I like these kinds of things.”

The thing is, I'm not an AI-negative person. I can see why people really, really like it. I just haven't—every time I used Copilot, from when Nat gave me access all the way up until about 6 months ago, that's how I used it for quite some time, and I really did enjoy the things I used out of it.

It just never did the opposite for me. I felt like I was more reviewing than writing, and I felt like I was more just letting things slide. I didn't really think too heavily about stuff, and I wasn't as engaged. So I'm like, “Okay, something's kind of wrong here.” That's just a personal thing for me.

I recognize that this is not how someone should approach these things. That's not a good reason for why you should or should not use AI. I just don't think that's right, because I could probably correct that and figure out a better way to do it.

I've been meaning to have another AI round. I've been thinking, “Maybe I just need to spend 2 weeks in Cursor and fully embrace what it means to be somebody like this.” And, God, what can I do with these new powers? Have they improved to the point where they're actually good?

For me, a lot of the decisions I make and a lot of the little functions I'm writing are not just because I'm trying to write this function to solve this problem. I'm writing these functions, or this set of functions, not just to solve this problem, but because I know that in about another 2,000 lines of code, building all these other things, I'm going to need to start doing this next activity.

I'm trying to really chess-move myself into the exact things that, as I let things go faster, I kind of fall apart on—that chess move. Again, skill issues on my behalf, and I mean that in the truest sense of the word. I'm making a critique because I don't use it well enough.

The better you are at programming—I don't know if this is a general rule; this is my anecdotal data—the better you are at programming, the less you want to use AI. The more it gets in the way, like the good programmers, fair enough, as far as I can tell. The more beginner programmers are much happier to use AI.

When I use AI, it's for basic things. I don't know if there's a better term.

ThePrimeagen

It's not boilerplate, but it's pretty easy programming. And that kind of programming is much easier to do. The sort of 10x—not to use the meme—programmers that I know, who are ultra-productive and brilliant people, they just hate AI. They're like, "This is nowhere close to what's needed." So there's something to that. I still think they should be using AI just for the learning.

Lex Fridman

Yeah, because it's going to get smarter. It's going to get better. And it's the same thing as when you super-optimize Neovim or super-optimize Emacs: you may not discover the new things that are in the pipeline. So it's always good to be sort of training in that way.

Let me ask you a question here, just for my understanding. You talked about this idea that you have all these LLM prompts, this big backlog of messy LLM prompts that you have these templates for, and that you can do various actions. You probably have these strategies for making it self-explain itself and then do the right thing, right? As far as I can tell, that's really built into a lot of people. Well, then you made this phrase where you're like, "But then at some point, the interface is going to get better, and maybe it can do a lot of these things better, where I won't need that."

Then my question is: Is anyone actually falling behind for not using AI? Because if the interface is going to change so greatly that all of your habits need to fundamentally change, and it will be able to clarify and make all those statements, have I actually fallen behind at all? Or will the next generation actually just be so different from the current one that it's kind of like, "Yeah, you're over there actually doing punch-card AI right now. I'm going to come in at compile-time AI," so different that it's like, "What's a punch card?"

ThePrimeagen

So, obviously, open question. It's a fascinating one. I personally think yes, you're falling behind—not you, but it could be me. If you're not playing with it, you're falling behind.

Because the thing I'm doing with the prompts is, you're learning. You're building up this intuition about how AI works. You're understanding its strengths and weaknesses—not even the current version, but the next version and so on. What does it mean to teach an AI system about the world? What kind of information does it need to make effective decisions? I think that does transfer to smarter and smarter models. You'll need to make less rigorous, specific, and detailed instructions over time, but you still have to have that kind of thing.

Yeah, I think it's a skill of almost empathy with an AI system, because it doesn't know what it's missing. It's missing common sense. It's missing long-term memory. A lot of things, when we talk to other humans, they have a basic common sense about reality, and AI systems often lack that kind of common sense. They also don't remember things. So you have to realize there's a constant blank slate happening. So it's almost just a skill of talking to an AI system that I'm training.

By having to write all those prompts and communicating back and forth to understand what kind of prompts work better or not, you build up that intuition. Also, just the raw skill of reading somebody else's code—maybe for people who work on large teams, that's a skill that's already developed. For me, not so much. So learning how to modify the code that somebody else wrote is a real skill.

And also, the other thing you mentioned, which is considering another perspective on a piece of code, is really nice, but it is also a skill to understand, "Okay, this is what you did there." There's a skill to asking a question about that code that's been generated such that you can have a conversation about the approach that was taken. I think there's just a lot of subtle little skills involved in a cooperative endeavor to code.

Lex Fridman

Kind of like there was a real skill issue between you and Theo when you guys did the video of "2 Guys, 1 Keyboard," right? People should go watch that video, where you guys obviously sucked at it.

ThePrimeagen

Yeah, co-using.

Lex Fridman

That was pretty cool, what you guys did, which is controlling one Neovim interface from 2 different keyboards.

ThePrimeagen

Yeah, and then we each get an allowance of certain characters or motions we could perform.

Lex Fridman

Yeah, and so you both had to communicate together.

ThePrimeagen

That's a real skill. I'm sure you can get super-efficient with that, but it takes time to learn that kind of thing. So yeah, I think there's some value to it. But I think there's a learning curve.

So, I want one thing to be pretty clear: I actually use AI quite a bit. I just don't use it for programming. One thing I've been trying to get to is to be able to have a long interview or understand what Twitch chat is saying, become Twitch chat, and be able to speak as if it is Twitch chat. I try to learn how to prompt it in different ways. I think those things, for me, are just really fun.

I tried to get it to learn how to play tower defense. I made a tower-defense game in Zig and then made it play tower defense, and then played Claude 3.5 against OpenAI. Claude 3.5 would do better during the daytime, and OpenAI did better during the nighttime. I don't know why. I have no idea what was going on there, but one would just start winning and the other one would start losing. It was very strange.

So it's just this. I'm learning to prompt well, but I'm learning to prompt in a very different axis. I just don't find it very useful yet in programming. I should also say that I'm using it in every walk of life, in every context. I use that same kind of exploration about prompts and so on; I'm using and learning. I think it legitimately is a whole field in itself: prompt engineering and how to interact with AI systems. I think it's worth the investment.

Lex Fridman

Can you actually speak to that? Because I saw you're basically pulling from Twitch chat and having an LLM speak. I didn't realize—I thought you were not reading the exact chat messages. So you're doing some kind of summarization.

ThePrimeagen

Yeah. I try to go through a process—I end up making about 8 queries to OpenAI—where the first thing is that I give it a default personality: "Hey, you're Randall, the manager. You're a software engineering manager. Explain their position, what they like, what they don't like." Then: "These are the list of thoughts you have in your head, and you need to talk to this person and ask them a question. Give me 10 of these responses that you think are probably thoughts that you have and you want to ask."

Then I have it give me a list, and then I reprompt it: "Hey, you're Randall. You're this, this, this, this, this, this. You have these 10 questions before you, and now you need to select one of them and reword it in a way that sounds more like you, the engineering manager." So I'm constantly trying to make it iterate on itself as opposed to just one-shotting it. I found if I iterate too much, it loses the value—it loses what it was originally trying to ask. If I don't do it enough, it's just too degenerate from Twitch chat. So I have a lot of improvement to do with this idea.

Lex Fridman

Just to clarify: You're feeding in Twitch chat. These are the thoughts—you're a manager, these are the thoughts you have in your head—pick out some of the most profound thoughts, effectively.

ThePrimeagen

It depends on what I want to do. I'm still trying to work on a better system for it. How can I give voice to Twitch chat? Can I make it so that I can create adversarial characters against Twitch chat or for Twitch chat? Can I incorporate YouTube? All that kind of stuff. How do you describe to an LLM how to role-play in its position?

So, just thinking through those kinds of things. Maybe I am having some prompt skills, but it's just not in the coding world yet. Sure. One day, one day I'll get there.

Lex Fridman

I saw that you were playing with different voices. There was a sexy voice that started off as a French voice, and then it turns out ElevenLabs just cannot do a French lady. When you do multilingual French lady, she starts talking. I was like, "What?" I tuned into one of your streams, and there was just this lady, in a sexualized way.

ThePrimeagen

It became too funny, and so we call her Not French Stormy Daniels.

Lex Fridman

Oh, nice. Yeah, but I want to go back to the AI and some of the aspects. My big gripe with AI has nothing to do with its capabilities. It's exactly as capable as it should be capable, because that's what people programmed it as.

The things that I really dislike are, first, there's a whole group of people that are just like, "The end is nigh. AI is here. You just need to stop programming." I cannot tell you—even on, you mentioned Pieter Levels earlier, he made some sort of tweet, and one person's response was, "Yeah, no one in 2025 or whatever should be acquiring hard skills. You should rely on AI for everything," effectively.

And it's just like, these are really damning pieces of advice for young people. Young people are being told that you should never become an expert in anything. You should always offload. The problem is that anyone worth their salt will tell you that AI, though it can produce code, is going to get it wrong in a huge number of cases. And as the code becomes bigger or more complex, or has more input, it's going to just start sloshing back and forth between bugs. So if you don't have those hard skills and you're not ultimately the driver at the end of the day, you're going to find some hard times, and your ability to progress will be directly bound to how good the LLMs are.

ThePrimeagen

So if you believe that the LLM will be vastly superior to humans in the next year, maybe that’s a good bet. But if it isn’t, then your skill ceiling is bound to whatever it is. Even beyond that, there’s a whole information problem, which is: can the thing actually navigate larger-scale problems? Do we even have enough compute power to be able to solve things at this real scale?

Even if we did, if everybody started using it right now, would we have enough compute power for everybody to use it? There are a lot of bounding questions. There are privacy concerns, and I just don’t want people to make the immediate, or what appears to be the obvious, choice where you don’t need hard skills, you don’t need these things, and our life is already going to be one where we just need to think creatively.

It’s like, no, I don’t think so. I think these hard skills are going to be around for quite some time. Even with a massive improvement in AI, you’re going to really be needed to step in regularly for quite some time, as far as I can tell. But I also think that even acquiring the hard skills—whether that means programming from scratch, for example, in the context of programming—is going to make you better at steering the AI.

Lex Fridman

Mhm.

ThePrimeagen

Not just correcting the AI, but steering the AI. I think there’s something where, if you know how a computer works, you can program Python better. It’s maybe counterintuitive, but if you know the low-level abstractions and have some intuition around them, you can steer the high-level abstractions better.

Lex Fridman

Yeah, that just seems to be the case.

ThePrimeagen

Unless, of course, AI becomes truly superintelligent, many levels above us. But that’s very unlikely in the short term, and in the long term, it’s still good, as it gets better and better and better, to be able to steer it and ride the wave of the improvement.

Lex Fridman

Yeah, I’m on that team very much. A lot of people have written to me. I think a lot of developers and programmers are really concerned about the future of their profession in the context of quickly improving AI systems. So, do you think AI will eventually replace programmers?

ThePrimeagen

The hard part about that phrase is that you use the term “eventually.”

Lex Fridman

Yeah.

ThePrimeagen

Meaning, do I think in 5 years, 10 years, or 100 years? What does that term actually mean? I think at some point, if we were able to scale and all things continued at the current rate of improvement, there does come a point where programming as a hard skill does become unnecessary. At some eventual point, way, way down the road, yes.

I don’t know what that point looks like. I don’t know when it’s going to happen. I don’t even attempt to make predictions about that. But there are still some leaps and bounds we need to make, even societally. There are plenty of companies that don’t even allow you to use AI. There are practical problems that exist, so that’s a question I just try not to answer in the direct sense.

There will come a day, if humanity continues and all things continue in a good, positive direction, where a lot of skills will go out the window due to immense computing systems. So, yeah, I’ll give you that one. But I just don’t think it has anything to do with the near term.

Lex Fridman

There’s been no computer improvement up to this date that did not result in more jobs.

ThePrimeagen

Yeah, absolutely.

Lex Fridman

I think we should say that it also depends on how you define programming. When the community moves from Assembly to C, from C to, I don’t know, Python and JavaScript, that’s evolution. That’s really painful for a lot of people who are used to programming in that lower-level language.

ThePrimeagen

Right now, I don’t think we are anywhere near natural language being possible because it’s ambiguous. I think what we’ll end up seeing, as people push really hard into this, is some sort of pseudo-language. It’s going to be a language for AIs in which you prompt, and it’s going to be less ambiguous.

People keep striving toward a less ambiguous state. At that point, you’re just programming. You’re just programming yet another evolution into a higher-level language. Perhaps that is a future in which people will have a more terse language. I’m just not sure how much more terse it can get.

Lex Fridman

Yeah. I mean, all I see is that if you say natural language can be used in the pipeline, you’ve just made it so that many more people can become programmers. That means that much more software will eventually be created, which means there’s that much more software that will need to be maintained. It just becomes a really big snowballing effect.

But there are people who are programmers who are worried about their jobs.

ThePrimeagen

Yeah, not a complete replacement, but maybe a rapid evolution of what it means to be a programmer. Like you mentioned, if natural language becomes a way that you can communicate and program, that means the pool of people who can get programming jobs changes rapidly. So they’re really concerned to some extent, right?

Lex Fridman

Is there something you recommend that a developer or programmer could do to avoid a situation where AI can automate them away?

ThePrimeagen

I think that the bigger the project you can manage, the bigger the thing you can build, and the more understanding you have of both down and up the stack, the more valuable you become. If you understand how to build something on the front end, now you can kick off some LLM task that’s going to go off and make a change to the front end.

While it’s doing that, you can go and kick off something in the CLI tool. You can go and kick off something somewhere else. As these things come back with results, you can review the results, make sure they’re the way you want them, change them, commit them, and go to the next.

You only become more productive if we reach this state where it’s truly able to do that. I think there is a skill to working together with AI, which is why I’m kind of excited to watch you keep trying to do it.

Lex Fridman

Yeah. It’s like we don’t know how it fits exactly, but it feels like AI should be a boost to productivity. I definitely think it’s a boost to the joy of programming. There are a lot of people for whom it’s a job, but it’s also a source of meaning and a source of joy.

Programming is fun. You’re creating something cool and potentially something that a lot of people use. There’s this one thing that really frustrates me. This is kind of going into the Devin category: I want an intern that cares.

ThePrimeagen

Yeah, you don’t get that out of an LLM. It does not care. I don’t want it just to make a UI for me that displays these icons like I asked. I want it to care. I want it to think about it. I want it to present it to me and for me to be like, “Oh, yeah, yeah, that’s great.”

Then I make changes, and later on it’s like, “Actually, you know what? I really rethought this, and it would be way better if we changed this.” It doesn’t actually care about the craft. When you work with an intern or somebody else, they care.

When they refactor something, they actually go over and say, “Yeah, this is actually kind of bad. I’m going to come back to that.” They finish this, they go back over here, and they make this even better. They actually care about the thing itself.

It’s a completely different experience, and I just want something that also cares, that wants to make the thing better, not just simply accomplish the task. I know I’m asking way too much. Now we’re getting into Blade Runner-level AI.

Lex Fridman

I mean, there are so many aspects to caring, but the trivial version of that is a kind of restlessness, where you want to keep improving. I think that is very much what AI could do.

ThePrimeagen

Yeah, we can constantly just ask it, “Can I make this better?” If it keeps doing that, it probably is going to take it to some ridiculous place.

So, actually, it’s also knowing when to stop. I think developing something you can call taste is trying, working extremely hard, and constantly improving until it just feels right: “This is it.” I think that is something AI is not good at. It’s just saying, “Yes, this is it. I’ve iterated 3 times, and 3 was the number. That’s it. We’re now there.”

Ultimately, that is what humans are amazing at: knowing when something is right. This is especially true as you develop taste in a particular industry, context, or application, knowing, “This is it. The rounded corners on this button—that’s exactly it. That’s beautiful.” It’s a sense of beauty, a sense of function and efficiency, and so on.

Lex Fridman

Yeah, humans could do almost like supervision of AI systems in that context.

ThePrimeagen

Yeah. You’ve ranted about Devin, just full of rage.

I mean, first off, the people who run Devin are extremely nice. I want that to be understood. I don’t have some sort of upsetness against them or anything like that. Second, Devin is kind of the full package when it comes to programming. You’re going to give it a task and a repository, and it’s going to try to understand the repository and the task, make the change by exploring it, then actually make a commit to GitHub and explain what it did.

Hopefully, you have this whole asynchronous thing, which is the other part of AI that I actually really like: “Go fix this thing.” Then I can just go and fix this one thing, come back, and go, “Okay, good enough. Merge. Boom.” I want that kind of ability to run and complete things. I think the ideal solution is that you can start giving it small bugs, and it goes and fixes them. You can come back to these backlog tickets that no one ever does, and it actually starts going through those backlog tickets. That’s a really amazing experience.

I love the idea. We can all agree that it sounds great, but every time I’ve done it—and I’ve asked it for many things—I try to keep narrowing down the problems. The narrower the problem, the better it does. If I say, “Just add one singular icon, and when it gets clicked, I want you to do this. Just `console.log` ‘click me.’ At least create me an SVG and place it so it’s nicely placed,” the narrower the task, the more likely it is to be successful.

There’s a certain level of specification where, if you specify too much, it just can’t do it. If you specify too little, it does weird things. It’s this very unique way of playing the balance game. So far, every time I do these things, I end up thinking, “Gosh, you know what? I should just get better at Tailwind and write it myself,” because I always go back and rewrite it. Then it’s just, “Dang it. What am I saving at the end?” I feel like I’m not saving anything yet.

I want it so badly. I actually want AI to be great, because then I can really go fast. I mean, I can go amazingly fast, but then I always think, “Gosh, I should just learn Tailwind myself to the nth degree and go fast.”

Lex Fridman

Yeah, we should also mention that debugging—this might be intuitive or counterintuitive—is something AI is really bad at.

#461

Yeah, that is one of the hardest things. It actually makes you realize how special humans are and how difficult the task of debugging is. Obviously, for trivial debugging, maybe you can find bugs, but the real art of programming is finding logical bugs: extremely complicated, rare bugs and edge cases.

AI can assist, but the hard ones really require so much context, experience, and intuition from operating in a fog full of uncertainty. It’s hard. Of course, AI could create logs, do traces, and process a huge amount of data that humans can’t. Ultimately, that just means it could be a better assistant in debugging versus the actual lead debugger.

I mean, it would be great if it could. The more it can do that, the better, right? As far as I can tell—and correct me where I’m wrong on this—debugging is really just looking at the code, looking at the bug report, and trying to predict where it’s most likely to be accurate, then trying to fix that spot. It’s like, “It’s likely this spot. You said ‘admin panel,’ so it’s slightly off here, here, and here. It’s probably this location.”

That could actually be a really great way to do search, right? Let me do semantic searching. Point me to where this is. Maybe that is a great way to navigate large codebases: smart, intelligent search, as opposed to trying to make it do the thing. Ask it to help you do the thing by pinpointing problems. I’d love to see more of that, because for me, that’s the exciting part.

There’s this really great article by the creator and maintainer of curl. The I in AI stands for intelligence. He writes and maintains curl. Curl has been inundated with security problems, and they’re all from LLMs saying, “Oh, I found a security flaw. Here’s the security flaw,” detailing it in the code. He’s just like, “Okay, how did you reproduce that? Show me.”

If you look at the code right here, that’s actually an impossible situation. You’re going in circles. Security right now is being inundated. These bug bounty programs are being inundated by LLM-submitted responses because the models can’t actually analyze the code beyond basic text prediction: “Oh, this is a `strcpy`. `strcpy` is commonly referred to as this, blah blah blah. Boom, there you go. Here’s the bug.”

It’s just like, “No, that’s actually impossible, because the if statement right beforehand leaves the function if the string is too long. So we don’t even run into this case. It’s impossible, what you’re saying.” Debugging is very interesting.

Lex Fridman

Yeah. For me, the big “if” is whether it can solve that—not solve it completely, but improve it. That would be huge, whether it’s agents or just LLMs integrated into IDEs.

I think there’s this whole idea I call a denial of attention. I think there’s an entire attack vector where people will use LLMs to generate fake bug reports and fake everything else to effectively demotivate and hurt open-source maintainers. Polyfill was the first bug that kind of had this experience: this denial of attention, where an active malicious maintainer hounded the owner. Then a white knight came out and offered to buy it—buy some stuff from under them—and when they bought it, they actually replaced it with malicious code and used it.

There’s a whole security world developing around using these systems in a very aggressive way. It’s a fascinating world we’re entering, but I do agree with you that human developers will be a huge part of that world. The job might evolve, but it’s going to be there.

I didn’t really look at this page. I thought it would be cool to go over it with you. This is again the Stack Overflow—my favorite Stack Overflow developer survey—talking about developers’ sentiment toward and usage of AI systems. The general sentiment is that 61% say yes, they use it, and 25% say no and don’t plan to. The majority use it, and the majority have a favorable sentiment toward it: favorable, very favorable, or indifferent. That looks like over 90%.

That’s really surprising, that that many people have no plan to look into AI. As much as I don’t like using it for coding, I hope one day I can use it more. I’m always looking for the next thing, so I’m surprised that people are that obstinate about it.

Obviously, the second one, the AI tool sentiment, must only include the users who responded yes to the first question, given the number of respondents. I wonder if the people who say no and don’t plan to are people who have tried it and quickly built up the intuition that this really sucks. We could be talking about experienced programmers who are saying, “No, this isn’t making me more productive.”

81% agree that increasing productivity is the biggest benefit that developers identify for AI tools. These are the benefits: increase productivity, speed up learning, greater efficiency, improve accuracy in coding, make workload more manageable, and improve collaboration. Where’s the fun? Increased fun. I would say that’s number 1 for me. Maybe speed of learning is a subcategory of fun, right? If you’re able to learn more and become better, that sounds good.

#461

Yeah, I don’t know. It’s different, because productivity is part of fun, too. There is just a lightness to it. Improved collaboration—maybe all of these elements, for sure. In my time using Copilot, there was certainly a level of wonder that would happen for quite some time. It was just amazing what it could do.

Lex Fridman

Yeah, I’m super impressed by what it can do, even though I don’t use it. It’s amazing to me that we have something that can even get that close.

#461

In terms of the accuracy of AI tools, only 2.7% highly trust them. I would say that you have to be very green to think that you should highly trust an AI output. You should be very skeptical.

Lex Fridman

Yeah, I don’t know where I stand. Probably somewhat distrust. Highly distrust seems aggressive. It does seem like you should definitely be in the somewhat category. You should always assume that there’s something wrong, and then from there, you can challenge it and estimate whether AI can handle complex tasks.

#461

Most people don't think it can handle complex tasks. It seems like people have a good sense of what it's able to handle and what it's not. I would argue that people don't have a good grasp of what “complex” is in programming.

Lex Fridman

Sure.

#461

If you say, “Write me quicksort,” some people think quicksort is super complex. Mhm. But I would argue that that's actually probably the simplest thing you could ask an AI to do, right? Things that are so well documented, it's going to do a great job at that.

Lex Fridman

Yeah, probably high-level design decisions, which people don't even use AI for right now. I guess agents are supposed to be doing that kind of stuff.

#461

That's probably the most difficult thing or the most impactful thing.

Lex Fridman

Well, the most difficult thing is finding bugs.

#461

Yeah. AI tools next year will be writing code and so on.

Lex Fridman

Now, this one, the ethics part, I'm actually super curious about your take on the ethics. Will we see Europe laying down some new regulations?

#461

Oh, boy. What about artists, right? Because the difference between coding and art is very, very simple. If you gave me a sheet of paper, I could draw you a crab. You'd go, “That's a crab.”

But you can't do that with coding. It's right or it's wrong. There's not a variation of interpretation for what a crab is. It's like, no, that statement is just—you cannot make that statement, you know? It's very bounded in what it can express.

Lex Fridman

I can see why artists would find that a very frustrating point.

#461

And then who gets rewarded for all that? Obviously. Then there's the whole thing with coding and licenses. How much of it is GPL-licensed, do you think they've scraped and used as training data?

Lex Fridman

The GPL forces open source. What are you going to do with that one? That means your model might need to be open source. OpenAI may have to be forced open.

#461

Yeah, all their previous stuff could be affected if there's any hint of GPL.

Lex Fridman

Yeah, that's a weird one. That's a really weird one, because most of these models, I think, are training on data they don't technically have the rights to be training on.

#461

Yeah, there are a lot of questions.

It's unspoken, and it's a real Wild West, because you could imagine— I always use Europe because they tend to have maybe the most consumer-protection laws out there. You could imagine what would happen if a law came down that said that if you used a model that produced potentially GPL code, you have to open source it.

How many companies are going to be like, “Oh my gosh”? You have 1 year to get rid of all code that was generated that's potentially GPL-sourced from a model. You could imagine the sheer panic that's going to happen. It would be a fire sale of code.

Lex Fridman

Given all that, what advice can you give to young programmers? This is another question from Reddit, the infinite wisdom of Reddit. What should a person in their early 20s do to move forward in the tech industry? And this is an interesting addition to the question: by doing it, will this be walking on someone else's path?

#461

I'm going to try to answer that question as best I can. I think that if you're entering the tech world, one of the hardest pieces of advice that I took a long time to learn was not to become enamored and addicted—obviously, we talked about that—to programming for way too many hours, forgetting to spend the time I needed with my wife, my friends, all that stuff, and totally wrapping myself up into one activity.

I think, though, it made me who I am, but it was probably an unhealthy activity and probably not a wise activity. The best advice I can give is that you've got to develop the love, the skill, and the desire for it, whether that's just using AI agents, programming yourself, using Zig, or programming JavaScript. Whatever that flavor is that's going to get you coming back every single day, getting the reps in the gym, if you will, for programming.

But also know how to value what is valuable, and don't get lost in the sauce, where you're so stuck on trying to make the next greatest startup that you sacrifice your health, your relationships, or even worse, your own morals to take certain shortcuts that you probably shouldn't be taking in life to achieve these things. I'm sure there are hundreds of horror stories you could hear where people definitely shortcutted their morals for monetary success.

Lex Fridman

Yeah. I mean, the golden handcuffs—comfort can destroy the soul in some sense.

#461

Yeah. That's really important to remember.

Lex Fridman

But there are young people thinking, “Do I even want to be a programmer now?” It seems like AI is getting better and better and better at programming. If they were trying to make that decision, would you still say, “Yeah, if this is something that fills you with joy”?

#461

I still want my kids to learn how to program. If that's a good enough answer, my kids are a decade younger than a young person trying to learn how to program right now. I'm hoping that my kid can run and build whatever he wants in Roblox, so I'm showing him ChatGPT and saying, “All right, let's ask questions. How do we do this?”

It's still extremely confusing for him to do all these things. So it's like, “Let's do this. I want him to learn and be effective.” Maybe one day he has to throw away all those skills in 20 years. But I bet you that whatever hard skills he had to throw away, an entirely new field that none of us have thought about will emerge.

Just like if you had asked somebody in the 1970s about social networks, they'd be like, “What the heck are you even talking about?” Things will exist in the future that are going to be massively different, crazy, and exciting. Maybe in virtual reality. There, maybe all of us actually, down the line, will just be building video games—just entertainment for all. The brave new world of our world.

Lex Fridman

Well, I think entertainment is a kind of trivialized version of what a video game could be. What is the purpose of life, anyway? It could be a deeply fulfilling video game. It doesn't have to be just a dopamine rush. It could be educational, scary, or challenging, forcing an evolution—the leap into adventure that makes up a fulfilling life. That could be video games. Who knows? Especially in virtual reality.

#461

That's the other thing. I play a lot of video games. I think there's a lot of room to make video games deeply fulfilling. There's a lot of space where that can go.

Lex Fridman

I didn't know you played a lot of video games, because when I asked you specifically, “Should I play World of Warcraft or do Advent of Code?” you said, “Advent of Code.”

#461

Advent of Code. That might mean I've never played World of Warcraft, because there are certain games I avoid. Fortnite, by the way, I think was one of them, because I was worried I'd become too addicted.

There are certain games I just know I won't get super addicted to. For example, I'm terrified of Civilization. I've never played a Civilization game because I'm worried it's a dark path that could lead me down. There are some games that really pull you in.

I'm much better with— that's why I play Skyrim. I can play these games, or Baldur's Gate, and moderate how much I play. They can be like a lifelong companion versus an addiction where it's sunrise and you're like, “What's happening with my life?” and I find myself naked behind a dumpster somewhere, just wondering what happened. That's how I choose my video games.

Lex Fridman

You're not the first person who has specifically called out Civilization.

#461

Yeah.

Lex Fridman

I've had more than 1 person, also very high up in the tech world, be like, “Civilization is my downfall. If I get near that game, I'm done.”

#461

Yep. I've never even played the game, and now it makes me think, “Dude, I've got to give this a try. That sounds crazy.”

Lex Fridman

Yeah, and the new one is actually supposed to be really, really good. What were we talking about? Yes—for that same young developer, is there a trajectory through jobs that you could give advice on? You started out with Schedulicity?

#461

Yeah, that was my first full-time job. I had the government-contracting one before that, which wasn't quite full-time. It was in C. It was a lot of fun, and then I built my own startup for quite some time.

If you count either of those as full-time, then those would be the full-time jobs, but Schedulicity was the official one on the books.

Lex Fridman

Is there some value to jumping around, working at one company and then another, to try to figure out what brings you joy?

#461

I think there's a lot to that, because not every job you're going to get is going to be great. Your first job could make you think you hate programming. It happened to me.

I did an internship at a place—I know I keep surprising you with more things I did in the past—called Total Information Management Systems. Remember when I talked about that hours ago, about health care and industrial shipping and all that? It was a C# shop.

It was so bad that after that, I changed my major to mechanical engineering for a semester in college. I thought, “Okay, actually, I like computer science. I hate programming.”

Just because you've had a job doesn't mean it's going to be the one. And here's the best part: if you get a job and you like it, want to do it, and find it exciting, you don't need to change, right?

I think a lot of people are like, “Ooh, I've got to find the next thing. I've been here for 2 years.” There's kind of this “you've got to move around” mindset.

I don't think you have to move around. I don't think it hurts your career because, if anything, you'll gain more responsibility, and you'll be able to talk with way more authority. The next time you interview, you're going to be way more into, “Oh yeah, I had to get these people and these people to be able to do all this stuff.” You can talk with much more authority if you stay at a place longer, and that's nothing but benefits in my book.

It's only if you stay at a place because you're afraid or you don't want to change, because you already have something that works for you and you just never want to change. You're just like, “I get to go in and just be completely mindless.” I think if you go mindless for a couple of years, you'll find yourself—that's the only real danger—you just come out with nothing at all.

Lex Fridman

Yeah. Especially when you're younger, that's the whole point: take the risk, take the leap out to the next thing, to the next thing. And not for money, but for personal joy.

#461

Joy.

Lex Fridman

Yeah. And money could come at the end. That's the best part: when you don't strive for the money, sometimes the money just shows up anyway.

#461

Yep. Some of what makes life worth living is the people you work with, like a good team. Some of it is—not to be generic—but culture matters. It's whatever makes you happy. For example, I just had—I won't call out places—but there are certain companies where everybody is very 9-to-5. Even if the work is exciting, they don't work hard enough. I would say I'm one of those people who likes to go all out, who likes to be surrounded by people who are super passionate. Now, to be fair, a lot of them don't have families.

Lex Fridman

Yeah, it's a fascinating choice. I really don't want to talk down on any choice, like work-life balance or not. But I think both are beautiful paths, and if you really derive a lot of value and joy from your work, going all in—at least for some stretch of your life—is a beautiful thing to do.

Just all-out, full-on passion, sacrificing a lot of social life, all that kind of stuff. I don't know, that could also be beautiful. There is going to be something very, very exciting about that in some sense, especially if you're building your own thing. I could imagine that would be very exciting. If I was Jeff Bezos building Amazon, one could imagine that those early years were probably very rough, and the amount of hours he probably put in were very, very rough.

But I will say that there's this unique aspect in our culture where we make this an equal trade-off between family and work. Like, “Oh, you do or you don't have to have kids.” My only real notion with that is that you will never know your capacity for love until you have kids. You just don't know.

Some people are like, “Oh yeah, but I love my dog.” It's just like, I loved my dogs, too. Then I had kids, and now my dogs are—they're all right. I like them. I could come home and pet Indie, and I'm like, “Indie.” Then I'm just like, “Okay, bye, Indie.” I can't even describe the difference between the two because they're not even the same.

That trade-off you're making is something no one can tell you what it's like, because there's a real reality that's right now. I'm sure—I'm 100% positive this is true with my wife as well—that if right now we got news that said, “You have some medical procedure where, if we do this, you will die, but your kid will live,” there's not a question in my soul that I wouldn't do that.

If I could look into the future and had to die right now, knowing that my kids would have a better life, they would be happier, they would be more fulfilled, and all those things, I guarantee you either my wife or I would take that every single time. You will never be able to say that about most things. People will jokingly say that until it's actually on the line.

#461

Mhm.

Lex Fridman

But with that, you just have this ferociousness. I can break out in a sweat thinking about somebody fictionally pushing my kid to the ground, actually getting real adrenaline responses flowing through my body. It's just such a different world, and it's hard to explain. You could never have convinced me when I was young that it would be this big.

#461

Yeah. Yeah. Yeah. I thought I knew. I didn't know. But to add on top of that, some of the most successful people I know, some of the most productive people I know, have kids. So I don't know if it's even a trade-off. That love you feel seems to be a catalyst to make sure you have less time, but you're going to use that time better to be productive.

Lex Fridman

I would argue that it definitely changed a lot of my life and how I approach problems and everything in a very different way. Let me ask some random questions from Reddit. On a scale of 1 to 10, how much do you hate every product Microsoft has ever created, and why is it a 10?

#461

Okay, I think we covered that.

Lex Fridman

We haven't technically covered it. There you go. All right, go ahead. Go ahead.

#461

The only thing I'll say is that I don't like that Microsoft pretends to be the good guy, when what they really want is to get you addicted to their products, to get you to use their products as much as possible so they can extract as much money out of you.

Lex Fridman

Well, in this world, are there really good guys?

#461

That's a great point. I would argue Neovim is a great guy. There's no way they can make money. Justin Keyes is the benevolent dictator, and he thinks deeply about the product and tries to make it the best possible.

Whereas something like Microsoft—they made VS Code as a loss leader. Copilot is probably operating as a loss leader. These things are all getting you so tied into GitHub, remote workspaces, CI, Copilot. You've become this trapped-in-permanent person. If that price rises, the switching cost is so great at some point that you'll never be able to switch. That's my only fear: Microsoft was once accused of EEE, and it feels like they're EEEing again.

Lex Fridman

Yeah, I'm nervous about criticizing a good thing because you could see an incentive to do that good thing, like Google creating all these services that don't make money, like Gmail, for example. You can sort of cynically say they're only doing that to tie you into an ecosystem so they can basically keep you for life. But also, it's awesome that they created Gmail.

#461

Yeah, and they create an incredible product, right? So I can side with you on that one. It is a good product. VS Code is a good product.

Yeah, don't put that on the “but.” It's fine. They did a great job.

Lex Fridman

There are going to be financial incentives behind some of these companies. And by the way, me defending—not defending, but saying positive things about Microsoft—is just so I could talk shit to Prime. But that's—

#461

I love that, by the way. Linux is my first and last love. The spirit of Linux and open source is a beautiful thing.

I do think that when you have these large corporations, even when they try to do good, oftentimes the profit imperative just takes over, and they can corrupt themselves. Microsoft has a long history of doing just that to themselves.

Lex Fridman

Yeah. That said, they've done—you know, they have, you could say for cynical reasons because they want to seem like the good guy amongst developers—but they've done a lot to support open source. It's just like Meta. Meta has done an insane amount to support open source.

#461

Yeah. You can say—actually, for that one, I don't even know if I can make a financial or cynical case for why Meta is open-sourcing Llama and these things.

Lex Fridman

Yeah, that one's confusing. It just seems great.

#461

Maybe for hiring, but no, I think that's a legitimate, ethical, really powerful decision. Sometimes these companies, because they have a lot of cash, can do the right thing.

Lex Fridman

Yeah, it's a really positive way to look at it, and I think that's really nice. But we should always be skeptical.

#461

Yeah. Because at the end of the day, companies—they're not good, they're not bad, right? They're morally neutral.

Lex Fridman

Well, it's the people that are running them, the decisions those people make, that are really where the bad or the good comes from.

Another question asks if he knows how to milk a cow. I've already asked that.

#461

Oh, no.

Lex Fridman

You don't know?

#461

I've never milked a cow. Never milked a cow. I've almost been killed by a cow, but never milked a cow.

Lex Fridman

Do you ever ride a bull?

#461

No.

Lex Fridman

All right. Why male models?

#461

Okay, so I can explain that one.

Lex Fridman

Mhm.

#461

I will say something like, “I really dislike the color purple because the color purple makes me upset.” I don't know, just something very benign. But then someone right afterward will be like, “But why don't you like the color purple?” Right? It would just be like Derek Zoolander. It's just like, I get done with a 5-minute talk about it, and then the next question is like, “But seriously, why, though?” It's just like, “Why male models?”

Lex Fridman

Yeah. So that's the Zoolander reference, when there's a long explanation: “Why male models?”

#461

And he agrees and then forgets.

Lex Fridman

Yep.

What is Ligma?

#461

You know, I've died by Ligma quite a few times.

Lex Fridman

Ligma. So, do you know the origin story of Ligma?

#461

No.

Lex Fridman

So, Ninja, the famous streamer—someone got him with Ligma. They said something like, “Have you heard about Ligma?” And he was like, “No.” Then they're like, “Oh, Ligma balls.” Right? After that, Ninja got so hurt by getting had by that that he started banning anyone in chat who said the word “Ligma,” or something like that.

#461

And so then it became, you know, if you don't embrace the meme—

Lex Fridman

Yep, you get destroyed.

#461

So, of course, he gets destroyed. And so then the whole goal is: can people get me with Ligma?

TJ did “Eye Ladies.” He was like, “Oh, did you hear that e-girls got renamed to Eye Ladies?” I didn’t even see it coming. I was just like, “What?” And he was like, “Ye ladies, nuts on your face.” And then it was just like, “Oh my gosh.”

Pirate Software also got me with, “Oh, have you heard about Google SIMA?” SIMA is a real product by Google. I was like, “Oh, yeah, I’ve heard about this. What is this again?” He was like, “Yeah, SIMA balls.” It’s just like, “Dang it. How do I keep—?” So I’ve had it happen live on stream many, many times. I’ve died by Ligma the most.

Lex Fridman

Please ask him about the size of his dict.

#461

Okay, so that’s dict. That’s a dictionary in Python. Who doesn’t love dicks? Yeah, that’s a great question. It’s just a dict party when you use Python. I love dict. That should be a T-shirt.

Lex Fridman

That’s actually a hilarious teaser.

#461

But on Stack Overflow, you can ask any question you want. I decided to craft a question one day on Stack Overflow that said, “How to measure your dicts?” Then I proceeded to really go to town and explain all the different things, like, “Well, what about the cost of the strings and the references?” When you really get both hands on your dict and really go after it, I threw in some innuendos.

The Stack Overflow team deleted the question. Then someone handwrote me an email explaining why they deleted it and complimented me on how thorough and thoughtful the question was, and on how thoroughly and thoughtfully I had woven in innuendos. The entire team was impressed, but it was inappropriate and had to be deleted. They told me not to do it again or they were going to ban my account.

It was a very funny moment. I was like, “Oh, that’s funny.” That happened about 6 years ago. Last year, I was at a conference, and there was a guy wearing a Stack Overflow name tag. I was like, “Oh, you work at Stack Overflow?” He was like, “Oh, yeah, I do.” I said, “Do I have a story for you?” And he goes, “No, wait a second. Are you the dict guy?” That was his only question. I was just like, “Let’s go.” I didn’t even say anything about me, and he already knew immediately that I was the dict guy.

I should say, in all seriousness, I think I’ve had a bunch of conversations in the Python world where I would have to mention the name of this data structure, and it makes me uncomfortable every time. It’s a very unfortunate shortening of the word “dictionary”: dict. It’s just like when I go to the hardware store and ask for caulk, and there’s always a nice old lady. I ask her where to find it, and it’s very uncomfortable. I try to pronounce it as clearly as I can, really get that L in there, like “caulk,” just to be clear, and try to avoid eye contact the whole time.

Lex Fridman

You said God was a big part of your life. Can you speak to that a little bit more? Who is God, and what role did he play in your life?

#461

I did talk about that one important evening where, for whatever reason, I gained my conscience in that moment. Obviously, for me, I grew up with a life where I would probably describe myself as a functional atheist. I went to church a handful of times. I can’t really remember actually going to church as a family in any sort of sense, so there wasn’t some super-strong tie or anything like that to it. Like pretty much anyone else growing up in America in the 90s, you had some sort of impact or intersection with church at some point in your life. That was just a very normal thing, I would probably say.

When that happened, it was a fairly big surprise for me. I wasn’t necessarily going in that direction or deciding to do any of those things. For me, it’s obviously the turning point of my entire life. I cannot speak to who I would be now without that. I can just tell you that I wouldn’t have had the drive. I probably would not have completed college. I would not have found my wife or had my kids. I don’t think I would have known how to value people without that whole thing. My value for people would have been very, very small because I would have continued objectifying people in the way I was.

Probably the biggest thing is there’s this one verse—I don’t even know where it’s at—that effectively says that we love because he first loved us. For me, I don’t think I would have ever lived a life that was happy without this, and I didn’t even know that was an option for me. It was a very tough set of years for me. I was very, very sad and constantly looking for something to fulfill me. I didn’t have any confidence. I didn’t have any joy. I felt very sad.

That was kind of this moment where, for the first time ever, I just felt like I didn’t have to live up to a standard. The standards had already been paid for. Everything was already— that’s the free gift. That’s the exchange. For the first time, I didn’t have to be the cool guy. I didn’t have to have all the right words. I didn’t have to go on a sexual conquest to find validation. I didn’t have to do any of those things. It was exceptionally liberating.

So, who is God? That’s more of a catechism question, perhaps. What is man? Who is God? Those are much harder questions. I believe that any time you try to get too deep into describing who God is, you typically fall into Christian heresy.

Lex Fridman

But for you, he gave you a chance to be happy.

#461

Yeah, he gave me a chance not just to be happy, but also made it so that, for the first time, I can actually feel forgiven, I guess, in some sense, and able to forgive people who hurt me. For a long time, I had this weight I carried around from the things I hated about high school and all that kind of stuff. Through that experience, I wrote down every last person’s name and actually held onto the list for quite some time. This was the list of people I forgave. I read it a few times because I couldn’t let myself be angry or consumed by that kind of stuff. Hate is so sticky, right? It sticks for a lifetime. There really is only one cure for hate, which is forgiveness. I just don’t think you can get rid of it without that.

I had to choose to forgive these people and move on, and it really freed me. I never would have thought of forgiveness as a means for that change if I hadn’t first experienced it myself.

Lex Fridman

What’s the role of love in the human condition? To go to the philosophical, what’s been the role of love in your life?

#461

It’s very obvious that every person wants or desires love. My wife recently convinced me to watch Love Is Blind with her one time. If you’re not familiar with it, it feels like a disastrous experiment designed to cause crazy feelings. The idea is that if you just don’t see somebody, you can fall in love with somebody and want to marry them after 10 days or some very small period of time.

What you really end up seeing is all these people who are just desperate for actual love. I told my wife, “It’s like love gladiators.” We’re watching people battle it out for drama, and really what they want is love. They’re fighting to the death in love, if you will. It’s this almost kind of sad aspect to watch.

I think it’s hard to say what its role is in the human experience because I think it’s just something that we all naturally not just want, but need. I don’t think that you can really progress. When I say the word “love,” I’d like to narrow it down a bit more. I don’t mean eros, the Greek word, like sexy love. I think that parental and friendship love are extremely important, and I think agape, like God love, is also very important.

Agape love is the one that is superior to them all, but obviously different, and also co-equal with the parental ones and all that. You kind of need this mixture of them all. Each one is different for each reason and where it’s applied. I just don’t see a world in which life is good in any way without that as a very foundational piece.

I didn’t come here trying to quote any sort of scripture, but it says that it’s not the nails that hung him there. It’s love. That’s the reason why these things happen. If forgiveness is the requirement to pay off hate in some sense, then love has to be the motivation for forgiveness.

Lex Fridman

Yeah, that’s the tragic aspect of life. I think there’s a deep loneliness in all of us and a longing—a longing to be a part of this bigger thing. That longing is love, and it has many names. But, yeah, the love aspect of it is the beautiful aspect of life. The tragedies, the loneliness, and the unfortunate suffering are a fundamental part of life, and the beautiful aspect is love.

I think that’s a good time to mention our Reddit, the place for everlasting positivity and love. Somebody wrote, “Please thank him for his everlasting positivity and give him a big hug for me.” So I won’t give you a big hug on camera because I’m afraid I’ll get a boner, and that will be very unfortunate.

#461

Hey, let’s not bring dicts into this again. Okay, it’s my favorite data structure. Like I said, I love dicts. All kinds of dicts. Ordered dicts. Unordered. I know what it takes. I don’t discriminate.

And, yeah, just to say, big thank you. I listen to you a lot, and I really enjoy it. I’ve been going through a lot of shit myself, and the positivity you have, even when you’re building the stupidest shit, radiates from you. It inspires me to be a good person.

You inspire me to build stuff. So, thank you. And I'm sure there are many others who listen to you for the same reason. Thank you for your positivity, for being the light in many people's lives, and for talking today, brother.

Lex Fridman

Dang, that was very kind. I really do appreciate all those extremely nice words, even from Reddit. That's very surprising, but thank you. I mean, I know you know that you've changed many people's lives, and I'm sure you've received letters from people whose lives have been changed by actions and things you've said and things you've done. One of the best parts about doing this is that you get a chance to potentially improve somebody's life.

You get to interview a lot of people. There's a lot of people who listened to Chris Lattner and saw his excitement for Swift, probably went and learned Swift, then got really amazing jobs, and it can all be traced back to you and that interview. Those are amazing things. And the same goes back to you. You've done a lot of good stuff.

#461

Right back at you, brother. Thank you for talking today.