Insightcast AI
Home
© 2025 All rights reserved
ImpressumDatenschutz
#126 – James Gosling: Java, JVM, Emacs, and the Early Days of Computing

#126 – James Gosling: Java, JVM, Emacs, and the Early Days of Computing

Lex Fridman Podcast XX

--:--
--:--

Full Transcription:

[0] 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 as always, at least, in the top two or three.

[1] We only had a limited time for this conversation, but I'm sure we'll talk again several times in this podcast.

[2] Quick summary of the sponsors, Public Good Goods, BetterHelp, and ExpressVPN.

[3] Please check out these sponsors in the description to get a discount and to support this podcast.

[4] 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.

[5] Also, early on in my undergraduate education, I took a course on concurrent programming with Java.

[6] 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.

[7] The idea that we could create an abstraction of parallelism where you could do many things at the same time while still guaranteeing stability and correctness was beautiful.

[8] While some folks in college took drugs to expand their mind, I took concurrent programming.

[9] 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 at Lex Friedman.

[10] As usual, I'll do a few minutes of ads now and no ads in the middle.

[11] I try to make these interesting, but I do give you time stamps, so go ahead and skip, but please do check out the sponsors by clicking the links in the description.

[12] It's the best way to support this podcast.

[13] This show, sponsored by Public Goods, the one -stop shop for affordable, sustainable, healthy household products.

[14] I take their fish oil and use their toothbrush, for example.

[15] Their products often have a minimalist black and white design that I find to be just beautiful.

[16] Some people ask why I wear this black suit and tie.

[17] 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.

[18] That's what design is to me, creating an inner conscious experience, not an external look.

[19] Anyway, Public Goods plants one tree for every order placed, which is kind of cool.

[20] Visit public goods .com slash Lex or use code Lex at checkout to get 15 bucks off your first order.

[21] This show is also sponsored by BetterHelp, spelled H -E -L -P -Help.

[22] Check it out at BetterHelp .com slash Lex.

[23] They figure out what you need and match you with a licensed professional therapist in under 48 hours.

[24] I chat with a person on there and enjoy it.

[25] 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.

[26] 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.

[27] I think therapy can help in whatever form that therapy takes.

[28] And I do think that BetterHelp is an option worth trying.

[29] They're easy, private, affordable, and available worldwide.

[30] You can communicate by text anytime and schedule weekly audio and video sessions.

[31] Check it out at BetterHelp .com slash Lex.

[32] This show is also sponsored by ExpressVPN.

[33] You can use it to unlock movies and shows that are only available in other countries.

[34] I did this recently with Star Trek Discovery on UK Netflix, mostly because I wonder what it's like to live in London.

[35] I'm thinking of moving from Boston to a place where I can build a business I've always dreamed of building.

[36] London is probably not in the top three, but top ten for sure.

[37] The number one choice currently is Austin, for many reasons that I'll probably speak to another time.

[38] San Francisco, unfortunately, dropped out from the number one spot, but it's still in the running.

[39] If you have advice, let me know.

[40] Anyway, check out ExpressVPN.

[41] It lets you change your location to almost 100 countries and it's super fast.

[42] Go to ExpressVPN .com slash LexPod to get an extra three months of ExpressVPN for free.

[43] That's ExpressVPN .com slash LexPod.

[44] And now, here's my conversation with James Gosling.

[45] I've read somewhere that the square of two is your favorite irrational number?

[46] I have no idea where that got started.

[47] Is there any truth to it?

[48] Is there anything in mathematics or numbers that you find beautiful?

[49] Oh, well, there's lots of things in math that's really beautiful.

[50] You know, I used to consider myself really good at math, and these days I consider myself really bad at math.

[51] I never 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 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.

[52] I would want to make the receipt add up to an interesting number.

[53] Is there some numbers that stuck with you that just kind of make you feel good?

[54] They'll have a story.

[55] And fortunately, I've actually mostly forgotten all of them.

[56] Are they, so like 42?

[57] Well, yeah, I mean, 42 is pretty magical.

[58] And then the irrationals.

[59] I mean, but is there a square out of two?

[60] story in there somewhere?

[61] How did that rumor get started?

[62] Well, in that it's like the only number that has destroyed a religion.

[63] In which way?

[64] Well, the Pathagoreans, they believed that all numbers were perfect and you could represent anything as a rational number.

[65] And in that time period, this proof came out that there was no, you know, rational fraction whose value was equal to the square root of two.

[66] And that means nothing in this world is perfect, not even mathematics.

[67] Well, it means that your definition of perfect was imperfect.

[68] Well, then there's the gaitle incompleteness theorems in the 20th century that ruined it once again for everybody.

[69] Yeah, although Girdle's theorem, you know, the lesson I take from Gertl's theorem is not that, you know, there are things you can't know, which is fundamentally what it says.

[70] But, you know, people want black and white answers.

[71] They want true or false.

[72] but if you allow a three -state logic that is true, false, or maybe, then life's good.

[73] I feel like there's a parallel to modern political discourse in there somewhere, but let me ask, so with your kind of early love or appreciation of the beauty, of mathematics, do you see a parallel between that world and the world of programming?

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

[75] Meaning like find a short program that gets the job done kind of thing.

[76] So then on the topic of irrational numbers, do you see programming?

[77] You just painted it so cleanly.

[78] It's a little of this trajectory to find like a nice little program, but do you see it as fundamentally messy?

[79] Maybe unlike mathematics?

[80] I don't think of it as, I mean, you know, you watch somebody who's good at math do math, and, you know, often it's fairly messy.

[81] Sometimes it's kind of magical.

[82] When I was a grad student, one of the students, his name was Jim Sacks, was he had this, this, this, this reputation of being sort of a walking, talking, human, theorem -proving machine.

[83] And if you were having a hard problem with something, you could just like a costume in the hall and say, Jim, and he would do this funny thing where he would stand up straight.

[84] His eyes would kind of defocus.

[85] He'd go, you know, just like something in today's movies.

[86] You just, uh, and then he straightened up and say, N -Log -in and walk away.

[87] And you go, well, okay, so N -Log -N is the answer.

[88] How did he get there?

[89] By which time he's, you know, down the hallway somewhere.

[90] Yeah.

[91] It's just the Oracle, the black box, it just gives you the answer.

[92] Yeah, and then you have to figure out the path from the question to the answer.

[93] I think in one of the videos I watched, you mentioned, Don Knuth, well, at least recommending his book is something people should read.

[94] Oh, yeah.

[95] But in terms of theoretical computer science, do you see something beautiful that has been inspiring to you?

[96] Speaking of N -Log -N in your work on programming languages, that's in that whole world of algorithms and complexity.

[97] and, you know, these kinds of more formal mathematical things?

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

[99] It did stick pretty clearly for me because one of the things that I care about is being able to sort of look at a piece of code and be able to prove to myself that it works.

[100] You know, and, you know, so, for example, I find that I'm at odds with many of the people around me over issues about, like, how you lay out a piece of software, right?

[101] You know, so software engineers get really cranky about how they format the documents that are the programs, you know, where they put new lines and where they put, you know.

[102] The braces and all the rest of that, right?

[103] And I tend to go for a style that's very dense.

[104] So minimize the white space.

[105] Yeah, well, to maximize.

[106] the amount that I can see at once, right?

[107] 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?

[108] Yeah, I'm with you on that, yeah.

[109] And people don't like that?

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

[111] You know, where they invite me to a meeting and everybody has arrived before me and they sort of all look at me and say, James, about your coding style.

[112] I'm sort of an odd person to be programming because I don't think very well verbally.

[113] I am just naturally a slow reader.

