Skip to content
Lex Fridman PodcastLex Fridman Podcast

Brian Kernighan: UNIX, C, AWK, AMPL, and Go Programming | Lex Fridman Podcast #109

Brian Kernighan is a professor of computer science at Princeton University. He co-authored the C Programming Language with Dennis Ritchie (creator of C) and has written a lot of books on programming, computers, and life including the Practice of Programming, the Go Programming Language, his latest UNIX: A History and a Memoir. He co-created AWK, the text processing language used by Linux folks like myself. He co-designed AMPL, an algebraic modeling language for large-scale optimization. Support this podcast by supporting our sponsors: - Eight Sleep: https://eightsleep.com/lex - Raycon: http://buyraycon.com/lex EPISODE LINKS: Brian's website: https://www.cs.princeton.edu/~bwk/ Unix: A History and a Memoir (book): https://amzn.to/3fFJ1yM Understanding the Digital World (book): https://amzn.to/30ktBJI PODCAST INFO: Podcast website: https://lexfridman.com/podcast Apple Podcasts: https://apple.co/2lwqZIr Spotify: https://spoti.fi/2nEwCF8 RSS: https://lexfridman.com/feed/podcast/ Full episodes playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4 Clips playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOeciFP3CBCIEElOJeitOr41 OUTLINE: 0:00 - Introduction 4:24 - UNIX early days 22:09 - Unix philosophy 31:54 - Is programming art or science? 35:18 - AWK 42:03 - Programming setup 46:39 - History of programming languages 52:48 - C programming language 58:44 - Go language 1:01:57 - Learning new programming languages 1:04:57 - Javascript 1:08:16 - Variety of programming languages 1:10:30 - AMPL 1:18:01 - Graph theory 1:22:20 - AI in 1964 1:27:50 - Future of AI 1:29:47 - Moore's law 1:32:54 - Computers in our world 1:40:37 - Life CONNECT: - Subscribe to this YouTube channel - Twitter: https://twitter.com/lexfridman - LinkedIn: https://www.linkedin.com/in/lexfridman - Facebook: https://www.facebook.com/LexFridmanPage - Instagram: https://www.instagram.com/lexfridman - Medium: https://medium.com/@lexfridman - Support on Patreon: https://www.patreon.com/lexfridman

Lex FridmanhostBrian Kernighanguest
Jul 18, 20201h 43mWatch on YouTube ↗

At a glance

WHAT IT’S REALLY ABOUT

Brian Kernighan on Unix, C, AWK, Go, and Computing’s Future

  1. Lex Fridman interviews Brian Kernighan about the origins of Unix at Bell Labs, its philosophy, and how constraints on early hardware shaped elegant, general designs like the Unix file model.
  2. They trace the evolution of programming languages from assembly to C, Go, JavaScript, and beyond, discussing why C endured, how Go modernizes its ideas, and how tools like AWK and grep empower rapid text and data processing.
  3. Kernighan reflects on AMPL and optimization modeling, the role of examples and good books in teaching programming, and the rise of large library ecosystems that both empower and obscure modern software.
  4. The conversation closes with his cautious optimism about AI, concerns about bias and privacy, the social impact of ubiquitous computing, and the enduring joy of building simple tools that other people actually use.

IDEAS WORTH REMEMBERING

5 ideas

Resource constraints drove Unix’s simplicity and power.

Early Unix had to run on tiny machines like the PDP-7, forcing minimal mechanisms and general interfaces (e.g., ‘everything is a file’) that made the system efficient, portable, and easy to build on.

Unix was designed as a programmer’s environment, not a product vertical.

Its goal was to make writing programs easy and productive; that fostered a strong developer community, rapid tool creation, and a virtuous cycle of programmers building tools for other programmers.

Clear examples are as important as formal language specs.

In books like *The C Programming Language*, Kernighan focused on small, realistic examples (e.g., text processors, ‘hello, world’) that show how to solve real tasks, not just syntax, enabling readers to adapt patterns to their own problems.

Small, purpose-built tools like AWK and grep offer huge leverage.

AWK’s default behaviors (line-by-line processing, field splitting, pattern–action structure) and grep’s simple text search model make many data tasks a one- or two-line script, giving high “bang for the buck” for everyday work.

General-purpose modeling languages separate models, data, and solvers.

AMPL lets users express optimization problems in human-readable algebraic form, keep that model independent from data, and plug it into different solvers—making large-scale optimization more maintainable and collaborative.

WORDS WORTH SAVING

5 quotes

In the beginning was the word, and the word—then there was time-sharing systems.

Brian Kernighan

Ken Thompson wrote an operating system in three weeks, which ultimately became Unix.

Brian Kernighan

One of the reasons programming was fun in the old days was that you were really building it all yourself.

Brian Kernighan

I think in terms of programming languages, you get the most bang for the buck by learning AWK.

Brian Kernighan

Don’t comment bad code, rewrite it.

Brian Kernighan

History and philosophy of Unix and Bell LabsEvolution of programming languages (assembly, Fortran, C, Go, JavaScript, etc.)Unix tools and scripting: AWK, grep, shells, editorsAMPL and algebraic modeling for optimizationProgramming practice: style, examples, libraries, and pedagogyAI past and present: expectations, bias, and societal impactFuture of computing, Moore’s Law, and human–computer interaction

High quality AI-generated summary created from speaker-labeled transcript.

Get more out of YouTube videos.

High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.

Add to Chrome