back to index

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


small model | large model

link |
00:00:00.000
The following is a conversation with James Gosling, the founder and lead designer behind
link |
00:00:04.160
the Java programming language, which in many indices is the most popular programming language
link |
00:00:09.600
in the world, or is always at least in the top two or three. We only had a limited time for
link |
00:00:15.360
this conversation, but I'm sure we'll talk again several times in this podcast. Quick summary of
link |
00:00:20.560
the sponsors, public goods, better help, and ExpressVPN. Please check out these sponsors in
link |
00:00:26.000
the description to get a discount and to support this podcast. As a side note, let me say that
link |
00:00:31.520
Java is the language with which I first learned object oriented programming and with it, the art
link |
00:00:38.000
and science of software engineering. Also early on in my undergraduate education, I took a course
link |
00:00:44.720
on concurrent programming with Java. Looking back at that time, before I fell in love with Neon
link |
00:00:50.720
Networks, the art of parallel computing was both algorithmically and philosophically fascinating
link |
00:00:57.360
to me. The concept of a computer in my mind before then was something that does one thing at a time.
link |
00:01:04.720
The idea that we could create an abstraction of parallelism where you could do many things at the
link |
00:01:09.280
same time while still guaranteeing stability and correctness was beautiful. While some folks in
link |
00:01:16.080
college took drugs to expand their mind, I took concurrent programming. If you enjoy this thing,
link |
00:01:22.000
subscribe on YouTube, review it with 5,000 up a podcast, follow on Spotify, support on Patreon,
link |
00:01:28.000
or connect with me on Twitter at Lex Freedman. As usual, I'll do a few minutes of ads now and
link |
00:01:33.520
no ads in the middle. I try to make these interesting, but I do give you timestamps,
link |
00:01:37.920
so go ahead and skip, but please do check out the sponsors by clicking the links in the description.
link |
00:01:43.440
It's the best way to support this podcast. This show, sponsored by Public Goods,
link |
00:01:49.360
the one stop shop for affordable, sustainable, healthy household products.
link |
00:01:54.400
I take their fish oil and use their toothbrush, for example. Their products often have a minimalist
link |
00:02:00.160
black and white design that I find to be just beautiful. Some people ask why I wear this black
link |
00:02:05.360
suit and tie. There's a simplicity to it that to me focuses my mind on the most important bits
link |
00:02:12.400
of every moment of every day, pulling only at the thread of the essential in all that life has
link |
00:02:18.720
to throw at me. It's not about how I look, it's about how I feel. That's what design is to me,
link |
00:02:24.480
creating an inner conscious experience, not an external look. Anyway, Public Goods plants one
link |
00:02:31.680
tree for every order placed, which is kind of cool. Visit publicgoods.com slash Lex,
link |
00:02:37.200
or use code Lex at checkout to get 15 bucks off your first order. This show is also sponsored by
link |
00:02:44.240
BetterHelp, spelled H E L P help. Check it out at betterhelp.com slash Lex. They figure out what
link |
00:02:51.360
you need and match you with a licensed professional therapist in under 48 hours. I chat with a person
link |
00:02:57.520
on there and enjoy it. Of course, I also regularly talk to David Goggins these days, who is definitely
link |
00:03:04.560
not a licensed professional therapist, but he does help me meet his and my demons and become
link |
00:03:11.760
comfortable to exist in their presence. Everyone is different. But for me, I think suffering is
link |
00:03:17.680
essential for creation, but you can suffer beautifully in a way that doesn't destroy you.
link |
00:03:23.200
I think therapy can help in whatever form that therapy takes. And I do think that BetterHelp
link |
00:03:28.560
is an option worth trying. They're easy, private, affordable and available worldwide. You can
link |
00:03:35.280
communicate by text anytime and schedule weekly audio and video sessions. Check it out at betterhelp.com
link |
00:03:41.600
slash Lex. This show is also sponsored by ExpressVPN. You can use it to unlock movies and shows
link |
00:03:48.720
that are only available in other countries. I did this recently with Star Trek Discovery and
link |
00:03:53.440
UK Netflix, mostly because I wonder what it's like to live in London. I'm thinking of moving from
link |
00:03:59.760
Boston to a place where I can build the business I've always dreamed of building. London is probably
link |
00:04:05.120
not in the top three, but top 10 for sure. The number one choice currently is Austin, for many
link |
00:04:12.000
reasons that I'll probably speak to another time. San Francisco, unfortunately, dropped out from the
link |
00:04:17.920
number one spot but is still in the running. If you have advice, let me know. Anyway, check out
link |
00:04:23.680
ExpressVPN. It lets you change your location to almost 100 countries and it's super fast.
link |
00:04:29.520
Go to expressvpn.com slash Lex pod to get an extra three months of ExpressVPN for free.
link |
00:04:35.840
That's expressvpn.com slash Lex pod. And now here's my conversation with James Gosling.
link |
00:04:43.920
I've read somewhere that the square root of two is your favorite irrational number.
link |
00:04:49.360
I have no idea where that got started. Is there any truth to it? Is there anything in
link |
00:04:55.680
mathematics or numbers that you find beautiful? Oh, well, there's lots of things in math that's
link |
00:05:02.400
really beautiful. I used to consider myself really good at math and these days I consider
link |
00:05:10.080
myself really bad at math. I never really had a thing for the square root of two,
link |
00:05:16.880
but when I was a teenager, there was this book called The Dictionary of Curious and
link |
00:05:24.480
Interesting Numbers, which for some reason I read through and damn near memorized the whole thing.
link |
00:05:35.440
And I started this weird habit of when I was like filling out checks or paying for things
link |
00:05:47.440
with credit cards, I would want to make the receipt add up to an interesting number.
link |
00:05:55.520
Is there some numbers that stuck with you that just kind of make you feel good?
link |
00:05:58.960
They all have a story. And fortunately, I've actually mostly forgotten all of them.
link |
00:06:08.400
Are they so like 42? Well, yeah. I mean, 42 is pretty magical.
link |
00:06:14.480
And then the irrationals. I mean, but is there a square root of two story in there somewhere?
link |
00:06:19.360
How does that homework get started? Well, it's like the only number
link |
00:06:22.800
that has destroyed a religion. Well, the Pythagoreans, they believed that all numbers
link |
00:06:33.040
were perfect and you could represent anything as a rational number. And in that time period,
link |
00:06:46.880
this proof came out that there was no rational fraction whose value was equal to the square
link |
00:06:58.800
root of two. And that means nothing in this world is perfect, not even mathematics.
link |
00:07:05.600
Well, it means that your definition of perfect was imperfect.
link |
00:07:11.200
Well, then there's the Gatal incompleteness theorems in the 20th century that ruined it once again
link |
00:07:16.320
for everybody. Yeah. Although Gertl's theorem,
link |
00:07:24.560
the lesson I take from Gertl's theorem is not that there are things you can't know,
link |
00:07:30.400
which is fundamentally what it says. But people want black and white answers. They want true or
link |
00:07:39.920
false. But if you allow a three state logic that is true, false, or maybe, then life's good.
link |
00:07:55.200
I feel like there's a parallel to modern political discourse in there somewhere.
link |
00:07:59.280
But let me ask, with your early love or appreciation of the beauty of mathematics,
link |
00:08:11.520
do you see a parallel between that world and the world of programming?
link |
00:08:16.400
You know, programming is all about logical structure, understanding the patterns that come
link |
00:08:29.840
out of computation, understanding sort of, I mean, it's often like the path through the
link |
00:08:39.120
graph of possibilities to find a short route. Meaning like find a short program that gets the
link |
00:08:48.640
job done kind of thing. But so then on the topic of irrational numbers, do you see programming?
link |
00:08:58.480
You just painted it so cleanly. It's a little of this trajectory to find a nice little program.
link |
00:09:05.040
But do you see it as fundamentally messy, maybe unlike mathematics?
link |
00:09:10.720
I don't think of it as, I mean, you watch somebody who's good at math do math. And
link |
00:09:18.960
often it's fairly messy. Sometimes it's kind of magical. When I was a grad student,
link |
00:09:29.760
one of the students, his name was Jim Sacks, was, he had this reputation of being sort of a walking,
link |
00:09:44.640
talking, human, theorem proving machine. And if you were having a hard problem with something,
link |
00:09:51.440
you could just like accost him in the hall and say, Jim. And he would do this funny thing
link |
00:09:59.600
where he would stand up straight, his eyes would kind of defocus. He'd go, just like something
link |
00:10:07.840
in today's movies. And then he'd straighten up and say, N log N and walk away. And you'd go,
link |
00:10:17.840
well, okay, so N log N is the answer. How did he get there? By which time he's down the hallway
link |
00:10:26.240
somewhere? Yeah. It is just the oracle, the black box, it just gives you the answer.
link |
00:10:31.200
Yeah. And then you have to figure out the path from the question to the answer.
link |
00:10:36.240
I think in one of the videos I watched, you mentioned Don Knuth,
link |
00:10:42.160
well, at least recommending his book is something people should read. But in terms of
link |
00:10:49.600
you know, theoretical computer science, do you see something beautiful that has been inspiring to
link |
00:10:58.400
you speaking of N log N in your work on programming languages that's in the whole world of algorithms
link |
00:11:07.440
and complexity and, you know, these kinds of more formal mathematical things? Or did that not really
link |
00:11:14.640
stick with you in your programming life? It did stick pretty clearly for me because
link |
00:11:25.520
one of the things that I care about is being able to
link |
00:11:32.160
sort of look at a piece of code and be able to prove to myself that it works.
link |
00:11:38.720
And, you know, so for example, I find that I'm at odds with many of the people around me over
link |
00:11:56.160
issues about like how you lay out a piece of software. So software engineers get really
link |
00:12:06.800
cranky about how they format the documents that are the programs, you know, where they put new
link |
00:12:12.720
lines and where they put, you know, the braces and all the rest of that. And I tend to go for
link |
00:12:23.040
a style that's very dense. Minimize the white space.
link |
00:12:28.640
Yeah. Well, to maximize the amount that I can see at once. So I like to be able to see a whole
link |
00:12:39.440
function and to understand what it does rather than have to go scroll, scroll, scroll and remember.
link |
00:12:45.680
Right? Yeah. I'm with you on that. Yeah. And people don't like that?
link |
00:12:49.680
Yeah. I've had, you know, multiple times when engineering teams have staged what was
link |
00:13:01.680
effectively an intervention. You know, where they invite me to a meeting and everybody's
link |
00:13:10.800
arrived before me and they all look at me and say, James, about your coding style. I'm sort of an
link |
00:13:21.680
odd person to be programming because I don't think very well verbally. I am just naturally a slow
link |
00:13:34.800
reader. I'm what most people would call a visual thinker. So when you think about a program,
link |
00:13:44.000
what do you see? I see pictures, right? So when I look at a piece of code on a piece of paper,
link |
00:13:52.000
it very quickly gets transformed into a picture. And, you know, it's almost like a piece of machinery
link |
00:14:01.760
with, you know, this connected to that and like these gears and different sizes. Yeah. I see them
link |
00:14:10.240
more like that than I see the sort of verbal structure or the lexical structure of letters.
link |
00:14:18.480
So then when you look at the program, that's why you want to see it all in the same place,
link |
00:14:21.760
then you could just map it to something visual. Yeah. And just kind of like it leaps off the page
link |
00:14:27.040
at me. Yeah. What are the inputs? What are the outputs? What the heck is this thing doing? Yeah.
link |
00:14:33.840
Getting a whole vision of it. Can we go back into your memory, memory, long term memory access?
link |
00:14:42.000
What's the first program you've ever written? I have no idea what the first one was. I mean,
link |
00:14:52.240
I know the first machine that I learned to program on was a PDP8
link |
00:15:03.360
at the University of Calgary. Do you remember the specs? Oh, yeah. So the thing had 4K of RAM.
link |
00:15:12.000
Nice. 12 bit words. The clock rate was, it was about a third of a megahertz.
link |
00:15:26.400
Oh, so you didn't even get to the M, okay. Yeah. So, you know, we're like 10,000 times faster
link |
00:15:35.120
these days. And was this kind of like a super computer, like a serious computer for?
link |
00:15:42.320
No, the PDP8i was the first thing that people were calling like mini computer. Got it.
link |
00:15:50.560
They were sort of inexpensive enough that a university lab could maybe afford to buy one.
link |
00:15:59.120
And was there time sharing, all that kind of stuff?
link |
00:16:01.360
There actually was a time sharing OS for that. But it wasn't used really widely.
link |
00:16:10.320
The machine that I learned on was one that was kind of hidden in the back corner of the
link |
00:16:18.080
of the computer center. And it was bought as part of a project to do computer networking.
link |
00:16:34.160
But they didn't actually use it very much. It was mostly just kind of sitting there.
link |
00:16:42.080
And it was kind of sitting there. And I noticed it was just kind of sitting there.
link |
00:16:46.800
And so, I started fooling around with it. And nobody seemed to mind. So, I just kept doing that.
link |
00:16:55.840
I had a keyboard and like a monitor. Oh, this is way before monitors were common.
link |
00:17:02.400
So, it was literally a Model 33 teletype with a paper tape reader.
link |
00:17:08.880
Okay. So, the user interface wasn't very good. Yeah. It was the first computer ever built
link |
00:17:20.000
with integrated circuits. But by integrated circuits, I mean that they would have like
link |
00:17:27.680
10 or 12 transistors on one piece of silicon. Not the 10 or 12 billion that machines have today.
link |
00:17:37.840
So, what did that I mean feel like if you remember those? I mean, did you have kind of
link |
00:17:46.080
inklings of the magic of exponential kind of improvement of Moore's law of the potential
link |
00:17:53.520
of the future that was at your fingertips kind of thing? Or was it just a cool?
link |
00:17:58.080
Yeah. It was just a toy. You know, I had always like building stuff. But one of the problems
link |
00:18:05.520
with building stuff is that you need to have parts. You know, you need to have pieces of wood
link |
00:18:11.200
or wire or switches or stuff like that. And those all cost money. And here you could build
link |
00:18:18.560
arbitrarily complicated things and I didn't need any physical materials. It required no money.
link |
00:18:27.040
That's a good way to put programming. You're right. It's if you love building things.
link |
00:18:32.240
It's completely accessible. You don't need anything. And anybody from anywhere could
link |
00:18:40.000
just build something really cool. Yeah. Yeah. If you've got access to a computer,
link |
00:18:44.640
you can build all kinds of crazy stuff. And when you were somebody like me who had like
link |
00:18:59.040
really no money. And I mean, I remember just lusting after being able to buy like a transistor.
link |
00:19:15.200
You know, and when I would do sort of electronics kind of projects, they were mostly made
link |
00:19:21.280
done by like dumpster diving for trash. You know, and you know, one of my big halls was
link |
00:19:31.680
discarded relay racks from the back of the phone company switching center.
link |
00:19:37.280
Oh, nice. That was the big memorable treasure. Oh, yeah. Yeah. That was a really good one.
link |
00:19:43.200
What do you use that for? I built a machine that played Tic Tac Toe.
link |
00:19:47.200
Nice. Out of relays. Of course, the thing that was really hard
link |
00:19:55.760
was that all the relays required a specific voltage. But getting a power supply that will
link |
00:20:02.640
would do that voltage was pretty hard. And since I had a bunch of trashed television sets,
link |
00:20:08.960
I had to sort of cobble together something that was wrong but worked. So I was actually
link |
00:20:22.240
running these relays at 300 volts. And none of the electrical connections were like properly
link |
00:20:31.520
sealed off. Surprised you survived that period of your life. Oh, for so many reasons. For so
link |
00:20:39.280
many reasons. I mean, you know, you're, you know, it's pretty common for teenage geeks to discover,
link |
00:20:46.320
oh, thermite, that's real easy to make. Yeah. Well, I'm glad you did. But do you remember the,
link |
00:20:53.520
do you remember what program and Calgary that you wrote, anything that stands out? And what
link |
00:21:02.080
language? Well, so mostly the, anything of any size was assembly code. And actually,
link |
00:21:15.760
before I learned assembly code, there was this programming language on the PDP eight called
link |
00:21:20.160
Focal Five. And Focal Five was kind of like a really stripped down Fortran. And I remember playing,
link |
00:21:31.600
you know, building programs that did things like play Blackjack,
link |
00:21:39.040
or Solitaire, or for some reason, or the things that I really liked were ones where they were
link |
00:21:46.640
just like plotting graphs. So something with like a function or data, and then you plot it.
link |
00:21:55.440
Yeah. Yeah, I did a bunches of those things and went, ooh, pretty pictures.
link |
00:22:03.040
And so this would like print out, again, no monitors. Right. So it was like on a teletype.
link |
00:22:10.320
Right. Yeah. So it's using something that's kind of like a typewriter.
link |
00:22:18.640
And then using those two plot functions. So when I apologize to romanticize things, but
link |
00:22:26.640
when did you first fall in love with programming? You know, what was the first programming language?
link |
00:22:34.000
Like as a serious maybe software engineer, what are you thought this is a beautiful thing? I guess
link |
00:22:40.560
I never really thought of any particular languages being like beautiful, because it was never really
link |
00:22:46.480
about the language for me. It was about what you could do with it. And, you know, even today,
link |
00:22:54.320
you know, people try to get me into arguments about particular forms of syntax or this or that.
link |
00:23:00.320
And I'm like, who cares? You know, it's about what you can do, not how you spell the word.
link |
00:23:10.400
And, you know, so back in those days, I learned like
link |
00:23:14.560
PL1 and Fortran and Koval. And, you know, by the time that people were
link |
00:23:22.240
willing to hire me to do stuff, you know, it was mostly assembly code and, you know,
link |
00:23:28.480
PDP assembly code and Fortran code and control data assembly code for like the CDC 6400, which was
link |
00:23:38.640
an early, I guess, supercomputer. Even though that supercomputer has less compute power than my phone
link |
00:23:47.840
by a lot. And that was mostly, like I said, Fortran world. That said, you've also showed
link |
00:23:56.560
appreciation for the greatest language ever that I think everyone agrees is Lisp.
link |
00:24:04.880
Well, Lisp is definitely on my list of the greatest ones that have existed.
link |
00:24:11.520
Is it at number one? Or, I mean, I mean, you know, the thing is that it's, you know,
link |
00:24:18.880
you know, I wouldn't put it number one. No. Is it the parentheses? What do you
link |
00:24:28.800
not love about Lisp? Well, I guess the number one thing to not love about it is so freaking
link |
00:24:37.600
many parentheses. On the love thing is, you know, out of those tons of parentheses,
link |
00:24:47.200
you actually get an interesting language structure. And I've always thought that
link |
00:24:52.800
there was a friendlier version of Lisp hiding out there somewhere. But I've never really spent much
link |
00:25:00.160
time thinking about it. But, you know, so like, like up the food chain for me,
link |
00:25:09.280
then from Lisp is Simula, which a very small number of people have ever used.
link |
00:25:15.200
But a lot of people, I think you had a huge influence, right? Yeah.
link |
00:25:19.760
The programming, but in the Simula, I apologize if I'm wrong on this, but is that one of the
link |
00:25:25.680
first functional languages? No, it was the first object oriented programming language.
link |
00:25:32.000
Got it.
link |
00:25:32.640
It's really where object oriented and languages sort of came together.
link |
00:25:37.360
And it was also the language where co routines first showed up as a part of the language.
link |
00:25:48.480
So you could have a programming style that was, you could think of it as sort of multi
link |
00:25:56.480
threaded with a lot of parallelism. Really? There's ideas of parallelism in there?
link |
00:26:03.520
Yeah. Yeah. So that was back, you know, so the first Simula spec was Simula 67.
link |
00:26:12.160
For like 1967?
link |
00:26:14.720
Yeah. Wow.
link |
00:26:16.400
So it had co routines, which are almost threads. The thing about co routines is that they don't
link |
00:26:24.400
have true concurrency, so you can get away without really complex locking. You can't
link |
00:26:33.920
usually do co routines on the multi core machine. Or if you try to do co routines on the multi
link |
00:26:42.320
core machine, you don't actually get to use the multiple cores. Either that or you know,
link |
00:26:49.760
because you start then having to get into the universe of semaphores and locks and things
link |
00:26:57.440
like that. But in terms of the style of programming, you could write code and think of it as being
link |
00:27:09.840
multi threaded. The mental model was very much a multi threaded one. And all kinds of problems
link |
00:27:18.480
you could approach very differently. To return to the world of Lisp for a brief moment,
link |
00:27:27.920
at CMU, you wrote a version of Emacs that I think was very impactful in the history of Emacs.
link |
00:27:38.080
What was your motivation for doing so? At that time, so that was in
link |
00:27:45.680
like 85 or 86. I had been using Unix for a few years. And most of the editing was this tool
link |
00:28:02.480
called ED, which was sort of an ancestor of VI. Is it a pretty good editor, not a good editor?
link |
00:28:14.000
Well, if what you're using, if your input device is a teletype, it's pretty good.
link |
00:28:22.640
It's certainly more humane than Tico, which was kind of the common thing in a lot of the deck
link |
00:28:30.800
universe at the time. And Tico is called TK? Is that the? No, Tico, TECO, the text editor and
link |
00:28:38.240
corrector. So many features. And the original Emacs came out as, so Emacs stands for editor macros.
link |
00:28:52.080
And Tico had a way of writing macros. And so the original Emacs from MIT
link |
00:29:01.360
sort of started out as a collection of macros for Tico. But then the Emacs style got popular
link |
00:29:12.880
originally at MIT. And then people did a few other implementations of Emacs that were,
link |
00:29:23.120
you know, the code base was entirely different, but it was sort of the philosophical style
link |
00:29:28.720
of the original Emacs. What was the philosophy of Emacs? And by the way, were all the implementations
link |
00:29:35.040
always in C? No. And how does Lisp fit into the picture? No, so the very first Emacs was written
link |
00:29:43.120
as a bunch of macros for the Tico text editor. Wow, this is so interesting. And the macro language
link |
00:29:51.440
for Tico was probably the most ridiculously obscure format. You know, if you just look at
link |
00:30:00.000
a Tico program on a page, you think it was just random characters. It really looks like just line
link |
00:30:07.920
noise. It's just kind of like latex or something. Oh, way worse than latex. Way, way worse than
link |
00:30:16.080
latex. But if you use Tico a lot, which I did, the Tico was completely optimized for
link |
00:30:26.320
touch typing at high speed. So there were no two character commands. Or there were a few, but
link |
00:30:37.200
mostly they were just one character. So every character on the keyboard was a separate command.
link |
00:30:41.760
And actually, every character on the keyboard was usually two or three commands because
link |
00:30:49.120
you can shift and control and all of those things. It's just a way of very tightly encoding it.
link |
00:30:56.480
And mostly what Emacs did was it made that visual. So one way to think of Tico is use Emacs
link |
00:31:08.480
with your eyes closed, where you have to maintain a mental model of sort of a mental image of your
link |
00:31:19.840
document. You have to go, okay, so the cursor is between the A and the E. And I want to exchange
link |
00:31:29.360
those so I do these things. So it is almost exactly the Emacs command set. Well, it's roughly
link |
00:31:39.600
the same as Emacs command set, but using Emacs with your eyes closed. So part of what Emacs added
link |
00:31:52.000
to the whole thing was being able to visually see what you were editing in a form that matched your
link |
00:32:01.760
document. And a lot of things changed in the command set. Because it was programmable,
link |
00:32:13.680
it was really flexible. You could add new commands for all kinds of things. And then
link |
00:32:18.880
people rewrote Emacs like multiple times in Lisp. There was one done at MIT for the Lisp machine.
link |
00:32:28.080
There was one done for Multix. And one summer, I got a summer job to work on the Pascal compiler
link |
00:32:38.080
for Multix. And that was actually the first time I used Emacs. To write the compilers. You worked
link |
00:32:49.280
on compilers too. It's fascinating. Yeah, so I did a lot of work. I spent a really intense
link |
00:32:58.400
three months working on this Pascal compiler, basically living in Emacs. And it was the one
link |
00:33:07.600
written in Maclist by Bernie Greenberg. And I thought, wow, this is just a way better way to do
link |
00:33:15.680
editing. And then I got back to CMU, where we had kind of one of everything. And two of a bunch
link |
00:33:27.840
of things and four of a few things. And since I mostly worked in the Unix universe, and Unix
link |
00:33:36.640
didn't have an Emacs, I decided that I needed to fix that problem. So I wrote this implementation of
link |
00:33:45.600
Emacs in C, because at the time, C was really the only language that worked on Unix. And you
link |
00:33:55.920
were comfortable with C as well, at that point? Yeah, at that time, I had done a lot of C coding.
link |
00:34:02.240
This was in like 86. And it was running well enough for me to use it to edit itself within a
link |
00:34:16.480
month or two. And then it kind of took over the university. And then it spread outside.
link |
00:34:25.360
Yeah. And then it went outside the, and largely because Unix kind of took over the research
link |
00:34:32.960
community on the ARPANET. And Emacs was kind of the best editor out there. It kind of took over.
link |
00:34:45.120
There was actually a brief period where I actually had login IDs on every non military
link |
00:34:54.720
host on the ARPANET. Because people would say, oh, can we install this? And I'd like,
link |
00:35:03.440
well, yeah, but you'll need some help. The days when security wasn't... When nobody cared.
link |
00:35:12.720
Nobody cared. Yeah. I mean, you can ask briefly, what were those early days of ARPANET and the
link |
00:35:20.320
internet like? I mean, did you, again, sorry for the silly question, but could you have possibly
link |
00:35:30.320
imagined that the internet would look like what it is today? Some of it is remarkably unchanged.
link |
00:35:40.880
So one of the things that I noticed really early on when I was at Carnegie Mellon was that
link |
00:35:53.680
a lot of social life became centered around the ARPANET. And so things like between email and
link |
00:36:03.760
text messaging, because text messaging was a part of the ARPANET really early on. There were no
link |
00:36:12.000
cell phones, but you're sitting at a terminal and you're typing stuff. So essentially email,
link |
00:36:18.560
or what is... Well, it's just like a one line message, right? So... Oh, cool. It's like chat.
link |
00:36:25.520
Like chat, right? So it's like sending a one line message to somebody, right?
link |
00:36:31.040
And so pretty much everything from arranging lunch to going out on dates was all like
link |
00:36:45.440
driven by social media, right? In the 80s. Easier than phone calls, yeah.
link |
00:36:54.320
And my life had gotten to where I was living on social media from the early mid 80s.
link |
00:37:11.200
And so when it sort of transformed into the internet and social media explodes,
link |
00:37:18.400
I was kind of like, what's the big deal? It's just a scale thing. Right. The scale thing is
link |
00:37:26.480
just astonishing. But the fundamentals in some ways... The fundamentals have hardly changed.
link |
00:37:36.080
And the technologies behind the networking have changed significantly. The watershed moment of
link |
00:37:46.960
you know, going from the ARPANET to the internet, and then people starting to just scale and scale
link |
00:37:56.720
and scale. I mean, the scaling that happened in the early 90s and the way that so many vested
link |
00:38:08.880
interests fought the internet. Oh, interesting. What was the... Oh, because you can't really
link |
00:38:16.320
control the internet. Yeah, so fundamentally, the cable TV companies and broadcasters and phone
link |
00:38:28.480
companies at the deepest fibers of their being, they hated the internet. But it was often kind of
link |
00:38:40.880
a funny thing because... So think of a cable company, right? Most of the employees of a cable
link |
00:38:55.760
company, their job is getting TV shows, movies, whatever out to their customers. They view their
link |
00:39:07.840
business as serving their customers. But as you climb up the hierarchy in the cable companies,
link |
00:39:20.800
that view shifts because really the business of the cable companies
link |
00:39:30.320
had always been selling eyeballs to advertisers. Right. And that view of a cable company didn't
link |
00:39:46.080
really dawn on most people who worked at the cable companies. But I had various dust ups with
link |
00:39:55.280
various cable companies where you could see, in the stratified layers of the corporation,
link |
00:40:01.680
that this view of the reason that you have cable TV is to capture eyeballs.
link |
00:40:13.040
So they didn't see it that way. Well, so the people who... Most of the people who worked at
link |
00:40:18.080
the phone company or at the cable companies, their view was that their job was getting delightful
link |
00:40:27.520
content out to their customers. And their customers would pay for that. Higher up,
link |
00:40:34.640
they viewed this as a way of attracting eyeballs to them. And then what they were really doing
link |
00:40:45.520
was selling the eyeballs that were glued to their content to the advertisers.
link |
00:40:52.240
To the advertisers, yeah. And so the internet was a competition in that sense.
link |
00:40:57.280
Right. And so... They were right.
link |
00:41:00.320
Well, yeah. I mean, there was one proposal that we sent, one detailed proposal that we
link |
00:41:10.880
wrote up back at that sun in the early 90s that was essentially like,
link |
00:41:19.200
look, with internet technologies, anybody can become provider of content. So you could be
link |
00:41:29.760
distributing home movies to your parents or your cousins who are anywhere else. So anybody can
link |
00:41:40.400
become a publisher. Wow. You were thinking about that already. Yeah. Yeah. That was like in the
link |
00:41:47.840
early 90s. And we thought, this would be great. And the kind of content we were thinking about
link |
00:41:56.720
at the time was like home movies, kids essays, stuff from grocery stores or a restaurant that
link |
00:42:12.400
they could actually start sending information about. That's brilliant.
link |
00:42:21.200
And the reaction of the cable companies was like, fuck no. Because then we're out of business.
link |
00:42:34.880
What is it about companies that... Because they could have just... They could have been ahead of
link |
00:42:39.280
that wave. They could have listened to that. And they could have... They didn't see a path to revenue.
link |
00:42:44.400
You know, there's... Somewhere in there, there's a lesson for big companies, right?
link |
00:42:51.440
To listen, to try to anticipate the renegade out there, out of the box,
link |
00:42:58.240
people like yourself in the early days writing proposals about what this could possibly be.
link |
00:43:03.760
Well, in that, it wasn't... If you're in a position where you're making
link |
00:43:09.440
truckloads of money off of a particular business model, the whole thought of like
link |
00:43:25.120
leaping the chasm, right? You can see, oh, new models that are more effective are emerging.
link |
00:43:33.840
Right? So like digital cameras versus film cameras.
link |
00:43:42.880
Why take the leap? Why take the leap? Because you're making so much money off of film.
link |
00:43:54.640
In my past at Sun, one of our big customers was Kodak. And I ended up interacting with
link |
00:44:01.120
folks from Kodak quite a lot. And they actually had a big digital camera research and digital
link |
00:44:10.800
imaging business or bit development group. And they knew that you just look at the
link |
00:44:22.480
at the trend lines and you look at the emerging quality of these digital cameras.
link |
00:44:33.920
And you can just plot it on the graph. And it's like, sure, film is better today,
link |
00:44:41.920
but digital is improving like this. The lines are going to cross. And the point at which the lines
link |
00:44:56.160
cross is going to be a collapse in their business. And they could see that. They absolutely knew that.
link |
00:45:06.880
The problem is that up to the point where they hit the wall, they were making truckloads of money.
link |
00:45:16.320
And when they did the math, it never started to make sense for them to kind of lead the charge.
link |
00:45:28.240
And part of the issues for a lot of companies for this kind of stuff is that if you're going to
link |
00:45:37.360
leap over a chasm like that, like with Kodak going from film to digital, that's a transition
link |
00:45:46.640
that's going to take a while. We had fights like this with people over smart cards. The smart
link |
00:45:53.920
cards fights were just ludicrous. But that's where visionary leadership comes in, right?
link |
00:45:59.920
Yeah, somebody needs to roll in and say, take the leap. Well, it's partly take the leap,
link |
00:46:07.200
but it's also partly take the hit. Take the hit in the short term.
link |
00:46:10.720
So you can draw the graphs you want that show that if we leap from here on our
link |
00:46:19.840
present trajectory, we're doing this and there's a cliff. If we force ourselves into a transition
link |
00:46:27.520
and we proactively do that, we can be on the next wave. But there will be a period when we're in a
link |
00:46:36.400
trough. And pretty much always there ends up being a trough as you leap the chasm.
link |
00:46:45.040
But the way that public companies work on this planet, they're reporting every quarter. And the
link |
00:46:56.320
one thing that a CEO must never do is take a big hit over some quarter. And many of these transitions
link |
00:47:07.840
involve a big hit for a period of time, one, two, three quarters. And so you get some companies.
link |
00:47:21.920
And like Tesla and Amazon are really good examples of companies that take huge hits.
link |
00:47:30.960
But they have the luxury of being able to ignore the stock market for a little while. And that's
link |
00:47:39.600
not so true today, really. But in the early days of both of those companies,
link |
00:47:51.040
they both did this thing of, I don't care about the quarterly reports. I care about how many
link |
00:47:59.280
happy customers we have. And having as many happy customers as possible can often be
link |
00:48:09.200
an enemy of the bottom line. Yeah. So how do they make that work? I mean,
link |
00:48:13.120
Amazon operated the negative for a long time. It's like investing into the future.
link |
00:48:17.120
Right. So Amazon and Google and Tesla and Facebook, a lot of those had what amounted to
link |
00:48:26.880
patient money, often because there's like a charismatic central figure who has a really
link |
00:48:38.080
large block of stock. And they can just make it so. So on that topic, maybe it's a little
link |
00:48:48.480
small tangent, but you've gotten a chance to work with some pretty big leaders. What are your
link |
00:48:53.680
thoughts about Tesla side Elon Musk leadership on the Amazon side, Jeff Bezos, all of these folks
link |
00:49:01.120
with large amounts of stock and vision in their company. I mean, they're founders.
link |
00:49:06.880
Either complete founders or early on folks. And Amazon have taken a lot of leaps.
link |
00:49:15.840
And that probably at the time people would criticize as like, what is this bookstore thing?
link |
00:49:26.240
Yeah. And Bezos had a vision and he had the ability to just follow it.
link |
00:49:36.320
Lots of people have visions and the average vision is completely idiotic and you crash and burn.
link |
00:49:42.480
The Silicon Valley crash and burn rate is pretty high. And they're not necessarily
link |
00:49:53.760
crash and burn because they were dumb ideas, but often it's just timing and luck. And
link |
00:50:01.040
you take companies like Tesla and really the original Tesla, sort of pre
link |
00:50:14.720
Elon was kind of doing sort of okay, but he just drove them. And because he had a really
link |
00:50:30.320
strong vision, he would make calls that were always mostly pretty good. I mean, the Model X
link |
00:50:41.360
was kind of a goofball thing to do. But he did it boldly anyway. Like there's so many people
link |
00:50:48.480
that just said like, there's so many people that oppose them on the Falconwind door,
link |
00:50:53.200
like the door from the engineering perspective, those doors are ridiculous. It's like.
link |
00:50:58.240
Yeah, they are a complete travesty. But they're exactly the symbol of what great leadership is,
link |
00:51:05.600
which is like, you have a vision and you just go like.
link |
00:51:08.880
If you're going to do something stupid, make it really stupid.
link |
00:51:11.920
Yeah, and go all in. Yeah. And to must credit, he's a really sharp guy.
link |
00:51:22.400
So going back in time a little bit to Steve Jobs. Steve Jobs was a similar sort of character who
link |
00:51:29.680
had a strong vision and was really, really smart. And he wasn't smart about the technology parts of
link |
00:51:37.920
things. But he was really sharp about the sort of human relationship between humans and objects.
link |
00:51:54.560
But he was a jerk. Can we just linger on that a little bit? Like people say he's a jerk.
link |
00:52:03.920
Is that a feature or a bug? Well, that's the question, right?
link |
00:52:11.120
So you take people like Steve who was really hard on people. And so the question is,
link |
00:52:20.720
was he really, was he needlessly hard on people or was he just making people reach to meet his vision?
link |
00:52:34.480
And you could kind of spin it either way. Well, the results tell a story.
link |
00:52:43.120
The whatever jerk ways he had, he made people often do the best work of their life.
link |
00:52:51.440
Yeah. Yeah. And that was absolutely true. And I interviewed with him several times.
link |
00:52:57.920
I did various negotiations with him. And even though kind of personally I liked him,
link |
00:53:14.080
I could never work for him. Can you put into words the kind of tension that you feel would be
link |
00:53:28.400
destructive as opposed to constructive? Oh, he'd yell at people. He'd call them names.
link |
00:53:37.200
And you don't like that? No. No, I don't think you need to do that.
link |
00:53:46.720
And I think there's pushing people to excel and then there's too far. And I think he was
link |
00:54:02.160
on the wrong side of the line. And I've never worked for Musk. I know a number of people who have
link |
00:54:10.240
many of them that have said, and it shows up in the press a lot, that Musk is kind of that way.
link |
00:54:18.160
And one of the things that I sort of loathe about Silicon Valley these days is that
link |
00:54:24.880
a lot of the high flying successes are run by people who are complete jerks.
link |
00:54:33.280
But it seems like there's come this sort of mythology out of Steve Jobs that the reason
link |
00:54:42.480
that he succeeded was because he was super hard on people. And in a number of corners, people
link |
00:54:55.680
start going, oh, if I want to succeed, I need to be a real jerk. And that for me just does not
link |
00:55:04.560
compute. I know a lot of successful people who are not jerks who are perfectly fine people. They
link |
00:55:15.440
tend to not be in the public eye. The general public somehow lifts the jerks up into the
link |
00:55:25.360
into the hero status. Right. Well, because they do things that get them in the press. And the
link |
00:55:34.800
people who don't do the kind of things that spill into the press. Yeah, I just talked to Chris
link |
00:55:49.360
Ladner for the second time. He's a super nice guy. Just an example of this kind of kind of
link |
00:55:58.320
individual that's in the background. I feel like he's behind a million technologies. But he also
link |
00:56:03.680
talked about the jerkiness of some of the folks. Yeah. Yeah. And the fact that being a jerk has
link |
00:56:10.640
become your required style. But one thing I maybe want to ask on that is maybe to push back a little
link |
00:56:17.360
bit. So there's the jerk side. But there's also, if I were to criticize what I've seen
link |
00:56:22.720
us in the Bound Valley, which is almost the resistance to working hard. So on the jerking
link |
00:56:29.200
aside, it's so postage jobs and Elon kind of pushed people to work really hard to do.
link |
00:56:41.760
And it's a question whether it's possible to do that nicely. But one of the things that
link |
00:56:46.720
bothers me, maybe I'm just Russian and just kind of romanticize the whole suffering thing.
link |
00:56:53.200
But I think working hard is essential for accomplishing anything interesting,
link |
00:56:58.720
like really hard. And in the parlance of Silicon Valley, it's probably too hard. This idea of
link |
00:57:05.280
that you should work smart, not hard. Often, to me, sounds like you should be lazy. Because of
link |
00:57:13.360
course, you want to be to work smart. Of course, you would be maximally efficient. But in order
link |
00:57:18.640
to discover the efficient path, like we're talking about with the short program. Yeah.
link |
00:57:23.280
Well, the smart, hard thing isn't an either or. It's an and. It's an and, yeah. Right. And
link |
00:57:32.000
the people who say you should work smart, not hard, they pretty much always fail.
link |
00:57:44.320
Yeah. Thank you. Right. I mean, that's just a recipe for disaster. I mean, there are
link |
00:57:51.840
counter examples. But they're more people who benefited from luck.
link |
00:57:57.120
And you're saying, yeah, exactly. Luck and timing, like you said, is often an essential
link |
00:58:04.320
thing. But you're saying, you know, you can be, you can push people to work hard and do incredible
link |
00:58:09.200
work without, without. Without being nasty. Yeah. Without being nasty. I think
link |
00:58:18.720
Google is a good example of the leadership of Google throughout its history has been
link |
00:58:23.200
a pretty good example of not being nasty and being kind. Yeah. I mean, the twins, Larry and Sergei
link |
00:58:35.680
are both pretty nice people. Sander Pichaz, very nice. Yeah. Yeah. And, you know, it's a cultural
link |
00:58:44.480
of people who work really, really hard. Let me ask maybe a little bit of a tense question. We're
link |
00:58:54.240
talking about Emacs. It seems like you've done some incredible work. So outside of Java, you've
link |
00:59:00.560
done some incredible work that didn't become as popular as it could have because of like licensing
link |
00:59:06.320
issues and open source and like issues. What are your thoughts about the, that entire mess?
link |
00:59:18.560
Like what's about open source now in retrospect, looking back about licensing, about open sourcing,
link |
00:59:26.320
do you think open source is a good thing, a bad thing? Do you have regrets? Do you have wisdom
link |
00:59:37.280
that you've learned from that whole experience? So in general, I'm a big fan of open source.
link |
00:59:45.200
The way that it can be used to build communities and promote the development of things and promote
link |
00:59:52.640
collaboration and all of that is really pretty grand. When open source turns into a religion
link |
01:00:03.200
that says all things must be open source, I get kind of weird about that because it's sort of
link |
01:00:11.840
like saying some versions of that end up saying that all software engineers must
link |
01:00:22.400
take about poverty. It's unethical to have money to build a company to write.
link |
01:00:37.120
There's a slice of me that actually buys into that because people who make billions of dollars
link |
01:00:46.320
off of a patent and the patent came from literally a stroke of lightning that hits you as you lie
link |
01:00:59.840
half awake in bed. That's lucky. Good for you. The way that that sometimes
link |
01:01:08.240
sort of explodes into something that looks to me a lot like exploitation. You see a lot of
link |
01:01:15.040
that in the drug industry. When you've got medications that cost you like $100 a day
link |
01:01:31.920
and it's like no. The interesting thing about the sort of open source,
link |
01:01:40.560
what bothers me is when something is not open source and because of that, it's a worse product.
link |
01:01:53.440
If I look at your just implementation of Emacs, that could have been the dominant
link |
01:01:58.480
implementation. I use Emacs. That's my main ID. I apologize to the world, but I still love it.
link |
01:02:03.040
I could have been using your implementation of Emacs and why aren't I?
link |
01:02:13.840
Are you using the GNU Emacs? I guess the default on Linux. Is that GNU?
link |
01:02:18.480
Yeah. That through a strange passage started out as the one that I wrote.
link |
01:02:24.400
Exactly. Part of that was because in the last couple of years of grad school,
link |
01:02:39.680
it became really clear to me that I was either going to be Mr. Emacs forever
link |
01:02:46.800
or I was going to graduate. I couldn't actually do both.
link |
01:02:54.320
Was that a hard decision? That's so interesting to think about you as a
link |
01:03:00.000
partner. It's a different trajectory that could have happened. That's fascinating.
link |
01:03:06.400
Maybe I could be fabulously wealthy today if I had become Mr. Emacs and
link |
01:03:12.400
Emacs had mushroomed into a series of text processing applications and all kinds of stuff.
link |
01:03:26.480
I have a long history of financially suboptimal decisions because I didn't want that life.
link |
01:03:36.000
I went to grad school because I wanted to graduate.
link |
01:03:53.440
Being Mr. Emacs for a while was fun and then it became not fun.
link |
01:04:01.120
When it was not fun, there was no way I could pay my rent.
link |
01:04:18.160
I was like, okay, do I carry on as a grad student? I had a research assistantship and
link |
01:04:25.360
I was living off of that. I was doing all my RA, being grad student work and being Mr. Emacs all
link |
01:04:36.880
at the same time. I decided to pick one. One of the things that I did at the time was I went
link |
01:04:49.280
around all the people I knew on the ARPANET who might be able to take over looking after Emacs.
link |
01:05:01.200
Pretty much everybody said, I got a day job. I actually found two folks and a couple of folks
link |
01:05:12.720
in a garage in New Jersey, complete with a dog, who were willing to take it over,
link |
01:05:22.880
but they were going to have to charge money. My deal with them was that they would
link |
01:05:31.360
make it free for universities and schools and stuff. They said, sure. That upset some people.
link |
01:05:40.400
Now, I don't know the full history of this, but I think it's interesting. You have some
link |
01:05:48.800
tension with Mr. Richard Stallman. He represents this kind of, like you mentioned, free software,
link |
01:05:58.720
sort of a dogmatic focus on all information must be free.
link |
01:06:11.920
Is there an interesting way to paint a picture of the disagreement you have with Richard through
link |
01:06:18.880
the years? My basic opposition is that when you say information must be free, to a really
link |
01:06:29.840
extreme form that turns into all people whose job is the production of
link |
01:06:40.880
everything from movies to software, they must all take a vow of poverty,
link |
01:06:52.560
because information must be free. That doesn't work for me. I don't want to be wildly rich.
link |
01:07:04.960
I am not wildly rich. I do okay, but I can feed my children.
link |
01:07:20.480
Yeah, I totally agree with you. It does just make me sad that sometimes the closing of the source,
link |
01:07:26.480
for some reason, the bureaucracy begins to build and sometimes it hurts the product.
link |
01:07:37.280
Oh, absolutely. Absolutely. It's always sad.
link |
01:07:40.080
And there is a balance in there. It's not hard over rapacious capitalism,
link |
01:07:56.160
and it's not hard over in the other direction. A lot of the open source movement,
link |
01:08:07.040
they have been managing to find a path to actually making money. So doing things like
link |
01:08:16.960
services and support works for a lot of people. And there are some ways where it's kind of,
link |
01:08:28.960
some of them are a little perverse. So as a part of things like this Sarbanes Oxley Act and
link |
01:08:43.440
various people's interpretations of all kinds of accounting principles, and this is kind of a
link |
01:08:50.880
worldwide thing, but if you've got a corporation that is depending on some piece of software,
link |
01:09:00.720
the often various accounting and reporting standards say, if you don't have a support
link |
01:09:05.920
contract on this thing that your business is depending on, then that's bad. So if you've got
link |
01:09:18.720
a database, you need to pay for support. But there's a difference between the support contracts that
link |
01:09:31.360
the average open source database producer charges and what somebody who is truly rapacious
link |
01:09:41.360
like Oracle charges. It is absolutely a balance. And there are a lot of different ways
link |
01:09:55.920
to make the math work out for everybody. And the very unbalanced sort of,
link |
01:10:15.920
like the winner takes all thing that happens in so much of modern commerce,
link |
01:10:21.440
that just doesn't work for me either. I know you've talked about this
link |
01:10:29.360
in quite a few places, but you have created one of the most popular programming languages in the
link |
01:10:37.760
world. So there's a programming language that I first learned about object oriented programming
link |
01:10:44.560
with. I think it's a programming language that a lot of people use in a lot of different places
link |
01:10:52.560
and millions of devices today, Java. So the absurd question, but can you tell the origin
link |
01:11:01.280
story of Java? So a long time ago, it's on in about 1990, there was a group of us who
link |
01:11:09.840
were kind of worried that there was stuff going on in the universe of computing that the computing
link |
01:11:19.360
industry was missing out on. And so a few of us started this project at Sun. We started talking
link |
01:11:33.440
about it in 1990, and it really got going in 91. And it was all about what was happening
link |
01:11:44.880
in terms of computing hardware processors and networking and all of that that was
link |
01:11:52.320
outside of the computer industry. And that was everything from the early glimmers of cell phones
link |
01:12:01.200
that were happening then to you look at elevators and locomotives and process control systems and
link |
01:12:11.360
factories and all kinds of audio equipment and video equipment. They all had processors in them,
link |
01:12:22.160
and they were all doing stuff with them. And it sort of felt like there was something going on
link |
01:12:30.480
there that we needed to understand. So C and C++ was in the air already?
link |
01:12:38.800
Oh no, C and C++ absolutely owned the universe at that time. Everything was written in C and C++.
link |
01:12:45.120
So where was the hunch that there was a need for a revolution?
link |
01:12:48.720
Well, so the need for a revolution was not about a language. It was just as simple and vague as
link |
01:12:58.640
there are things happening out there. We need to understand them.
link |
01:13:04.960
We need to understand them. And so a few of us went on several somewhat epic road trips.
link |
01:13:19.440
Literal road trips?
link |
01:13:20.640
Literal road trips. It's like get on an airplane, go to Japan, visit Toshiba and Sharp and Mitsubishi
link |
01:13:30.720
and Sony and all of these folks. And because we worked for Sun, we had folks who were willing to
link |
01:13:40.320
give us introductions. We visited Samsung and a bunch of Korean companies, and we went
link |
01:13:50.400
all over Europe, went to places like Phillips and Siemens and Thompson.
link |
01:13:57.920
What did you see there?
link |
01:14:00.000
For me, one of the things that sort of leapt out was that they were doing all the usual computer
link |
01:14:06.800
things that people had been doing like 20 years before. The thing that really leapt out to me
link |
01:14:13.040
was that they were sort of reinventing computer networking, and they were making all the mistakes
link |
01:14:24.320
that people in the computer industry had made. And since I'd been doing a lot of work in the
link |
01:14:31.440
networking area, we'd go and visit Company X, they'd describe this networking thing that they
link |
01:14:39.280
were doing. And just without any thought, I could tell them like the 25 things that were going to
link |
01:14:46.000
be complete disasters with that thing that they were doing. And I don't know whether that had
link |
01:14:54.320
any impact on any of them, but that particular story of repeating the disasters of the computer
link |
01:15:03.760
science industry was there. And one of the things we thought was, well, maybe we could do something
link |
01:15:12.240
useful here with bringing them forward somewhat. But also, at the same time, we learned a bunch of
link |
01:15:22.560
things from these mostly consumer electronics companies. And high on the list was that
link |
01:15:39.440
they viewed their relationship with the customer as sacred. They were never ever
link |
01:15:48.240
willing to make tradeoffs for safety. So, one of the things that had always made me nervous in the
link |
01:16:01.040
computer industry was that people were willing to make tradeoffs in reliability to get performance.
link |
01:16:12.160
They want faster and faster. It breaks a little more often because it's faster. Maybe you run it
link |
01:16:22.160
a little hotter than you should. The one that always blew my mind was the way that
link |
01:16:29.920
the folks at Cray Supercomputers got their division to be really fast,
link |
01:16:37.680
was that they did Newton Raphson approximations. And so, the bottom several bits of A over B
link |
01:16:51.280
were essentially random numbers. What could possibly go wrong?
link |
01:16:56.640
What could go wrong? And just figuring out how to nail the bottom bit, how to make sure that
link |
01:17:11.280
if you put a piece of toast in a toaster, it's not going to kill the customer.
link |
01:17:18.160
It's not going to burst into flames and burn the house down.
link |
01:17:21.280
So, I guess those are the principles that were inspiring. But how did, from the days of
link |
01:17:30.960
Java is called oak because of a tree outside the window story that a lot of people know,
link |
01:17:36.560
how did it become this incredible powerful language?
link |
01:17:43.920
Well, so, it was a bunch of things. After all that, we started,
link |
01:17:49.040
you know, the way that we decided that we could understand things better
link |
01:17:54.480
was by building a demo, building a prototype of something. So, kind of because it was easy
link |
01:18:02.080
and fun, we decided to build a control system for some home electronics, you know, TV, VCO,
link |
01:18:09.200
that kind of stuff. And as we were building it, we sort of discovered that there were some
link |
01:18:17.600
things about standard practice in C programming that were really getting in the way. And it
link |
01:18:27.360
wasn't exactly, you know, because we were writing all this C code and C++ code that
link |
01:18:35.840
we couldn't write it to do the right thing, but that one of the things that was weird in the
link |
01:18:41.920
group was that we had a guy whose, you know, his sort of top level job was, he was a business guy.
link |
01:18:52.560
You know, he was sort of an MBA kind of person, you know, think about business plans and all of
link |
01:18:58.080
that. And, you know, there were a bunch of things that were kind of, you know, and we would talk
link |
01:19:05.920
about things that were going wrong and other things that were going wrong, things that were
link |
01:19:10.480
going right. And, you know, as we thought about, you know, things like the requirements for
link |
01:19:16.480
security and safety, some low level details in C like naked pointers. And, you know, so back in
link |
01:19:28.480
the early 90s, it was well understood that, you know, the number one source of like security
link |
01:19:40.240
vulnerabilities was just pointers was just bugs. Yeah. Right. And it was like, you know, 50, 60,
link |
01:19:48.720
70% of all security vulnerabilities were bugs. And the vast majority of them were like buffer
link |
01:19:56.080
overflows. So you're like, we have to fix this. We have to make sure that this cannot happen.
link |
01:20:04.000
And that was kind of the original thing for me was this cannot, this cannot continue.
link |
01:20:11.440
And one of the things I find really entertaining this year was I forget which
link |
01:20:20.240
rag published it, but there was this article that came out that was an examination, it was sort of
link |
01:20:28.640
the result of an examination of all the security vulnerabilities in Chrome. And Chrome is like a
link |
01:20:36.320
giant piece of C++ code. And 60 or 70% of all the security vulnerabilities were stupid pointer
link |
01:20:46.080
tricks. And I thought, it's 30 years later. And we're still there. And we're still there.
link |
01:20:56.320
And, you know, that's one of those, you know, slap your forehead and just want to cry.
link |
01:21:04.320
So would you attribute or is that too much of a simplification, but would you attribute the
link |
01:21:10.160
creation of Java to C pointers? Obvious problem. Well, I mean, that was one of the trigger points.
link |
01:21:21.760
Concurrency you've mentioned. Concurrency was a big deal.
link |
01:21:27.760
Because when you're interacting with people, the last thing you ever want to see is the thing like
link |
01:21:34.000
waiting. And, you know, issues about the software development process, you know, when
link |
01:21:42.240
faults happen, can you recover from them? What can you do to make it easier to create and eliminate
link |
01:21:52.000
complex data structures? What can you do to fix, you know, one of the most common C problems,
link |
01:21:59.760
which is storage leaks. And it's evil twin, the freed but still being used piece of memory,
link |
01:22:14.000
you know, you free something and then you keep using it.
link |
01:22:17.760
Oh, yeah. You know, so when I was originally thinking about that, I was thinking about that in
link |
01:22:22.560
terms of sort of safety and security issues. And one of the things I sort of came to believe,
link |
01:22:28.720
came to understand was that it wasn't just about safety and security, but it was about
link |
01:22:36.160
developer velocity. And I got really religious about this because at that point,
link |
01:22:44.640
I had spent an ungodly amount of my life hunting down mystery pointer bugs.
link |
01:22:53.120
Yeah. And, you know, like two thirds of my time as a software developer was, you know,
link |
01:23:01.840
because the mystery pointer bugs tend to be the hardest to find because they tend to be
link |
01:23:09.040
very, very statistical. The ones that hurt, you know, they're like a one in a million chance.
link |
01:23:15.920
But nevertheless, create an infinite amount of suffering.
link |
01:23:23.200
Right. Because when you're doing a billion operations a second, you know,
link |
01:23:28.400
a one in a million chance means it's going to happen. And so I got really religious about
link |
01:23:37.680
this thing about, you know, making it so that if something fails, it fails immediately and
link |
01:23:43.040
visibly. And, you know, one of the things that was a real attraction of Java to lots of development
link |
01:23:54.000
shops was that, you know, we get our code up and running twice as fast.
link |
01:24:00.800
You mean like the entirety of the development process, the bugging, all that kind of stuff?
link |
01:24:04.800
Yeah. So if you measure time from, you know, you first touch fingers to keyboard until you get
link |
01:24:14.240
your first demo out, not much different. But if you look from fingers touching keyboard to solid
link |
01:24:25.120
piece of software that you could release in production, it would be way faster.
link |
01:24:31.200
And I think what people don't often realize is, yeah, there's things that really slow you down.
link |
01:24:36.640
Like the hard to catch bugs probably is the thing that really slows down that.
link |
01:24:43.120
It really slows things down. But also there were, you know, one of the things that you get out of
link |
01:24:49.760
object oriented programming is a strict methodology about, you know, what are the interfaces
link |
01:24:54.320
between things and being really clear about how parts relate to each other. And what that
link |
01:25:03.680
helps with is so many times what people do is they kind of like sneak around the side.
link |
01:25:12.320
So if you've built something and people are using it and you say, well, okay, you know,
link |
01:25:20.080
I've built this thing, you use it this way. And then you change it in such a way that it still
link |
01:25:27.200
does what you said it does. It just does it a little bit different. But then you find out
link |
01:25:31.360
that somebody out there was sneaking around the side. They had sort of tunneled in a back door
link |
01:25:38.160
and this person, their code broke. And because they were sneaking through a side door.
link |
01:25:46.080
And normally the altitude is dummy. But a lot of times, you know, you can't get away,
link |
01:26:01.680
you can't just slap their hand and tell them to not do that because, you know, it's, you know,
link |
01:26:09.760
somebody's, you know, some bank's, you know, account reconciliation system that, you know,
link |
01:26:19.200
some developer decided, oh, I'm lazy, you know, I'll just sneak through the back door.
link |
01:26:24.720
And because the language allows it, I mean, you can't even mad at them.
link |
01:26:28.480
And so one of the things I did that on the one hand upset a bunch of people was that I made it so
link |
01:26:34.640
that you really couldn't go through back doors, right? So the whole point of that was to say,
link |
01:26:42.240
if you need, you know, if the interface here isn't right, the wrong way to deal with that
link |
01:26:48.880
is to go through a back door. The right way to deal with it is to walk up to the developer of
link |
01:26:54.000
this thing and say, uh, fix it. Right. And so it was kind of like a social engineering thing.
link |
01:27:01.360
Yeah. And people ended up discovering that that really made a difference
link |
01:27:11.040
in terms of, you know, and a bunch of this stuff, you know, if you're just like screwing around
link |
01:27:15.920
right in your own, like, you know, class project scale stuff, a lot of stuff isn't quite so,
link |
01:27:23.680
so important because, you know, you're, you know, both sides of the interface. But, you know, when
link |
01:27:32.880
you're building, you know, sort of larger, more complex pieces of software that have a lot of
link |
01:27:38.320
people working on them, and especially when they like span organizations,
link |
01:27:45.920
you know, having, having really clear, having clarity about how that gets structured
link |
01:27:51.920
saves your life. Yeah. And, you know, especially, you know, there's so much software that is
link |
01:28:00.400
fundamentally untestable, you know, until you do the real thing. Right.
link |
01:28:08.000
It's better to write good code in the beginning as opposed to writing crappy code and then trying
link |
01:28:14.000
to fix it and trying to scramble and figure out and through testing figure out where the bugs are.
link |
01:28:20.240
Yeah. It's like, it's like, it's like, which shortcut caused that
link |
01:28:27.200
rocket to not get where it was needed to go? So, I think one of the most beautiful ideas
link |
01:28:37.040
philosophically and technically is of a virtual machine, the Java virtual machine.
link |
01:28:42.720
Well, again, I apologize to romanticize things, but how did the idea of the JVM come to be?
link |
01:28:53.280
How do you radical of an idea it is? Because it seems to me to be just a really interesting
link |
01:29:00.960
idea in the history of programming. So, and what is it? So, the Java virtual machine,
link |
01:29:07.120
I mean, you can think of it in different ways because it was carefully designed to have
link |
01:29:17.760
different ways of viewing it. So, one view of it that most people don't really realize is there
link |
01:29:25.040
is that you can view it as sort of an encoding of the abstract syntax tree in reverse Polish
link |
01:29:35.680
notation. I don't know if that makes any sense at all. I could explain it and that would blow
link |
01:29:43.120
all over time. But the other way to think of it and the way that it ends up being explained is that
link |
01:29:51.600
it's like the instruction set of an abstract machine that's designed such that you can
link |
01:29:58.960
translate that abstract machine to a physical machine. And the reason that that's important,
link |
01:30:07.760
so if you wind back to the early 90s when we were talking to all of these companies doing
link |
01:30:15.200
consumer electronics, and you talk to the purchasing people,
link |
01:30:22.400
there were interesting conversations with purchasing.
link |
01:30:25.040
So, if you look at how these devices come together, they're sheet metal and gears and
link |
01:30:35.040
circuit boards and capacitors and resistors and stuff. And everything you buy has multiple sources.
link |
01:30:46.080
So, you can buy a capacitor from here, you can buy a capacitor from there,
link |
01:30:52.080
and you've got kind of a market so that you can actually get a decent price for a capacitor.
link |
01:31:03.360
But CPUs and particularly in the early 90s, CPUs were all different and all proprietary.
link |
01:31:16.400
So, if you use the chip from Intel, you had to be an Intel customer till the end of time.
link |
01:31:28.000
Because if you wrote a bunch of software, when you wrote software using whatever technique you
link |
01:31:35.440
wanted and C was particularly bad about this because there was a lot of properties of the
link |
01:31:43.920
underlying machine that came through. So, the code you wrote, you were stuck to
link |
01:31:50.640
that particular machine. You were stuck to that particular machine,
link |
01:31:54.160
which meant that they couldn't decide, Intel is screwing us. I'll start buying chips from
link |
01:32:03.360
Bob's Better Chips. This drove the purchasing people absolutely insane
link |
01:32:16.080
that they were welded into this decision. And they would have to make this decision
link |
01:32:22.800
before the first line of software was written. That's funny that you were talking about the
link |
01:32:27.280
purchasing people. So, there's one perspective, right? There's a lot of other perspectives
link |
01:32:32.560
that all probably hated this idea. But from a technical aspect, just the creation of an
link |
01:32:39.520
abstraction layer that's agnostic to the underlying machine from the perspective of the
link |
01:32:47.280
developer is brilliant. So, that's across the spectrum of providers of chips.
link |
01:32:58.240
But then there's also the time thing because as you went from one generation to the next generation
link |
01:33:05.600
to the next generation, they were all different. And you would often have to rewrite your software.
link |
01:33:09.840
I mean, generations of machines of different kinds.
link |
01:33:14.400
Yeah. So, one of the things that sucked about a year out of my life was when
link |
01:33:20.720
Son went from the Motorola 68010 processor to the 68020 processor,
link |
01:33:31.600
then they had a number of differences. And one of them hit us really hard. And I ended up being
link |
01:33:38.880
the point guy on the worst case of where the new instruction cache architecture heard us.
link |
01:33:48.160
Well, okay. So, I mean, one of this idea, I mean, okay. So, yeah, you articulate a really clear
link |
01:33:56.320
fundamental problem in all of computing. But where do you get the guts to think we can actually solve
link |
01:34:04.080
this? In our conversations with all these vendors, these problems started to show up.
link |
01:34:12.400
And I kind of had this epiphany because it reminded me of a summer job that I had had in grad school.
link |
01:34:31.360
So, back in grad school, my thesis advisor, well, I had two thesis advisors for bizarre reasons.
link |
01:34:41.520
One of them was a guy named Raj Reddy. The other one was Bob Sproul. And Raj, I love Raj,
link |
01:34:52.880
I really love both of them. So, the department had bought a bunch of early workstations
link |
01:35:05.440
from a company called Three Rivers Computer Company. And Three Rivers Computer Company was
link |
01:35:13.440
a bunch of electrical engineers who wanted to do as little software as possible. So,
link |
01:35:20.720
they knew that they'd need to have like compilers and OS and stuff like that. And they didn't want
link |
01:35:24.880
to do any of that. And they wanted to do that for as close to zero money as possible. So, what
link |
01:35:35.760
they did was they built a machine whose instruction set was literally the bytecode for UCSD Pascal,
link |
01:35:47.360
the P code. And so, we had a bunch of software that was written for this machine.
link |
01:36:02.960
And for various reasons, the company wasn't doing terrifically well. We had all this software on
link |
01:36:09.360
these machines and we wanted it to run on other machines, principally the Vax. And so, Raj asked
link |
01:36:20.880
me if I could come up with a way to port all of this software from the perk machines to Vaxes.
link |
01:36:33.360
And I think what he had in mind was something that would translate from Pascal to C or Pascal to
link |
01:36:50.080
actually at those times, pretty much, you could translate to C or C. And if you didn't like translate
link |
01:36:56.560
to C, you could translate to C. There was, it's like the Henry Ford, any color you want,
link |
01:37:05.680
just as long as it's black. And I went, that's really hard. And I noticed that when I was like
link |
01:37:19.760
looking at stuff and I went, ooh, I bet I could rewrite the P code into Vax assembly code.
link |
01:37:29.600
And then I started to realize that, you know, there were some properties of P code that made
link |
01:37:36.240
that really easy, some properties that made it really hard. So, I ended up writing this thing
link |
01:37:42.640
that translated from P code on the three rivers perks into assembly code on the Vax.
link |
01:37:53.840
And I actually got higher quality code than the C compiler. And so, everything just got really fast.
link |
01:38:03.120
It was really easy. It was like, wow, I thought that was a sleazy hack because I was lazy.
link |
01:38:09.680
And in actual fact, it worked really well. And I tried to convince people that that was maybe a
link |
01:38:17.040
good thesis topic. And nobody was, you know, it was like, nah.
link |
01:38:24.640
Really? I mean, it's kind of a brilliant idea, right? Maybe you didn't have the,
link |
01:38:33.360
you weren't able to articulate the big picture of it.
link |
01:38:36.240
Yeah. And I think, you know, that was a key part. But so then, you know, clock comes forward a few
link |
01:38:45.600
years. And it's like, we've got to be able to, you know, if they want to be able to switch from,
link |
01:38:53.680
you know, this weird microprocessor to that weird and totally different microprocessor,
link |
01:38:59.440
how do you do that? And I kind of went, oh, maybe by doing something kind of in the space of,
link |
01:39:09.680
you know, Pascal P code, you know, I could do like multiple translators.
link |
01:39:15.360
And I spent some time thinking about that and thinking about, you know, what worked and what
link |
01:39:19.040
didn't work when I did the P code to Vax translator. And I talked to some of the folks
link |
01:39:29.360
who were involved in small talk, because small talk also did a bytecode. And then I kind of went,
link |
01:39:38.400
yeah, I want to do that. Because that actually, you know, and it had the other advantage that
link |
01:39:45.920
you could either interpret it or compile it. And interpreters are usually easier to do,
link |
01:39:55.120
but not as fast as a compiler. So I figured, good, I can be lazy again. You know, sometimes I think
link |
01:40:06.800
that most of my good ideas are driven by laziness. And often I find that people, some of people's
link |
01:40:14.240
stupidest ideas are because they're insufficiently lazy. They just want to build something really
link |
01:40:22.560
complicated. It's like, doesn't need to be that complicated. Yeah. And so that's how that came
link |
01:40:29.840
out. And, you know, but that also turned into kind of a, you know, almost a religious position on
link |
01:40:39.200
my part, which was, which got me in several other fights. So like one of the things that was a real
link |
01:40:47.120
difference was the way that arithmetic worked. You know, once upon a time, it wasn't always just
link |
01:40:59.520
two's complement arithmetic. There were some machines that had one's complement arithmetic,
link |
01:41:04.000
which was like almost anything built by CDC. And occasionally there were machines that were
link |
01:41:10.800
decimal arithmetic. And I was like, this is crazy. You know, pretty much two's complement
link |
01:41:20.240
integer arithmetic has won. So just, let's just do that. Just do that. One of the other places
link |
01:41:29.360
where there was a lot of variability was in the way that floating point behaved.
link |
01:41:33.200
And that was causing people throughout the software industry much pain because you couldn't
link |
01:41:44.400
do a numerical computing library that would work on CDC and then have it work on an IBM machine
link |
01:41:50.720
and work on a deck machine. And as a part of that whole struggle, there had been this
link |
01:41:58.320
this big body of work on floating point standards. And this thing emerged that came to be called
link |
01:42:08.320
IEEE 754, which is the floating point standard that pretty much has taken over the entire universe.
link |
01:42:20.000
And at the time I was doing Java, it had pretty much completed taking over the universe.
link |
01:42:24.480
There were still a few pockets of holdouts, but I was like, it's important to be able to say what
link |
01:42:32.640
2 plus 2 means. And so I went that. And one of the ways that I got into fights with people was that
link |
01:42:46.480
there were a few machines that did not implement IEEE 754 correctly.
link |
01:42:55.360
Of course, that's all short term kind of fights. I think in the long term, I think this vision
link |
01:43:01.600
is one out. Yeah. And I think it's, you know, and it worked out over time. I mean, the biggest
link |
01:43:07.760
fights were with Intel because they had done some strange things with rounding. They had
link |
01:43:15.520
done some strange things with their transcendental functions, which turned into a mushroom cloud
link |
01:43:22.080
of weirdness. And the name, in the name of optimization, but from the perspective of the
link |
01:43:29.200
developer, that's not good. Well, their issues with transcendental functions were just stupid.
link |
01:43:35.680
Okay. So that's not even a trade off. That's just absolutely.
link |
01:43:40.560
Yeah. They were doing range reduction for sine and cosine.
link |
01:43:44.800
A lot. Okay. Using a slightly wrong value for pi.
link |
01:43:48.320
Got it. Go ahead, 10 minutes. So in the interest of time,
link |
01:43:52.640
two questions. So one about Android and one about life.
link |
01:43:57.920
So one, I mean, we could talk for many more hours. I hope eventually we might talk again.
link |
01:44:04.960
But I got to ask you about Android and the use of Java there because it's one of the many places
link |
01:44:12.080
where Java just has a huge impact on this world. Just on your opinion, is there things that make
link |
01:44:20.000
you happy about the way Java is used in the Android world? And are there things that you wish were
link |
01:44:28.400
different? I don't know how to do a short answer to that. But I have to do a short answer to that.
link |
01:44:34.320
So I'm happy that they did it. Java had been running on cell phones at that time for quite
link |
01:44:41.840
a few years and it worked really, really well. There were things about how they did it and in
link |
01:44:50.160
particular various ways that they kind of violated all kinds of contracts. The guy who led it,
link |
01:45:02.160
Andy Rubin, he crossed a lot of lines. There's some lines crossed.
link |
01:45:07.680
Yeah, lines were crossed that have since mushroomed into giant court cases.
link |
01:45:16.640
And they didn't need to do that. And in fact, it would have been so much cheaper for them to not
link |
01:45:23.520
cross lines. I suppose they didn't anticipate the success of this whole endeavor. Or do you think
link |
01:45:35.040
at that time it was already clear that this is going to blow up? I guess I sort of came to
link |
01:45:41.440
believe that it didn't matter what Andy did, it was going to blow up. I kind of started to think
link |
01:45:51.840
of him as like a manufacturer of bombs. Yeah, some of the best things in this world come about.
link |
01:46:01.840
They're a little bit of explosive. Well, and some of the worst.
link |
01:46:06.960
And some of the worst, beautifully put. But is there, and like you said, I mean,
link |
01:46:12.800
does that make you proud that the Java is in millions? I mean, it could be billions of devices.
link |
01:46:21.040
Yeah. Well, I mean, it was in billions of phones before Android came along.
link |
01:46:26.240
And I'm just as proud of the way that the smart card standards
link |
01:46:37.520
adopted Java. And they did it. Everybody involved in that did a really good job.
link |
01:46:43.200
And that's billions and billions. That's crazy. The SIM cards in your pocket.
link |
01:46:52.720
Yeah, I mean, I've been outside of that world for a decade. So I don't know how that has evolved,
link |
01:46:59.920
but it's just been crazy. So on that topic, let me ask, again,
link |
01:47:07.840
there's a million technical things we could talk about. But let me ask the absurd,
link |
01:47:13.920
the old philosophical question about life. What do you hope when you look back at your life and
link |
01:47:25.280
people talk about you, write about you 500 years from now? What do you hope your legacy is?
link |
01:47:34.480
People not being afraid to take a leap of faith. I mean, I've got this
link |
01:47:41.680
kind of weird history of doing weird stuff. It worked out pretty damn well.
link |
01:47:49.120
It worked out. And I think some of the weirder stuff that I've done
link |
01:47:55.760
has been the coolest. And some of it crashed and burned. And I think well over half of the
link |
01:48:04.880
stuff that I've done has crashed and burned, which has occasionally been really annoying.
link |
01:48:11.840
But still you kept doing it.
link |
01:48:13.600
But yeah. And even when things crash and burn, you at least learn something from it.
link |
01:48:22.240
By way of advice, people, developers, engineers, scientists, or just people who are young
link |
01:48:29.920
to look up to you, what advice would you give them? How to approach their life?
link |
01:48:37.040
Don't be afraid of risk. It's okay to do stupid things once.
link |
01:48:45.200
Maybe about a couple of times.
link |
01:48:48.320
You get a pass on the first time or two that you do something stupid.
link |
01:48:53.120
The third or fourth time, yeah, not so much.
link |
01:48:55.280
But also, I don't know why, but really early on, I started to think about
link |
01:49:10.880
ethical choices in my life. And because I'm a big science fiction fan,
link |
01:49:17.520
I got to thinking about just about every technical decision I make
link |
01:49:27.040
in terms of, are you building Blade Runner or Star Trek?
link |
01:49:33.600
Which one's better?
link |
01:49:34.880
Which future would you rather live in?
link |
01:49:38.720
So what's the answer to that?
link |
01:49:40.240
Well, I would rather live in the universe of Star Trek.
link |
01:49:44.400
Star Trek, yeah. That opens up a whole topic about AI, but that's a really interesting idea.
link |
01:49:53.040
So your favorite AI system would be data from Star Trek.
link |
01:49:58.000
And my least favorite would easily be Skynet.
link |
01:50:02.240
Beautifully put, I don't think there's a better way to end it, James.
link |
01:50:05.600
I can't say enough how much of an honor it is to meet you, to talk to you.
link |
01:50:09.360
Thanks so much for wasting your time with me today.
link |
01:50:12.560
Not a waste at all.
link |
01:50:13.760
Thanks, James.
link |
01:50:14.560
All right, thanks.
link |
01:50:16.400
Thanks for listening to this conversation with James Gosling and thank you to our sponsors,
link |
01:50:20.800
Public Goods, BetterHelp and ExpressVPN. Please check out these sponsors in the
link |
01:50:25.840
description to get a discount and to support this podcast. If you enjoy this thing,
link |
01:50:31.360
subscribe on YouTube, review it with five stars on Apple Podcasts, follow on Spotify,
link |
01:50:36.080
support on Patreon, or connect with me on Twitter at Lex Freedman.
link |
01:50:39.920
And now, let me leave you with some words from James Gosling.
link |
01:50:44.240
One of the toughest things about life is making choices.
link |
01:50:48.000
Thank you for listening and hope to see you next time.