[114] I'm what most people would call a visual thinker.

[115] So when you think about a program, what do you see?

[116] I see pictures, right?

[117] So when I look at a piece of code on a piece of paper, it very quickly gets transformed into a picture.

[118] And, you know, it's almost like a piece of machinery with, you know, this connected to that.

[119] Like these gears and different sizes.

[120] Yeah.

[121] Yeah, I see them more like that than I see the sort of verbal structure or the lexical structure of letters.

[122] So then when you look at the program, that's why you want to see it all in the same place, then you can just map it to something visual.

[123] Yeah, and just kind of like it leaps off the page at me. Yeah.

[124] What are the inputs, what are the outputs, what the heck is this thing doing?

[125] Yeah.

[126] And getting a whole vision of it.

[127] Can we go back into your memory, long -term memory access?

[128] What's the first program you've ever written?

[129] Oh.

[130] I have no idea what the first one was.

[131] I mean, I know the first machine that I learned that I learned to program on.

[132] What is it?

[133] Was a PDP8 at the University of Calgary.

[134] Do you remember the spec?

[135] Oh, yeah.

[136] So the thing had 4K of RAM.

[137] Nice.

[138] 12 -bit words.

[139] The clock rate was, it was about a third of a megahertz.

[140] Oh, so you even get to the to the M. Okay.

[141] Yeah.

[142] Yeah.

[143] So, you know, we're like 10 ,000 times faster these days.

[144] And was this kind of like a super computer, like a serious computer for...

[145] No, the PDP8I was the first thing that people were calling like a mini -computer.

[146] Got it.

[147] They were sort of inexpensive enough that a university lab could maybe afford to buy one.

[148] And was there time sharing, all that kind of stuff?

[149] There actually was a time sharing OS for that.

[150] but it wasn't used really widely.

[151] The machine that I learned on was one that was kind of hidden in the back corner of the computer center.

[152] And it was bought as part of a project to do computer networking.

[153] but you know they didn't actually use it very much it was mostly just kind of sitting there 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 had a keyboard and like a monitor oh this is way before monitors were common So it was literally a Model 33 teletype with a paper tape reader.

[154] Okay, so the user interface wasn't very good.

[155] Yeah, yeah.

[156] It was the first computer ever built with integrated circuits.

[157] But by integrated circuits, I mean that they would have like 10 or 12 transistors on one piece of silicon.

[158] not the 10 or 12 billion that machines have today so what do that I mean feel like if you remember those I mean did you have kind of inklings of the the magic of exponential kind of improvement of Moore's law of the potential of the future that was at your fingertips kind of thing or was it just a cool yeah it was just a toy You know, I had always liked building stuff, but one of the problems with building stuff is that you need to have parts.

[159] You know, you need to have pieces of wood or wire or switches or stuff like that.

[160] And those all cost money.

[161] And here you could build...

[162] You could build arbitrarily complicated things, and I didn't need any physical materials.

[163] It required no money.

[164] That's a good way to put programming.

[165] You're right.

[166] it's uh if you love building things it uh it's a yeah completely accessible you don't need anything and anybody from anywhere could just build something really cool yeah yeah if you've got access to a computer you can you can build all kinds of crazy stuff um and you know and when you were somebody like me who had like really no money and I mean I remember just lusting after being able to buy like a transistor you know and when I would do sort of electronics kind of projects they were mostly made done by like dumpster dive for trash you know and you know one of my big halls was uh discarded relay racks from the back of the phone company switching center oh nice that was the big memorable treasure oh yeah yeah that was a what do you use that for i built a machine that played tick -tac -toe out of relays of course the thing that was really hard um was that all the relays required a specific voltage.

[167] But getting a power supply that would do that voltage was pretty hard.

[168] And since I had a bunch of trashed television sets, I had to sort of cobble together something that was wrong but worked.

[169] So I was actually running these relays at 300 volts.

[170] And none of the electrical connections were, like, properly sealed off.

[171] I'm surprised you survived that period of your life.

[172] Oh, for so many reasons.

[173] For so many reasons.

[174] I mean, you know, you're, you know, it's pretty common for teenage geeks to discover, oh, thermite.

[175] That's real easy to make.

[176] Yeah.

[177] Well, I'm glad you did.

[178] but do you remember what program in Calgary that you wrote, anything that stands out, and what language?

[179] Well, so mostly anything of any size was assembly code.

[180] And actually, before I learned assembly code, there was this programming language on the PDP8 called Focal 5.

[181] And focal five was kind of like a really stripped down Fortran.

[182] And I remember playing, you know, building programs that did things like play Blackjack or Solitaire or, and for some reason or the things that I really liked were ones where they were just like plotting graphs.

[183] So something with like a function or.

[184] data and then you'd plot it yeah yeah i did a bunches of those things and went ooh pretty pictures um and so this would like print out again no no monitors right so it was like on a teletype yeah so using something that's kind of like a typewriter yeah and then using those to plot functions So when, I apologize to romanticize things, but when did you first fall in love with programming?

[185] You know, what was the first programming language?

[186] Like, is a serious, maybe software engineer?

[187] What are you thought this is a beautiful thing?

[188] I guess I never really thought of any particular language as being like beautiful because it was never really about the language for me. It was about what you could do with it.

[189] And, you know, even today, you know, people try to get me into arguments about particular forms of syntax or this or that.

[190] And I'm like, who cares?

[191] You know, it's about what you can do, not how you spell the word.

[192] And, you know, so back in those days, I learned, like, PL1 and Fortran and Coval.

[193] And, you know, by the time that people were willing to hire me to do stuff, you know, it was mostly assembly code and, you know, PDPA assembly code and Fortran code and control data assembly code for, like, the CDC 6400, which was an early, I guess, supercomputer.

[194] computer, even though that supercomputer has less compute power than my phone by a lot.

[195] And that was mostly, like you said, Fortran world.

[196] That said, you've also showed appreciation for the greatest language ever that I think everyone agrees is LISP.

[197] Well, LISP is definitely on my list of the greatest ones that have existed.

[198] Is it at number one or, I mean, or are you, I mean.

[199] You know, the thing is that it's, that, you know, I wouldn't put it number one, no. Is it the parentheses?

[200] What do you love and what do you not love about Lisp?

[201] Well, I guess the number one thing to not love about it is so freaking many parentheses.

[202] Yeah.

[203] 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 but i've never really spent much time thinking about it thinking about it but you know so like Like up the food chain for me from LISP is simula, which a very small number of people have ever used.

[204] But a lot of people, I think you had a huge influence, right?

[205] Yeah.

[206] The programming, but in a simula, I apologize if I'm wrong on this, but is that one of the first functional languages?

[207] No. No, it was the first object -oriented programming language.

[208] Got it.

[209] It's really where object -oriented and languages sort of came together.

[210] And it was also the language where co -routines first showed up as a part of the language.

[211] So you could have a programming style that was, you could think of it as sort of multi -threaded with a lot of parallelism.

[212] Really?

[213] there's ideas of parallelism in there?

[214] Yeah, so that was back, you know, so the first simulus back was Simula 67.

[215] For like 1967?

[216] Yeah.

[217] Wow.

[218] So it had co -routines, which are almost threads.

[219] The thing about co -routines is that they don't have true concurrency, so you can get away without really.

[220] complex locking you can't useably do co -routines on a on the multi -core machine or if you try to do core routines on a multi -core machine you don't actually get to use the multiple cores either that or you you know because you start then having to get into the universe of you know semaphores and locks and things like that but you know you know, in terms of the style of programming, you could write code and think of it as being multi -threaded.

