Skip to content
Lex Fridman PodcastLex Fridman Podcast

James Gosling: Java, JVM, Emacs, and the Early Days of Computing | Lex Fridman Podcast #126

James Gosling is the founder and lead designer of the Java programming language. Please check out our sponsors to get a discount and to support this podcast: - Public Goods: https://publicgoods.com/lex and use code LEX - BetterHelp: https://betterhelp.com/lex - ExpressVPN: https://www.expressvpn.com/lexpod EPISODE LINKS: James Twitter: https://twitter.com/errcraft James Wiki: https://en.wikipedia.org/wiki/James_Gosling 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:45 - Irrational numbers 8:04 - Math and programming 10:36 - Coding style 14:41 - First computer 23:54 - Lisp 27:22 - Write an Emacs implementation in C 35:15 - Early days of the Internet 45:57 - Elon Musk, Steve Jobs, Jeff Bezos 56:13 - Work hard and smart 58:48 - Open source 1:10:25 - Java 1:28:31 - Java virtual machine 1:44:05 - Android 1:47:04 - Advice 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 FridmanhostJames Goslingguest
Sep 24, 20201h 51mWatch on YouTube ↗

EVERY SPOKEN WORD

  1. 0:004:45

    Introduction

    1. LF

      The following is a conversation with James Gosling, the founder and lead designer behind the Java programming language, which in many indices is the most popular programming language in the world, or is always at least in the top two or three. We only had a limited time for this conversation, but I'm sure we'll talk again several times in this podcast. A quick summary of the sponsors: Public Goods, BetterHelp, and ExpressVPN. Please check out these sponsors in the description to get a discount and to support this podcast. As a side note, let me say that Java is the language with which I first learned object-oriented programming, and with it, the art and science of software engineering. Also, early on in my undergraduate education, I took a course on concurrent programming with Java. Looking back at that time, before I fell in love with neural networks, the art of parallel computing was both algorithmically and philosophically fascinating to me. The concept of a computer in my mind before then was something that does one thing at a time. The idea that we could create an abstraction of parallelism where you can do many things at the same time while still guaranteeing stability and correctness was beautiful. While some folks in college took drugs to expand their mind, I took concurrent programming. If you enjoy this thing, subscribe on YouTube, review it with five stars on Apple Podcast, follow on Spotify, support on Patreon, or connect with me on Twitter, @lexfridman. As usual, I'll do a few minutes of ads now and no ads in the middle. I try to make these interesting, but I do give you timestamps, so go ahead and skip, but please do check out the sponsors by clicking the links in the description. It's the best way to support this podcast. This show, sponsored by Public Goods, the one-stop shop for affordable, sustainable, healthy household products. I take their fish oil and use their toothbrush, for example. Their products often have a minimalist black and white design that I find to be just beautiful. Some people ask why I wear this black suit and tie. There's a simplicity to it that, to me, focuses my mind on the most important bits of every moment of every day, pulling only at the thread of the essential in all that life has to throw at me. It's not about how I look, it's about how I feel. That's what design is to me; creating an inner conscious experience, not an external look. Anyway, Public Goods plants one tree for every order placed, which is kind of cool. Visit publicgoods.com/lex or use code Lex at checkout to get 15 bucks off your first order. This show is also sponsored by BetterHelp, spelled H-E-L-P, help. Check it out at betterhelp.com/lex. They figure out what you need and match you with a licensed professional therapist in under 48 hours. I chat with a person on there and enjoy it. Of course, I also regularly talk to David Goggins these days, who is definitely not a licensed professional therapist, but he does help me meet his and my demons and become comfortable to exist in their presence. Everyone is different, but for me, I think suffering is essential for creation, but you can suffer beautifully, in a way that doesn't destroy you. I think therapy can help in whatever form that therapy takes, and I do think that BetterHelp is an option worth trying. They're easy, private, affordable, and available worldwide. You can communicate by text any time and schedule weekly audio and video sessions. Check it out at betterhelp.com/lex. This show is also sponsored by ExpressVPN. You can use it to unlock movies and shows that are only available in other countries. I did this recently with Star Trek Discovery on UK Netflix, mostly because I wonder what it's like to live in London. I'm thinking of moving from Boston to a place where I can build the business I've always dreamed of building. London is probably not in the top three, but top 10 for sure. The number one choice currently is Austin, for many reasons that I'll probably speak to another time. San Francisco unfortunately dropped out from the number one spot, but it's still in the running. If you have advice, let me know. Anyway, check out ExpressVPN. It lets you change your location to almost 100 countries and it's super fast. Go to expressvpn.com/lexpod to get an extra three months of ExpressVPN for free. That's expressvpn.com/lexpod. And now, here's my conversation with James Gosling.

  2. 4:458:04

    Irrational numbers

    1. LF

      I've read somewhere that the square root of two is your favorite irrational number.

    2. JG

      I have no idea where that got started.

    3. LF

      (laughs)

    4. JG

      Um...

    5. LF

      Is there any truth to it? Is there anything in mathematics or numbers that you find beautiful?

    6. JG

      Oh, well, there's lots of things in, in math that's really beautiful. Um, you know, I, I used to consider myself really good at math and these days I consider myself really bad at math. I never had... really had a thing for the square root of two, but when I was a teenager, there was this book called the, The Dictionary of Curious and Interesting Numbers.

    7. LF

      Mm-hmm.

    8. JG

      Which, for some reason, I read through and damn near memorized the whole thing. And I started this weird habit of when I was like filling out checks, you know, or, you know, paying for things with credit cards, I would want to make the, the receipt add up to an interesting number.

    9. LF

      Hmm. Is there some numbers that stuck with you that just kind of make you feel good?

    10. JG

      They all have a story and fortunately, I've actually mostly forgotten all of them.

    11. LF

      (laughs)

    12. (laughs)

    13. JG

      Um...

    14. LF

      Are they, uh, so like 42? Uh...

    15. JG

      Well, yeah, I mean-

    16. LF

      That one-

    17. JG

      42 is pretty magical.

    18. LF

      And then the irrationals. I mean, but is there a square root of two story in there somewhere? How did that-

    19. JG

      Well-

    20. LF

      ... rumor get started?

    21. JG

      ... in that it's, it's like the only number that has destroyed religion.

    22. LF

      (laughs) In which way? (laughs)

    23. JG

      Well, the, the Pythagoreans, they, they believed that all numbers were perfect and you could re- represent anything as, as a, as a rational number. And, um, in that, in that time period, um, the, this proof came out that there was no, you know, rational fraction whose value was equal to the square root of two.

    24. LF

      And that-

    25. JG

      Huh.

    26. LF

      ... that means nothing in this world is perfect, not even mathematics.

    27. JG

      Well, it, it means that your definition of perfect was imperfect. (laughs)

    28. LF

      Well then-

    29. JG

      Right?

    30. LF

      ... then there's the Godel incompleteness theorems in the 20th century that ruined it once again for everybody.

  3. 8:0410:36

    Math and programming

    1. LF

      so with your kind of early, uh, love or appreciation of the beauty of mathematics, do, do you see a parallel between that world and the world of programming?

    2. JG

      You know, programming is all about logical structure, understanding the, the patterns that, um, come out of computation, understanding sort of... I mean, it's often like, you know, the path through the graph of possibilities to find a, a short, a short route.

    3. LF

      Meaning like, uh, find a short program that gets the job done-

    4. JG

      Yeah.

    5. LF

      ... kind of thing? But, uh, so then on the topic of irrational numbers, (laughs) do you, do you see, do you see programming... You just painted it so cleanly, uh, it's a little, this trajectory to find like a nice little program, but do you see it as fundamentally messy-

    6. JG

      Um-

    7. LF

      ... m- maybe unlike mathematics?

    8. JG

      I don't think of it as... I mean, I mean, y- you know, you watch somebody who's good at math do math and, you know, often it's, it's fairly messy. Sometimes it's kind of magical. Um, when I was a grad student, um, one of the students, his name was Jim Saxh, was... He had this, this, this, this, this reputation of being sort of a, a walking, talking human, uh, theorem proving machine.

    9. LF

      Hmm.

    10. JG

      And if you were having a hard problem with something, you could just, like, accost him in the hall and say, "Jim, da-da-da-da," and, and he would do this, this, this funny thing where he would stand up straight, his eyes would kind of defocus. He'd go, "Uh..." You know, just, just like you, you know, like, like something in today's movies. He'd just be like, "Uh..."

    11. LF

      Yeah.

    12. JG

      And then he'd straighten up and say, "N log N," and walk away.

    13. LF

      (laughs)

    14. JG

      And, and y- and you'd go, "Well, okay, so N log N is the answer. How did he get there?" By which time he's, you know, down the hallway somewhere.

    15. LF

      Yeah. Y- yeah, he's just the, the oracle, the black box that just gives you the answer.

    16. JG

      Yeah.

    17. LF

      You-

    18. JG

      And then you have to figure out the path from the question to the answer.

  4. 10:3614:41

    Coding style

    1. JG

    2. LF

      I think in one of the videos I watched you mentioned, uh, Don Knuth, uh, well, at least recommending his, uh, you know, his, hi- his book as something people should read.

    3. JG

      Oh yeah.

    4. LF

      But in terms of, you know, theoretical computer science, do y- do you see something beautiful in, in, that has been inspiring to you, speaking of N log N, in your work on programming languages, uh, that's in the, in the, that whole world of algorithms and complexity and, you know, these kinds of more formal mathematical things?

    5. JG

      Um...

    6. LF

      Or did that not really stick with you in your programming life?

    7. JG

      W- it, it did stick pretty c- clearly for me, because one of the things that I care about is being able to (breathes deeply) sort of look at a piece of code and, and be able to prove to myself that it works. Um, you know, and, you know, so, so for example, I find that, um, I'm, I'm at odds with many of the people around me over, um, issues about, like, how you lay out a piece of software, right? You know, so, so software engineers get really cranky about how they format their- the documents that are the programs, you know, w- where they put new lines and where they put, you know-

    8. LF

      The braces, and-

    9. JG

      The braces and-

    10. LF

      ... spaces and tabs.

    11. JG

      ... all the rest of that, right? And...I tend to go for a, a style that's very dense.

    12. LF

      Hmm.

    13. JG

      Um...

    14. LF

      So minimize the white space.

    15. JG

      Um, yeah. Well, to maximize the amount that I can see at once, right?

    16. LF

      Got it.

    17. JG

      So I like to be able to see a whole function and to understand what it does, rather than have to go scroll, scroll, scroll and remember, right?

    18. LF

      Yeah. I'm with you on-

    19. JG

      Yeah.

    20. LF

      ... that. Yeah. That's...

    21. JG

      And-

    22. LF

      And people don't like that?

    23. JG

      Yeah. I've, I've had-

    24. LF

      (laughs)

    25. JG

      I, I've had, you know, multiple times when engineering teams have, uh, staged what was effectively an intervention.

    26. LF

      (laughs)

    27. JG

      Um, you know, where they, they, they invite me to a meeting and everybody's arrived before me, and they sort of all look at me and say, "James, about your coding style."

    28. LF

      (laughs)

    29. JG

      I'm sort of an odd person to be programming because I don't think very well verbally. Um, I am just naturally a slow reader.

    30. LF

      Hmm.

  5. 14:4123:54

    First computer

    1. LF

      access. What's the first program you've ever written?

    2. JG

      Oh.

    3. LF

      (laughs)

    4. JG

      I have no idea what the first one was. I mean, I, I know the first machine that I learnt, that, that I learned to program on.

    5. LF

      What is it?

    6. JG

      Was a, a PDP-8, um, at the University of Calgary.

    7. LF

      Do you remember the specs?

    8. JG

      Oh yeah. It... So, so the thing had 4K of RAM.

    9. LF

      Nice.

    10. JG

      12 bit words. The clock rate was, um, it was about a third of a megahertz.

    11. LF

      Oh, so it didn't even get to the, to the M. Okay.

    12. JG

      Yeah.

    13. LF

      (laughs)

    14. JG

      Yeah. So, you know, we're, we're like 10,000 times faster these days. Um...

    15. LF

      And was this kind of a, like a super compute- like a serious computer for-

    16. JG

      No, the PDP-8I was the, the first thing that people were calling like mini computer.

    17. LF

      Got it.

    18. JG

      They were sort of inexpensive enough that y- that a university lab could maybe afford to buy one.

    19. LF

      And was there time-sharing, all that kind of stuff? Or no?

    20. JG

      Um, there, there actually was a time-sharing OS for that, but it wasn't used really widely. The machine that I learned on was one that was kind of hidden in the back corner of the, of the computer center. Um, and it was, it was bought as a, as part of a, a, um, project to do computer networking. Um, but, you know, they didn't actually use it very much. It was mostly just kind of sitting there.

    21. LF

      Mm-hmm.

    22. JG

      And it was kind of sitting there and I noticed it was just kind of sitting there. And so I started fooling around with it, and nobody seemed to mind. So I just kept doing that and...

    23. LF

      It had a keyboard and like a, a monitor? Or, or were you-

    24. JG

      Oh, this is way before monitors were common. So it was, it was literally a, a Model 33 Teletype...

    25. LF

      Okay.

    26. JG

      ... with a paper tape reader. (laughs)

    27. LF

      (laughs) Okay, so the user interface wasn't very good. Okay. (laughs)

    28. JG

      Yeah. Yeah. It was-

    29. LF

      Uh...

    30. JG

      It was the first computer ever built with integrated circuits. But by integrated circuits, I mean that they would have like 10 or 12 transistors on one piece of silicon.

  6. 23:5427:22

    Lisp

    1. LF

      ... world. That said, you've also showed appreciation for the greatest language, um, ever that, uh, I think everyone agrees is Lisp. Um-

    2. JG

      Well, Lisp is definitely on my list of the greatest ones that have li- have, um, existed.

    3. LF

      Is that at number one? Or, I mean...

    4. JG

      Um...

    5. LF

      Or are you... ? I mean...

    6. JG

      You know, the... you know, the thing is that it's-

    7. LF

      (laughs)

    8. JG

      ... that... y- you know, I wouldn't put it number one, no.

    9. LF

      Is it the parentheses? What, uh-

    10. JG

      Um, n- no, no.

    11. LF

      What do you love and what do you not love about Lisp?

    12. JG

      Um-Well, I guess the number one thing to not love about it, it is so freaking many parentheses.

    13. LF

      Yeah.

    14. JG

      Um, on the, on the love thing is, you know, out of those tons of parentheses, you actually get an interesting language structure. And I've always thought that there was a friendlier version of Lisp hiding out there somewhere. Um, but I've never really spent much time...

    15. LF

      Thinking about it.

    16. JG

      ... thinking about it. But, you know, so like, like up the food chain for me, um, the, from Lisp is Simula, which a very small number of people have ever used.

    17. LF

      But a lot of people, I think, had a huge influence, right?

    18. JG

      Yeah.

    19. LF

      Um, you know, the programming but... And the Simula, I- I apologize if I'm wrong on this, but is that one of the first functional languages?

    20. JG

      Um...

    21. LF

      Or no?

    22. JG

      No. It was, it was-

    23. LF

      Object-oriented?

    24. JG

      It was the first object-oriented programming language.

    25. LF

      Yes, yeah. Got it.

    26. JG

      It's really where object-oriented and languages sort of came together. Um, and it was also the, the language where coroutines first showed up as a part of the language. So, you could have a programming style that was... You could think of it as multi-par- uh, sort of multi-threaded with a lot of parallel- parallelism.

    27. LF

      Really? Y- there's ideas of parallelism in there?

    28. JG

      Yeah. Yeah.

    29. LF

      Like-

    30. JG

      So that was, that was back, you know... So, so the first Simula spec was Simula '67. Um-

  7. 27:2235:15

    Write an Emacs implementation in C

    1. LF

      To, to return to, uh, the world of Lisp for (laughs) for a brief moment, you, uh, at CMU, you've, you, uh, wrote a version of Emacs-

    2. JG

      Yeah.

    3. LF

      ... that, that I think was very impactful on the history of Emacs. Uh, what, what was your motivation for-

    4. JG

      Um-

    5. LF

      ... for doing so?

    6. JG

      A- at, at that time... So that was in like '85 or '86. Um, I had been using Unix for a few years. And, um, most of the editing was this, this tool called ed, um, which was sort of an ancestor of vi. And-

    7. LF

      Is it, is it a pretty good editor? Not a good editor?

    8. JG

      Well, if, if what you're using... Um, if your input device is a Teletype, it's pretty good.

    9. LF

      Yeah.

    10. JG

      It's certainly more humane than TECO, which was kind of the, the common thing in, in a lot of, um, the DEC universe at the time.

    11. LF

      TECO is spelled T-K? Is that the... No.

    12. JG

      No. TECO. T-E-C-O. The Text Editor and Corrector.

    13. LF

      Corrector. Wow, so many features.

    14. JG

      Um...

    15. LF

      (laughs)

    16. JG

      And the original Emacs, um, came out as... So, Emacs stands for Editor Macros. And TECO had a way of writing macros, and so the original, um, Emacs from MIT sort of started out as a collection of macros for TECO, but then, you know, you know, the, the sort of Emacs style got, got popular originally at, at, at MIT, and then people did a few other implementations of, of Emacs that were... You know, the, the, the code base was entirely different, but it was sort of the philosophical style of the original Emacs.

    17. LF

      What was the pho- philosophy of Emacs? And by the way, were all the implementations always in C? And then-

    18. JG

      No. No.

    19. LF

      And how does Lisp fit into the picture?

    20. JG

      No. So, so the very first Emacs was written as a bunch of macros for the TECO text editor.

    21. LF

      Wow. That's so interesting.

    22. JG

      And the, the, the macro language for TECO was probably the most ridiculously obscure format. You know, if you just look at a TECO program on a, on a page, you think it was just random characters.

    23. LF

      Okay.

    24. JG

      It really looks like just line noise.

    25. LF

      Just kind of like LaTeX or something?

    26. JG

      Oh-

    27. LF

      Like, worse?

    28. JG

      Oh, way worse than LaTeX.

    29. LF

      (laughs)

    30. JG

      Way, way worse than LaTeX. Um, but, you know, if you use TECO a lot, which I did, the, the... TECO was completely optimized for touch typing-

  8. 35:1545:57

    Early days of the Internet

    1. LF

      I mean, can I ask briefly what were those early days of ARPANET and the internet like? What was, uh, what... I mean, did you, uh... Again, sorry for the silly question, but, like, could you have possibly imagined that, uh, the, the internet would look like what it is today?

    2. JG

      You know, some of it is remarkably unchanged. So like-

    3. LF

      In what way?

    4. JG

      ...one of the things that I noticed really early on, um, uh, you know, when I was at, at, at Carnegie Mellon was that a lot of social life became centered around the ARPANET.

    5. LF

      Hmm.

    6. JG

      So things like, you know, between email and text messaging, uh, because the qu- you know, text messaging was a part of the ARPANET really early on. There were no cell phones but, you know, you're sitting at a terminal, and you're typing stuff, and y-

    7. LF

      So essentially email or like what, what is the text message?

    8. JG

      Well, just like, like a one-line message, right? So, so, so...

    9. LF

      Oh, cool. So like chat.

    10. JG

      Like chat.

    11. LF

      Yeah.

    12. JG

      Right.

    13. LF

      Wow.

    14. JG

      So it's like, like sending a, a one-line message to somebody, right?

    15. LF

      Yeah.

    16. JG

      And, and, and so pretty much everything from, you know, arranging lunch to-... going out on dates, you know? It was all, like, driven by social media.

    17. LF

      (laughs) Social media.

    18. JG

      You know? Right? In the-

    19. LF

      The early days, yeah.

    20. JG

      ... in the, in the '80s.

    21. LF

      (laughs) Easier than phone calls, yeah.

    22. JG

      You know, and my life had gotten to where, you know, I was, you know, living on social media, you know, from, like, the early mid '80s. Um, and, and so when, when it sort of transformed into the internet and social media explodes, I was kind of like-

    23. LF

      Yeah.

    24. JG

      ... "What's the big deal?"

    25. LF

      Yeah. (laughs) It's just a scale thing.

    26. JG

      It's, it's... Right. Uh, the, the, the scale thing is just astonishing.

    27. LF

      Yeah.

    28. JG

      Um...

    29. LF

      But the fundamentals, um, in some ways remain the same.

    30. JG

      The fundamentals have, have, have hardly changed. And, you know, the, the technologies behind the, the networking have changed significantly. The, you know, the, the, the watershed moment of, you know, going from the ARPANET to the internet, um, and then people starting to just scale and scale and scale. I mean the, the, the, the scaling that happened in the early '90s, and the way that so many vested interests fought the internet.

  9. 45:5756:13

    Elon Musk, Steve Jobs, Jeff Bezos

    1. JG

    2. LF

      Well, that's where visionary leadership comes in, right? Yeah, somebody needs to roll in-

    3. JG

      Well-

    4. LF

      ... and say, and take- t- take the leap.

    5. JG

      Well, it's- i- it's partly take the leap, but it's also partly take the hit.

    6. LF

      Take the hit, in the short term.

    7. JG

      Right? So- so- so- so you can draw all the graphs you want that show that, you know, if we leap from here y- y- you know, on our present trajectory we're doing this and there's a cliff. If we, um, force ourselves into a- into a transition and we proactively do that, we can be on the next wave, but there will be a period when we're in a trough. And pretty much always there ends up being a- a trough as you leap the chasm.

    8. LF

      (laughs) .

    9. JG

      But the way that public companies work on this planet, they're reporting every quarter, and the one thing that a CEO must never do is take a big hit.

    10. LF

      Take a big hit. Yeah.

    11. JG

      Uh, you know, over some- some quarter. And- and many of these transitions involve a big hit for a- a period of time, you know, one, two, three quarters. And so you get some companies and, you know, like Tesla and Amazon are- are really good examples of companies that take huge hits, but they have the luxury of being able to ignore the stock market for a little while. And that's not so true today really, but, you know, in the early days of- of- of both of those companies, um, you know, like- like- like- like- like they- they- they both did this thing of, you know, "I don't care about the quarterly reports. I care about how many- how many happy customers we have."

    12. LF

      Yeah.

    13. JG

      Right? And having as many happy customers as possible can often be, um, an enemy of the bottom line.

    14. LF

      Yeah, so how do they make that work? I mean, Amazon-

    15. JG

      Well-

    16. LF

      ... operated in the negative for a long time. It's like investing into the future.

    17. JG

      Right. But, you- you know, so Amazon and Google and Tesla and Facebook, a lot of those had what i- what amounted to patient money. Um, often because the- there's- there's like a charismatic central figure who has a really large block of stock and they can just make it so.

    18. LF

      So what, uh, on, on that topic, just, maybe it's a small tangent, but, uh, you've gotten the chance to work with some pretty big leaders. What, what are your thoughts about, on the Tesla side, Elon Musk, leadership on the Amazon side, Jeff Bezos? All of these folks with large amounts of stock and vision in their company. I mean, they're founders.

    19. JG

      Yeah.

    20. LF

      Either, either complete founders or, like, early on folks. And, uh, they're, they hit, th- Amazon have taken leap, a lot of leaps, uh, and bel- you know, uh, that probably at the time people would criticize as, like, "What, what is this bookstore thing? Why..." (laughs)

    21. JG

      Yeah. And, and, you know, Bezos had a vision, and he had the ability to just follow it. Lots of people have visions and, you know, the average vision is completely idiotic, and you crash and burn. Um, you know, the, the Silicon Valley, um, crash and burn rate is pretty high.

    22. LF

      Yeah.

    23. JG

      Um, and they're not, they don't necessarily crash and burn because they were dumb ideas but, you know, often it's, it's just timing.

    24. LF

      Yes, timing.

    25. JG

      Um, timing and luck. And, you know, you take companies like, like, like Tesla, um, and, and, and, and, and really, you know, the, the original Tesla, um, you know, sort of pre-, um, Elon, it was kind of doing sort of okay.

    26. LF

      Mm-hmm.

    27. JG

      But, but, but he just drove them. And because he had a really strong vision, you know, he would, he would make calls that were always, you know, or well, mostly pretty good. I mean, the Model X was kind of a goofball thing to do.

    28. LF

      But he did it boldly anyway. Like, there's so many people that just said, like, there's so many people that opposed him on the, in the Falcon 1 door, like the doors?

    29. JG

      Yeah.

    30. LF

      From an engineering perspective, those doors are ridiculous. It's like-

  10. 56:1358:48

    Work hard and smart

    1. JG

    2. LF

      But, uh, one thing I maybe wanna ask on that is, and maybe to push back a little bit, so there's the jerk side, but there's also, if I were to criticize what I've seen in Silicon Valley, which is almost a resistance to working hard. So on the jerkiness side is, um... (sighs) it's- it's... so both Steve Jobs and Elon kind of pushed people to work really hard to do-

    3. JG

      Yeah.

    4. LF

      And it's a question whether it's possible to do that nicely, but one of the things that bothers me, maybe I'm just Russian and just kind of, you know, romanticize the whole suffering thing, but I think working hard is es- is essential for accomplishing anything interesting. Like, really hard.

    5. JG

      Yeah.

    6. LF

      And in the parlance of Silicon Valley, it's probably too hard. This idea of that you should work smart, not hard often, uh, (laughs) to me sounds like you should be lazy, because of course you wanna be- work smart. Of course you wanna be maximally efficient. But in order to discover the efficient path, like we're talking about with the short programs-

    7. JG

      Yeah.

    8. LF

      ... you have to check before.

    9. JG

      Well, you know, the- the- the- the smart hard thing-

    10. LF

      Yeah.

    11. JG

      ... isn't an either or. It's an and.

    12. LF

      It's an and, yeah.

    13. JG

      Right? And, um, you know, the- the- the- the- the, the people who say you should work smart, not hard, they pretty much always fail.

    14. LF

      Yeah. Thank you. (laughs)

    15. JG

      Right? I mean that's-

    16. LF

      I agree with that.

    17. JG

      ... that's- that's just- just a recipe for disaster.

    18. LF

      Yeah.

    19. JG

      I mean, there are, there are counterexamples, but they're more people who benefited from luck.

    20. LF

      And you're... yeah, exactly. Luck- luck and timing, like you said, is often, uh, an essential thing. But you're saying, you know, you can be... you can push people to work hard and do incredible work without, without, uh...

    21. JG

      Without being nasty.

    22. LF

      Yeah, without being nasty. I think, uh, um, Google, uh, is a good example of, uh, the leadership of Google throughout its history has been a pretty good example of, uh, not being nasty and being-

    23. JG

      Yeah.

    24. LF

      ... being kind.

    25. JG

      Yeah. I mean, the, the, the, the, the twins-

    26. LF

      (laughs)

    27. JG

      ... Larry and Sergey, um, are both pretty nice people.

    28. LF

      Yeah. Sandhya Pichai is very nice.

    29. JG

      Yeah.

    30. LF

      Yeah.

  11. 58:481:10:25

    Open source

    1. JG

    2. LF

      Let me ask maybe a little bit of a tense question. Uh, we're talking about Emacs. It seems like you've done some incredible work. So outside of Java, you've done some incredible work that didn't become as popular as it could have because of like licensing issues and open source and like-

    3. JG

      Yeah.

    4. LF

      ... issues. Um, is... (laughs) uh, what are your thoughts about the- the- that entire mess? Like what's... uh, about open source now in retrospect, looking back, uh, about licensing, about open sourcing, do you think, uh, open source is a good thing, a bad thing? Do you have regrets? Do you have wisdom that you've learned from that whole experience?

    5. JG

      So in general, I'm a big fan of, of open source. The way that it, it, it can be used to build communities and promote the development of things and promote collaboration and all of that is really pretty grand. Um, when open source turns into a religion that says all things must be open source-

    6. LF

      Right.

    7. JG

      ... um, I get kind of weird about that because it's- it's sort of like saying, you know, some, some versions of that, um, e- end up saying that the- that all, all software engineers must take a vow of poverty.

    8. LF

      Right.

    9. JG

      Right? As though, um...

    10. LF

      It's unethical to have money-

    11. JG

      Yeah.

    12. LF

      ... to build a company, to, uh... right.

    13. JG

      And, you know, there's a, there's a, there's a- a slice of me that actually kind of buys into that-

    14. LF

      Right.

    15. JG

      ... because, you know, people who make billions of dollars off of like a patent and the- the patent came from, like...... you know, literally a, a stroke of lightning that, that, that hits you as you lie half awake in bed. Yeah, that's lucky, good for you. The way that that sometimes sort of explodes into something that looks to me a lot like exploitation. You know, you see a lot of that in, in, in like the, the drug industry. Um, you know, when, you know, when you've got a, got, got medications that cost, you know, cost you like $100 a day and it's like, "No."

    16. LF

      (laughs) Yeah, so the, the, the interesting thing about the sort of open source, uh, wha- what bothers me is when it, something is not open source and because of that, it's a worse product.

    17. JG

      Yeah.

    18. LF

      So, so like, I mean, if I look at your just implementation of Emacs, like that could have been the dominant implementa- like I use Emacs. That's my main ID. I apologize to the world, but I still love it. Uh, (laughs) and you know, I could have been using, um, your implementation of Emacs, and why aren't I?

    19. JG

      So are you using the GNU Emacs?

    20. LF

      I guess the default on Linux is like GNU?

    21. JG

      Yeah.

    22. LF

      Yeah.

    23. JG

      And, and that through a strange passage started out as the one that I wrote.

    24. LF

      Exactly. So it's, it still has a...

    25. JG

      Right.

    26. LF

      Yeah. You... right.

    27. JG

      Well, and, and, and part of that was because, you know, in, you know, the last couple of years of grad school, it, it became really clear to me that I was either going to be Mr. Emacs forever-

    28. LF

      Mm-hmm.

    29. JG

      ... or I was gonna graduate.

    30. LF

      Got it.

  12. 1:10:251:28:31

    Java

    1. JG

    2. LF

      I know you've talked about this in quite a few places, but you have created one of the most popular programming languages in the world. Uh, this is the programming language that I first learned about object-oriented programming with. Uh, you know, I think it's a programming language that a lot of people use in a lot of different places and millions of devices today, Java. So the... Absurd question, but can you tell the origin story of Java?

    3. JG

      So long time ago at Sun-

    4. LF

      (laughs)

    5. JG

      ... in about 1990, there was a group of us who were kind of worried that, that there was stuff going on in the universe of computing that the computing industry was missing out on. Um, and so, uh, uh, a few of us started this project at Sun that really got going... I mean, we started talking about it in 1990, and it really got going in '91. Um, and it was all about, you know, what was happening in terms of, you know, computing hardware, you know, processors and networking and all of that that was outside of the computer industry, and that was everything from the, the, the sort of early glimmers of cell phones that were happening then to, you know, you look at elevators and locomotives and process control systems in factories and all kinds of audio, audio equipment, video equipment. Um, they all had processors in them, and they were all doing stuff with them. And, and it, and it sort of felt like there was something going on there that we needed to understand. And-

    6. LF

      So C, C and C++ was in the air already?

    7. JG

      Oh, no, C and C++ absolutely owned the universe at that time. Everything was written in C and C++.

    8. LF

      So where, where was the hunch that there was a need for a revolution?

    9. JG

      Well, so the, the need for revolution was not about the lang- a, a language. It was about... It was just as simple and vague as, "There are things happening out there, and we-"

    10. LF

      We need to understand them.

    11. JG

      We need to understand them.And, and so, um, a few of us went on several, um, somewhat epic road trips. Um...

    12. LF

      Literal road trips?

    13. JG

      Literal road trips. It's like, get on an airplane, go to Japan, visit, you know, Toshiba and Sharp and Mitsubishi and Sony and all of these folks. And, you know, because we worked for Sun, we had, you know, folks who were willing to, like, give us introductions, you know. We, we visited, you know, Samsung and, um, you know, a bunch of Korean companies, and we went all over Europe. We went to, you know, places like, like Philips and Siemens and Thomson and...

    14. LF

      What did you see there?

    15. JG

      You know, for me the, one of the things that sort of leapt out was that they were doing all the usual computer, computer things that people had been doing, like, 20 years before. The thing that really leapt out to me was that they were sort of reinventing computer networking in... And, they were making all the mistakes that people in the computer industry had, had made. And since I'd been doing a lot of work in, in the networking area, you know, you know, we'd go and, you know, visit, you know, company X. They'd describe this networking thing that they were doing, and just without any thought I could, I could tell them, like, the 25 things that were going to be complete disasters with that thing that they were doing.

    16. LF

      Mm-hmm.

    17. JG

      Um, and I don't know whether that had any impact on any of them, but, but, but that particular story of, you know, sort of repeating the disasters the com- of the computer science industry, um, was there, and we th- and one of the things we thought was, "Well, maybe we could do something useful here with, like, bringing them forward somewhat." But, but also at the same time, we learned a bunch of things from, from these, you know, mostly consumer electronics companies. Um, and, you know, high on the list was that they viewed their, like, relationship with the customer as sacred. Um, they, they were never, ever willing to make trade-offs between... For, for safety, all right? So, one of the things that had always made me nervous in the computer industry was that, um, people were willing to make trade-offs in reliability to get performance. Um, you know, the, the, you know, th- they, they want faster, faster, and it breaks a little more often because it's fast, you know, you... Maybe you run it a little hotter than you should, or like, like the one that always blew my mind was the way that, um, the folks at, at, at Cray supercomputers-

    18. LF

      Mm-hmm.

    19. JG

      ... got their division to be really fast, was that they did Newton-Raphson approximations.

    20. LF

      Uh-huh. (laughs)

    21. JG

      And so, you know, the bottom several bits of, you know, A over B were essentially random numbers. Um...

    22. LF

      What could possibly go wrong?

    23. JG

      What could go wrong, right?

    24. LF

      (laughs)

    25. JG

      And, you know, just figuring out how to nail the bottom bit. Um, how to make sure that, you, you know, if you put a piece of toast in a toaster, it's not going to kill the customer. It's not gonna burst into flames and burn the house down.

    26. LF

      So those are... I guess those are the, the principles that were inspiring, but how did the... From the days of, uh, Java's... Called Oak because of a tree outside the window story-

    27. JG

      Yeah.

    28. LF

      ... that lots of people know. How did it become this incredible, like, powerful language?

    29. JG

      Well, so it wa- it was a bunch of things. So we s- you know, a- after all that we started... You know, the, the way that we decided that we could understand things better was by building a demo, building a prototype of something.

    30. LF

      Got it.

  13. 1:28:311:44:05

    Java virtual machine

    1. JG

    2. LF

      So I think one of the most beautiful ideas, uh, philosophically and technically is, uh, of a virtual machine, the Java Virtual Machine. Um, again, apologize to romanticize things but, uh, (laughs) uh, how did the idea of the JVM come to be? How to you radical of an idea it is? 'Cause it, it seems to me to be just a really interesting idea in the history of programming.

    3. JG

      So-

    4. LF

      And what is it?

    5. JG

      So the Java Virtual Machine, you can think of it in different ways, um, because it was carefully designed to have different ways of viewing it. So one view of it that most people don't really realize is there is that you can, um, view it as sort of an encoding of the abstract syntax tree in reverse Polish notation. Um, I don't know if that makes any sense at all. I, I could explain it and that would blow all of our time.

    6. LF

      Yeah.

    7. JG

      Um, but the other way to think of it, um, and the way that it, it ends up being explained is that it's, it's like the, the instruction set of an abstract machine that's designed such that you can translate that abstract machine to a physical machine. And the reason that that's important... So if you wind back to the early '90s when we were talking to all of these, these companies doing consumer electronics and you talk to the purchasing people, there were interesting conversations with purchasing. Um, so if you look at how, you know, these, you know, these devices come together, they're sheet metal and gears and circuit boards and capacitors and resistors and stuff, and everything you buy has multiple sources, right? So you can buy a capacitor from here, you can buy a capacitor from there, and you've got kind of a market. So y- y- you know, so that the... you can actually get a decent price for a capacitor. Um, but CPUs, and particularly in the early '90s, um, CPUs were all different and all proprietary. So if you used a chip from Intel-You had to be an Intel customer for the end of, till the end of time, because if you wrote a bunch of software, you know, when, when you wrote software using whatever technique you wanted, and C was particularly bad about this be- because there was a lot of properties of the underlying machine that came through. So for-

    8. LF

      You were stuck. So the code you wrote, you were stuck to that particular machine.

    9. JG

      You were stuck to that particular machine, which meant that they couldn't decide, "You know, Intel is screwing us."

    10. LF

      Mm-hmm.

    11. JG

      "Um, I'll, I'll start buying chips from, you know, Bob's Better Chips." This drove the, like the purchasing people absolutely insane. That, that they would, they were welded into this decision, and it would ha- they would have to make this decision before the first line of software was written.

    12. LF

      It's funny that you're talking about the purchasing people. So there's one perspective, right? It's, you could, there's a lot of other perspectives that all probably hated this idea.

    13. JG

      Right.

    14. LF

      But from a technical aspect, just like the creation of an abstraction layer that's, uh, agnostic to the underlying machine, uh, from the perspective of the developer, I mean, that's brilliant. Uh-

    15. JG

      Right. Well, and, and, and, and, and it, you know, so that's like across the spectrum of, of providers of chips. But then there's also the, the time thing, because, um, you know, as you went from one generation to the next generation to the next generation, they were all different, and you would often have to rewrite your software.

    16. LF

      Oh, you mean g- generations of, uh, CP, of machines of different kinds? So like-

    17. JG

      Yeah. So, so like, like-

    18. LF

      (laughs)

    19. JG

      ...like, like one of the things that sucked about a year out of my life was when Sun went from the, the Motorola 68010 processor to the 68020 processor.

    20. LF

      Mm-hmm.

    21. JG

      Then they had a number of differences, and one of them hit us really hard, and I ended up being the, the point guy on the worst case of where the new instruction cache architecture hurt us.

    22. LF

      Well, okay, so, (laughs) I mean, so-

    23. JG

      So-

    24. LF

      ...when, when did this i- idea, I mean, okay, so yeah. You, you articulate a really clear fundamental problem in all of computing, but how, where do you get the guts then to think, (laughs) "We can actually solve this?"

    25. JG

      You know, in our conversations with, uh, you know, all of these vendors, you know, these, these problems started to, to show up. And I kind of had this epiphany, because it reminded me of a summer job that I had had in grad school. So back in grad school, my, my thesis advisor ... well, I had two thesis advisors, for bizarre reasons. Um, one of them was a guy named Raj Reddy. The other one was Bob Sproull. Um, and Raj, I love Ra- I really love both of them, but-

    26. LF

      Yeah, Raj was amazing.

    27. JG

      Um, so the, the department had bought a bunch of, like early workstations from a company called Three Rivers Computer Company.

    28. LF

      Mm-hmm.

    29. JG

      And Three Rivers Computer Company was a bunch of electrical engineers who wanted to do as little software as possible. So, um, they knew that they'd need to have, like compilers and an OS and stuff like that, and they didn't want to do any of that. And they wanted to do that for as close to zero money as possible. So, um, what they did was they, they built a machine whose instruction set was, um, the, was literally the byte code for UCSD Pascal, the P-code. And so we had a bunch of software, um, that was, that was written for this machine.

    30. LF

      Mm-hmm.

  14. 1:44:051:47:04

    Android

    1. LF

      But I gotta ask you about Android and the use of Java there, because it's one of the many places where Java ha- just has a huge impact on this world. Just on your opinion, is there things that make you happy, uh, about the way Andro- uh, Java is used in the Android world? And are there things that, uh, you wish were different?

    2. JG

      I, I don't know how to do a short answer to that, um-

    3. LF

      (laughs)

    4. JG

      ... but I have to do a short answer to that. So, you know, I'm happy that they did it. Um, Java had been running on cellphones at that time for quite a few years, and it worked really, really well. Um, there were things about how they did it and, and in particular, um, various ways that they kind of, you know, violated all kinds of contracts. The guy who, who led it, Andy Rubin, he crossed a lot of lines.

    5. LF

      There's some lines crossed.

    6. JG

      Yeah. Lines were crossed that have since, you know, mushroomed into giant court cases. Um, and, you know, they didn't need to do that. And in fact, it would've been so much cheaper for them to not cross lines.

    7. LF

      I mean, I, I suppose they didn't anticipate the, the success, uh, of this whole endeavor.

    8. JG

      Um-

    9. LF

      Or do you think at that time, it was already clear that this is, uh, is gonna blow up?

    10. JG

      I, I guess I, I, I, I, I sort of came to believe that it didn't matter what Andy did, it was gonna blow up.

    11. LF

      (laughs) Okay.

    12. JG

      He's, he, he's, he... You know, I kinda started to think of him as, as, as like a manufacturer of bombs.

    13. LF

      (laughs) Uh, yeah. Some of the best things in this world come about through a little bit of, uh, uh, explosive...

    14. JG

      Well, and some of the worst.

    15. LF

      And some of the worst. Beautifully put. But is there, um... And, and like you said, I mean, does that make you proud that the Java is in-

    16. JG

      Yeah.

    17. LF

      ... is in millions... I mean, it could be billions of devices and-

    18. JG

      Yeah. Well, I, I mean, it was in, in billions of phones before Android came along. Um, and, you, you know, I'm, I'm just as proud as, you know, of the way that, like, the, the smart card standards adopted Java. And they did a, they... you know, everybody involved in that did a really good job, and that's, you know, billions and billions. Um...

    19. LF

      That's crazy.

    20. JG

      The SIM cards-

    21. LF

      SIM cards.

    22. JG

      You know, the SIM cards in your pocket.

    23. LF

      Yeah. I mean, it's, uh-

    24. JG

      I've been out of, outside of that world for a decade, so I don't know how that has, has evolved. But, um, you know, it's just been crazy.

  15. 1:47:041:48:11

    Advice

    1. JG

    2. LF

      So on that topic, let me ask, uh... Again, there's a million technical things, uh, uh, we could talk about, but let me ask the absurd, the old, uh, philosophical question about life. Um, what do you hope... When you look back at your life and, uh, people talk about you or write about you 500 years from now, uh, what do you hope your legacy is?

    3. JG

      People not being afraid to take a leap of faith. Um, I mean, I... You know, I've got this, this kinda weird history of doing weird stuff and, um...

    4. LF

      It worked out pretty damn well.

    5. JG

      It, it, it worked out, right? And I think some of the weirder stuff that I've done, um, has been the coolest. And some of it, some of it crashed and burned and, um... Yeah, you know, I think well over half of the stuff that I've done has crashed and burned, um, which has occasionally been really annoying.

Episode duration: 1:51:00

Install uListen for AI-powered chat & search across the full episode — Get Full Transcript

Transcript of episode IT__Nrr3PNI

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