back to indexJames Gosling: Java, JVM, Emacs, and the Early Days of Computing | Lex Fridman Podcast #126
Chapters
0:0 Introduction
4:45 Irrational numbers
8:4 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
70:25 Java
88:31 Java virtual machine
104:5 Android
107:4 Advice
00:00:00.000 |
The following is a conversation with James Gosling, 00:00:10.680 |
or is always at least in the top two or three. 00:00:14.120 |
We only had a limited time for this conversation, 00:00:16.520 |
but I'm sure we'll talk again several times in this podcast. 00:00:24.800 |
Please check out these sponsors in the description 00:00:26.660 |
to get a discount and to support this podcast. 00:00:29.840 |
As a side note, let me say that Java is the language 00:00:33.420 |
with which I first learned object-oriented programming, 00:00:36.520 |
and with it, the art and science of software engineering. 00:00:40.300 |
Also, early on in my undergraduate education, 00:00:43.360 |
I took a course on concurrent programming with Java. 00:00:51.820 |
the art of parallel computing was both algorithmically 00:00:58.560 |
The concept of a computer in my mind before then 00:01:04.840 |
The idea that we could create an abstraction of parallelism 00:01:07.920 |
where you could do many things at the same time 00:01:17.200 |
to expand their mind, I took concurrent programming. 00:01:21.140 |
If you enjoy this thing, subscribe on YouTube, 00:01:36.280 |
but I do give you timestamps, so go ahead and skip, 00:01:49.520 |
the one-stop shop for affordable, sustainable, 00:01:54.580 |
I take their fish oil and use their toothbrush, 00:02:00.280 |
black and white design that I find to be just beautiful. 00:02:03.680 |
Some people ask why I wear this black suit and tie. 00:02:20.360 |
It's not about how I look, it's about how I feel. 00:02:32.080 |
for every order placed, which is kind of cool. 00:02:35.000 |
Visit publicgoods.com/lex, or use code LEX at checkout 00:02:52.040 |
and match you with a licensed professional therapist 00:02:56.640 |
I chat with the person on there and enjoy it. 00:02:59.800 |
Of course, I also regularly talk to David Goggins these days 00:03:03.600 |
who is definitely not a licensed professional therapist, 00:03:11.280 |
and become comfortable to exist in their presence. 00:03:27.200 |
and I do think that BetterHelp is an option worth trying. 00:03:30.000 |
They're easy, private, affordable, and available worldwide. 00:03:37.400 |
and schedule weekly audio and video sessions. 00:03:53.440 |
and UK Netflix mostly because I wonder what it's like 00:04:11.720 |
for many reasons that I'll probably speak to another time. 00:04:25.000 |
It lets you change your location to almost 100 countries 00:04:32.560 |
to get an extra three months of ExpressVPN for free. 00:04:39.720 |
And now, here's my conversation with James Gosling. 00:04:44.200 |
I've read somewhere that the square root of two 00:05:03.720 |
You know, I used to consider myself really good at math 00:05:09.080 |
and these days I consider myself really bad at math. 00:05:12.040 |
I never really had a thing for the square root of two, 00:05:22.340 |
The Dictionary of Curious and Interesting Numbers, 00:05:45.300 |
you know, or paying for things with credit cards, 00:06:01.200 |
And fortunately, I've actually mostly forgotten all of them. 00:06:21.420 |
- It's like the only number that has destroyed a religion. 00:06:33.900 |
and you could represent anything as a rational number. 00:06:59.800 |
- And that means nothing in this world is perfect, 00:07:10.360 |
- Well, then there's the Gatel and completeness theorems 00:07:14.120 |
in the 20th century that ruined it once again for everybody. 00:07:17.420 |
- Yeah, although, although, although Gatel's theorem, 00:07:21.120 |
you know, the lesson I take from Gatel's theorem 00:07:26.580 |
is not that, you know, there are things you can't know, 00:07:33.780 |
But, you know, people want black and white answers. 00:07:56.540 |
to modern political discourse in there somewhere. 00:07:59.540 |
But let me ask, so with your kind of early love 00:08:04.540 |
or appreciation of the beauty of mathematics, 00:08:16.760 |
- You know, programming is all about logical structure, 00:08:22.020 |
understanding the patterns that come out of computation, 00:08:28.040 |
understanding sort of, I mean, it's often like, 00:08:37.700 |
you know, the path through the graph of possibilities. 00:08:51.020 |
But so then on the topic of irrational numbers, 00:08:54.580 |
do you see programming, you just painted it so cleanly. 00:09:13.780 |
you watch somebody who's good at math do math, 00:09:25.240 |
When I was a grad student, one of the students, 00:09:37.780 |
he had this reputation of being sort of a walking, 00:09:48.440 |
And if you were having a hard problem with something, 00:09:51.540 |
you could just like accost him in the hall and say, 00:10:13.900 |
And you'd go, well, okay, so N log N is the answer. 00:10:21.980 |
By which time he's, you know, down the hallway somewhere. 00:10:31.380 |
- Yeah, and then you have to figure out the path 00:10:38.180 |
you mentioned Don Knuth, well, at least recommending his, 00:10:43.180 |
you know, his book is something people should read. 00:10:48.660 |
- But in terms of, you know, theoretical computer science, 00:10:57.220 |
that has been inspiring to you, speaking of N log N, 00:11:03.900 |
that's in that whole world of algorithms and complexity 00:11:27.060 |
is being able to sort of look at a piece of code 00:11:32.060 |
and be able to prove to myself that it works. 00:11:39.300 |
And, you know, so for example, I find that I'm at odds 00:12:03.460 |
You know, so software engineers get really cranky 00:12:07.660 |
about how they format the documents that are the programs, 00:12:15.740 |
- The braces and all the rest of that, right? 00:12:18.780 |
And I tend to go for a style that's very, very simple 00:12:43.100 |
rather than have to go scroll, scroll, scroll 00:13:35.820 |
I'm what most people would call a visual thinker. 00:13:42.220 |
- So when you think about a program, what do you see? 00:13:47.460 |
So when I look at a piece of code on a piece of paper, 00:13:52.260 |
it very quickly gets transformed into a picture. 00:13:55.940 |
And, you know, it's almost like a piece of machinery 00:14:19.980 |
that's why you wanna see it all in the same place, 00:14:21.900 |
then you can just map it to something visual. 00:14:24.180 |
- Yeah, and it just kind of like it leaps off the page at me. 00:14:28.260 |
- Yeah, what are the inputs, what are the outputs, 00:14:35.700 |
Can we go back into your memory, long-term memory access? 00:14:40.700 |
What's the first program you've ever written? 00:15:29.280 |
- Yeah, yeah, so we're like 10,000 times faster these days. 00:15:34.280 |
- And was this kind of like a super computer, 00:15:53.640 |
that a university lab could maybe afford to buy one. 00:15:57.940 |
- And was there time-sharing, all that kind of stuff? 00:16:02.440 |
- There actually was a time-sharing OS for that, 00:16:44.240 |
and I noticed it was just kind of sitting there. 00:16:50.640 |
and nobody seemed to mind, so I just kept doing that. 00:16:59.040 |
- Oh, this is way before monitors were common. 00:17:12.120 |
- Okay, so the user interface wasn't very good. 00:17:22.140 |
But by integrated circuits, I mean that they would have 00:17:26.440 |
like 10 or 12 transistors on one piece of silicon. 00:17:31.440 |
Not the 10 or 12 billion that machines have today. 00:17:48.960 |
of exponential kind of improvement of Moore's Law, 00:17:52.920 |
of the potential of the future that was at your fingertips 00:18:18.040 |
- You could build arbitrarily complicated things, 00:18:30.960 |
If you love building things, it's completely accessible. 00:19:13.160 |
And when I would do electronics kind of projects, 00:19:20.360 |
they were mostly made, done by dumpster diving for trash. 00:19:27.520 |
And one of my big hauls was discarded relay racks 00:19:32.520 |
from the back of the phone company switching center. 00:19:55.920 |
was that all the relays required a specific voltage, 00:20:00.280 |
but getting a power supply that would do that voltage 00:20:06.400 |
And since I had a bunch of trashed television sets, 00:20:19.400 |
So I was actually running these relays at 300 volts. 00:20:32.540 |
- Surprised you survived that period of your life. 00:20:40.480 |
I mean, it's pretty common for teenage geeks to discover, 00:20:52.800 |
But do you remember what program in Calgary that you wrote? 00:21:03.880 |
- Well, so mostly, anything of any size was assembly code. 00:21:08.880 |
And actually, before I learned assembly code, 00:21:17.560 |
there was this programming language on the PDP-8 00:21:22.580 |
And Focal 5 was kind of like a really stripped down Fortran. 00:21:31.700 |
building programs that did things like play Blackjack 00:21:36.140 |
or Solitaire or, and for some reason or other, 00:21:50.420 |
- So something with like a function or a data, 00:21:55.540 |
- Yeah, yeah, I did a bunches of those things 00:22:01.700 |
- And so this would like print out, again, no monitors. 00:22:13.420 |
- So it's using something that's kind of like a typewriter. 00:22:22.180 |
- So when, I apologize to romanticize things, 00:22:26.220 |
but when did you first fall in love with programming? 00:22:31.220 |
You know, what was the first programming language? 00:22:41.860 |
of any particular language as being like beautiful, 00:22:45.700 |
'cause it was never really about the language for me. 00:22:56.580 |
about particular forms of syntax or this or that. 00:23:18.780 |
And, you know, by the time that people were willing 00:23:32.300 |
and control data assembly code for like the CDC 6400, 00:23:41.780 |
Even though that supercomputer has less compute power 00:23:49.100 |
- And that was mostly, like you said, Fortran world. 00:24:11.700 |
- Is it at number one or, I mean, are you, I mean. 00:24:16.180 |
- You know, the thing is that it's, you know, 00:24:24.780 |
What do you love and what do you not love about Lisp? 00:24:30.380 |
- Well, I guess the number one thing to not love about it 00:24:48.020 |
you actually get an interesting language structure. 00:24:51.020 |
And I've always thought that there was a friendlier version 00:25:12.460 |
which a very small number of people have ever used. 00:25:24.980 |
but is that one of the first functional languages or no? 00:25:28.220 |
- No, it was the first object oriented programming language. 00:25:39.820 |
And it was also the language where coroutines 00:25:48.700 |
So you could have a programming style that was, 00:26:16.820 |
- So it had coroutines, which are almost threads. 00:26:26.340 |
So you can get away without really complex locking. 00:26:44.260 |
you don't actually get to use the multiple cores. 00:26:49.980 |
'cause you start then having to get into the universe 00:26:54.140 |
of semaphores and locks and things like that. 00:26:58.380 |
But, you know, in terms of the style of programming, 00:27:11.580 |
The mental model was very much a multi-threaded one. 00:27:20.620 |
- To return to the world of Lisp for a brief moment, 00:27:32.620 |
that I think was very impactful on the history of Emacs. 00:27:42.420 |
- At that time, so that was in like '85 or '86. 00:27:57.740 |
And most of the editing was this tool called ED, 00:28:11.460 |
- Is it a pretty good editor, not a good editor? 00:28:16.780 |
if your input device is a teletype, it's pretty good. 00:28:35.540 |
- No, Tico, T-E-C-O, the text editor and corrector. 00:29:01.740 |
sort of started out as a collection of macros for Tico. 00:29:06.220 |
But then, the sort of Emacs style got popular 00:29:22.540 |
you know, the code base was entirely different, 00:29:33.420 |
And by the way, were all the implementations always in C? 00:29:43.420 |
as a bunch of macros for the Tico text editor. 00:29:52.940 |
was probably the most ridiculously obscure format. 00:29:58.340 |
You know, if you just look at a Tico program on a page, 00:30:17.980 |
But, you know, if you use Tico a lot, which I did, 00:30:38.980 |
So every character on the keyboard was a separate command. 00:30:55.300 |
And mostly what Emacs did was it made that visual. 00:31:14.100 |
Where you have to maintain a mental model of, 00:31:17.140 |
you know, sort of a mental image of your document. 00:31:20.660 |
You have to go, okay, so the cursor is between the A 00:31:31.860 |
So it is almost exactly the Emacs command set. 00:31:36.860 |
Well, it's roughly the same as Emacs command set, 00:31:52.940 |
was being able to visually see what you were editing 00:32:02.660 |
And, you know, a lot of things changed in the command set. 00:32:15.980 |
You could add new commands for all kinds of things. 00:32:18.540 |
And then people rewrote Emacs like multiple times in Lisp. 00:32:23.540 |
There was one done at MIT for the Lisp machine. 00:32:40.300 |
And that was actually the first time I used Emacs. 00:32:53.860 |
You know, I mean, I spent like a really intense three months 00:32:59.580 |
working on this Pascal compiler, basically living in Emacs. 00:33:11.380 |
And I thought, wow, this is just a way better way 00:33:16.460 |
And then I got back to CMU where we had kind of one 00:33:30.620 |
And since I mostly worked in the Unix universe 00:33:47.700 |
'cause at the time C was really the only language 00:33:59.540 |
- Yeah, at that time I had done a lot of C coding. 00:34:11.980 |
for me to use it to edit itself within a month or two. 00:34:17.100 |
And then it kind of took over the university. 00:34:37.220 |
And Emacs was kind of the best editor out there. 00:34:59.220 |
Because people would say, "Oh, can we install this?" 00:35:01.460 |
And I'd like, "Well, yeah, but you'll need some help." 00:35:14.900 |
- Can I ask briefly, what were those early days 00:35:24.940 |
I mean, did you, again, sorry for the silly question, 00:35:31.980 |
that the internet would look like what it is today? 00:35:36.780 |
- You know, some of it is remarkably unchanged. 00:35:41.460 |
So like one of the things that I noticed really early on 00:35:53.860 |
a lot of social life became centered around the ARPANET. 00:35:58.860 |
So things like, you know, between email and text messaging, 00:36:05.140 |
because text messaging was a part of the ARPANET 00:36:11.780 |
There were no cell phones, but you're sitting at a terminal 00:36:27.580 |
- Right, so it's like sending a one-line message 00:36:31.980 |
And so pretty much everything from, you know, 00:36:36.980 |
arranging lunch to going out on dates, you know, 00:36:55.060 |
- You know, and my life had gotten to where, you know, 00:36:59.660 |
I was, you know, living on social media, you know, 00:37:08.140 |
And so when it sort of transformed into the internet 00:37:16.340 |
and social media explodes, I was kind of like, 00:37:23.500 |
- It's, right, the scale thing is just astonishing. 00:37:36.220 |
And, you know, the technologies behind the networking 00:37:42.580 |
The, you know, the watershed moment of, you know, 00:37:50.460 |
and then people starting to just scale and scale and scale. 00:37:57.340 |
I mean, the scaling that happened in the early '90s 00:38:14.220 |
What was the, oh, because you can't really control 00:38:43.380 |
because, you know, so think of a cable company, right? 00:39:06.060 |
They view their business as serving their customers. 00:39:13.020 |
But as you climb up the hierarchy in the cable companies, 00:39:40.020 |
- And, you know, that view of like a cable company 00:39:55.180 |
with various cable companies where you could see, 00:39:58.460 |
you know, in the stratified layers of the corporation 00:40:17.020 |
most of the people who worked at the phone company 00:40:24.020 |
that their job was getting delightful content 00:40:45.700 |
was selling the eyeballs that were glued to their content, 00:40:54.620 |
And so the internet was a competition in that sense. 00:41:19.380 |
look, anybody, you know, with internet technologies, 00:41:27.220 |
So, you know, you could be distributing home movies 00:41:32.220 |
to your parents or your cousins who are anywhere else, right? 00:41:41.500 |
- Wow, you were thinking about that already, yeah. 00:41:52.460 |
And the kind of content we were thinking about 00:41:56.900 |
at the time was like, you know, home movies, kids' essays, 00:42:21.500 |
- And the reaction of the cable companies was like, 00:42:40.140 |
They could have listened to that and they could have-- 00:42:47.620 |
there's a lesson for like big companies, right? 00:42:50.420 |
Like to listen, to try to anticipate the renegade, 00:42:56.100 |
the out there, out of the box people like yourself 00:43:46.660 |
Because you're making so much money off of film. 00:43:59.660 |
And I ended up interacting with folks from Kodak quite a lot 00:44:03.340 |
and they actually had a big digital camera research 00:44:24.420 |
and you look at, you know, the emerging quality 00:44:33.660 |
And, you know, you can just plot it on a graph, you know? 00:44:37.980 |
And it's like, you know, sure film is better today, 00:44:42.820 |
but, you know, digital is improving like this. 00:45:29.420 |
And part of the issues for a lot of companies 00:45:45.300 |
that's a transition that's gonna take a while, right? 00:45:49.940 |
We had fights like this with people who were like smart cards. 00:45:56.980 |
- But that's where visionary leadership comes in, right? 00:46:10.780 |
- So you can draw the graphs you want that show 00:46:27.740 |
and we proactively do that, we can be on the next wave, 00:46:32.740 |
but there will be a period when we're in a trough. 00:46:39.220 |
And pretty much always there ends up being a trough 00:46:46.220 |
But the way that public companies work on this planet, 00:47:06.260 |
And many of these transitions involve a big hit 00:47:11.260 |
for a period of time, one, two, three quarters. 00:47:16.300 |
And so you get some companies and like Tesla and Amazon 00:47:22.500 |
are really good examples of companies that take huge hits, 00:47:34.660 |
to ignore the stock market for a little while. 00:47:42.220 |
but in the early days of both of those companies, 00:47:57.740 |
I care about how many happy customers we have. 00:48:02.380 |
And having as many happy customers as possible 00:48:12.820 |
I mean, Amazon operated in the negative for a long time. 00:48:17.340 |
- Right, but so Amazon and Google and Tesla and Facebook, 00:48:22.340 |
a lot of those had what amounted to patient money. 00:48:30.380 |
Often because there's like a charismatic central figure 00:48:44.700 |
- So on that topic, just maybe it's a little small tangent, 00:48:53.300 |
What are your thoughts about on Tesla's side, 00:48:55.780 |
Elon Musk leadership, on the Amazon side, Jeff Bezos, 00:49:00.180 |
all of these folks with large amounts of stock 00:49:16.300 |
that probably at the time people would criticize 00:49:42.940 |
The Silicon Valley crash and burn rate is pretty high. 00:50:12.020 |
sort of pre-Elon was kind of doing sort of okay, 00:50:40.380 |
I mean, the Model X was kind of a goofball thing to do. 00:51:05.860 |
which is like you have a vision and you just go like-- 00:51:22.620 |
So going back in time a little bit to Steve Jobs, 00:51:29.700 |
who had a strong vision and was really, really smart. 00:51:33.660 |
And he wasn't smart about the technology parts of things, 00:51:39.340 |
but he was really sharp about the sort of human relationship 00:52:25.460 |
or was he just making people reach to meet his vision? 00:52:47.900 |
he made people often do the best work of their life. 00:53:04.540 |
And even though kind of personally I liked him, 00:53:30.660 |
- Oh, he'd yell at people, he'd call them names. 00:54:01.620 |
And I think he was on the wrong side of the line. 00:54:36.860 |
there's come this sort of mythology out of Steve Jobs 00:54:49.380 |
And in a number of corners, people start going, 00:54:55.340 |
oh, if I wanna succeed, I need to be a real jerk. 00:55:01.900 |
- Right, and that for me just does not compute. 00:55:07.740 |
who are not jerks, who are perfectly fine people. 00:55:12.060 |
You know, they tend to not be in the public eye. 00:55:19.420 |
- The general public somehow lifts the jerks up 00:55:33.220 |
- And the people who don't do the kind of things 00:55:46.060 |
- Yeah, I just talked to Chris Lautner for the second time. 00:56:00.420 |
I feel like he's behind like a million technologies, 00:56:21.420 |
if I were to criticize what I've seen in Silicon Valley, 00:56:24.420 |
which is almost the resistance to working hard. 00:56:56.620 |
for accomplishing anything interesting, like really hard. 00:57:04.860 |
This idea of the, you should work smart, not hard, 00:57:12.500 |
because of course you wanna be to work smart. 00:57:20.180 |
like we're talking about with the short programs. 00:57:25.180 |
the smart hard thing isn't an either or, it's an and. 00:57:35.020 |
the people who say you should work smart, not hard, 00:57:46.380 |
- Right, I mean, that's just a recipe for disaster. 00:57:53.580 |
but there are more people who benefited from luck. 00:58:00.340 |
Luck and timing, like you said, is often an essential thing. 00:58:19.980 |
of the leadership of Google throughout its history 00:58:23.060 |
has been a pretty good example of not being nasty. 00:58:43.020 |
it's a culture of people who work really, really hard. 00:58:49.860 |
- Let me ask maybe a little bit of a tense question. 00:58:56.500 |
It seems like you've done some incredible work, 00:58:58.900 |
so outside of Java, you've done some incredible work 00:59:01.900 |
that didn't become as popular as it could have 00:59:10.060 |
What are your thoughts about that entire mess? 00:59:18.740 |
Like what's about open source now in retrospect, 00:59:22.220 |
looking back, about licensing, about open sourcing, 00:59:27.100 |
do you think open source is a good thing, a bad thing? 00:59:39.860 |
- So in general, I'm a big fan of open source. 00:59:45.420 |
The way that it can be used to build communities 01:00:18.340 |
that all software engineers must take a vow of poverty. 01:00:46.340 |
off of a patent and the patent came from literally 01:01:09.740 |
into something that looks to me a lot like exploitation, 01:01:19.060 |
When you've got medications that cost you $100 a day 01:01:36.940 |
- Yeah, so the interesting thing about sort of open source, 01:01:41.220 |
what bothers me is when something is not open source 01:01:52.220 |
- So like, I mean, if I look at your just implementation 01:01:55.380 |
of Emacs, like that could have been the dominant, 01:02:01.300 |
I apologize to the world, but I still love it. 01:02:05.060 |
And I could have been using your implementation of Emacs 01:02:37.980 |
it became really clear to me that I was either going 01:02:44.140 |
to be Mr. Emacs forever or I was gonna graduate. 01:02:58.140 |
That's so interesting to think about you as a, 01:03:00.540 |
like it's a different trajectory that could have happened. 01:03:04.540 |
- And maybe I could be fabulously wealthy today 01:03:10.300 |
if I had become Mr. Emacs and Emacs had mushroomed 01:03:14.420 |
into a series of text processing applications 01:03:37.620 |
And I went to grad school because I wanted to graduate 01:03:43.500 |
and being Mr. Emacs for a while was kind of fun 01:04:17.580 |
- And I was like, okay, do I carry on as a grad student? 01:04:48.460 |
was I went around all the people I knew on the ARPANET 01:04:53.620 |
who might be able to take over looking after Emacs 01:04:58.620 |
and pretty much everybody said, I got a day job. 01:05:04.100 |
So I actually found two folks and a couple of folks 01:05:11.060 |
in a garage in New Jersey, complete with a dog, 01:05:46.940 |
You have some tension with Mr. Richard Stallman. 01:06:11.100 |
So what, is there an interesting way to paint a picture 01:06:15.760 |
of the disagreement you have with Richard through the years? 01:07:33.800 |
and sometimes it doesn't, it hurts the product. 01:07:52.280 |
and it's not hard over in the other direction. 01:08:35.920 |
So as a part of things like the Sarbanes-Oxley Act 01:08:43.280 |
that would be various people's interpretations 01:08:57.920 |
the often various accounting and reporting standards say, 01:09:04.880 |
if you don't have a support contract on this thing 01:09:14.800 |
So if you've got a database, you need to pay for support. 01:09:30.280 |
that the average open source database producer charges 01:10:25.240 |
- I know you've talked about this in quite a few places, 01:10:39.360 |
This is the programming language that I first learned 01:10:49.400 |
that a lot of people use in a lot of different places 01:11:07.440 |
there was a group of us who were kind of worried 01:11:12.440 |
that there was stuff going on in the universe of computing 01:11:17.880 |
that the computing industry was missing out on. 01:11:25.200 |
And so a few of us started this project at Sun. 01:11:54.440 |
And that was everything from the sort of early glimmers 01:12:04.800 |
you know, you look at elevators and locomotives 01:12:12.560 |
and all kinds of audio equipment and video equipment. 01:12:24.960 |
And it sort of felt like there was something going on there 01:12:39.040 |
- Oh no, C and C++ absolutely owned the universe 01:12:54.680 |
It was about, it was just as simple and vague 01:13:36.560 |
we had folks who were willing to give us introductions. 01:13:41.560 |
We visited Samsung and a bunch of Korean companies 01:14:00.200 |
- For me, one of the things that sort of left out 01:14:03.200 |
was that they were doing all the usual computer things 01:14:07.480 |
that people had been doing like 20 years before. 01:14:13.240 |
was that they were sort of reinventing computer networking 01:14:24.040 |
that people in the computer industry had made. 01:14:31.000 |
in the networking area, we'd go and visit Company X, 01:14:36.000 |
they'd describe this networking thing that they were doing. 01:14:40.760 |
And just without any thought, I could tell them 01:14:43.400 |
like the 25 things that were going to be complete disasters 01:14:50.240 |
And I don't know whether that had any impact on any of them, 01:14:55.840 |
but that particular story of sort of repeating 01:15:00.840 |
the disasters of the computer science industry was there. 01:15:10.320 |
well, maybe we could do something useful here 01:15:43.560 |
They were never, ever willing to make trade-offs 01:15:56.680 |
So one of the things that had always made me nervous 01:16:07.120 |
people were willing to make trade-offs in reliability 01:16:17.720 |
it breaks a little more often because it's fast. 01:16:20.520 |
Maybe you run it a little hotter than you should, 01:16:26.640 |
was the way that the folks at Cray Supercomputers 01:16:38.200 |
was that they did Newton-Raphson approximations. 01:16:59.840 |
And just figuring out how to nail the bottom bit, 01:17:04.840 |
how to make sure that if you put a piece of toast 01:17:13.200 |
in a toaster, it's not going to kill the customer. 01:17:17.280 |
It's not gonna burst into flames and burn the house down. 01:17:21.800 |
- So those are, I guess those are the principles 01:17:54.640 |
was by building a demo, building a prototype of something. 01:18:05.520 |
for some home electronics, you know, TV, VCR, 01:18:14.440 |
we sort of discovered that there were some things 01:18:34.240 |
that we couldn't write it to do the right thing, 01:18:37.840 |
but that one of the things that was weird in the group 01:18:49.560 |
his sort of top level job was he was a business guy. 01:18:52.760 |
You know, he was sort of an MBA kind of person, 01:18:56.320 |
you know, think about business plans and all of that. 01:19:05.320 |
and we would talk about things that were going wrong 01:19:11.360 |
And, you know, as we thought about, you know, 01:19:14.360 |
things like the requirements for security and safety, 01:19:25.120 |
- And, you know, so back in the early nineties, 01:19:36.400 |
the number one source of like security vulnerabilities. 01:19:53.360 |
And the vast majority of them were like buffer overflows. 01:20:00.240 |
- We have to make sure that this cannot happen. 01:20:03.200 |
And that was kind of the original thing for me 01:20:11.600 |
And one of the things I find really entertaining this year 01:20:31.320 |
of all the security vulnerabilities in Chrome. 01:20:34.560 |
And Chrome is like a giant piece of C++ code. 01:20:39.320 |
And 60 or 70% of all the security vulnerabilities 01:20:46.960 |
And I thought it's 30 years later and we're still there. 01:21:16.800 |
- Well, I mean, that was one of the trigger points. 01:21:25.640 |
You know, because when you're interacting with people, 01:21:30.720 |
you know, the last thing you ever want to see 01:21:35.880 |
And, you know, issues about the software development process, 01:21:40.880 |
you know, when faults happen, can you recover from them? 01:21:57.320 |
one of the most common C problems, which is storage leaks. 01:22:14.160 |
You know, you free something and then you keep using it. 01:22:19.240 |
- You know, so when I was originally thinking about that, 01:22:26.760 |
And one of the things I sort of came to believe, 01:22:28.920 |
came to understand was that it wasn't just about safety 01:22:32.720 |
and security, but it was about developer velocity, right? 01:22:43.440 |
because at that point I had spent an ungodly amount 01:22:46.680 |
of my life hunting down mystery pointer bugs. 01:23:11.960 |
The ones that hurt, you know, they're, you know, 01:23:20.800 |
- But nevertheless create an infinite amount of suffering. 01:23:24.600 |
Because when you're doing a billion operations a second, 01:23:32.800 |
And so I got really religious about this thing, 01:23:38.520 |
about, you know, making it so that if something fails, 01:23:44.120 |
And, you know, one of the things that was a real 01:23:50.120 |
attraction of Java to lots of development shops was that, 01:23:55.560 |
you know, we get our code up and running twice as fast. 01:24:01.080 |
- You mean like the entirety of the development process, 01:24:05.000 |
- Yeah, if you, you know, so if you measure time from, 01:24:09.560 |
you know, you first touch fingers to keyboard 01:24:21.120 |
But if you look from fingers touching keyboard 01:24:23.720 |
to solid piece of software that you could release 01:24:32.200 |
- And I think what people don't often realize is, 01:24:34.600 |
yeah, there's things that really slow you down, 01:24:36.800 |
like it's hard to catch bugs probably is the thing 01:24:45.080 |
But also there were, you know, one of the things 01:24:47.720 |
that you get out of object oriented programming 01:24:56.000 |
And being really clear about how parts relate to each other. 01:25:00.760 |
And what that helps with is so many times what people do 01:25:12.520 |
So if you've built something and people are using it, 01:25:23.920 |
And then you change it in such a way that it still does 01:25:42.040 |
And because they were sneaking through a side door. 01:25:55.040 |
But a lot of times, you know, you can't get away, 01:26:01.440 |
you can't just slap their hand and tell them to not do that. 01:26:06.800 |
Because, you know, it's, you know, somebody's, 01:26:15.240 |
account reconciliation system that, you know, 01:26:19.320 |
some developer decided, oh, I'm lazy, you know, 01:26:30.360 |
that on the one hand upset a bunch of people, 01:26:36.040 |
you really couldn't go through back doors, right? 01:26:41.400 |
if you need, you know, if the interface here isn't right, 01:26:47.160 |
the wrong way to deal with that is go through a back door. 01:27:07.160 |
that that really made a difference in terms of, 01:27:12.160 |
you know, and a bunch of this stuff, you know, 01:27:27.120 |
you're, you know, both sides of the interface, 01:27:29.640 |
but, you know, when you're building, you know, 01:27:34.000 |
sort of larger, more complex pieces of software 01:27:40.040 |
and especially when they like span organizations, 01:27:49.280 |
having clarity about how that stuff gets structured 01:27:58.920 |
there's so much software that is fundamentally untestable, 01:28:08.120 |
- It's better to write good code in the beginning 01:28:36.640 |
philosophically and technically is of a virtual machine, 01:28:56.480 |
'Cause it seems to me to be just a really interesting idea 01:29:25.120 |
is that you can view it as sort of an encoding 01:29:30.120 |
of the abstract syntax tree in reverse Polish notation. 01:29:41.560 |
I could explain it and that would blow all over time. 01:29:50.160 |
is that it's like the instruction set of an abstract machine 01:30:10.560 |
when we were talking to all of these companies 01:30:20.760 |
there were interesting conversations with purchasing. 01:30:25.440 |
So if you look at how these devices come together, 01:30:32.000 |
they're sheet metal and gears and circuit boards 01:30:40.120 |
And everything you buy has multiple sources, right? 01:30:54.360 |
so that you can actually get a decent price for a capacitor. 01:31:28.520 |
when you wrote software using whatever technique you wanted 01:32:01.480 |
I'll start buying chips from, you know, Bob's Better Chips. 01:32:06.480 |
This drove the purchasing people absolutely insane 01:32:22.880 |
before the first line of software was written. 01:32:25.920 |
- It's funny that you're talking about the purchasing people. 01:32:37.560 |
just like the creation of an abstraction layer 01:32:54.320 |
so that's like across the spectrum of providers of chips. 01:33:00.720 |
because, you know, as you went from one generation 01:33:04.840 |
to the next generation to the next generation, 01:33:07.960 |
And you would often have to rewrite your software. 01:33:10.200 |
- Oh, you mean generations of machines of different kinds? 01:33:20.520 |
was when San went from the Motorola 68010 processor 01:33:44.120 |
the new instruction cache architecture hurt us. 01:33:49.160 |
- Well, okay, so I mean, so when did this idea, 01:33:52.760 |
I mean, okay, so yeah, you articulate a really clear 01:34:05.360 |
- You know, in our conversations with all of these vendors, 01:34:36.360 |
well, I had two thesis advisors for bizarre reasons. 01:34:46.920 |
And Raj, I love Raj, I really love both of them. 01:35:06.480 |
from a company called Three Rivers Computer Company. 01:35:15.360 |
who wanted to do as little software as possible. 01:35:17.880 |
So they knew that they'd need to have like compilers 01:35:36.360 |
whose instruction set was literally the byte code 01:36:19.800 |
And so Raj asked me if I could come up with a way 01:36:40.240 |
was something that would translate from like Pascal to C 01:36:51.480 |
pretty much it was, you could translate to C or C. 01:36:58.720 |
There was, you know, it's like the Henry Ford, 01:37:27.840 |
And then I started to realize that, you know, 01:37:40.840 |
So I ended up writing this thing that translated 01:37:52.440 |
And I actually got higher quality code than the C compiler. 01:37:58.920 |
And so everything just went, got really fast. 01:38:04.360 |
It was like, wow, I thought that was a sleazy hack 01:38:34.360 |
you weren't able to articulate the big picture of it. 01:38:37.280 |
- Yeah, and I think, you know, that was a key part. 01:38:42.560 |
But so then, you know, clock comes forward a few years 01:38:47.000 |
and it's like, we've got to be able to, you know, 01:38:51.400 |
if they want to be able to switch from, you know, 01:38:57.160 |
and totally different microprocessor, how do you do that? 01:39:00.840 |
And I kind of went, oh, maybe by doing something 01:39:05.840 |
kind of in the space of, you know, Pascal P code, 01:39:11.760 |
you know, I could do like multiple translators. 01:39:18.920 |
and what didn't work when I did the P code to Vax translator. 01:39:32.960 |
And then I kind of went, yeah, I want to do that. 01:39:41.400 |
'Cause that, you know, and it had the other advantage 01:39:45.040 |
that you could either interpret it or compile it. 01:40:03.720 |
You know, sometimes I think that most of my good ideas 01:40:12.480 |
And often I find that some of the people's stupidest ideas 01:40:17.920 |
They just want to build something really complicated. 01:40:23.960 |
It's like, it doesn't need to be that complicated. 01:40:37.600 |
you know, almost a religious position on my part, 01:40:44.400 |
So like one of the things that was a real difference 01:41:27.320 |
One of the other places where there was a lot of variability 01:41:42.280 |
because you couldn't do a numerical computing library 01:42:04.640 |
And this thing emerged that came to be called IEEE 754, 01:42:12.920 |
that pretty much has taken over the entire universe. 01:42:21.160 |
it had pretty much completed taking over the universe. 01:42:30.400 |
it's important to be able to say what two plus two means. 01:42:40.000 |
And one of the ways that I got into fights with people 01:42:58.600 |
I think in the long term, I think this vision is one out. 01:43:09.280 |
because they had done some strange things with rounding. 01:43:19.480 |
which turned into a mushroom cloud of, you know, weirdness. 01:43:32.680 |
- Well, their issues with transcendental functions 01:43:42.960 |
in first sign and cosine using a slightly wrong value for pi. 01:43:55.680 |
So one, I mean, we could talk for many more hours. 01:44:09.960 |
because it's one of the many places where Java 01:44:22.520 |
about the way Java is used in the Android world? 01:44:25.960 |
And are there things that you wish were different? 01:44:29.760 |
- I don't know how to do a short answer to that, 01:44:37.160 |
Java had been running on cell phones at that time 01:44:41.720 |
for quite a few years and it worked really, really well. 01:44:55.800 |
kind of, you know, violated all kinds of contracts. 01:45:09.800 |
that have since, you know, mushroomed into giant court cases. 01:45:19.840 |
And in fact, it would have been so much cheaper 01:45:33.800 |
Or do you think at that time it was already clear 01:45:42.040 |
that it didn't matter what Andy did, it was gonna blow up. 01:45:48.720 |
- He's, you know, I kind of started to think of him 01:45:59.240 |
Some of the best things in this world come about 01:46:17.480 |
- Is in millions, I mean, it could be billions of devices. 01:46:21.720 |
- Yeah, well, I mean, it was in billions of phones 01:46:26.560 |
And, you know, I'm just as proud as, you know, 01:46:33.240 |
of the way that like the smart card standards adopted Java. 01:46:38.240 |
And they did a, you know, everybody involved in that 01:46:49.560 |
- The SIM cards, you know, the SIM cards in your pocket. 01:46:54.520 |
- I've been outside of that world for a decade, 01:47:11.360 |
we could talk about, but let me ask the absurd, 01:47:17.940 |
What do you hope when you look back at your life 01:47:27.360 |
500 years from now, what do you hope your legacy is? 01:47:31.400 |
- People not being afraid to take a leap of faith. 01:47:39.920 |
I mean, you know, I've got this kind of weird history 01:47:50.920 |
And I think some of the weirder stuff that I've done 01:47:53.680 |
has been the coolest and some of it crashed and burned. 01:48:00.120 |
You know, I think well over half of the stuff 01:48:16.120 |
And you know, even when things crash and burn, 01:48:22.360 |
- By way of advice, you know, people, developers, 01:48:26.320 |
engineers, scientists, or just people who are young 01:48:30.320 |
to look up to you, what advice would you give them? 01:48:46.880 |
- You know, you get a pass on the first time or two 01:48:53.080 |
You know, the third or fourth time, yeah, not so much. 01:49:45.160 |
- Yeah, that opens up a whole topic about AI, 01:49:53.200 |
So your favorite AI system would be data from Star Trek. 01:49:58.200 |
- And my least favorite would easily be Skynet. 01:50:03.300 |
I don't think there's a better way to end it, James. 01:50:05.740 |
I can't say enough how much of an honor it is 01:50:09.500 |
Thanks so much for wasting your time with me today. 01:50:18.100 |
with James Gosling, and thank you to our sponsors, 01:50:24.360 |
Please check out these sponsors in the description 01:50:26.620 |
to get a discount and to support this podcast. 01:50:30.520 |
If you enjoy this thing, subscribe on YouTube, 01:50:44.460 |
One of the toughest things about life is making choices. 01:50:48.440 |
Thank you for listening, and hope to see you next time.