[221] The mental model was very much a multi -threaded one and all kinds of problems you could approach very differently.

[222] To return to the world of Lisp for a brief moment, You, at CMU, you wrote a version of EMAX that I think was very impactful on the history of EMAX.

[223] What was your motivation for doing so?

[224] At that time, so that was in like 85 or 86.

[225] I had been using Unix for a few years.

[226] And most of the editing was this tool called E .D., which was sort of an ancestor of VI.

[227] And...

[228] Is it a pretty good editor, not a good editor?

[229] Well, if what you're using, if your input device is a teletype, it's pretty good.

[230] It's certainly more humane than Tico, which was kind of the...

[231] the common thing in a lot of the deck universe at the time.

[232] Tico is spelled TK?

[233] Is that the...

[234] No, Tico, T -E -C -O, the text editor and corrector.

[235] Corrector, well, so many features.

[236] And the original E -Max came out as...

[237] So, E -M -M -X stands for editor macros.

[238] And T -C -O had a way of writing macros.

[239] And so the original EMAX from MIT sort of started out as a collection of macros for Tico.

[240] But then, you know, the sort of EMAX style got popular originally at MIT.

[241] And then people did a few other implementations of EMAX that were, you know, the code base.

[242] It was entirely different, but it was sort of the philosophical style of the original Emacs.

[243] What was the philosophy of Emacs?

[244] And by the way, were all the implementations always in C?

[245] No. And how does Lisp fit into the picture?

[246] No. So the very first Emacs was written as a bunch of macros for the Tico text editor.

[247] Wow, that's so interesting.

[248] And the macro language for Tico was probably the most.

[249] ridiculously obscure format you know if you just look at a Tico program on a on a page you think it was just random characters it really looks like just line noise just kind of like latex or something oh way worse than latex way way worse than latex but you know if you use Tico a lot which I did the Tico was completely optimized for touch typing at high speed so there were no two -character commands or there were a few but mostly they were just one character so every character on the keyboard was a separate command and actually every character on the keyboard was usually two or three commands because you know you can shift and control and all of those things you know it's just a way of very tightly and coding it.

[250] And mostly what Emacs did was it made that visual.

[251] Right.

[252] So one way to think of Tico is use Emacs with your eyes closed.

[253] Where you have to maintain a mental model of, you know, sort of a mental image of your document.

[254] You have to go, okay, so the cursor is between, between the A and the E, and I want to exchange those, so I do these things, right?

[255] So it almost, it is almost exactly the Emacs command set.

[256] Well, it's roughly approximate, roughly the same as Emacs command set, but using Emacs with your eyes closed.

[257] So what Emacs, you know, part of what Emacs added to the whole thing was, was being able to, to visually see what you were editing in a form that matched your document.

[258] And, you know, a lot of things changed in the in the command set.

[259] It, you know, because it was programmable, it was really flexible.

[260] You could add new commands for all kinds of things.

[261] And then people rewrote Emacs like multiple times in LISP.

[262] There was one done at MIT for the LISP machine.

[263] There was one done for Multics.

[264] And one summer, I got a summer job to work on the Pascal compiler for Multics.

[265] And that was actually the first time I used Emacs.

[266] And so...

[267] To write the compilers.

[268] You've worked in compilers, too.

[269] It's fascinating.

[270] Yeah.

[271] So I did a lot of work.

[272] I mean, I spent like a really intense three months working on this Pascal compiler, basically living in Emacs, and it was the one written in MacLess by Bernie Greenberg.

[273] And I thought, wow, this is just a way better way to do editing.

[274] And then I got back to CMU where we had kind of, of one of everything and two of a bunch of things and four of a few things and since I mostly worked in the Unix universe and Unix didn't have an Emacs.

[275] I decided that I needed to fix that problem.

[276] So I wrote this implementation of Emacs in C because at the time C was really the only language that worked on...

[277] on unix on unix and you were comfortable with c as well oh yeah at that point yeah at that time i had done a lot of c coding that this was in like 86 um and you know it was running well enough to be for me to use it to edit itself within a month or two and um then it kind of took over the university and and it spread outside yeah and then it went outside the and largely because eunuchs kind of took over the research community on the on the on the on the arpinet then and emacs was kind of the best editor out there it kind of took over and there was actually a brief period where I actually had login IDs on every non -military host on the ARPANET.

[278] You know, because people would say, oh, can we install this?

[279] And I'd like, well, yeah, but you'll need some help.

[280] The days when security wasn't...

[281] When nobody cared.

[282] Nobody cared.

[283] Yeah.

[284] I can ask briefly, what were those?

[285] early days of ARPANET and the internet like what was uh what I mean did you uh again sorry for the silly question but could you have possibly imagined that the the internet would look like what it is today you know some of it is is remarkably unchanged so like one of the things that I noticed really early on at, you know, when I was at Carnegie Mellon was that a lot of social life became centered around the ARPANET.

[286] So things like, you know, between email and text messaging, because, you know, text messaging was a part of the ARPANET really early on.

[287] There were no cell phones, but, you know, you're sitting at a terminal and you're typing stuff and essentially email or like what what is well just like like a one line message right so so so so so oh cool so like chat like chat yeah right so it's like like sending a one line message to somebody right and and and so pretty much everything from you know arranging lunch to going out on dates you know was all, like, driven by social media.

[288] Social media.

[289] Right?

[290] In the 80s.

[291] Easier than phone calls, yeah.

[292] 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.

[293] And, and so.

[294] So when it sort of transformed into the internet and social media explodes, I was kind of like, what's the big deal?

[295] It's just a scale thing.

[296] It's right.

[297] The scale thing is just astonishing.

[298] Yeah.

[299] But the fundamentals in some ways.

[300] The fundamentals have hardly changed.

[301] And, you know, the technologies behind the networking have changed significantly.

[302] You know, the watershed moment of, you know, going from the ARPANET to the Internet.

[303] And then people starting to just scale and scale and scale.

[304] I mean, the scaling that happened in the early 90s and the way that so many vested interests fought the Internet.

[305] Oh, who, oh, interesting.

[306] What was the, oh, because you can't really control the internet?

[307] Yeah, so, so, so fundamentally the, you know, the cable TV companies and broadcasters and phone companies, you know, at the deepest fibers of their being, they hated the internet.

[308] but it was often kind of a funny thing because, you know, so think of a cable company, right?

[309] Most of the employees of a cable company, their job is getting TV shows, movies, whatever, out to their customers.

[310] they view their business as serving their customers.

[311] But as you climb up the hierarchy in the cable companies, that view shifts because really the business of the cable companies had always been selling eyeballs to advertisers.

[312] right um and you know that view of of like a cable company didn't really dawn on most people who worked at the cable companies but you know we you know i had various dustups with various cable companies where you could see you know in the stratified layers of the corporation that that this this this this this view of, you know, the reason that you have, you know, cable TV is to capture eyeballs.

[313] You know, they didn't see it that way.

[314] Well, so the people who, the most of the people who worked at the phone company are at the cable companies, their view was that their job was getting delightful content out to their customers, and their customers would pay for them, would pay for that.

[315] higher up they viewed this as a way of attracting eyeballs to them and and then what they were really doing was selling the eyeballs that were glued to their content to the advertisers to the advertisers yeah and so the internet was a competition in that sense.

[316] Right.

[317] And they were right.

[318] Well, yeah.

[319] like, look, anybody, you know, with internet technologies, anybody can become provider of content.

[320] So, you know, you could be distributing home movies to your parents or your cousins or who are anywhere else, right?

[321] So anybody can become a publisher.

[322] Wow, you were thinking about that already.

[323] Netflix.

[324] Netflix.

[325] Yeah, that was like in the early.

[326] 90s.

[327] Yeah.

[328] And we thought this would be great.

[329] You could, you know, and the kind of content we were thinking about at the time was like, you know, home movies, kids' essays, you know, stuff from like grocery stores or, you know, that, or a restaurant that they could actually, like, start sending information about, out.

[330] And that's brilliant.

[331] And the reaction of the cable companies was like, fuck, no. Because then we're out of business.

[332] What is it about companies that, because they could have just, they could have been ahead of that wave.

[333] They could have listened to that.

[334] And they could have.

[335] They didn't see a path to revenue.

[336] You know, there's somewhere in there, there's a less.

[337] and for like big companies right like to to listen to to try to anticipate the the the renegate the out there out of the box people like yourself in the early days writing proposals about what this could possibly be well in that you know that you know it wasn't you know if you're in a position where you're making truckloads of money off of a particular business model you know, the whole thought of, like, you know, leaping the chasm, right?

[338] You know, you can see, oh, new models that are more effective are emerging, right?

[339] So, like, digital cameras versus film cameras.

[340] You know, I mean...

[341] Why take the leap?

[342] Why take the leap?

[343] Because you're making so much.

[344] money off of film.

[345] And, you know, in my past at Sun, one of our big customers was Kodak.

[346] And I ended up interacting with folks from Kodak quite a lot.

[347] And they actually had a big digital camera research and, you know, digital imaging business or development group.

[348] And they knew that, you know, you just look at the trend lines and you look at, you know, the emerging quality of, of these, you know, digital cameras.

[349] And, you know, you can just plot it on a graph, you know, and it's like, you know, sure, film is better today, but, you know, digital is, is improving like this, the lines are going to cross, and, you know, at the point at which the lines cross is going to be a collapse in their business.

[350] And they could see that, right?

[351] They absolutely knew that.

[352] The problem is that, you know, up to the point where they hit the wall, they were making truckloads of money.

[353] Right?

[354] And, And when they did the math, it never started to make sense for them to kind of lead the charge.

[355] And part of the issues for a lot of companies for this kind of stuff is that, you know, if you're going to leap over a chasm like that, like with Kodak going from film to digital, that's a transition that's going to take a while.

[356] right we had we had fights like this with people over like smart carts the smart cards fights were just ludicrous but that's where visionary leadership comes in right yeah somebody needs to roll in and say then take take the leap well it's it partly take the leap but it's also partly take the hit take the hit in the short time so so so so you can draw all the graphs you want that show that, you know, if we leap from here, you know, on our present trajectory, we're doing this and there's a cliff.

[357] If we force ourselves into a transition and we proactively do that, we can be on the next wave.

[358] But there will be a period when we're in a trough.

[359] And pretty much always there ends up being a trough as you leap the chasm.

[360] But the way that public companies work on this planet, they're reporting every quarter.

[361] And the one thing that a CEO must never do is take a big hit.

[362] Take a big hit.

[363] You know, over some quarter.

[364] And many of these transitions involve a big hit for a period of time, you know, one, two, three quarters.

[365] And so you get some companies, and, you know, like Tesla and Amazon 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.

[366] And that's not so true today, really, but, you know, in the early days of both of those companies, you know, like, like, like, they both did this thing of, you know, I don't care about the quarterly reports.

[367] I care about how many, how many happy customers we have.

[368] Yeah.

[369] Right.

[370] And having as many happy customers as possible can often be.

[371] an enemy of the bottom line.

[372] Yeah, so how do they make that work?

[373] I mean, Amazon operated the negative for a long time.

[374] It's like investing into the future.

[375] Right.

[376] But, you know, so Amazon and Google and Tesla and Facebook, a lot of those had what amounted to patient money, often because there's like a charismatic central figure who has a really, large block of stock and they can just make it so so what on that topic just maybe it's a small tangent but you've gotten the chance to work with some pretty big leaders 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 yeah either the complete founders or like early on folks and uh they're they hit amazon have taken leap a lot of leaps uh and believe you know uh that probably at the time people would criticize as like what is this bookstore thing why yeah and and you know bezos had a vision and he had the ability to just follow it.

[377] Lots of people have visions and you know, the average vision is completely idiotic and you crash and burn.

[378] You know, the Silicon Valley crash and burn rate is pretty high.

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

[380] That's time.

[381] Timing and luck.

[382] And, you know, you take companies like, like, like, like Tesla, and really, you know, the original Tesla, you know, sort of pre -Elon was kind of doing sort of okay, but, but he just drove them.

[383] 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.

[384] I mean, the Model X was kind of a goofball thing to do.

[385] But he did it boldly.

[386] Anyway, like, there's so many people that just said, like, there's so many people that oppose them on the, in the Falcon Wind door, like the door.

[387] From the engineering perspective, those doors are ridiculous.

[388] It's like.

[389] Yeah, they are a complete travesty.

[390] But they're, but they're.

[391] exactly the symbol of what great leadership is, which is like, you have a vision and you just go, like, if you're going to do something stupid, make it really stupid.

[392] Yeah, and go all in.

[393] Yeah.

[394] Yeah.

[395] And, you know, to, to my credit, he's a really sharp guy.

[396] So going back in time a little bit to Steve Jobs.

[397] You know, Steve Jobs was a similar sort of character who had a strong vision and was really, really smart.

[398] And he wasn't smart about the technology parts of things, but he was really sharp about the sort of human relationship between, you know, the relationship between humans and objects.

[399] And, but he was a jerk.

[400] You know, right?

[401] Can we just linger?

[402] that a little bit like people say he's a jerk um is that a feature or a bug well that's that's the question right so you take people like steve um who was really hard on people and and the and so the question is was he really was he needlessly hard on people or was he just making people reach to meet his vision and you could kind of spin it either way well the results tell a story you know he's he through whatever jerk ways he had he made people often do the best work of their life yeah yeah and that was absolutely true and you know I interviewed with him several times.

[403] I did, you know, various negotiations with him.

[404] And even though kind of personally I liked him, I could never work for him.

[405] Why do you think that can you put into words the kind of tension that you feel would be?

[406] Destructive as opposed to constructive?

[407] Oh, he'd yell at people.

[408] He'd call them names.

[409] And you don't like that?

[410] No. No, I don't think you need to do that.

[411] And, you know, I think, you know, I think, you know, there's pushing people to excel.

[412] and then there's too far.

[413] And I think he was on the wrong side of the line.

[414] And I've never worked for Musk.

[415] I know a number of people who have, many of them that have said, and it shows up in the press a lot that Musk is kind of that way.

[416] And one of the things that I sort of loathe about Silicon Valley these days is that a lot of the high -flying successes are run by people who are complete jerks.

[417] But it seems like there's been become this, there's come this sort of mythology out of Steve Jobs, that the reason that he succeeded was because he was super hard on people.

[418] and in a number of corners, people start going, oh, if I want to succeed, I need to be a real jerk.

[419] Yeah.

[420] Right.

[421] And that, for me, just does not compute.

[422] I mean, I know a lot of successful people who are not jerks, who are perfectly fine people.

[423] You know, they tend to not be in the public.

[424] public eye the the the general public somehow lifts the jerks up into the into the hero status right well they because they're they do things that get them in the press yeah and you know the people who you know don't do the kind of things that spill into the press yeah just talking to Chris Latner for the second time.

[425] He's a super nice guy.

[426] Just an example of this kind of kind of individual that's in the background.

[427] I feel like he's behind like a million technologies, but he also talked about the jerkiness of some of the folks.

[428] Yeah.

[429] Yeah.

[430] And the fact that being a jerk has become a required style.

[431] But one thing I maybe want to ask on that is maybe to push back a little bit.

[432] So there's the jerk side, but there's also, if I were to criticize what I've seen in Southbound Valley, which is almost the resistance to working hard.

[433] So on the jerking aside is it's so postage jobs and Elon kind of push people to work really hard to do.

[434] And it's a question whether it's possible to do that nicely.

[435] But one of the things that bothers me, maybe I'm just a rush and just kind of, you know, romanticize the whole suffering thing.

[436] But I think working hard is essential for accomplishing anything interesting, like really hard.

[437] And in the parlance of Silicon Valley, it's probably too hard.

[438] This idea of that you should work smart, not hard, often, to me, sounds like you should be lazy.

[439] Because, of course, you want to be to work smart.

[440] Of course, you would be maximally efficient.

[441] but in order to discover the efficient path, like we're talking about with the short programs.

[442] Yeah.

[443] Well, you know, the smart, hard thing isn't an either -or.

[444] It's an and.

[445] That's an and, yeah.

[446] Right.

[447] And, you know, the people who say you should work smart, not hard, they pretty much always fail.

[448] Yeah.

[449] Thank you.

[450] Right.

[451] I mean, that's, that's, that's, that's, That's just a recipe for disaster.

[452] I mean, there are counter examples, but there are more people who benefited from luck.

[453] And you're saying, yeah, exactly.

[454] Luck and timing, like you said, is often an essential thing.

[455] But you're saying, you know, you can push people to work hard and do incredible work without, without being nasty.

[456] Yeah, without being nasty.

[457] I think Google is a good example of the leadership of Google throughout its history has been a pretty good example of not being nasty and being kind.

[458] Yeah, I mean, the twins, Larry and Sergey, are both pretty nice people.

[459] Sandra Bichaz, very nice.

[460] Yeah, yeah.

[461] And, you know, it's a cultural, of people who work really, really hard.

[462] Let me ask maybe a little bit of a tense question.

[463] We're talking about Emacs.

[464] 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 licensing issues and open source and, like, of issues.

[465] Is it, what are your thoughts about that entire mess?

[466] Like what's about open source now in retrospect, looking back, about licensing, about open sourcing.

[467] Do you think open source is a good thing, a bad thing?

[468] Do you have regrets?

[469] Do you have wisdom that you've learned from that whole experience?

[470] So in general, I'm a big fan.

[471] fan of open source, the way that it can be used to build communities and promote the development of things and promote collaboration and all of that is really pretty grand.

[472] When open source turns into a religion that says all things must be open source, I get kind of weird about that because it's sort of like saying, saying, you know, some versions of that end up saying that all software engineers must take a vow of poverty.

[473] Right.

[474] Right, as though.

[475] It's unethical to have money.

[476] Yeah.

[477] To build a company.

[478] And, you know, there's a, there's a slice of me that actually kind of buys into that.

[479] Right.

[480] Because, you know, people who make billions of dollars off of, like, a patent.

[481] And the patent came from, like, you know, literally a stroke of lightning that hits you as you lie half a wake in bed.

[482] Yeah, that's lucky.

[483] Good for you.

[484] the way that that sometimes sort of explodes into something that looks to me a lot like exploitation.

[485] You know, you see a lot of that in, like, the drug industry.

[486] You know, when you've got a got medications that cost, you know, cost you like $100 a day.

[487] And it's like, No. Yeah, so the interesting thing about the sort of open source, what bothers me is when something is not open source, and because of that, it's a worse product.

[488] Yeah.

[489] So, like, I mean, if I look at your just implementation of Emacs, like, that could have been the dominant implement.

[490] Like, I use Emacs.

[491] That's my main ID.

[492] I apologize to the world, but I still love it.

[493] And, you know, I could have been using your implementation of Emacs, and why aren't I?

[494] So are you using the Ganoo Emacs?

[495] I guess the default on Linux.

[496] Is that Gano?

[497] Yeah.

[498] And that, through a strange passage, started out as the one that I wrote.

[499] Exactly.

[500] So it still has...

[501] Right.

[502] Yeah.

[503] Right.

[504] Well, and part of that was because, you know, in the last...

[505] a couple of years of grad school, it became really clear to me that I was either going to be Mr. Emacs forever, or I was going to graduate.

[506] Got it.

[507] I couldn't actually do both.

[508] Was that a hard decision?

[509] That's so interesting to think about you as a...

[510] Like, it's a different trajectory that could have happened.

[511] Yeah.

[512] That's fascinating.

[513] You know, and maybe, you know, I could be fabulously wealthy today if I had become Mr. Emacs, and Emacs had mushroomed into a series of text processing applications and all kinds of stuff.

[514] And, you know, I would have, you know.

[515] But I have a long history of financially suboptimal decisions because I, didn't want that life, right?

[516] And, you know, I went to grad school because I wanted to graduate.

[517] And, you know, being Mr. Emacs for a while was kind of fun, and then it kind of became not fun.

[518] And, you know, when it was not fun, and I was, you know, there was no way I could, you know, pay my rent, right?

[519] Yeah.

[520] And I was like, okay, do I carry on as a grad student as a, you know, I had a research assistantship and I was sort of living off of that.

[521] and I was trying to do my, you know, I was doing all my RA, all my RA, you know, being gradson work and being Mr. Emacs all at the same time.

[522] And I decided to pick one.

[523] And one of the things that I did at the time was I went around, you know, all the people I knew on the arpenet who might be able to take over.

[524] looking after Emacs and um pretty much everybody said yeah i got a day job so so i actually found you know two folks and a couple of folks in a garage in new jersey um complete with a dog um we were willing to take it over but they were going to have to charge money um but my deal with them was that they would only did that they would make it free for universities and schools and stuff and they said sure and you know that upset some people so you have some now I don't know the full history of this but I think it's kind of interesting you have some tension with Mr. Richard Stallman over the and he kind of represents this kind of like like you mentioned, free software, sort of a dogmatic focus on...

[525] Yeah, all information must be free.

[526] Must be free.

[527] So what, is there an interesting way to paint a picture of the disagreement you have with Richard through the years?

[528] My basic opposition is that, you know, when you say information must be free, to a really extreme form that turns into, you know, all people whose job is the production of everything from movies to software.

[529] They must all take a vow of poverty because information must be free, and that doesn't work for me. Right.

[530] And I don't want to be wildly rich.

[531] I am not wildly rich.

[532] I do okay.

[533] But I do actually, you know, I can feed my children.

[534] Yeah, I totally agree with you.

[535] It does just make me sad that sometimes the closing of the source, for some reason that people that like a bureaucracy begins to build, and sometimes it doesn't, it hurts the product.

[536] Oh, absolutely, absolutely.

[537] It's always sad.

[538] And there's, and there is a, there is a balance in there.

[539] That's a balance.

[540] And, you know, it's, it's not hard, hard over, you know, rapacious capitalism.

[541] And, and it's, and it's, and it's not.

[542] part over in the other direction.

[543] And a lot of the open source movement, they have been managing to find a path to actually making money.

[544] So doing things like service and support works for a lot of people.

[545] And there are some ways where it's kind of, some of them are a little perverse right so as you know a part of things like this sarbanes oxley act and various people's interpretations of all kinds of accounting principles and this is kind of a worldwide thing but if you've got a corporation that is depending on some piece of software, you know, the often, you know, various accounting and reporting standards say, if you don't have a support contract on this thing that your business is depending on, then that's bad.

[546] You know, so, so, so, you know, if you've got a, if you've got a database, you need to pay for support.

[547] And, and so, but there's a difference between, you know, the sort of support contracts that, you know, the average open source database producer charges and what somebody who is truly rapacious, like Oracle charges.

[548] Yeah, so it's a balance, like you said.

[549] It is absolutely a balance.

[550] And, you know, there are a lot of, a lot of different ways.

[551] to make, you know, the math work out for everybody.

[552] And, you know, the very, you know, unbalanced sort of, you know, like the winner takes all thing that happens in so much of modern commerce.

[553] That just doesn't work for me either.

[554] 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.

[555] It's the programming language that I first learned about objectorian programming with.

[556] 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.

[557] so the absurd question but can you tell the origin story of Java so a long time ago at son in about 1990 there was a group of us who were kind of worried that there was stuff going on in the universe of computing that the computing industry was missing out on And so a few of us started this project at Sun.

[558] The really got going, I mean, we started talking about it in 1990, and it really got going in 91.

[559] 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.

[560] And that was everything from 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 equipment and video equipment.

[561] They all had processors in them and they were all doing stuff with them.

[562] And it sort of felt like there was something going on there that we needed to understand.

[563] So C and C++ was in the air already.

[564] Oh, no, C &C++ absolutely owned the universe at that time.

[565] Everything was written in C and C++.

[566] So where was the hunch that there was a need for a revolution?

[567] Well, so the need for a revolution was not about a language.

[568] It was just as simple and vague as there are things happening out there.

[569] We need to understand them.

[570] We need to understand them.

[571] And so a few of us went on several somewhat epic road trips.

[572] Literal road trips?

[573] literal road trips it's like get on an airplane go to japan visit you know toshaba and sharp and Mitsubishi and sony and all of these folks and you know because we worked for son we had you know folks who were willing to like give us introductions you know we we visited you know Samsung and, you know, a bunch of Korean companies, and we went all over Europe, we went to, you know, places like Phillips and Siemens and Thompson.

[574] What did you see there?

[575] You know, for me, one of the things that sort of left out was that they were doing all the usual computer things that people had been doing like 20 years before.

[576] The thing that really left out to me was that they were.

[577] sort of reinventing computer networking, and they were making all the mistakes that people in the computer industry had made.

[578] And since I had been doing a lot of work in the networking area, you know, we'd go and, you know, visit, you know, Company X, they'd describe this networking thing that they were doing.

[579] And just without any thought, I could tell them, like, the 25 things that were going to be complete disasters with that thing that they were doing.

[580] And I don't know whether that had any impact on any of them, but that particular story of, you know, sort of repeating the disasters of the computer science industry was there.

[581] And one of the things we thought was, well, maybe we could do something useful here with, like, bringing them forward somewhat.

[582] But also, at the same time, we learned a bunch of things from these, you know, mostly consumer electronics companies.

[583] And, you know, high on the list was that they viewed their, like, relationship with the customer as sacred, they were never, ever willing to make trade -offs between, for safety.

[584] So one of the things that had always made me nervous in the computer industry was that people were willing to make trade -offs in reliability to get performance.

[585] You know, they want faster, fast.

[586] It breaks a little more often because it's fast.

[587] Maybe you run it a little hotter than you should, or like the one that always blew my mind was the way that the folks at Kray supercomputers got their division to be really fast, was that they did Newton -Rafson approximations.

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

[589] What could possibly go wrong?

[590] What could go wrong, right?

[591] And, you know, just figuring out how to nail the bottom base.

[592] how to make sure that, you know, if you put a piece of toast in a toaster, it's not going to kill the customer.

[593] It's not going to burst into flames and burn the house down.

[594] So those are, I guess those are the principles that were inspiring, but how did, from the days of Java is called oak, because of a tree outside the window, the way that a lot of people know, how did it become this incredible, like, powerful language?

[595] Well, so it was a bunch of things.

[596] So we, you know, after all that, we started, you know, the way that we decided that we could understand things better was by building a demo, building a prototype of something.

[597] Got it.

[598] So kind of because it was easy and fun, we decided to build a control system for some, home electronics, you know, TV, VCR, that kind of stuff.

[599] And as we were building it, we, you know, we sort of discovered that there were some things about standard practice in C programming that were really getting in the way.

[600] And it wasn't, it wasn't exactly, you know, because we were writing this, all the C code and C++ plus code that we couldn't write it to do the right thing, but that one of the things that was weird in the group was that we had a guy whose, who's, you know, his sort of top level job was he was a business guy.

[601] You know, he was sort of an MBA kind of person, you know, think about business plans and all of that.

[602] And, you know, there were a bunch of things.

[603] things that were kind of, you know, and we would talk about things that were going wrong and things that were going wrong, things that were going right.

[604] And, you know, as we thought about, you know, things like the requirements for security and safety, some low -level details and see, like, naked pointers.

[605] Yeah.

[606] And, you know, so back in the early 90s, it was well understood that, you know, the number one source of, like, security vulnerabilities was just pointers, was just bugs.

[607] Yeah.

[608] Right?

[609] And it was like, you know, 50, 60, 70 percent of all security vulnerabilities were bugs.

[610] And the vast majority of them were like buffer overflows.

[611] So you're like, we have to fix this.

[612] We have to make sure that this cannot have.

[613] happen.

[614] And that was kind of the original thing for me was this cannot, this cannot continue.

[615] And one of the things I find really entertaining this year was, I forget which Ragg published it, but there was this article that came out that was an examination, it was sort of the result of of an examination of all the security vulnerabilities in Chrome.

[616] And Chrome is like a giant piece of C++ code.

[617] And 60 or 70 % of all the security vulnerabilities were stupid pointer tricks.

[618] And I thought, it's 30 years later and we're still there.

[619] And we're still there.

[620] And that's one of those.

[621] slap your forehead and, and just, just, just want to cry.

[622] So would you attribute, or is that too much of a simplification, but would you attribute the creation of Java to, uh, to see porters?

[623] Obvious problem.

[624] Well, I mean, that was, that was one of the, the trigger points.

[625] Concurrentcy, you've mentioned.

[626] Concurrentcy was a big deal.

[627] Um, you know, because when you're interacting with, people, you know, the last thing you ever want to see is the thing like waiting.

[628] And, you know, issues about the software development process.

[629] You know, when faults happen, can you recover from them?

[630] What can you do to make it easier to create and eliminate complex data structures?

[631] what can you do to fix, you know, one of the most common sea problems, which is storage leaks.

[632] And it's evil twin, the freed but still being used piece of memory.

[633] You know, you free something and then you keep using it.

[634] Oh, yeah.

[635] You know, so when I was originally thinking about that, I was thinking about that in terms of, of sort of safety and security issues.

[636] And one of the things I sort of came to believe, came to understand was that it wasn't just about safety and security, but it was about developer velocity.

[637] Right?

[638] So, and I got really religious about this, because at that point, I had spent an ungodly amount of my life hunting down mystery pointer bugs.

[639] have.

[640] And, you know, like, like two -thirds of my time as a software developer was, you know, because the mystery pointer bugs tend to be the hardest to find, because they tend to be very, very statistical.

[641] The ones that hurt, you know, they're, you know, they're like a one -and -a -million chance.

[642] And...

[643] But nevertheless, create an infinite amount of suffering.

[644] Right.

[645] Because when you're doing a billion operations a second, you know, one in a million chance means it's going to happen.

[646] And so I got really religious about this thing, about, you know, making it so that if something fails, it fails immediately and visibly.

[647] And, you know, one of the things that was a real attraction of Java to lots of.

[648] of development shops was that, you know, we get our code up and running twice as fast.

[649] You mean like the entirety of the development process, debugging, all that kind of stuff?

[650] Yeah, if you, you know, so if you measure time from, you know, you first touch fingers to keyboard until you get your first demo out, not much different.

[651] But if you look from fingers touching keyboard, to solid piece of software that you could release in production, it would be way faster.

[652] And I think what people don't often realize there's, yeah, there's things that really slow you down, like hard to catch bugs probably is the thing that really slows down that.

[653] It really slows things down.

[654] But also there were, you know, one of the things that you get out of object -oriented programming is a strict methodology about, you know, what are the interfaces between things?

[655] And being really clear about how parts relate to each other.

[656] And what that helps with is so many times what people do is they kind of like sneak around the side.

[657] So if you've built something and people are using it, and then you say, well, okay, you know, I built this thing, you use it.

[658] And then you change it in such a way that it still does what you said it does.

[659] It just does it a little bit different.

[660] Then you find out that somebody out there was sneaking around the side.

[661] They had sort of tunneled in a back door and this person, their code broke.

[662] And because they were sneaking through a side door.

[663] And normally the attitude is to...

[664] dummy um but a lot of times um you know you can't get away you can't you can't just slap their hand and tell them to not do that right because you know it's you know somebody's you know some bank's you know account reconciliation system that that you know some developer decided oh i'm lazy you know, I'll just sneak through the back door.

[665] Because the language allows it, I mean, you can't even mad at them.

[666] Right.

[667] And so one of the things I did that on the one hand upset a bunch of people was that I made it so that you really couldn't go through back doors, right?

[668] So the whole point of that was to say, if you need, you know, if the interface here isn't right, the wrong way to deal with that is to go through a back door.

[669] the right way to deal with it is to walk up to the developer of this thing and say uh change the interface fix it yep right and so it was kind of like a social engineering thing yeah and um it's brilliant and people ended up discovering that that really made a difference um in terms uh you know and and and and a bunch of this stuff you know if you're just like screwing around writing your own like you know class project scale stuff um A lot of this stuff isn't quite so important because you're both sides of the interface.

[670] But when you're building sort of larger, more complex pieces of software that have a lot of people working on them, and especially when they like span organizations, you know, having really clear, having clarity about how that's that gets structured, saves your life.

[671] Yeah.

[672] And, you know, especially, you know, there's so much software that is fundamentally untestable, you know, until you do the real thing.

[673] It's better to write good code in the beginning as opposed to writing crappy code and then trying to fix it and trying to scramble and figure out and through testing, figure out where the bugs are.

[674] Yeah, it's like, it's like, which shortcut caused that rocket to not get where it was needed to go?

[675] So I think one of the most beautiful ideas philosophically and technically is of a virtual machine, the Java virtual machine.

[676] Again, I apologize to romanticize things, but how do you?

[677] did the idea of the JVM come to be?

[678] How to you radical of an idea it is?

[679] Because it seems to me to be just a really interesting idea in the history of programming.

[680] And what is it?

[681] So the Java virtual machine, you can think of it in different ways.

[682] Because it was carefully designed to have different ways of viewing it.

[683] So one view of it that most people don't really realize is there is that you can view it as sort of an encoding of the abstract syntax tree in reverse Polish notation.

[684] I don't know if that makes any sense at all.

[685] I could explain it and that would blow all over time.

[686] But the other way to think of it, and the way to think of it, and the way that it ends up being explained is that it's like the instruction set of an abstract machine that's designed such that you can translate that abstract machine to a physical machine.

[687] And the reason that that's important, so if you wind back to the early 90s when we were talking to all of these companies doing consumer electronics, And you talk to the purchasing people.

[688] There were interesting conversations with purchasing.

[689] So if you look at how, you know, these devices come together, they're sheet metal and gears and circuit boards and capacitors and resistors and stuff.

[690] And everything you buy has multiple sources.

[691] 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 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.

[692] So if you use the chip from Intel, you had to be an Intel customer for the end, till the end of time.

[693] Because if you wrote a bunch of software, you know, when you wrote software using whatever technique you wanted, and C was particularly bad about this because there was a lot of properties of the underlying machine that came through.

[694] So the code you wrote, you were stuck to that particular machine.

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

[696] I'll start buying chips from, you know, Bob's Better Chips.

[697] This drove the purchasing people absolutely insane.

[698] that they were welded into this decision.

[699] And they would have to make this decision before the first line of software was written.

[700] That's funny that you were talking about the purchasing people.

[701] So that's one perspective, right?

[702] There's a lot of other perspectives that all probably hated this idea.

[703] Right.

[704] But from a technical aspect, just like the creation of an abstraction layer that's agnostic to the underlying machine, from the perspective of the developer.

[705] I mean, that's brilliant.

[706] Right.

[707] Well, and, and, you know, so that's like across the spectrum of providers of chips.

[708] But then there's also the time thing, because, you know, as you went from one generation to the next generation to the next generation, they were all different.

[709] And you would often have to rewrite your software.

[710] Oh, you mean generations of machines, of different kinds?

[711] Yeah, so like, like one of the things that sucked about a year out of my life was when Son went from the Motorola 68010 processor to the 68020 processor.

[712] Then they had a number of differences, and one of them hit us really hard.

[713] And I ended up being the point guy on the worst case of where.

[714] the new instruction cache architecture hurt us.

[715] Well, okay, so, I mean, so when did this idea, I mean, okay, so yeah, you articulate a really clear fundamental problem in all of computing, but how, where do you get the guts to think we can actually solve this?

[716] You know, in our conversations with, you know, all these vendors, you know, these problems started to show up.

[717] and I kind of had this epiphany because it reminded me of a summer job that I had had in grad school.

[718] So back in grad school, my thesis advisor, well, I had two thesis advisors for bizarre reasons.

[719] One of them was a guy named Raj Reddy, the other one was Bob Sproul.

[720] And Raj, I love both of them.

[721] Yeah, Raj's amazing.

[722] So the department had bought a bunch of, like, early workstations from a company called Three Rivers Computer Company.

[723] And Three Rivers Computer Company was a bunch of electrical engineers who wanted to do as little software as possible.

[724] So 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.

[725] And they wanted to do that for as close to zero money as possible.

[726] So what they did was they built a machine whose instruction set was the was literally the byte code for UCSD Pascal, the P code.

[727] And so we had a bunch of software that was written for this machine.

[728] And for various reasons, you know, the company wasn't doing terrifically well.

[729] We had all the software on these machines, and we wanted it to run on other machines, principally the VACs.

[730] And so Raj asked me, if I could come up with a way to port all of this software from the from from the from the the the the the the perk machines to vaxes and and I think he you know what he had in mind was something that would translate from like Pascal to see or Pascal to I actually at those times pretty much it was you could translate to C or see and if you didn't like translate to see you could translate to C there was you know it's you know it's like the the Henry Ford you know any color you want it's just as long as it's black and and I went that's really hard and I and I noticed that you know and I was was like looking at stuff, and I went, ooh, I bet I could rewrite the P code into Vax assembly code.

[731] And then I started to realize that, you know, there were some properties of P code that made that really easy, some properties that made it really hard.

[732] So I ended up writing this thing that translated from P -code on the Three Rivers perks into assembly code on the Vax.

[733] And I actually got higher quality code than the C compiler.

[734] And so everything just got really fast.

[735] It was really easy.

[736] It was like, wow, I thought that was a sleazy hack because I was lazy.

[737] And in actual fact, it worked really well.

[738] And I tried to convince people that that was maybe a good thesis topic.

[739] Yeah.

[740] And nobody was, you know, it was like, nah.

[741] Really?

[742] I mean, yeah.

[743] It's kind of a brilliant idea, right?

[744] Maybe you didn't have the, you weren't able to articulate the big picture of it.

[745] Yeah.

[746] And I think, you know, that was a key part.

[747] But so then, you know, clock comes forward a few years.

[748] And it's like, we've got to be able to, you know, know, if they wanted to be able to switch from this weird microprocessor to that weird and totally different microprocessor, how do you do that?

[749] And I kind of went, oh, maybe by doing something kind of in the space of, you know, Pascal P -code, you know, I could do like multiple translators.

[750] And I spent some time thinking about that and thinking about, you know, what worked and what didn't work when I did the P -code to Vax translator.

[751] And I talked to some of the folks who were involved in Smalltalk because Smoltock also did a Vite code.

[752] And then I kind of went, yeah, I want to do that.

[753] Yeah.

[754] And it had the other advantage that you could either interpret it or compile it.

[755] and interpreters are usually easier to do, but not as fast as a compiler.

[756] So I figured, good, I can be lazy again.

[757] You know, sometimes I think that most of my good ideas are driven by laziness.

[758] And often I find that some of people's stupidest ideas are because they're insufficiently lazy.

[759] they just want to build something really complicated and it's like it doesn't need to be that complicated yeah and so and so that's how that came out and and um you know but that also turned into kind of a you know almost a religious position on my part which was which got me in in several other fights so like like one of the things that was a real difference was the way that arithmetic worked um you know once upon a time there were you know it wasn't always just two's complement arithmetic there were some machines that had one's complement arithmetic which was like almost anything built by CDC um and occasionally there were machines that were decimal arithmetic and and i was like this is crazy you know pretty much two's complement integer arithmetic has one.

[760] So just let's just do that.

[761] Just do that.

[762] One of the other places where there was a lot of variability was in the way that floating point behaved.

[763] And that was causing people throughout the software industry much pain because you couldn't do a numerical computing library that would work on.

[764] CDC and then have it work on an IBM machine and work on a deck machine.

[765] And as a part of that whole struggle, there had been this big body of work on floating point standards.

[766] And this thing emerged that came to be called IEE -E -754, which is the floating point standard that pretty much has taken over the entire universe.

[767] And at the time I was doing Java, it had pretty much completed taking over the universe.

[768] There were still a few pockets of holdouts, but I was like, you know, it's important to be able to say what 2 plus 2 means.

[769] Yeah.

[770] And so I went that.

[771] And one of the ways that I got into fights with people was that there were a few.

[772] few machines that did not implement IEE -E -7 -54 correctly.

[773] Well, of course, that's all short -term kind of fights.

[774] I think in the long term, I think this vision is won out.

[775] Yeah, and I think it's, you know, and it worked out over time.

[776] I mean, the biggest fights were with Intel because they had done some strange things with rounding, they had done some strange things with their transcendental function.

[777] which turned into a mushroom cloud of, you know, weirdness.

[778] Yeah, in the name of optimization, but from the perspective of the developer, that's not good.

[779] Well, their issues with transcendental functions were just stupid.

[780] Okay, so that's not even a trade -off.

[781] That's just absolutely.

[782] Yeah, they were doing range reduction for sign and cosine using a slightly wrong value for pi.

[783] Got it.

[784] Go ahead, 10 minutes.

[785] So in the interest of time, two questions.

[786] So one about Android, one about life.

[787] So one, I mean, we could talk for many more hours.

[788] I hope eventually we might talk again.

[789] But I got to ask you about Android and the use of Java there because it's one of the many places where Java just has a huge impact on this world.

[790] Just on your opinion, is that.

[791] there things that make you happy about the way Java is used in the Android world?

[792] And are there things that you wish were different?

[793] I don't know how to do a short answer to that, but I have to do a short answer to that.

[794] So, you know, I'm happy that they did it.

[795] Java had been running on cell phones at that time for quite a few years, and it worked really, really well.

[796] There were things about how they did it and in particular various ways that they kind of you know violated all kinds of contracts the guy who who let it Andy Rubin he crossed a lot of lines there's some lines crossed yeah lines were crossed that have since you know mushroomed into giant court cases And, you know, they didn't need to do that.

[797] And, in fact, it would have been so much cheaper for them to not cross lines.

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

[799] Or do you think at that time it was already clear that this is going to blow up?

[800] I guess I sort of came to believe that it didn't matter what Andy did.

[801] It was going to blow up.

[802] okay he's he you know i kind of started to think of him as as as like a manufacturer of bombs uh yeah some of the best things in this world come about through a little bit of uh explosive well and some of the worst 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 Yeah.

[803] It's in millions.

[804] I mean, it could be billions of devices.

[805] Yeah.

[806] Well, I mean, it was in billions of phones before Android came along.

[807] And, you know, I'm just as proud of the way that, like, the smart card standards adopted Java.

[808] And they did a, you know, everybody involved in that did a really good job.

[809] And that's, you know, billions and billions.

[810] that's crazy the sim cards you know the sim cards in your pocket yeah i mean it's i've been outside of that world for a decade so i don't know how that has it has evolved but um you know it's just been crazy so on that topic let me ask uh again there's a million technical things uh we could talk about but let me ask the absurd the old uh philosophical question about life, what do you hope when you look back at your life and people talk about you, right about you 500 years from now, what do you hope your legacy is?

[811] People not being afraid to take a leap of faith.

[812] I mean, you know, I've got this kind of weird history of doing weird stuff.

[813] It worked out pretty damn.

[814] It worked out, right?

[815] And I think some of the weirder stuff that I've done has been the coolest, and some of it crashed and burned.

[816] I think well over half of the stuff that I've done has crashed and burned, which has occasionally been really annoying.

[817] But still you kept doing it.

[818] But yeah.

[819] Yeah.

[820] Yeah.

[821] And, you know, even when things crash and, you know, even when things crash and, burn you at least learn something from it by way of advice you know people developers engineers scientists are just people who are young uh to look up to you what advice would you give them how to uh how to approach their life don't be afraid of risk it's okay to do stupid things once maybe a couple times you know you know you get you get a pass on the first time or two that you do something stupid.

[822] You know, the third or fourth time, yeah, not so much.

[823] But also, you know, I don't know why, but really early on, I started to think about ethical choices in my life.

[824] and because I'm a big science fiction fan I got to thinking about like just about every technical decision I make in terms of how do you want to you know are you building Blade Runner or Stride Trek which one's better which future would you rather live in you know so what's the answer to that well I would sure rather live in the universe of Star Trek.

[825] Star Trek, yeah.

[826] That opens up a whole topic about AI, but that's a really interesting.

[827] Yeah, yeah, yeah.

[828] It's a really interesting idea.

[829] So your favorite AI system would be data from Star Trek and my least favorite would easily be Skynet.

[830] Yeah.

[831] Beautifully put, I don't think there's a better way to end it, James.

[832] I can't say enough how much of an honor it is to meet you to talk to you.

[833] Thanks so much for wasting your time with me today.

[834] Not a waste at all.

[835] Thanks, James.

[836] All right, thanks.

[837] Thanks for listening to this conversation with James Gosling, and thank you to our sponsors, public goods, better help, and ExpressVPN.

[838] Please check out these sponsors in the description to get a discount and to support this podcast.

[839] If you enjoy this thing, subscribe by YouTube, review it with 5 stars on Apple Podcast, follow on Spotify, support on Patreon, or connect with me on Twitter at Lex Friedman.

[840] And now, let me leave you with some words from James Gosling.

[841] One of the toughest things about life is making choices.

[842] Thank you for listening and hope to see you next time.