James Gosling: Java, JVM, Emacs, and the Early Days of Computing
技术与编程音乐与艺术AI 与机器学习商业与创业历史与文明
📋 章节目录
暂无章节信息
🔑 关键词
emacscodegotprogramminggoingstuffdonhardsoftwaredoingmachinelanguagecompaniesjavacomputerdidnworkedwentinterestingbunch
💬 精彩语录
暂无语录
🎙️ 完整对话(1675 条)
Lex Fridman (00:00.000)
The following is a conversation with James Gosling, the founder and lead
以下是与创始人兼负责人 James Gosling 的对话
Lex Fridman (00:03.360)
designer behind the Java programming language, which in many indices is the
Java 编程语言背后的设计者,在许多指标中都是
Lex Fridman (00:07.920)
most popular programming language in the world, or is always at least in the top
世界上最流行的编程语言,或者至少始终名列前茅
Lex Fridman (00:12.600)
two or three.
两个或三个。
Lex Fridman (00:14.080)
We only had a limited time for this conversation, but I'm sure we'll talk
我们这次谈话的时间有限,但我相信我们会谈谈
James Gosling (00:17.320)
again several times in this podcast.
在这个播客中再次出现了几次。
Lex Fridman (00:19.880)
Quick summary of the sponsors, Public Goods, BetterHelp, and ExpressVPN.
赞助商、Public Goods、BetterHelp 和 ExpressVPN 的快速摘要。
James Gosling (00:24.800)
Please check out these sponsors in the description to get a discount
请在说明中查看这些赞助商以获得折扣
Lex Fridman (00:27.440)
and to support this podcast.
并支持这个播客。
James Gosling (00:29.280)
As a side note, let me say that Java is the language with which I first learned
顺便说一下,Java 是我最初学习的语言
Lex Fridman (00:34.120)
object oriented programming, and with it, the art and science of software
面向对象编程,以及随之而来的软件艺术和科学
James Gosling (00:38.560)
engineering.
工程。
Lex Fridman (00:39.680)
Also early on in my undergraduate education, I took a course on concurrent
在我本科教育的早期,我选修了并发课程
James Gosling (00:45.080)
programming with Java.
使用 Java 编程。
Lex Fridman (00:47.240)
Looking back at that time, before I fell in love with neural networks, the art
回想那时,在我爱上神经网络之前,这门艺术
James Gosling (00:52.160)
of parallel computing was both algorithmically and philosophically
并行计算既在算法上又在哲学上
Lex Fridman (00:56.080)
fascinating to me.
对我来说很有吸引力。
James Gosling (00:57.240)
The concept of a computer in my mind before then was something that does
在此之前我脑海中的计算机概念就是这样的东西
Lex Fridman (01:01.560)
one thing at a time, the idea that we could create an abstraction of
一次一件事,我们可以创建一个抽象的想法
James Gosling (01:05.880)
parallelism where you could do many things at the same time, while still
并行性,你可以同时做很多事情,同时仍然
Lex Fridman (01:09.640)
guaranteeing stability and correctness, was beautiful.
James Gosling (01:13.720)
While some folks in college took drugs to expand their mind, I took concurrent
Lex Fridman (01:18.560)
programming.
James Gosling (01:19.840)
If you enjoy this thing, subscribe on YouTube, review it with five stars on
Lex Fridman (01:23.280)
Apple Podcasts, follow on Spotify, support on Patreon, or connect with me
James Gosling (01:27.640)
on Twitter at Lex Friedman.
Lex Fridman (01:30.120)
As usual, I'll do a few minutes of ads now and no ads in the middle.
James Gosling (01:33.640)
I try to make these interesting, but I do give you timestamps, so go ahead
Lex Fridman (01:37.440)
and skip, but please do check out the sponsors by clicking the links in the
James Gosling (01:41.320)
description.
Lex Fridman (01:42.320)
It's the best way to support this podcast.
James Gosling (01:45.800)
This show sponsored by Public Goods, the one stop shop for affordable,
Lex Fridman (01:50.040)
sustainable, healthy household products.
James Gosling (01:53.520)
I take their fish oil and use their toothbrush, for example.
Lex Fridman (01:57.400)
Their products often have a minimalist black and white design that I find
James Gosling (02:00.880)
to be just beautiful.
Lex Fridman (02:02.480)
Some people ask why I wear this black suit and tie.
James Gosling (02:06.080)
There's a simplicity to it that to me focuses my mind on the most important
Lex Fridman (02:10.560)
bits of every moment of every day, pulling only at the thread of the
James Gosling (02:15.560)
essential in all that life has to throw at me.
Lex Fridman (02:18.360)
It's not about how I look, it's about how I feel.
James Gosling (02:21.000)
That's what design is to me, creating an inner conscious experience,
Lex Fridman (02:24.960)
not an external look.
James Gosling (02:27.240)
Anyway, Public Goods plants one tree for every order placed, which is kind of cool.
Lex Fridman (02:32.920)
Visit publicgoods.com slash Lex, or use code Lex at checkout to get 15 bucks
James Gosling (02:38.120)
off your first order.
Lex Fridman (02:40.440)
This show is also sponsored by BetterHelp, spelled H E L P, help.
James Gosling (02:45.080)
Check it out at betterhelp.com slash Lex.
Lex Fridman (02:48.160)
They figure out what you need and match you with a licensed professional
James Gosling (02:51.720)
therapist in under 48 hours.
Lex Fridman (02:54.080)
I chat with the person on there and enjoy it.
James Gosling (02:57.200)
Of course, I also regularly talk to David Goggins these days, who is definitely not
James Gosling (03:02.320)
a licensed professional therapist, but he does help me meet his and my demons and
James Gosling (03:08.840)
become comfortable to exist in their presence.
James Gosling (03:11.400)
Everyone is different, but for me, I think suffering is essential for creation, but
James Gosling (03:16.320)
you can suffer beautifully in a way that doesn't destroy you.
Lex Fridman (03:20.160)
I think therapy can help in whatever form that therapy takes.
Lex Fridman (03:24.000)
And I do think that BetterHelp is an option worth trying.
Lex Fridman (03:27.720)
They're easy, private, affordable, and available worldwide.
James Gosling (03:31.840)
You can communicate by text anytime and schedule weekly audio and video sessions.
Lex Fridman (03:36.760)
Check it out at betterhelp.com slash Lex.
James Gosling (03:39.440)
This show is also sponsored by Express CPM.
Lex Fridman (03:42.240)
You can use it to unlock movies and shows that are only
James Gosling (03:45.560)
available in other countries.
Lex Fridman (03:47.360)
I did this recently with Star Trek Discovery and UK Netflix, mostly because
James Gosling (03:52.200)
I wonder what it's like to live in London.
Lex Fridman (03:54.800)
I'm thinking of moving from Boston to a place where I can build the
James Gosling (03:57.720)
business I've always dreamed of building.
Lex Fridman (04:00.200)
London is probably not in the top three, but top 10 for sure.
James Gosling (04:04.680)
The number one show I've been to is the one that I'm most excited about.
Lex Fridman (04:08.000)
The number one choice currently is Austin.
James Gosling (04:11.640)
For many reasons that I'll probably speak to another time.
Lex Fridman (04:14.800)
San Francisco, unfortunately dropped out from the number one spot,
Lex Fridman (04:18.880)
but it's still in the running.
Lex Fridman (04:20.600)
If you have advice, let me know.
James Gosling (04:22.960)
Anyway, check out ExpressVPN.
Lex Fridman (04:24.920)
It lets you change your location to almost 100 countries and it's super fast.
James Gosling (04:29.600)
Go to expressvpn.com slash LexPod to get an extra three
Lex Fridman (04:33.520)
months of ExpressVPN for free.
James Gosling (04:35.560)
That's expressvpn.com slash LexPod.
Lex Fridman (04:40.240)
And now here's my conversation with James Gosling.
James Gosling (04:44.680)
I've read somewhere that the square root of two is your favorite irrational number.
Lex Fridman (04:49.080)
I have no idea where that got started.
Lex Fridman (04:53.440)
Is there any truth to it?
Lex Fridman (04:54.600)
Is there anything in mathematics or numbers that you find beautiful?
James Gosling (04:58.400)
Oh, well, there's lots of things in math that's really beautiful.
Lex Fridman (05:03.120)
I used to consider myself really good at math and these days I consider
James Gosling (05:07.960)
myself really bad at math.
James Gosling (05:11.040)
I never really had a thing for the square root of two, but when I was a teenager,
James Gosling (05:18.480)
there was this book called The Dictionary of Curious and Interesting Numbers,
Lex Fridman (05:23.360)
which for some reason I read through and damn near memorized the whole thing.
Lex Fridman (05:33.040)
And I started this weird habit of when I was like filling out checks or paying for things
Lex Fridman (05:43.120)
with credit cards, I would want to make the receipt add up to a new number.
Lex Fridman (05:49.840)
Is there some numbers that stuck with you that just kind of make you feel good?
James Gosling (05:54.320)
They all have a story and fortunately, I've actually mostly forgotten all of them.
James Gosling (06:02.800)
Are they, uh, so like 42, uh, well, yeah, I mean, that one 42 is pretty magical.
Lex Fridman (06:08.880)
And then the irrationals, I mean, but is there a square root of two story in there
Lex Fridman (06:12.880)
somewhere, how did that come about?
James Gosling (06:14.720)
It's, it's like the only number that has destroyed a religion in which way, well,
James Gosling (06:22.640)
the, the pathogorians, they, they believed that all numbers were perfect and you
Lex Fridman (06:28.160)
could re represent anything as, as a, as a rational number.
James Gosling (06:33.040)
And, um, in that, in that time period, um, the, this proof came out that there was no,
Lex Fridman (06:44.720)
you know, rational fraction whose value was equal to the square root of two.
Lex Fridman (06:50.720)
And that, that means nothing in this world, right?
Lex Fridman (06:54.320)
Yeah.
James Gosling (06:54.640)
So, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so,
Lex Fridman (07:02.800)
in this world is perfect, not even mathematics.
James Gosling (07:05.600)
Well, it means that your definition of perfect was imperfect.
Lex Fridman (07:11.280)
Well then, then there's the Gaitl incompleteness theorems and the 20th
James Gosling (07:14.640)
century that ruined it once again for everybody.
Lex Fridman (07:17.360)
Yeah.
James Gosling (07:17.840)
Although, although, although Goerl's theorem, um, you know, the lesson I take
Lex Fridman (07:25.360)
from Goerl's theorem is not that, you know, there are things you can't know,
James Gosling (07:29.920)
which is fundamentally what it says.
Lex Fridman (07:35.920)
But people want black and white answers.
James Gosling (07:39.360)
They want true or false.
Lex Fridman (07:43.540)
But if you allow a three state logic
James Gosling (07:48.000)
that is true, false, or maybe,
Lex Fridman (07:51.860)
then life's good.
James Gosling (07:55.360)
I feel like there's a parallel to modern political discourse
Lex Fridman (07:58.660)
in there somewhere, but let me ask.
Lex Fridman (08:04.160)
So with your kind of early love or appreciation
Lex Fridman (08:10.100)
of the beauty of mathematics,
Lex Fridman (08:11.480)
do you see a parallel between that world
Lex Fridman (08:15.000)
and the world of programming?
James Gosling (08:17.920)
Programming is all about logical structure,
Lex Fridman (08:21.960)
understanding the patterns that come out of computation,
James Gosling (08:32.680)
understanding sort of, I mean, it's often like the path
Lex Fridman (08:38.880)
through the graph of possibilities to find a short route.
James Gosling (08:45.760)
Meaning like find a short program
Lex Fridman (08:48.320)
that gets the job done kind of thing.
Lex Fridman (08:50.960)
But so then on the topic of irrational numbers,
Lex Fridman (08:54.560)
do you see programming?
James Gosling (08:58.640)
You just painted it so cleanly.
Lex Fridman (09:01.260)
It's a little of this trajectory
James Gosling (09:02.880)
to find like a nice little program,
Lex Fridman (09:05.200)
but do you see it as fundamentally messy?
Lex Fridman (09:08.880)
Maybe unlike mathematics?
Lex Fridman (09:10.840)
I don't think of it as, I mean, you know,
James Gosling (09:13.740)
you watch somebody who's good at math do math
Lex Fridman (09:16.820)
and you know, often it's fairly messy.
James Gosling (09:22.480)
Sometimes it's kind of magical.
Lex Fridman (09:27.680)
When I was a grad student, one of the students,
James Gosling (09:32.920)
his name was Jim Sachs, was he had this reputation
Lex Fridman (09:37.920)
of being sort of a walking, talking human
James Gosling (09:46.920)
theorem proving machine.
Lex Fridman (09:49.280)
And if you were having a hard problem with something,
James Gosling (09:51.520)
you could just like accost him in the hall
Lex Fridman (09:54.260)
and say, Jim, and he would do this funny thing
James Gosling (09:59.740)
where he would stand up straight.
Lex Fridman (10:01.840)
His eyes would kind of defocus.
James Gosling (10:03.560)
He'd go, you know, just like something in today's movies.
Lex Fridman (10:10.880)
And then he'd straighten up and say n log n and walk away.
Lex Fridman (10:15.800)
And you'd go, well, okay, so n log n is the answer.
Lex Fridman (10:20.520)
How did he get there?
James Gosling (10:24.240)
By which time he's, you know, down the hallway somewhere.
Lex Fridman (10:27.120)
Yeah, he's just the oracle, the black box
James Gosling (10:30.280)
that just gives you the answer.
Lex Fridman (10:31.360)
Yeah, and then you have to figure out the path
James Gosling (10:33.360)
from the question to the answer.
Lex Fridman (10:36.440)
I think in one of the videos I watched,
James Gosling (10:38.160)
you mentioned Don Knuth, well, at least recommending his,
Lex Fridman (10:44.560)
you know, his book is something people should read.
James Gosling (10:47.800)
Oh, yeah.
Lex Fridman (10:48.640)
But in terms of, you know, theoretical computer science,
Lex Fridman (10:53.920)
do you see something beautiful that has been inspiring
Lex Fridman (10:58.400)
to you, speaking of n log n, in your work
James Gosling (11:01.360)
on programming languages, that's in that whole world
Lex Fridman (11:06.040)
of algorithms and complexity and, you know,
Lex Fridman (11:10.240)
these kinds of more formal mathematical things?
Lex Fridman (11:13.520)
Or did that not really stick with you
Lex Fridman (11:16.720)
in your programming life?
Lex Fridman (11:20.040)
It did stick pretty clearly for me,
James Gosling (11:24.080)
because one of the things that I care about
Lex Fridman (11:27.040)
is being able to sort of look at a piece of code
Lex Fridman (11:34.240)
and be able to prove to myself that it works.
Lex Fridman (11:41.360)
And, you know, so for example, I find that I'm at odds
James Gosling (11:51.440)
with many of the people around me over issues
Lex Fridman (11:55.440)
about like how you lay out a piece of software, right?
James Gosling (12:03.400)
You know, so software engineers get really cranky
Lex Fridman (12:07.600)
about how they format the documents that are the programs,
James Gosling (12:11.380)
you know, where they put new lines and where they put,
Lex Fridman (12:14.280)
you know.
James Gosling (12:15.120)
The braces.
Lex Fridman (12:15.960)
The braces and all the rest of that, right.
Lex Fridman (12:18.720)
And I tend to go for a style that's very dense.
Lex Fridman (12:27.600)
Minimize the white space.
James Gosling (12:30.080)
Yeah, well, to maximize the amount
Lex Fridman (12:34.360)
that I can see at once, right?
Lex Fridman (12:37.600)
So I like to be able to see a whole function
Lex Fridman (12:40.760)
and to understand what it does,
James Gosling (12:43.080)
rather than have to go scroll, scroll, scroll
Lex Fridman (12:44.960)
and remember, right?
James Gosling (12:46.160)
Yeah, I'm with you on that.
Lex Fridman (12:47.520)
Yeah, that's.
Lex Fridman (12:48.360)
And people don't like that.
Lex Fridman (12:52.640)
Yeah, I've had, you know, multiple times
James Gosling (12:56.920)
when engineering teams have staged
Lex Fridman (13:01.000)
what was effectively an intervention.
James Gosling (13:07.760)
You know, where they invite me to a meeting
Lex Fridman (13:10.120)
and everybody's arrived before me
Lex Fridman (13:12.100)
and they all look at me and say,
Lex Fridman (13:14.500)
James, about your coding style, I'm sort of an odd person
James Gosling (13:23.080)
to be programming because I don't think very well verbally.
Lex Fridman (13:31.560)
I am just naturally a slow reader.
James Gosling (13:37.760)
I'm what most people would call a visual thinker.
Lex Fridman (13:42.040)
So when you think about a program,
Lex Fridman (13:43.560)
what do you see?
Lex Fridman (13:45.080)
I see pictures, right?
Lex Fridman (13:47.320)
So when I look at a piece of code on a piece of paper,
Lex Fridman (13:52.120)
it very quickly gets transformed into a picture.
James Gosling (13:58.320)
And, you know, it's almost like a piece of machinery
Lex Fridman (14:01.880)
with, you know, this connected to that and.
James Gosling (14:05.440)
Like these gears and different sizes.
Lex Fridman (14:07.480)
Yeah, yeah, I see them more like that
James Gosling (14:11.320)
than I see the sort of verbal structure
Lex Fridman (14:15.960)
or the lexical structure of letters.
Lex Fridman (14:18.640)
So then when you look at the program,
Lex Fridman (14:19.960)
that's why you want to see it all in the same place,
James Gosling (14:21.920)
then you can just map it to something visual.
Lex Fridman (14:24.180)
Yeah, and it just kind of like,
James Gosling (14:25.600)
like it leaps off the page at me and.
Lex Fridman (14:28.240)
Yeah, what are the inputs, what are the outputs?
Lex Fridman (14:30.800)
What the heck is this thing doing?
Lex Fridman (14:32.160)
Yeah, yeah.
James Gosling (14:33.680)
Getting a whole vision of it.
Lex Fridman (14:35.720)
Can we go back into your memory?
James Gosling (14:39.080)
Memory, long term memory access.
Lex Fridman (14:42.060)
What's the first program you've ever written?
James Gosling (14:47.460)
Oh, I have no idea what the first one was.
Lex Fridman (14:52.100)
I mean, I know the first machine
James Gosling (14:54.780)
that I learned to program on.
Lex Fridman (14:58.520)
What is it?
James Gosling (14:59.360)
Was a PDP eight at the University of Calgary.
Lex Fridman (15:06.500)
Do you remember the specs?
James Gosling (15:08.100)
Oh yeah, so the thing had 4K of RAM.
Lex Fridman (15:12.700)
Nice.
James Gosling (15:13.700)
12 bit words.
Lex Fridman (15:16.340)
The clock rate was,
James Gosling (15:21.500)
it was about a third of a megahertz.
Lex Fridman (15:26.580)
Oh, so you didn't even get to the M, okay.
James Gosling (15:29.260)
Yeah, yeah, so we're like 10,000 times faster these days.
Lex Fridman (15:34.260)
10,000 times faster these days.
Lex Fridman (15:38.020)
And was this kind of like a super computer,
Lex Fridman (15:40.500)
like a serious computer for.
James Gosling (15:42.340)
No, the PDP eight I was the first thing
Lex Fridman (15:46.180)
that people were calling like mini computer.
James Gosling (15:49.700)
Got it.
Lex Fridman (15:50.660)
They were sort of inexpensive enough
James Gosling (15:53.180)
that a university lab could maybe afford to buy one.
Lex Fridman (15:59.340)
And was there time sharing, all that kind of stuff?
James Gosling (16:02.100)
There actually was a time sharing OS for that,
Lex Fridman (16:06.220)
but it wasn't used really widely.
James Gosling (16:10.500)
The machine that I learned on was one
Lex Fridman (16:12.980)
that was kind of hidden in the back corner
James Gosling (16:17.560)
of the computer center.
Lex Fridman (16:22.340)
And it was bought as part of a project
James Gosling (16:27.340)
to do computer networking,
Lex Fridman (16:34.180)
but they didn't actually use it very much.
James Gosling (16:38.740)
It was mostly just kind of sitting there
Lex Fridman (16:42.200)
and it was kind of sitting there
Lex Fridman (16:44.180)
and I noticed it was just kind of sitting there.
Lex Fridman (16:47.020)
And so I started fooling around with it
Lex Fridman (16:50.580)
and nobody seemed to mind.
Lex Fridman (16:52.900)
So I just kept doing that and.
Lex Fridman (16:56.020)
And it had a keyboard and like a monitor, are we?
Lex Fridman (16:58.980)
Oh, this is way before monitors were common.
Lex Fridman (17:02.580)
So it was literally a model 33 teletype
Lex Fridman (17:07.820)
with a paper tape reader.
James Gosling (17:12.060)
Okay, so the user interface wasn't very good.
Lex Fridman (17:14.580)
Yeah, it was the first computer ever built
James Gosling (17:20.140)
with integrated circuits, but by integrated circuits,
Lex Fridman (17:24.820)
I mean that they would have like 10 or 12 transistors
James Gosling (17:29.620)
on one piece of silicon,
Lex Fridman (17:31.940)
not the 10 or 12 billion that the machines have today.
Lex Fridman (17:38.740)
So what did that, I mean, feel like if you remember those?
Lex Fridman (17:43.740)
I mean, did you have kind of inklings of the magic
James Gosling (17:48.880)
of exponential kind of improvement of Moore's law
Lex Fridman (17:52.840)
of the potential of the future that,
Lex Fridman (17:55.220)
was that your fingertips kind of thing?
Lex Fridman (17:57.100)
Or was it just a cool?
James Gosling (17:58.480)
Yeah, it was just a toy.
Lex Fridman (18:01.140)
I had always liked building stuff,
Lex Fridman (18:04.080)
but one of the problems with building stuff
Lex Fridman (18:06.820)
is that you need to have parts.
James Gosling (18:08.740)
You need to have pieces of wood or wire or switches
Lex Fridman (18:13.580)
or stuff like that.
Lex Fridman (18:14.980)
And those all cost money.
Lex Fridman (18:16.820)
And here you could build.
James Gosling (18:17.940)
You could build arbitrarily complicated things
Lex Fridman (18:20.640)
and I didn't need any physical materials.
James Gosling (18:25.180)
It required no money.
Lex Fridman (18:27.220)
That's a good way to put programming.
James Gosling (18:29.060)
You're right, it's, if you love building things,
Lex Fridman (18:35.900)
completely accessible, you don't need anything.
James Gosling (18:38.780)
Anybody from anywhere could just build
Lex Fridman (18:40.660)
something really cool.
James Gosling (18:41.600)
Yeah, yeah.
Lex Fridman (18:43.060)
If you've got access to a computer,
James Gosling (18:44.760)
you can build all kinds of crazy stuff.
Lex Fridman (18:51.420)
And when you were somebody like me
James Gosling (18:58.220)
who had like really no money, and I mean,
Lex Fridman (19:05.340)
I remember just lusting after being
James Gosling (19:08.100)
able to buy like a transistor.
Lex Fridman (19:15.780)
And when I would do sort of electronics kind of projects,
James Gosling (19:20.260)
they were mostly made, done by like dumpster diving for trash.
Lex Fridman (19:27.420)
And one of my big hauls was discarded relay racks
James Gosling (19:33.580)
from the back of the phone company switching center.
Lex Fridman (19:37.340)
Oh, nice.
James Gosling (19:39.220)
That was the big memorable treasure.
Lex Fridman (19:41.340)
Oh, yeah.
James Gosling (19:42.020)
Yeah, that was a really.
Lex Fridman (19:43.260)
What do you use that for?
James Gosling (19:45.140)
I built a machine that played tic tac toe.
Lex Fridman (19:50.420)
Nice.
James Gosling (19:51.180)
Out of relays.
Lex Fridman (19:52.060)
Of course, the thing that was really hard
James Gosling (19:55.780)
was that all the relays required a specific voltage.
Lex Fridman (1:00:04.460)
must be open source, I get kind of weird about that
James Gosling (1:00:10.860)
because it's sort of like saying some versions of that
Lex Fridman (1:00:17.420)
end up saying that all software engineers
James Gosling (1:00:22.300)
must take a vow of poverty, right, as though.
Lex Fridman (1:00:28.100)
It's unethical to have money.
James Gosling (1:00:30.060)
Yeah.
Lex Fridman (1:00:31.540)
To build a company, right.
Lex Fridman (1:00:34.500)
And there's a slice of me that actually kind of buys into that
Lex Fridman (1:00:41.260)
because people who make billions of dollars off of a patent,
Lex Fridman (1:00:50.060)
and the patent came from literally a stroke
Lex Fridman (1:00:56.260)
of lightning that hits you as you lie half awake in bed.
James Gosling (1:01:02.500)
Yeah, that's lucky.
Lex Fridman (1:01:03.980)
Good for you.
James Gosling (1:01:06.060)
The way that that sometimes sort of explodes
Lex Fridman (1:01:09.700)
into something that looks to me a lot like exploitation,
James Gosling (1:01:14.420)
you see a lot of that in the drug industry.
Lex Fridman (1:01:18.540)
You know, when you've got medications that cost you
James Gosling (1:01:26.620)
like $100 a day, and it's like, no.
Lex Fridman (1:01:33.900)
Yeah, so the interesting thing about the sort of open source,
Lex Fridman (1:01:39.060)
what bothers me is when something is not open source,
Lex Fridman (1:01:44.220)
and because of that, it's a worse product.
James Gosling (1:01:48.700)
Yeah.
Lex Fridman (1:01:49.700)
So like, I mean, if I look at your just implementation
James Gosling (1:01:52.700)
of Emacs, like that could have been the dominant implementation.
Lex Fridman (1:01:56.620)
Like I use Emacs.
James Gosling (1:01:57.460)
That's my main ID.
Lex Fridman (1:01:58.700)
I apologize to the world, but I still love it.
Lex Fridman (1:02:02.540)
And I could have been using your implementation of Emacs.
Lex Fridman (1:02:09.020)
And why aren't I?
Lex Fridman (1:02:11.180)
So are you using the GNU Emacs?
Lex Fridman (1:02:14.180)
I guess the default on Linux is that GNU?
James Gosling (1:02:16.380)
Yeah.
Lex Fridman (1:02:16.900)
And that, through a strange passage,
James Gosling (1:02:20.420)
started out as the one that I wrote.
Lex Fridman (1:02:22.220)
Exactly.
Lex Fridman (1:02:22.740)
So it still has a, yeah.
Lex Fridman (1:02:26.540)
Well, and part of that was because in the last couple
James Gosling (1:02:32.860)
of years of grad school, it became really clear
Lex Fridman (1:02:38.980)
to me that I was either going to be Mr. Emacs forever
James Gosling (1:02:46.060)
or I was going to graduate.
Lex Fridman (1:02:50.060)
Got it.
James Gosling (1:02:50.580)
I couldn't actually do both.
Lex Fridman (1:02:54.340)
Was that a hard decision?
James Gosling (1:02:56.260)
That's so interesting to think about you as a,
Lex Fridman (1:02:58.700)
like it's a different trajectory that could have happened.
James Gosling (1:03:01.260)
Yeah.
Lex Fridman (1:03:01.900)
That's fascinating.
Lex Fridman (1:03:04.420)
And maybe I could be fabulously wealthy today
Lex Fridman (1:03:10.220)
if I had become Mr. Emacs, and Emacs
James Gosling (1:03:13.580)
had mushroomed into a series of text processing applications
Lex Fridman (1:03:19.220)
and all kinds of stuff.
Lex Fridman (1:03:20.340)
And I would have, you know.
Lex Fridman (1:03:24.340)
But I have a long history of financially suboptimal
Lex Fridman (1:03:30.620)
decisions because I didn't want that life, right?
Lex Fridman (1:03:38.300)
And I went to grad school because I wanted to graduate.
Lex Fridman (1:03:47.300)
And being Mr. Emacs for a while was kind of fun,
Lex Fridman (1:03:58.260)
and then it kind of became not fun.
Lex Fridman (1:04:03.420)
And when it was not fun, there was
Lex Fridman (1:04:10.540)
no way I could pay my rent, right?
Lex Fridman (1:04:17.060)
And I was like, OK, do I carry on as a grad student?
Lex Fridman (1:04:23.780)
I had a research assistantship, and I
James Gosling (1:04:25.620)
was sort of living off of that.
Lex Fridman (1:04:27.220)
And I was trying to do my, you know,
James Gosling (1:04:30.180)
I was doing all my RA work, all my RA,
Lex Fridman (1:04:33.380)
you know, being grad student work
Lex Fridman (1:04:35.220)
and being Mr. Emacs all at the same time.
Lex Fridman (1:04:40.660)
And I decided to pick one.
Lex Fridman (1:04:45.260)
And one of the things that I did at the time
Lex Fridman (1:04:48.340)
was I went around all the people I knew on the ARPANET who
James Gosling (1:04:53.660)
might be able to take over looking after Emacs.
Lex Fridman (1:04:58.980)
And pretty much everybody said, eh, I got a day job.
Lex Fridman (1:05:06.300)
So I actually found two folks and a couple
Lex Fridman (1:05:12.340)
of folks in a garage in New Jersey, complete with a dog,
James Gosling (1:05:20.540)
who were willing to take it over.
Lex Fridman (1:05:22.940)
But they were going to have to charge money.
Lex Fridman (1:05:26.140)
But my deal with them was that they would only,
Lex Fridman (1:05:31.180)
that they would make it free for universities and schools
Lex Fridman (1:05:33.700)
and stuff.
Lex Fridman (1:05:34.980)
And they said sure.
Lex Fridman (1:05:36.620)
And you know, that upset some people.
Lex Fridman (1:05:41.100)
So you have some, now I don't know the full history of this,
Lex Fridman (1:05:43.860)
but I think it's kind of interesting.
Lex Fridman (1:05:46.780)
You have some tension with Mr. Richard Stallman over the,
Lex Fridman (1:05:54.340)
and he kind of represents this kind of,
Lex Fridman (1:05:56.660)
like you mentioned, free software,
James Gosling (1:06:03.660)
sort of a dogmatic focus on, yeah.
Lex Fridman (1:06:07.260)
All information must be free.
James Gosling (1:06:10.140)
Must be free.
Lex Fridman (1:06:10.860)
So what, is there an interesting way
James Gosling (1:06:14.220)
to paint a picture of the disagreement
Lex Fridman (1:06:17.420)
you have with Richard through the years?
James Gosling (1:06:19.900)
My basic opposition is that when you say information
Lex Fridman (1:06:26.980)
must be free, to a really extreme form that
James Gosling (1:06:32.100)
turns into all people whose job is
Lex Fridman (1:06:38.780)
the production of everything from movies to software.
James Gosling (1:06:49.300)
They must all take a vow of poverty
Lex Fridman (1:06:52.580)
because information must be free.
Lex Fridman (1:06:56.740)
And that doesn't work for me.
Lex Fridman (1:06:59.980)
And I don't want to be wildly rich.
James Gosling (1:07:05.060)
I am not wildly rich.
Lex Fridman (1:07:08.780)
I do OK.
Lex Fridman (1:07:14.260)
But I do actually, I can feed my children.
Lex Fridman (1:07:20.620)
Yeah, I totally agree with you.
James Gosling (1:07:22.220)
It does just make me sad that sometimes
Lex Fridman (1:07:25.340)
the closing of the source, for some reason
James Gosling (1:07:28.540)
that people that, like a bureaucracy begins to build,
Lex Fridman (1:07:33.620)
and sometimes it doesn't, it hurts the product.
James Gosling (1:07:37.460)
Oh, absolutely.
Lex Fridman (1:07:38.660)
Absolutely.
James Gosling (1:07:39.380)
It's always sad.
Lex Fridman (1:07:40.420)
And there is a balance in there.
James Gosling (1:07:44.740)
There's a balance.
Lex Fridman (1:07:47.060)
And it's not hard over rapacious capitalism.
Lex Fridman (1:07:56.100)
And it's not hard over in the other direction.
Lex Fridman (1:08:02.660)
And a lot of the open source movement,
James Gosling (1:08:07.820)
they have been managing to find the path
Lex Fridman (1:08:11.780)
to actually making money.
Lex Fridman (1:08:15.220)
So doing things like service and support
Lex Fridman (1:08:18.900)
works for a lot of people.
Lex Fridman (1:08:20.860)
And there are some ways where it's kind of, some of them
Lex Fridman (1:08:33.100)
are a little perverse.
Lex Fridman (1:08:35.820)
So as a part of things like this Sarbanes–Oxley Act
Lex Fridman (1:08:43.180)
and various people's interpretations
James Gosling (1:08:45.860)
of all kinds of accounting principles.
Lex Fridman (1:08:49.860)
And this is kind of a worldwide thing.
Lex Fridman (1:08:51.860)
But if you've got a corporation that
Lex Fridman (1:08:55.300)
is depending on some piece of software,
James Gosling (1:09:01.220)
often various accounting and reporting standards
Lex Fridman (1:09:04.540)
say if you don't have a support contract on this thing
James Gosling (1:09:08.420)
that your business is depending on, then that's bad.
Lex Fridman (1:09:15.940)
So if you've got a database, you need to pay for support.
Lex Fridman (1:09:24.500)
But there's a difference between the sort of support contracts
Lex Fridman (1:09:30.100)
that the average open source database producer charges
Lex Fridman (1:09:37.060)
and what somebody who is truly rapacious like Oracle charges.
Lex Fridman (1:09:44.500)
Yeah, so it's a balance, like you said.
James Gosling (1:09:47.260)
It is absolutely a balance.
Lex Fridman (1:09:49.660)
And there are a lot of different ways
James Gosling (1:09:57.060)
to make the math work out for everybody.
Lex Fridman (1:10:04.900)
And the very unbalanced sort of like the winner
James Gosling (1:10:16.700)
takes all thing that happens in so much of modern commerce,
Lex Fridman (1:10:23.140)
that just doesn't work for me either.
James Gosling (1:10:26.180)
I know you've talked about this in quite a few places,
Lex Fridman (1:10:31.380)
but you have created one of the most popular programming
James Gosling (1:10:37.020)
languages in the world.
Lex Fridman (1:10:39.180)
This is a programming language that I first
James Gosling (1:10:41.740)
learned about object oriented programming with.
Lex Fridman (1:10:46.740)
I think it's a programming language
James Gosling (1:10:49.260)
that a lot of people use in a lot of different places
Lex Fridman (1:10:52.620)
and millions of devices today, Java.
Lex Fridman (1:10:55.740)
So the absurd question, but can you
Lex Fridman (1:11:00.420)
tell the origin story of Java?
Lex Fridman (1:11:03.060)
So a long time ago at Sun in about 1990,
Lex Fridman (1:11:07.340)
there was a group of us who were kind of worried
James Gosling (1:11:12.740)
that there was stuff going on in the universe of computing
Lex Fridman (1:11:18.620)
that the computing industry was missing out on.
Lex Fridman (1:11:21.020)
And so a few of us started this project
Lex Fridman (1:11:29.740)
at Sun that really got going.
James Gosling (1:11:32.380)
I mean, we started talking about it in 1990,
Lex Fridman (1:11:34.860)
and it really got going in 91.
Lex Fridman (1:11:39.020)
And it was all about what was happening
Lex Fridman (1:11:44.860)
in terms of computing hardware processors
Lex Fridman (1:11:48.820)
and networking and all of that that was outside
Lex Fridman (1:11:53.220)
of the computer industry.
Lex Fridman (1:11:54.340)
And that was everything from the sort
Lex Fridman (1:11:59.060)
of early glimmers of cell phones that were happening then
James Gosling (1:12:03.500)
to you look at elevators and locomotives
Lex Fridman (1:12:07.940)
and process control systems in factories
Lex Fridman (1:12:12.500)
and all kinds of audio equipment and video equipment.
Lex Fridman (1:12:20.820)
They all had processors in them, and they were all
James Gosling (1:12:22.740)
doing stuff with them.
Lex Fridman (1:12:24.820)
And it sort of felt like there was something going on there
James Gosling (1:12:30.860)
that we needed to understand.
Lex Fridman (1:12:34.420)
And
Lex Fridman (1:12:36.020)
So C and C++ was in the air already.
Lex Fridman (1:12:38.980)
Oh, no, C and C++ absolutely owned the universe
James Gosling (1:12:42.300)
at that time.
Lex Fridman (1:12:42.940)
Everything was written in C and C++.
Lex Fridman (1:12:45.140)
So where was the hunch that there
Lex Fridman (1:12:46.860)
was a need for a revolution?
James Gosling (1:12:48.780)
Well, so the need for a revolution
Lex Fridman (1:12:50.700)
was not about a language.
James Gosling (1:12:54.500)
It was just as simple and vague as there
Lex Fridman (1:12:59.900)
are things happening out there.
James Gosling (1:13:03.620)
We need to understand them.
Lex Fridman (1:13:04.980)
We need to understand them.
Lex Fridman (1:13:08.580)
And so a few of us went on several somewhat epic road
Lex Fridman (1:13:16.900)
trips.
Lex Fridman (1:13:19.420)
Literal road trips?
Lex Fridman (1:13:20.660)
Literal road trips.
James Gosling (1:13:21.860)
It's like get on an airplane, go to Japan,
Lex Fridman (1:13:24.740)
visit Toshiba and Sharp and Mitsubishi and Sony
Lex Fridman (1:13:31.820)
and all of these folks.
Lex Fridman (1:13:33.700)
And because we worked for Sun, we
James Gosling (1:13:36.620)
had folks who were willing to give us introductions.
Lex Fridman (1:13:42.300)
We visited Samsung and a bunch of Korean companies.
Lex Fridman (1:13:50.060)
And we went all over Europe.
Lex Fridman (1:13:51.340)
We went to places like Philips and Siemens and Thomson.
Lex Fridman (1:13:56.620)
And what did you see there?
Lex Fridman (1:14:00.020)
For me, one of the things that sort of leapt out
James Gosling (1:14:02.980)
was that they were doing all the usual computer things
Lex Fridman (1:14:07.300)
that people had been doing like 20 years before.
James Gosling (1:14:10.540)
The thing that really leapt out to me
Lex Fridman (1:14:13.100)
was that they were sort of reinventing
James Gosling (1:14:16.700)
computer networking.
Lex Fridman (1:14:18.820)
And they were making all the mistakes
James Gosling (1:14:24.340)
that people in the computer industry had made.
Lex Fridman (1:14:28.580)
And since I had been doing a lot of work in the networking
James Gosling (1:14:32.180)
area, we'd go and visit Company X.
Lex Fridman (1:14:37.140)
They'd describe this networking thing that they were doing.
Lex Fridman (1:14:40.540)
And just without any thought, I could tell them
Lex Fridman (1:14:43.260)
like the 25 things that were going
James Gosling (1:14:45.980)
to be complete disasters with that thing
Lex Fridman (1:14:49.020)
that they were doing.
Lex Fridman (1:14:52.220)
And I don't know whether that had any impact on any of them.
Lex Fridman (1:14:55.700)
But that particular story of repeating the disasters
James Gosling (1:15:03.180)
of the computer science industry was there.
Lex Fridman (1:15:07.940)
And one of the things we thought was, well,
James Gosling (1:15:11.300)
maybe we could do something useful here with bringing them
Lex Fridman (1:15:15.420)
forward somewhat.
Lex Fridman (1:15:16.380)
But also, at the same time, we learned a bunch of things
Lex Fridman (1:15:24.180)
from these mostly consumer electronics companies.
Lex Fridman (1:15:31.940)
And high on the list was that they
Lex Fridman (1:15:39.780)
viewed their relationship with the customer as sacred.
James Gosling (1:15:45.460)
They were never, ever willing to make tradeoffs
Lex Fridman (1:15:51.820)
between for safety.
Lex Fridman (1:15:56.540)
So one of the things that had always
Lex Fridman (1:16:00.300)
made me nervous in the computer industry
James Gosling (1:16:04.900)
was that people were willing to make tradeoffs in reliability
Lex Fridman (1:16:12.220)
to get performance.
James Gosling (1:16:17.540)
They want faster, faster.
Lex Fridman (1:16:18.740)
It breaks a little more often because it's fast.
James Gosling (1:16:21.460)
Maybe you run it a little hotter than you should.
Lex Fridman (1:16:23.940)
Or the one that always blew my mind
James Gosling (1:16:27.620)
was the way that the folks at Cray Supercomputers
Lex Fridman (1:16:34.100)
got their division to be really fast
James Gosling (1:16:38.780)
was that they did Newton Raphson approximations.
Lex Fridman (1:16:44.220)
And so the bottom several bits of A over B
James Gosling (1:16:51.420)
were essentially random numbers.
Lex Fridman (1:16:55.540)
What could possibly go wrong?
Lex Fridman (1:16:56.860)
What could go wrong?
Lex Fridman (1:16:59.700)
And just figuring out how to nail the bottom bit,
Lex Fridman (1:17:08.580)
how to make sure that if you put a piece of toast in a toaster,
Lex Fridman (1:17:14.700)
it's not going to kill the customer.
James Gosling (1:17:18.300)
It's not going to burst into flames and burn the house down.
Lex Fridman (1:17:22.540)
So I guess those are the principles that were inspiring.
Lex Fridman (1:17:26.860)
But how did, from the days of Java's called oak,
Lex Fridman (1:17:33.100)
because of a tree outside the window story
James Gosling (1:17:34.980)
that a lot of people know, how did it
Lex Fridman (1:17:37.100)
become this incredible, powerful language?
James Gosling (1:17:43.900)
Well, so it was a bunch of things.
Lex Fridman (1:17:46.780)
So after all that, the way that we
James Gosling (1:17:50.660)
decided that we could understand things better
Lex Fridman (1:17:54.500)
was by building a demo, building a prototype of something.
Lex Fridman (1:17:59.300)
So because it was easy and fun, we
Lex Fridman (1:18:02.740)
decided to build a control system for some home
James Gosling (1:18:07.220)
electronics, TV, VCR, that kind of stuff.
Lex Fridman (1:18:11.020)
And as we were building it, we discovered
James Gosling (1:18:16.580)
that there were some things about standard practice
Lex Fridman (1:18:19.660)
in C programming that were really getting in the way.
Lex Fridman (1:18:26.380)
And it wasn't exactly because we were writing all this C code
Lex Fridman (1:18:32.380)
and C++ code that we couldn't write it to do the right thing.
Lex Fridman (1:18:37.740)
But one of the things that was weird in the group
Lex Fridman (1:18:42.340)
was that we had a guy whose top level job was
James Gosling (1:18:50.860)
he was a business guy.
Lex Fridman (1:18:52.940)
He was an MBA kind of person, think about business plans
Lex Fridman (1:18:57.780)
and all of that.
Lex Fridman (1:18:58.660)
And there were a bunch of things that were kind of,
Lex Fridman (1:19:05.260)
and we would talk about things that were going wrong
Lex Fridman (1:19:07.540)
and things that were going wrong,
James Gosling (1:19:10.100)
things that were going right.
Lex Fridman (1:19:11.260)
And as we thought about things like the requirements
James Gosling (1:19:16.140)
for security and safety, some low level details
Lex Fridman (1:19:21.540)
and see like naked pointers.
James Gosling (1:19:24.060)
Yeah.
Lex Fridman (1:19:24.980)
And so back in the early 90s, it was well understood
James Gosling (1:19:35.300)
that the number one source of security vulnerabilities.
Lex Fridman (1:19:41.580)
Was pointers.
James Gosling (1:19:42.380)
Was just pointers, was just bugs.
Lex Fridman (1:19:45.980)
And it was like 50%, 60%, 70% of all security vulnerabilities
James Gosling (1:19:52.420)
were bugs.
Lex Fridman (1:19:53.300)
And the vast majority of them were like buffer overflows.
Lex Fridman (1:19:57.980)
So you're like, we have to fix this.
Lex Fridman (1:20:00.140)
We have to make sure that this cannot happen.
Lex Fridman (1:20:04.020)
And that was kind of the original thing for me
Lex Fridman (1:20:07.420)
was this cannot continue.
Lex Fridman (1:20:11.420)
And one of the things I find really entertaining this year
Lex Fridman (1:20:16.500)
was, I forget which Rag published it,
Lex Fridman (1:20:22.340)
but there was this article that came out
Lex Fridman (1:20:24.780)
that was sort of the result of an examination
James Gosling (1:20:31.220)
of all the security vulnerabilities in Chrome.
Lex Fridman (1:20:35.260)
And Chrome is like a giant piece of C++ code.
Lex Fridman (1:20:39.100)
And 60% or 70% of all the security vulnerabilities
Lex Fridman (1:20:44.100)
were stupid pointer tricks.
Lex Fridman (1:20:48.100)
And I thought, it's 30 years later and we're still there.
Lex Fridman (1:20:54.260)
Still there.
Lex Fridman (1:20:54.940)
And we're still there.
Lex Fridman (1:20:56.260)
And that's one of those slap your forehead
Lex Fridman (1:21:00.900)
and just want to cry moments.
Lex Fridman (1:21:05.220)
Would you attribute, or is that too much of a simplification,
Lex Fridman (1:21:09.060)
but would you attribute the creation of Java
Lex Fridman (1:21:11.300)
to C pointers?
James Gosling (1:21:15.460)
Obvious problem.
Lex Fridman (1:21:16.660)
Well, I mean, that was one of the trigger points.
James Gosling (1:21:21.820)
Concurrency you've mentioned.
Lex Fridman (1:21:23.420)
Concurrency was a big deal.
James Gosling (1:21:27.900)
Because when you're interacting with people,
Lex Fridman (1:21:31.100)
the last thing you ever want to see
James Gosling (1:21:32.740)
is the thing like waiting and issues
Lex Fridman (1:21:37.860)
about the software development process.
Lex Fridman (1:21:42.100)
When faults happen, can you recover from them?
Lex Fridman (1:21:45.820)
What can you do to make it easier
Lex Fridman (1:21:49.300)
to create and eliminate complex data structures?
Lex Fridman (1:21:54.700)
What can you do to fix one of the most common C problems,
Lex Fridman (1:21:59.940)
which is storage leaks?
Lex Fridman (1:22:03.620)
And it's evil twin, the freed but still being used
James Gosling (1:22:12.500)
piece of memory.
Lex Fridman (1:22:14.340)
You free something and then you keep using it.
James Gosling (1:22:17.780)
Oh, yeah.
Lex Fridman (1:22:19.660)
So when I was originally thinking about that,
James Gosling (1:22:21.580)
I was thinking about it in terms of safety and security issues.
Lex Fridman (1:22:26.700)
And one of the things I came to understand
James Gosling (1:22:29.900)
was that it wasn't just about safety and security,
Lex Fridman (1:22:33.260)
but it was about developer velocity.
Lex Fridman (1:22:39.180)
So and I got really religious about this
Lex Fridman (1:22:43.340)
because at that point, I had spent an ungodly amount
James Gosling (1:22:46.620)
of my life hunting down mystery pointer bugs.
Lex Fridman (1:22:54.900)
And two thirds of my time as a software developer
James Gosling (1:23:01.300)
was because the mystery pointer bugs tend
Lex Fridman (1:23:03.900)
to be the hardest to find because they tend
James Gosling (1:23:07.900)
to be very, very statistical.
Lex Fridman (1:23:11.820)
The ones that hurt, they're like a one in a million chance.
Lex Fridman (1:23:20.780)
But nevertheless, create an infinite amount of suffering.
Lex Fridman (1:23:23.420)
Right.
James Gosling (1:23:24.460)
Because when you're doing a billion operations a second,
Lex Fridman (1:23:28.740)
one in a million chance means it's going to happen.
Lex Fridman (1:23:35.260)
And so I got really religious about this thing,
Lex Fridman (1:23:38.420)
about making it so that if something fails,
James Gosling (1:23:41.180)
it fails immediately and visibly.
Lex Fridman (1:23:44.900)
And one of the things that was a real attraction of Java
James Gosling (1:23:52.780)
to lots of development shops was that we get our code up
Lex Fridman (1:23:57.220)
and running twice as fast.
James Gosling (1:24:00.900)
You mean like the entirety of the development process,
Lex Fridman (1:24:03.540)
debugging, all that kind of stuff?
James Gosling (1:24:04.900)
Yeah, so if you measure time from you first touch fingers
Lex Fridman (1:24:12.500)
to keyboard until you get your first demo out,
James Gosling (1:24:19.580)
not much different.
Lex Fridman (1:24:21.140)
But if you look from fingers touching keyboard
James Gosling (1:24:23.620)
to solid piece of software that you could release
Lex Fridman (1:24:27.900)
in production, it would be way faster.
Lex Fridman (1:24:32.180)
And I think what people don't often realize is, yeah,
Lex Fridman (1:24:34.740)
there's things that really slow you down,
James Gosling (1:24:36.780)
like the hard to catch bugs probably
Lex Fridman (1:24:40.260)
is the thing that really slows down the entire time.
James Gosling (1:24:43.580)
It really slows things down.
Lex Fridman (1:24:45.740)
But also, one of the things that you get out
James Gosling (1:24:48.540)
of object oriented programming is a strict methodology
Lex Fridman (1:24:52.940)
about what are the interfaces between things
Lex Fridman (1:24:55.860)
and being really clear about how parts relate to each other.
Lex Fridman (1:25:02.180)
And what that helps with is so many times
Lex Fridman (1:25:06.940)
what people do is they kind of like sneak around the side.
Lex Fridman (1:25:12.540)
So if you've built something and people are using it
Lex Fridman (1:25:16.980)
and you say, well, OK, I built this thing.
Lex Fridman (1:25:21.420)
You use it this way.
Lex Fridman (1:25:23.740)
And then you change it in such a way
Lex Fridman (1:25:26.180)
that it still does what you said it does.
James Gosling (1:25:28.540)
It just does it a little bit different.
Lex Fridman (1:25:30.260)
Then you find out that somebody out there
James Gosling (1:25:33.260)
was sneaking around the side.
Lex Fridman (1:25:35.660)
They sort of tunneled in a back door.
Lex Fridman (1:25:38.180)
And this person, their code broke.
Lex Fridman (1:25:41.860)
And because they were sneaking through a side door.
Lex Fridman (1:25:47.020)
And normally, the attitude is, dummy.
Lex Fridman (1:25:56.380)
But a lot of times, you can't just slap their hand
Lex Fridman (1:26:04.740)
and tell them to not do that.
Lex Fridman (1:26:06.740)
Because it's some bank's account reconciliation system
James Gosling (1:26:17.940)
that some developer decided, oh, I'm lazy.
Lex Fridman (1:26:22.780)
I'll just sneak through the back door.
James Gosling (1:26:24.900)
Because the language allows it.
Lex Fridman (1:26:26.420)
I mean, you can't even mad at them.
Lex Fridman (1:26:28.060)
And so one of the things I did that, on the one hand,
Lex Fridman (1:26:32.020)
upset a bunch of people was I made it
Lex Fridman (1:26:34.540)
so that you really couldn't go through back doors.
Lex Fridman (1:26:38.740)
So the whole point of that was to say,
James Gosling (1:26:44.340)
if the interface here isn't right,
Lex Fridman (1:26:47.140)
the wrong way to deal with that is to go through a back door.
James Gosling (1:26:51.380)
The right way to deal with it is to walk up
Lex Fridman (1:26:53.340)
to the developer of this thing and say, fix it.
Lex Fridman (1:26:58.860)
And so it was kind of like a social engineering thing.
Lex Fridman (1:27:02.300)
And people ended up discovering that that really
James Gosling (1:27:08.580)
made a difference in terms of.
Lex Fridman (1:27:12.340)
And a bunch of this stuff, if you're just screwing around
James Gosling (1:27:16.060)
writing your own class project scale stuff,
Lex Fridman (1:27:20.900)
a lot of this stuff isn't quite so important
James Gosling (1:27:25.460)
because you're both sides of the interface.
Lex Fridman (1:27:31.420)
But when you're building larger, more complex pieces of software
James Gosling (1:27:37.740)
that have a lot of people working on them,
Lex Fridman (1:27:39.940)
and especially when they span organizations,
James Gosling (1:27:46.380)
having clarity about how that stuff gets structured
Lex Fridman (1:27:52.860)
saves your life.
Lex Fridman (1:27:56.380)
And especially, there's so much software
Lex Fridman (1:28:00.180)
that is fundamentally untestable until you do the real thing.
James Gosling (1:28:08.140)
It's better to write good code in the beginning
Lex Fridman (1:28:11.980)
as opposed to writing crappy code
Lex Fridman (1:28:13.580)
and then trying to fix it and trying to scramble and figure
Lex Fridman (1:28:17.260)
out, and through testing, figure out where the bugs are.
James Gosling (1:28:20.300)
Yeah, it's like, which shortcut caused that rocket
Lex Fridman (1:28:27.980)
to not get where it was needed to go?
Lex Fridman (1:28:31.580)
So I think one of the most beautiful ideas philosophically
Lex Fridman (1:28:38.260)
and technically is of a virtual machine, a Java virtual machine.
James Gosling (1:28:45.220)
Again, I apologize to romanticize things,
Lex Fridman (1:28:47.380)
but how did the idea of the JVM come to be?
Lex Fridman (1:28:53.300)
How to you radical of an idea it is?
Lex Fridman (1:28:56.380)
Because it seems to me to be just a really interesting idea
James Gosling (1:29:01.460)
in the history of programming.
Lex Fridman (1:29:04.660)
And what is it?
Lex Fridman (1:29:05.660)
So the Java virtual machine, you can think of it
Lex Fridman (1:29:10.060)
in different ways because it was carefully designed
James Gosling (1:29:17.060)
to have different ways of viewing it.
Lex Fridman (1:29:19.820)
So one view of it that most people don't really realize
James Gosling (1:29:23.820)
is there is that you can view it as sort
Lex Fridman (1:29:30.580)
of an encoding of the abstract syntax tree
James Gosling (1:29:34.820)
in reverse Polish notation.
Lex Fridman (1:29:39.180)
I don't know if that makes any sense at all.
James Gosling (1:29:41.380)
I could explain it, and that would blow all of our time.
Lex Fridman (1:29:44.820)
But the other way to think of it and the way
James Gosling (1:29:47.620)
that it ends up being explained is
Lex Fridman (1:29:50.380)
that it's like the instruction set of an abstract machine
James Gosling (1:29:57.180)
that's designed such that you can translate
Lex Fridman (1:30:00.380)
that abstract machine to a physical machine.
Lex Fridman (1:30:03.820)
And the reason that that's important,
Lex Fridman (1:30:07.860)
so if you wind back to the early 90s
James Gosling (1:30:10.460)
when we were talking to all of these companies doing
Lex Fridman (1:30:15.260)
consumer electronics, and you talk to the purchasing people,
James Gosling (1:30:22.460)
there were interesting conversations with purchasing.
Lex Fridman (1:30:27.900)
So if you look at how these devices come together,
James Gosling (1:30:31.940)
they're sheet metal and gears and circuit boards
Lex Fridman (1:30:36.100)
and capacitors and resistors and stuff.
Lex Fridman (1:30:40.620)
And everything you buy has multiple sources.
Lex Fridman (1:30:46.180)
So you can buy a capacitor from here.
James Gosling (1:30:50.420)
You can buy a capacitor from there.
Lex Fridman (1:30:52.780)
And you've got kind of a market so that you can actually
James Gosling (1:30:57.700)
get a decent price for a capacitor.
Lex Fridman (1:31:03.340)
But CPUs, and particularly in the early 90s,
James Gosling (1:31:12.980)
CPUs were all different and all proprietary.
Lex Fridman (1:31:17.700)
So if you use the chip from Intel,
James Gosling (1:31:22.620)
you had to be an Intel customer till the end of time.
Lex Fridman (1:31:28.060)
Because if you wrote a bunch of software,
James Gosling (1:31:31.500)
when you wrote software using whatever technique you wanted,
Lex Fridman (1:31:36.780)
and C was particularly bad about this
James Gosling (1:31:39.580)
because there was a lot of properties
Lex Fridman (1:31:43.780)
of the underlying machine that came through.
Lex Fridman (1:31:48.340)
So you were stuck.
Lex Fridman (1:31:49.220)
So the code you wrote, you were stuck
James Gosling (1:31:50.660)
to that particular machine.
Lex Fridman (1:31:51.780)
You were stuck to that particular machine,
James Gosling (1:31:54.300)
which meant that they couldn't decide,
Lex Fridman (1:31:56.980)
you know, Intel is screwing us.
James Gosling (1:32:01.500)
I'll start buying chips from Bob's Better Chips.
Lex Fridman (1:32:08.220)
This drove the purchasing people absolutely insane
James Gosling (1:32:15.860)
that they were welded into this decision.
Lex Fridman (1:32:20.540)
And they would have to make this decision
James Gosling (1:32:22.980)
before the first line of software was written.
Lex Fridman (1:32:25.940)
That's funny that you're talking about the purchasing people.
Lex Fridman (1:32:28.140)
So there's one perspective, right?
Lex Fridman (1:32:31.300)
There's a lot of other perspectives
James Gosling (1:32:32.740)
that all probably hated this idea.
Lex Fridman (1:32:35.260)
Right.
Lex Fridman (1:32:36.060)
But from a technical aspect,
Lex Fridman (1:32:37.540)
just like the creation of an abstraction layer
James Gosling (1:32:41.740)
that's agnostic to the underlying machine
Lex Fridman (1:32:46.300)
from the perspective of the developer,
James Gosling (1:32:48.340)
I mean, that's brilliant.
Lex Fridman (1:32:50.100)
Right.
James Gosling (1:32:50.780)
Well, and so that's like across the spectrum
Lex Fridman (1:32:56.300)
of providers of chips.
Lex Fridman (1:32:58.500)
But then there's also the time thing
Lex Fridman (1:33:00.700)
because, you know, as you went from one generation
James Gosling (1:33:04.820)
to the next generation to the next generation,
Lex Fridman (1:33:06.820)
they were all different.
Lex Fridman (1:33:07.980)
And you would often have to rewrite your software.
Lex Fridman (1:33:10.180)
Oh, you mean generations of machines of different kinds?
James Gosling (1:33:14.740)
Yeah.
Lex Fridman (1:33:15.620)
So like one of the things that sucked about a year out
James Gosling (1:33:19.820)
of my life was when Sun went from the Motorola 68010
Lex Fridman (1:33:27.660)
processor to the 68020 processor.
James Gosling (1:33:31.660)
Then they had a number of differences.
Lex Fridman (1:33:33.820)
And one of them hit us really hard.
Lex Fridman (1:33:36.540)
And I ended up being the point guy
Lex Fridman (1:33:41.820)
on the worst case of where the new instruction cache
James Gosling (1:33:46.340)
architecture hurt us.
Lex Fridman (1:33:49.060)
Well, OK, so I mean, so one of this idea, I mean, OK.
Lex Fridman (1:33:53.300)
So yeah, you articulate a really clear fundamental problem
Lex Fridman (1:33:57.580)
in all of computing.
Lex Fridman (1:33:59.100)
But where do you get the guts to think
Lex Fridman (1:34:03.180)
we can actually solve this?
James Gosling (1:34:05.180)
You know, in our conversations with all of these vendors,
Lex Fridman (1:34:09.580)
these problems started to show up.
Lex Fridman (1:34:14.100)
And I kind of had this epiphany because it reminded me
Lex Fridman (1:34:23.500)
of a summer job that I had had in grad school.
Lex Fridman (1:34:31.220)
So back in grad school, my thesis advisor,
Lex Fridman (1:34:37.660)
well, I had two thesis advisors for bizarre reasons.
James Gosling (1:34:42.900)
One of them was a guy named Raj Reddy.
Lex Fridman (1:34:44.900)
The other one was Bob Sproul.
Lex Fridman (1:34:48.340)
And Raj, I love Raj.
Lex Fridman (1:34:53.020)
I really love both of them.
Lex Fridman (1:34:56.140)
So the department had bought a bunch of early workstations
Lex Fridman (1:35:06.300)
from a company called Three Rivers Computer Company.
Lex Fridman (1:35:11.220)
And Three Rivers Computer Company
Lex Fridman (1:35:13.340)
was a bunch of electrical engineers
James Gosling (1:35:15.260)
who wanted to do as little software as possible.
Lex Fridman (1:35:19.060)
So they knew that they'd need to have compilers and an OS
Lex Fridman (1:35:23.580)
and stuff like that.
Lex Fridman (1:35:24.380)
And they didn't want to do any of that.
Lex Fridman (1:35:26.660)
And they wanted to do that for as close to zero money
Lex Fridman (1:35:29.460)
as possible.
Lex Fridman (1:35:31.260)
So what they did was they built a machine whose instruction set
Lex Fridman (1:35:39.380)
was literally the byte code for UCSD Pascal, the P code.
Lex Fridman (1:35:50.420)
And so we had a bunch of software
Lex Fridman (1:35:56.860)
that was written for this machine.
Lex Fridman (1:36:02.900)
And for various reasons, the company
Lex Fridman (1:36:06.700)
wasn't doing terrifically well.
James Gosling (1:36:08.340)
We had all this software on these machines.
Lex Fridman (1:36:10.100)
And we wanted it to run on other machines, principally
James Gosling (1:36:13.260)
the VAX.
Lex Fridman (1:36:15.460)
And so Raj asked me if I could come up
James Gosling (1:36:23.140)
with a way to port all of this software from the PERC machines
Lex Fridman (1:36:32.580)
to VAXs.
Lex Fridman (1:36:35.260)
And I think what he had in mind was something
Lex Fridman (1:36:41.460)
that would translate from Pascal to C or Pascal to, actually,
James Gosling (1:36:50.740)
at those times, pretty much it was
Lex Fridman (1:36:52.460)
you could translate to C or C. And if you
James Gosling (1:36:55.780)
didn't like translate to C, you could translate to C.
Lex Fridman (1:37:00.820)
There was, it's like the Henry Ford, any color you want,
James Gosling (1:37:05.820)
just as long as it's black.
Lex Fridman (1:37:09.300)
And I went, that's really hard.
James Gosling (1:37:15.140)
That's a.
Lex Fridman (1:37:16.500)
And I noticed that, and I was looking at stuff.
Lex Fridman (1:37:20.660)
And I went, oh, I bet I could rewrite the P code
Lex Fridman (1:37:25.820)
into VAX assembly code.
Lex Fridman (1:37:29.580)
And then I started to realize that there
Lex Fridman (1:37:33.940)
were some properties of P code that
James Gosling (1:37:36.060)
made that really easy, some properties that
Lex Fridman (1:37:39.500)
made it really hard.
Lex Fridman (1:37:40.820)
So I ended up writing this thing that
Lex Fridman (1:37:42.940)
translated from P code on the Three Rivers PERCs
James Gosling (1:37:49.620)
into assembly code on the VAX.
Lex Fridman (1:37:53.820)
And I actually got higher quality code than the C compiler.
Lex Fridman (1:38:00.180)
And so everything just got really fast.
Lex Fridman (1:38:03.260)
It was really easy.
James Gosling (1:38:04.340)
It was like, wow, I thought that was a sleazy hack
Lex Fridman (1:38:08.660)
because I was lazy.
Lex Fridman (1:38:10.660)
And in actual fact, it worked really well.
Lex Fridman (1:38:13.980)
And I tried to convince people that that was maybe
James Gosling (1:38:17.780)
a good thesis topic.
Lex Fridman (1:38:18.780)
And nobody was, it was like, nah.
Lex Fridman (1:38:23.460)
Really?
Lex Fridman (1:38:23.980)
That's, I mean, it's kind of a brilliant idea, right?
James Gosling (1:38:29.580)
Or maybe you didn't have the, you
Lex Fridman (1:38:31.820)
weren't able to articulate the big picture of it.
James Gosling (1:38:34.460)
Yeah.
Lex Fridman (1:38:34.980)
And I think that was a key part.
Lex Fridman (1:38:39.940)
But so then clock comes forward a few years.
Lex Fridman (1:38:44.100)
And it's like, we've got to be able to,
James Gosling (1:38:48.980)
if they want to be able to switch
Lex Fridman (1:38:50.500)
from this weird microprocessor to that weird and totally
Lex Fridman (1:38:55.300)
different microprocessor, how do you do that?
Lex Fridman (1:38:58.460)
And I kind of went, oh, maybe by doing something kind of
James Gosling (1:39:04.540)
in the space of Pascal P code, I could do multiple translations
Lex Fridman (1:39:12.260)
to multiple translators.
Lex Fridman (1:39:15.460)
And I spent some time thinking about that
Lex Fridman (1:39:17.260)
and thinking about what worked and what didn't work
James Gosling (1:39:19.780)
when I did the P code to Vax translator.
Lex Fridman (1:39:25.620)
And I talked to some of the folks
James Gosling (1:39:29.460)
who were involved in Smalltalk because Smalltalk also
Lex Fridman (1:39:31.980)
did a bytecode.
Lex Fridman (1:39:34.780)
And then I kind of went, yeah, I want to do that.
Lex Fridman (1:39:41.300)
Because that actually, and it had the other advantage
James Gosling (1:39:44.940)
that you could either interpret it or compile it.
Lex Fridman (1:39:49.900)
And interpreters are usually easier to do,
Lex Fridman (1:39:55.940)
but not as fast as a compiler.
Lex Fridman (1:40:00.060)
So I figured, good, I can be lazy again.
James Gosling (1:40:06.820)
Sometimes I think that most of my good ideas
Lex Fridman (1:40:08.940)
are driven by laziness.
Lex Fridman (1:40:12.340)
And often I find that some of people's stupidest ideas
Lex Fridman (1:40:15.860)
are because they're insufficiently lazy.
James Gosling (1:40:21.660)
They just want to build something really complicated.
Lex Fridman (1:40:23.900)
And it's like, it doesn't need to be that complicated.
James Gosling (1:40:26.740)
Yeah, and so that's how that came out.
Lex Fridman (1:40:30.380)
But that also turned into almost a religious position
James Gosling (1:40:39.140)
on my part, which got me in several other fights.
Lex Fridman (1:40:44.300)
So one of the things that was a real difference
James Gosling (1:40:49.020)
was the way that arithmetic worked.
Lex Fridman (1:40:51.020)
And once upon a time, it wasn't always just
James Gosling (1:40:59.620)
two's complement arithmetic.
Lex Fridman (1:41:01.540)
There were some machines that had one's complement
James Gosling (1:41:03.580)
arithmetic, which was like almost anything built by CDC.
Lex Fridman (1:41:08.820)
And occasionally, there were machines
James Gosling (1:41:10.660)
that were decimal arithmetic.
Lex Fridman (1:41:13.100)
And I was like, this is crazy.
James Gosling (1:41:17.860)
Pretty much two's complement integer arithmetic has one.
Lex Fridman (1:41:22.580)
So just do that.
James Gosling (1:41:28.180)
One of the other places where there was a lot of variability
Lex Fridman (1:41:31.180)
was in the way that floating point behaved.
Lex Fridman (1:41:36.180)
And that was causing people throughout the software
Lex Fridman (1:41:40.780)
industry much pain because you couldn't
James Gosling (1:41:44.500)
do a numerical computing library that
Lex Fridman (1:41:47.380)
would work on CDC and then have it work on an IBM machine
Lex Fridman (1:41:50.860)
and work on a DEC machine.
Lex Fridman (1:41:54.700)
And as a part of that whole struggle,
James Gosling (1:41:57.700)
there had been this big body of work on floating point
Lex Fridman (1:42:03.900)
standards.
Lex Fridman (1:42:05.300)
And this thing emerged that came to be called IEEE 754,
Lex Fridman (1:42:11.660)
which is the floating point standard that pretty much
James Gosling (1:42:14.580)
has taken over the entire universe.
Lex Fridman (1:42:20.060)
And at the time I was doing Java,
James Gosling (1:42:21.860)
it had pretty much completed taking over the universe.
Lex Fridman (1:42:25.740)
There were still a few pockets of holdouts,
Lex Fridman (1:42:28.180)
but I was like, it's important to be
Lex Fridman (1:42:32.100)
able to say what two plus two means.
Lex Fridman (1:42:37.500)
And so I went that.
Lex Fridman (1:42:42.380)
And one of the ways that I got into fights with people
James Gosling (1:42:46.180)
was that there were a few machines that did not
Lex Fridman (1:42:50.380)
implement IEEE 754 correctly.
James Gosling (1:42:55.300)
Well, of course, that's all short term kind of fights.
Lex Fridman (1:42:58.500)
I think in the long term, I think this vision is one out.
James Gosling (1:43:03.020)
Yeah, and I think it's worked out over time.
Lex Fridman (1:43:06.180)
I mean, the biggest fights were with Intel
James Gosling (1:43:10.700)
because they had done some strange things with rounding.
Lex Fridman (1:43:15.380)
They'd done some strange things with their transcendental
James Gosling (1:43:17.980)
functions, which turned into a mushroom cloud of weirdness.
Lex Fridman (1:43:24.860)
And in the name of optimization, but from the perspective
James Gosling (1:43:29.100)
of the developer, that's not good.
Lex Fridman (1:43:32.500)
Well, their issues with transcendental functions
James Gosling (1:43:34.580)
were just stupid.
Lex Fridman (1:43:35.740)
OK, so that's not even a trade off.
James Gosling (1:43:39.340)
That's just absolutely.
Lex Fridman (1:43:40.740)
Yeah, they were doing range reduction for sine and cosine
James Gosling (1:43:45.620)
using a slightly wrong value for pi.
Lex Fridman (1:43:48.500)
Got it.
James Gosling (1:43:49.580)
We've got 10 minutes.
Lex Fridman (1:43:50.580)
So in the interest of time, two questions.
Lex Fridman (1:43:53.460)
So one about Android and one about life.
Lex Fridman (1:43:58.100)
So one, I mean, we could talk for many more hours.
James Gosling (1:44:02.300)
I hope eventually we might talk again.
Lex Fridman (1:44:05.140)
But I got to ask you about Android and the use of Java
James Gosling (1:44:09.220)
there because it's one of the many places where Java just
Lex Fridman (1:44:14.220)
has a huge impact on this world.
James Gosling (1:44:16.380)
Just on your opinion, is there things
Lex Fridman (1:44:19.780)
that make you happy about the way Java
Lex Fridman (1:44:24.300)
is used in the Android world?
Lex Fridman (1:44:25.860)
And are there things that you wish were different?
James Gosling (1:44:29.580)
I don't know how to do a short answer to that.
Lex Fridman (1:44:32.660)
But I have to do a short answer to that.
Lex Fridman (1:44:34.500)
So I'm happy that they did it.
Lex Fridman (1:44:38.980)
Java had been running on cell phones
James Gosling (1:44:40.940)
at that time for quite a few years.
Lex Fridman (1:44:42.540)
And it worked really, really well.
James Gosling (1:44:46.020)
There were things about how they did it.
Lex Fridman (1:44:49.260)
And in particular, various ways that they kind of violated
James Gosling (1:44:59.420)
all kinds of contracts.
Lex Fridman (1:45:00.540)
The guy who led it, Andy Rubin, he crossed a lot of lines.
James Gosling (1:45:06.380)
There's some lines crossed.
Lex Fridman (1:45:07.700)
Yeah, lines were crossed that have since mushroomed
James Gosling (1:45:11.820)
into giant court cases.
Lex Fridman (1:45:16.620)
And they didn't need to do that.
Lex Fridman (1:45:19.740)
And in fact, it would have been so much cheaper for them
Lex Fridman (1:45:23.220)
to not cross lines.
James Gosling (1:45:25.260)
I mean, I suppose they didn't anticipate
Lex Fridman (1:45:28.260)
the success of this whole endeavor.
James Gosling (1:45:34.540)
Or do you think at that time it was already clear
Lex Fridman (1:45:36.500)
that this is going to blow up?
James Gosling (1:45:38.820)
I guess I sort of came to believe
Lex Fridman (1:45:41.900)
that it didn't matter what Andy did,
James Gosling (1:45:44.420)
it was going to blow up.
Lex Fridman (1:45:50.500)
I kind of started to think of him as a manufacturer of bombs.
James Gosling (1:45:58.380)
Yeah, some of the best things in this world
Lex Fridman (1:46:01.500)
come about through a little bit of explosive.
James Gosling (1:46:05.820)
Well, and some of the worst.
Lex Fridman (1:46:07.180)
And some of the worst, beautifully put.
Lex Fridman (1:46:11.420)
And like you said, I mean, does that
Lex Fridman (1:46:13.260)
make you proud that Java is in millions?
James Gosling (1:46:19.140)
I mean, it could be billions of devices.
Lex Fridman (1:46:21.660)
Yeah, well, I mean, it was in billions of phones
James Gosling (1:46:24.940)
before Android came along.
Lex Fridman (1:46:26.300)
And I'm just as proud of the way that the smart card standards
James Gosling (1:46:37.380)
adopted Java.
Lex Fridman (1:46:39.020)
And everybody involved in that did a really good job.
Lex Fridman (1:46:43.100)
And that's billions and billions.
Lex Fridman (1:46:48.300)
That's crazy.
James Gosling (1:46:49.300)
The SIM cards, the SIM cards in your pocket.
Lex Fridman (1:46:54.220)
I've been outside of that world for a decade.
Lex Fridman (1:46:56.860)
So I don't know how that has evolved.
Lex Fridman (1:46:59.980)
But it's just been crazy.
Lex Fridman (1:47:04.340)
So on that topic, let me ask, again,
Lex Fridman (1:47:07.940)
there's a million technical things we could talk about.
Lex Fridman (1:47:12.260)
But let me ask the absurd, the old philosophical question
Lex Fridman (1:47:16.620)
about life.
Lex Fridman (1:47:20.060)
What do you hope when you look back at your life
Lex Fridman (1:47:23.060)
and the people talk about you, write about you 500 years
Lex Fridman (1:47:28.140)
from now, what do you hope your legacy is?
Lex Fridman (1:47:34.460)
People not being afraid to take a leap of faith.
James Gosling (1:47:39.820)
I mean, I've got this kind of weird history
Lex Fridman (1:47:44.340)
of doing weird stuff.
Lex Fridman (1:47:45.580)
And it worked out pretty damn well.
Lex Fridman (1:47:49.220)
It worked out.
Lex Fridman (1:47:50.820)
And I think some of the weirder stuff that I've done
Lex Fridman (1:47:55.820)
has been the coolest.
Lex Fridman (1:47:56.940)
And some of it crashed and burned.
Lex Fridman (1:47:59.940)
And I think well over half of the stuff that I've done
James Gosling (1:48:05.860)
has crashed and burned, which has occasionally
Lex Fridman (1:48:09.540)
been really annoying.
Lex Fridman (1:48:12.060)
But still, you kept doing it.
Lex Fridman (1:48:13.580)
But yeah.
James Gosling (1:48:15.060)
Yeah.
Lex Fridman (1:48:15.540)
Yeah.
Lex Fridman (1:48:16.020)
And even when things crash and burn,
Lex Fridman (1:48:19.340)
you at least learn something from it.
James Gosling (1:48:22.340)
By way of advice, people, developers, engineers,
Lex Fridman (1:48:27.180)
scientists, or just people who are young, to look up to you,
Lex Fridman (1:48:32.100)
what advice would you give them how to approach their life?
Lex Fridman (1:48:37.660)
Don't be afraid of risk.
James Gosling (1:48:39.620)
It's OK to do stupid things once.
Lex Fridman (1:48:41.900)
Maybe a couple of times you get a pass on the first time
James Gosling (1:48:50.580)
or two that you do something stupid.
Lex Fridman (1:48:53.260)
The third or fourth time, yeah, not so much.
Lex Fridman (1:48:59.660)
But also, I don't know why, but really early on,
Lex Fridman (1:49:07.420)
I started to think about ethical choices in my life.
Lex Fridman (1:49:14.220)
And because I'm a big science fiction fan,
Lex Fridman (1:49:20.220)
I got to thinking about just about every technical decision
James Gosling (1:49:25.700)
I make in terms of, are you building
Lex Fridman (1:49:30.340)
Blade Runner or Star Trek?
Lex Fridman (1:49:33.700)
Which one's better?
Lex Fridman (1:49:34.540)
Which future would you rather live in?
Lex Fridman (1:49:38.820)
So what's the answer to that?
Lex Fridman (1:49:40.380)
Well, I would sure rather live in the universe of Star Trek.
James Gosling (1:49:44.500)
Star Trek, yeah.
Lex Fridman (1:49:46.100)
That opens up a whole topic about AI,
Lex Fridman (1:49:48.180)
but that's a really interesting idea.
Lex Fridman (1:49:53.140)
So your favorite AI system would be data from Star Trek.
Lex Fridman (1:49:58.140)
And my least favorite would easily be Skynet.
Lex Fridman (1:50:00.700)
Yeah.
James Gosling (1:50:02.340)
Beautifully put.
Lex Fridman (1:50:03.060)
I don't think there's a better way to end it, James.
James Gosling (1:50:05.700)
I can't say enough how much of an honor
Lex Fridman (1:50:08.100)
it is to meet you, to talk to you.
James Gosling (1:50:09.540)
Thanks so much for wasting your time with me today.
Lex Fridman (1:50:12.620)
Not a waste at all.
James Gosling (1:50:13.940)
Thanks, James.
Lex Fridman (1:50:14.660)
All right, thanks.
James Gosling (1:50:16.580)
Thanks for listening to this conversation with James
Lex Fridman (1:50:18.940)
Gosling, and thank you to our sponsors, Public Goods,
James Gosling (1:50:21.780)
BetterHelp, and ExpressVPN.
Lex Fridman (1:50:24.300)
Please check out these sponsors in the description
James Gosling (1:50:26.580)
to get a discount and to support this podcast.
Lex Fridman (1:50:30.460)
If you enjoy this thing, subscribe on YouTube,
James Gosling (1:50:32.780)
review it with five stars on Apple Podcast,
Lex Fridman (1:50:34.940)
follow on Spotify, support on Patreon,
James Gosling (1:50:37.660)
or connect with me on Twitter at Lex Friedman.
Lex Fridman (1:50:40.780)
And now, let me leave you with some words from James Gosling.
James Gosling (1:50:44.460)
One of the toughest things about life is making choices.
Lex Fridman (1:50:49.540)
Thank you for listening, and hope to see you next time.
Lex Fridman (20:00.140)
But getting a power supply that would do that voltage
Lex Fridman (20:04.540)
was pretty hard.
Lex Fridman (20:06.260)
And since I had a bunch of trashed television sets,
Lex Fridman (20:10.180)
I had to sort of cobble together something
James Gosling (20:16.140)
that was wrong but worked.
Lex Fridman (20:21.380)
So I was actually running these relays at 300 volts.
Lex Fridman (20:26.740)
And none of the electrical connections
Lex Fridman (20:30.460)
were like properly sealed off.
James Gosling (20:33.460)
Surprised you survived that period of your life.
Lex Fridman (20:36.380)
Oh, for so many reasons.
James Gosling (20:38.940)
For so many reasons.
Lex Fridman (20:40.420)
I mean, it's pretty common for teenage geeks
James Gosling (20:45.380)
to discover, oh, thermite.
Lex Fridman (20:47.380)
That's real easy to make.
James Gosling (20:50.460)
Yeah.
Lex Fridman (20:51.220)
Well, I'm glad you did.
Lex Fridman (20:52.740)
But do you remember what program in Calgary
Lex Fridman (20:58.820)
that you wrote, anything that stands out?
Lex Fridman (21:01.820)
And what language?
Lex Fridman (21:03.700)
Well, so mostly anything of any size was assembly code.
Lex Fridman (21:14.780)
And actually, before I learned assembly code,
Lex Fridman (21:17.420)
there was this programming language
James Gosling (21:19.100)
on the PDP 8 called Focal 5.
Lex Fridman (21:22.660)
And Focal 5 was kind of like a really stripped down Fortran.
Lex Fridman (21:28.540)
And I remember building programs that did things
Lex Fridman (21:33.580)
like play blackjack or solitaire.
James Gosling (21:40.940)
Or for some reason or other, the things that I really liked
Lex Fridman (21:45.180)
were ones where they were just like plotting graphs.
Lex Fridman (21:50.300)
So something with like a function or data,
Lex Fridman (21:53.940)
and then you plot it.
James Gosling (21:55.420)
Yeah.
Lex Fridman (21:56.900)
Yeah, I did a bunches of those things
Lex Fridman (21:59.300)
and went, ooh, pretty pictures.
Lex Fridman (22:03.100)
And so this would like print out, again, no monitors.
James Gosling (22:07.340)
Right, so it was like on a teletype.
Lex Fridman (22:11.820)
Yeah.
Lex Fridman (22:13.260)
So it's using something that's kind of like a typewriter.
Lex Fridman (22:18.620)
And then using those to plot functions.
Lex Fridman (22:23.140)
So when, I apologize to romanticize things,
Lex Fridman (22:26.100)
but when did you first fall in love with programming?
Lex Fridman (22:32.300)
What was the first programming language?
Lex Fridman (22:34.180)
Like as a serious, maybe, software engineer,
Lex Fridman (22:36.220)
where you thought this is a beautiful thing?
Lex Fridman (22:40.460)
I guess I never really thought of any particular language
James Gosling (22:43.300)
as being beautiful, because it was never really
Lex Fridman (22:46.620)
about the language for me.
James Gosling (22:47.820)
It was about what you could do with it.
Lex Fridman (22:49.540)
And even today, people try to get me
James Gosling (22:55.660)
into arguments about particular forms of syntax
Lex Fridman (22:59.740)
for this or that.
Lex Fridman (23:00.460)
And I'm like, who cares?
Lex Fridman (23:03.380)
It's about what you can do, not how you spell the word.
Lex Fridman (23:10.340)
And so back in those days, I learned like PL1 and Fortran
Lex Fridman (23:16.660)
and COBOL, and by the time that people were willing to hire me
James Gosling (23:23.260)
to do stuff, it was mostly assembly code and PDP assembly
Lex Fridman (23:29.500)
code and Fortran code and control data assembly
James Gosling (23:35.820)
code for the CDC 6400, which was an early, I guess,
Lex Fridman (23:40.620)
supercomputer.
James Gosling (23:43.100)
Even though that supercomputer has less compute power
Lex Fridman (23:46.340)
than my phone by a lot.
Lex Fridman (23:50.540)
And that was mostly, like you said, Fortran world.
Lex Fridman (23:54.820)
That said, you've also showed appreciation
James Gosling (23:57.380)
for the greatest language ever that I
Lex Fridman (24:01.580)
think everyone agrees is Lisp.
James Gosling (24:05.020)
Well, Lisp is definitely on my list of the greatest ones
Lex Fridman (24:09.100)
that have existed.
Lex Fridman (24:11.700)
Is it at number one?
Lex Fridman (24:12.740)
Or I mean, are you, I mean?
James Gosling (24:16.140)
You know, the thing is that it's, you know,
Lex Fridman (24:21.060)
I wouldn't put it number one, no.
Lex Fridman (24:23.380)
Is it the parentheses?
Lex Fridman (24:24.620)
What do you not love about Lisp?
James Gosling (24:34.180)
Well, I guess the number one thing
Lex Fridman (24:35.780)
to not love about it is so freaking many parentheses.
James Gosling (24:41.020)
On the love thing is, you know, out of those tons
Lex Fridman (24:46.460)
of parentheses, you actually get an interesting language
James Gosling (24:50.180)
structure.
Lex Fridman (24:51.820)
And I've always thought that there was a friendlier version
James Gosling (24:54.300)
of Lisp hiding out there somewhere.
Lex Fridman (24:57.940)
But I've never really spent much time thinking about it.
James Gosling (25:03.140)
But, you know, so like up the food chain for me from Lisp
Lex Fridman (25:10.460)
is Simula, which a very small number of people
James Gosling (25:14.420)
have ever used.
Lex Fridman (25:16.140)
But a lot of people, I think you had a huge influence, right,
James Gosling (25:19.460)
on the programming.
Lex Fridman (25:20.620)
But in the Simula, I apologize if I'm wrong on this,
Lex Fridman (25:24.900)
but is that one of the first functional languages?
Lex Fridman (25:27.780)
Or no?
James Gosling (25:28.300)
No, it was the first object oriented programming language.
Lex Fridman (25:32.780)
It's really where object oriented and languages sort
James Gosling (25:36.540)
of came together.
Lex Fridman (25:39.700)
And it was also the language where coroutines first showed
James Gosling (25:46.060)
up as a part of the language.
Lex Fridman (25:48.620)
So you could have a programming style that was,
James Gosling (25:53.900)
you could think of it as sort of multi threaded
Lex Fridman (25:57.740)
with a lot of parallelism.
Lex Fridman (26:00.900)
Really?
Lex Fridman (26:01.620)
There's ideas of parallelism in there?
James Gosling (26:03.580)
Yeah.
Lex Fridman (26:05.340)
Yeah, so that was back, you know,
Lex Fridman (26:08.220)
so the first Simula spec was Simula 67.
Lex Fridman (26:12.780)
Like 1967?
James Gosling (26:14.740)
Yeah.
Lex Fridman (26:15.780)
Wow.
Lex Fridman (26:16.420)
So it had coroutines, which are almost threads.
Lex Fridman (26:21.980)
The thing about coroutines is that they
James Gosling (26:24.180)
don't have true concurrency.
Lex Fridman (26:26.220)
So you can get away without really complex locking.
James Gosling (26:32.220)
You can't useably do coroutines on the multi core machine.
Lex Fridman (26:39.780)
Or if you try to do coroutines on the multi core machine,
James Gosling (26:44.100)
you don't actually get to use the multiple cores.
Lex Fridman (26:48.460)
Either that or you, because you start then
James Gosling (26:52.340)
having to get into the universe of semaphores and locks
Lex Fridman (26:56.940)
and things like that.
Lex Fridman (27:00.060)
But in terms of the style of programming,
Lex Fridman (27:04.700)
you could write code and think of it as being multi threaded.
James Gosling (27:11.460)
The mental model was very much a multi threaded one.
Lex Fridman (27:15.860)
And all kinds of problems you could
James Gosling (27:18.820)
approach very differently.
Lex Fridman (27:22.420)
To return to the world of Lisp for a brief moment,
James Gosling (27:27.940)
at CMU you wrote a version of Emacs
Lex Fridman (27:32.940)
that I think was very impactful on the history of Emacs.
Lex Fridman (27:37.660)
What was your motivation for doing so?
Lex Fridman (27:42.220)
At that time, so that was in like 85 or 86.
James Gosling (27:52.820)
I had been using Unix for a few years.
Lex Fridman (27:57.500)
And most of the editing was this tool
James Gosling (28:02.580)
called ED, which was sort of an ancestor of VI.
Lex Fridman (28:10.940)
Is it a pretty good editor, not a good editor?
James Gosling (28:14.060)
Well, if what you're using, if your input device
Lex Fridman (28:19.220)
is a teletype, it's pretty good.
James Gosling (28:22.620)
It's certainly more humane than TECO,
Lex Fridman (28:25.740)
which was kind of the common thing
James Gosling (28:28.180)
in a lot of the DEC universe at the time.
Lex Fridman (28:32.580)
TECO is spelled TK, is that the?
James Gosling (28:35.060)
No, TECO, T E C O, the text editor and corrector.
Lex Fridman (28:39.620)
Corrector, wow, so many features.
Lex Fridman (28:44.100)
And the original Emacs came out as,
Lex Fridman (28:48.740)
so Emacs stands for editor macros.
Lex Fridman (28:52.060)
And TECO had a way of writing macros.
Lex Fridman (28:56.500)
And so the original Emacs from MIT
James Gosling (29:02.780)
started out as a collection of macros for TECO.
Lex Fridman (29:07.060)
But then the Emacs style got popular originally at MIT.
Lex Fridman (29:15.060)
And then people did a few other implementations
Lex Fridman (29:20.300)
of Emacs that were, the code base was entirely different,
Lex Fridman (29:26.180)
but it was sort of the philosophical style
Lex Fridman (29:28.780)
of the original Emacs.
Lex Fridman (29:30.700)
What was the philosophy of Emacs?
Lex Fridman (29:33.260)
And by the way, were all the implementations always in C?
Lex Fridman (29:36.580)
And then how does Lisp fit into the picture?
Lex Fridman (29:39.700)
No, so the very first Emacs was written
James Gosling (29:43.300)
as a bunch of macros for the TECO text editor.
Lex Fridman (29:46.420)
Wow, that's so interesting.
Lex Fridman (29:47.780)
And the macro language for TECO was probably
Lex Fridman (29:54.220)
the most ridiculously obscure format.
James Gosling (29:59.100)
If you just look at a TECO program on a page,
Lex Fridman (30:02.420)
you think it was just random characters.
James Gosling (30:05.900)
It really looks like just line noise.
Lex Fridman (30:09.580)
So it's kind of like LaTeX or something.
James Gosling (30:11.380)
Oh, way worse than LaTeX.
Lex Fridman (30:14.860)
Way, way worse than LaTeX.
Lex Fridman (30:18.100)
But if you use TECO a lot, which I did,
Lex Fridman (30:23.700)
TECO was completely optimized for touch typing at high speed.
Lex Fridman (30:31.180)
So there were no two character commands.
Lex Fridman (30:35.300)
Well, there were a few, but mostly they
James Gosling (30:37.980)
were just one character.
Lex Fridman (30:39.220)
So every character on the keyboard was a separate command.
Lex Fridman (30:43.780)
And actually, every character on the keyboard
Lex Fridman (30:45.860)
was usually two or three commands
James Gosling (30:48.180)
because you could hit Shift and Control and all
Lex Fridman (30:51.900)
of those things.
James Gosling (30:52.700)
It's just a way of very tightly encoding it.
Lex Fridman (30:56.420)
And mostly what Emacs did was it made that visual.
Lex Fridman (31:03.660)
So one way to think of TECO is use Emacs with your eyes
Lex Fridman (31:10.140)
closed, where you have to maintain
James Gosling (31:15.500)
a mental model of a mental image of your document.
Lex Fridman (31:20.660)
You have to go, OK, so the cursor is between the A and the E.
Lex Fridman (31:27.780)
And I want to exchange those, so I do these things.
Lex Fridman (31:31.860)
So it is almost exactly the Emacs command set.
James Gosling (31:38.780)
Well, it's roughly the same as Emacs command set,
Lex Fridman (31:42.820)
but using Emacs with your eyes closed.
Lex Fridman (31:47.780)
So part of what Emacs added to the whole thing
Lex Fridman (31:52.940)
was being able to visually see what
James Gosling (31:56.700)
you were editing in a form that matched your document.
Lex Fridman (32:02.180)
And a lot of things changed in the command set because it
James Gosling (32:12.420)
was programmable.
Lex Fridman (32:13.820)
It was really flexible.
James Gosling (32:15.980)
You could add new commands for all kinds of things.
Lex Fridman (32:18.500)
And then people rewrote Emacs multiple times in Lisp.
James Gosling (32:24.700)
There was one done at MIT for the Lisp machine.
Lex Fridman (32:28.180)
There was one done for Multics.
Lex Fridman (32:31.420)
And one summer, I got a summer job
Lex Fridman (32:35.100)
to work on the Pascal compiler for Multics.
Lex Fridman (32:40.220)
And that was actually the first time I used Emacs.
Lex Fridman (32:47.540)
To write the compilers.
James Gosling (32:48.900)
You've worked on compilers, too.
Lex Fridman (32:50.460)
That's fascinating.
James Gosling (32:52.180)
Yeah, so I did a lot of work.
Lex Fridman (32:55.940)
I spent a really intense three months
James Gosling (32:59.580)
working on this Pascal compiler, basically living in Emacs.
Lex Fridman (33:05.300)
And it was the one written in Mac Lisp by Bernie Greenberg.
Lex Fridman (33:11.260)
And I thought, wow, this is just a way better way
Lex Fridman (33:15.420)
to do editing.
Lex Fridman (33:19.060)
And then I got back to CMU, where
Lex Fridman (33:22.980)
we had one of everything and two of a bunch of things
Lex Fridman (33:28.700)
and four of a few things.
Lex Fridman (33:30.460)
And since I mostly worked in the Unix universe,
Lex Fridman (33:36.140)
and Unix didn't have an Emacs, I decided
Lex Fridman (33:39.340)
that I needed to fix that problem.
Lex Fridman (33:43.420)
So I wrote this implementation of Emacs in C,
Lex Fridman (33:47.620)
because at the time, C was really the only language that
James Gosling (33:51.140)
worked on Unix.
Lex Fridman (33:55.820)
And you were comfortable with C as well at that point?
James Gosling (33:58.660)
Yeah, at that time, I had done a lot of C coding.
Lex Fridman (34:02.380)
This was in, like, 86.
Lex Fridman (34:06.820)
And it was running well enough for me
Lex Fridman (34:14.100)
to use it to edit itself within a month or two.
Lex Fridman (34:17.380)
And then it kind of took over the university.
Lex Fridman (34:23.580)
And it spread outside.
James Gosling (34:25.380)
Yeah, and then it went outside.
Lex Fridman (34:28.100)
And largely because Unix kind of took over the research
James Gosling (34:33.060)
community on the ARPANET, and Emacs
Lex Fridman (34:39.700)
was kind of the best editor out there.
James Gosling (34:43.220)
It kind of took over.
Lex Fridman (34:44.300)
And there was actually a brief period
James Gosling (34:47.940)
where I actually had login IDs on every nonmilitary host
Lex Fridman (34:55.300)
on the ARPANET.
Lex Fridman (34:59.140)
Because people would say, oh, can we install this?
Lex Fridman (35:01.420)
And I'd like, well, yeah, but you'll need some help.
James Gosling (35:09.700)
The days when security wasn't.
Lex Fridman (35:11.860)
When nobody cared.
James Gosling (35:12.820)
Nobody cared.
Lex Fridman (35:15.500)
I can ask briefly, what were those early days of ARPANET
Lex Fridman (35:20.180)
and the internet like?
Lex Fridman (35:25.780)
Did you, again, sorry for the silly question,
Lex Fridman (35:28.820)
but could you have possibly imagined
Lex Fridman (35:31.940)
that the internet would look like what it is today?
James Gosling (35:36.940)
Some of it is remarkably unchanged.
Lex Fridman (35:42.420)
So one of the things that I noticed really early on
James Gosling (35:49.420)
when I was at Carnegie Mellon was
Lex Fridman (35:51.980)
that a lot of social life became centered around the ARPANET.
Lex Fridman (36:00.740)
So things like between email and text messaging.
Lex Fridman (36:06.380)
Because text messaging was a part of the ARPANET
James Gosling (36:09.620)
really early on.
Lex Fridman (36:11.660)
There were no cell phones, but you're sitting at a terminal
Lex Fridman (36:15.100)
and you're typing stuff.
Lex Fridman (36:16.820)
So essentially email, or what is text messaging?
James Gosling (36:19.860)
Well, just like a one line message.
Lex Fridman (36:23.740)
Oh, cool.
Lex Fridman (36:24.260)
So like chat.
Lex Fridman (36:25.540)
Like chat.
Lex Fridman (36:27.660)
So it's like sending a one line message to somebody.
Lex Fridman (36:31.820)
And so pretty much everything from arranging lunch
James Gosling (36:40.020)
to going out on dates was all like driven by social media.
Lex Fridman (36:48.100)
Social media.
James Gosling (36:49.700)
Right, in the 80s.
Lex Fridman (36:52.860)
Easier than phone calls, yeah.
Lex Fridman (36:55.420)
And my life had gotten to where I
Lex Fridman (37:00.660)
was living on social media from the early mid 80s.
Lex Fridman (37:11.180)
And so when it sort of transformed into the internet
Lex Fridman (37:16.620)
and social media explodes, I was kind of like,
Lex Fridman (37:19.820)
what's the big deal?
Lex Fridman (37:21.900)
It's just a scale thing.
James Gosling (37:24.140)
Right, the scale thing is just astonishing.
Lex Fridman (37:29.060)
But the fundamentals in some ways remain the same.
James Gosling (37:32.380)
The fundamentals have hardly changed.
Lex Fridman (37:36.020)
And the technologies behind the networking
James Gosling (37:40.860)
have changed significantly.
Lex Fridman (37:42.460)
The watershed moment of going from the ARPANET
James Gosling (37:49.460)
to the internet.
Lex Fridman (37:52.580)
And then people starting to just scale and scale and scale.
James Gosling (37:57.300)
I mean, the scaling that happened in the early 90s
Lex Fridman (38:03.660)
and the way that so many vested interests fought the internet.
James Gosling (38:12.620)
Oh, interesting.
Lex Fridman (38:14.220)
What was the, oh, because you can't really
James Gosling (38:16.380)
control the internet.
Lex Fridman (38:17.980)
Yeah, so who fought the internet?
Lex Fridman (38:19.900)
So fundamentally, the cable TV companies
Lex Fridman (38:25.900)
and broadcasters and phone companies,
James Gosling (38:32.940)
at the deepest fibers of their being, they hated the internet.
Lex Fridman (38:38.300)
But it was often kind of a funny thing because, so think
James Gosling (38:50.580)
of a cable company.
Lex Fridman (38:53.900)
Most of the employees of a cable company,
James Gosling (38:57.220)
their job is getting TV shows, movies, whatever,
Lex Fridman (39:04.460)
out to their customers.
James Gosling (39:06.980)
They view their business as serving their customers.
Lex Fridman (39:13.940)
But as you climb up the hierarchy in the cable companies,
James Gosling (39:20.780)
that view shifts because really the business of the cable
Lex Fridman (39:29.780)
companies had always been selling eyeballs
James Gosling (39:34.460)
to advertisers.
Lex Fridman (39:36.580)
Right.
Lex Fridman (39:39.820)
And that view of a cable company
Lex Fridman (39:45.580)
didn't really dawn on most people who
James Gosling (39:49.060)
worked at the cable companies.
Lex Fridman (39:50.900)
But I had various dust ups with various cable companies
James Gosling (39:57.340)
where you could see in the stratified layers
Lex Fridman (40:00.220)
of the corporation that this view of the reason
James Gosling (40:06.260)
that you have cable TV is to capture eyeballs.
Lex Fridman (40:13.140)
So they didn't see it that way.
James Gosling (40:15.060)
Well, so most of the people who worked at the phone company
Lex Fridman (40:19.820)
or at the cable companies, their view
James Gosling (40:22.460)
was that their job was getting delightful content out
Lex Fridman (40:28.340)
to their customers.
Lex Fridman (40:29.540)
And their customers would pay for that.
Lex Fridman (40:33.140)
Higher up, they viewed this as a way of attracting eyeballs
James Gosling (40:40.100)
to them.
Lex Fridman (40:41.940)
And then what they were really doing
James Gosling (40:45.620)
was selling the eyeballs that were glued to their content
Lex Fridman (40:51.580)
to the advertisers.
James Gosling (40:52.380)
To the advertisers, yeah.
Lex Fridman (40:54.420)
And so the internet was a competition in that sense.
James Gosling (40:57.260)
Right.
Lex Fridman (40:58.980)
They were right.
James Gosling (41:00.300)
Well, yeah.
Lex Fridman (41:02.620)
I mean, there was one proposal that we sent,
James Gosling (41:08.620)
one detailed proposal that we wrote up back
Lex Fridman (41:14.460)
at Sun in the early 90s that was essentially like, look,
James Gosling (41:19.700)
anybody with internet technologies,
Lex Fridman (41:22.260)
anybody can become provider of content.
Lex Fridman (41:27.100)
So you could be distributing home movies
Lex Fridman (41:32.740)
to your parents or your cousins or who are anywhere else.
Lex Fridman (41:39.420)
So anybody can become a publisher.
Lex Fridman (41:41.380)
Wow, you were thinking about that already.
James Gosling (41:43.300)
Netflix, Netflix, YouTube.
Lex Fridman (41:45.660)
Yeah, that was like in the early 90s.
Lex Fridman (41:49.780)
And we thought, this would be great.
Lex Fridman (41:54.060)
And the kind of content we were thinking about at the time
James Gosling (41:57.380)
was like home movies, kids essays,
Lex Fridman (42:05.100)
stuff from grocery stores or a restaurant
James Gosling (42:12.380)
that they could actually start sending information about.
Lex Fridman (42:20.340)
That's brilliant.
Lex Fridman (42:21.220)
And the reaction of the cable companies
Lex Fridman (42:25.060)
was like, fuck no.
James Gosling (42:29.940)
Because then we're out of business.
Lex Fridman (42:34.940)
What is it about companies that, because they could have just,
James Gosling (42:38.420)
they could have been ahead of that wave.
Lex Fridman (42:40.060)
They could have listened to that.
Lex Fridman (42:41.780)
And they could have.
Lex Fridman (42:42.660)
They didn't see a path to revenue.
James Gosling (42:46.940)
Somewhere in there, there's a lesson for big companies,
Lex Fridman (42:50.420)
like to listen, to try to anticipate the renegade,
James Gosling (42:56.060)
the out there, out of the box, people like yourself
Lex Fridman (42:59.420)
in the early days writing proposals
James Gosling (43:01.460)
about what this could possibly be.
Lex Fridman (43:03.780)
Well, and that wasn't.
James Gosling (43:06.940)
If you're in a position where you're
Lex Fridman (43:09.020)
making truckloads of money off of a particular business model,
James Gosling (43:19.780)
the whole thought of leaping the chasm,
Lex Fridman (43:28.060)
you can see, oh, new models that are more effective
James Gosling (43:33.060)
are emerging, so like digital cameras versus film cameras.
Lex Fridman (43:44.060)
Why take the leap?
Lex Fridman (43:45.820)
Why take the leap?
Lex Fridman (43:46.580)
Because you're making so much money off of film.
Lex Fridman (43:50.980)
And in my past at Sun, one of our big customers was Kodak.
Lex Fridman (43:59.500)
And I ended up interacting with folks from Kodak quite a lot.
Lex Fridman (44:03.220)
And they actually had a big digital camera research
Lex Fridman (44:09.940)
and digital imaging business, or development group.
Lex Fridman (44:15.860)
And they knew that you just look at the trend lines
Lex Fridman (44:24.340)
and you look at the emerging quality of these digital
James Gosling (44:32.340)
cameras.
Lex Fridman (44:33.900)
And you can just plot it on the graph.
Lex Fridman (44:37.940)
And it's like, sure, film is better today.
Lex Fridman (44:44.100)
But digital is improving like this.
James Gosling (44:51.340)
The lines are going to cross.
Lex Fridman (44:52.860)
And the point at which the lines cross
James Gosling (44:56.820)
is going to be a collapse in their business.
Lex Fridman (45:00.260)
And they could see that.
James Gosling (45:05.100)
They absolutely knew that.
Lex Fridman (45:07.740)
The problem is that up to the point where they hit the wall,
James Gosling (45:12.860)
they were making truckloads of money.
Lex Fridman (45:16.300)
And when they did the math, it never
James Gosling (45:24.300)
started to make sense for them to kind of lead the charge.
Lex Fridman (45:29.300)
And part of the issues for a lot of companies
James Gosling (45:32.460)
for this kind of stuff is that if you're
Lex Fridman (45:37.020)
going to leap over a chasm like that,
James Gosling (45:39.260)
like with Kodak going from film to digital,
Lex Fridman (45:45.820)
that's a transition that's going to take a while.
James Gosling (45:49.900)
We had fights like this with people over smart cards.
Lex Fridman (45:53.500)
The smart cards fights were just ludicrous.
Lex Fridman (45:57.820)
But that's where visionary leadership comes in, right?
Lex Fridman (46:00.180)
Somebody needs to roll in and say, then take the leap.
James Gosling (46:04.700)
Well, it's partly take the leap,
Lex Fridman (46:07.300)
but it's also partly take the hit.
James Gosling (46:09.500)
Take the hit in the short term.
Lex Fridman (46:12.540)
So you can draw the graphs you want that show that if we leap
James Gosling (46:17.380)
from here, on our present trajectory, we're doing this
Lex Fridman (46:21.540)
and there's a cliff.
James Gosling (46:22.940)
If we force ourselves into a transition
Lex Fridman (46:27.580)
and we proactively do that, we can be on the next wave.
Lex Fridman (46:33.660)
But there will be a period when we're in a trough.
Lex Fridman (46:39.020)
And pretty much always there ends up being a trough
James Gosling (46:43.940)
as you leap the chasm.
Lex Fridman (46:46.100)
But the way that public companies work on this planet,
James Gosling (46:52.620)
they're reporting every quarter.
Lex Fridman (46:55.700)
And the one thing that a CEO must never do is take a big hit.
James Gosling (47:02.700)
Take a big hit.
Lex Fridman (47:04.700)
Over some quarter.
Lex Fridman (47:06.180)
And many of these transitions involve a big hit
Lex Fridman (47:11.180)
for a period of time, one, two, three quarters.
Lex Fridman (47:17.340)
And so you get some companies and like Tesla and Amazon
Lex Fridman (47:26.060)
are really good examples of companies that take huge hits.
Lex Fridman (47:32.380)
But they have the luxury of being
Lex Fridman (47:34.140)
able to ignore the stock market for a little while.
Lex Fridman (47:38.060)
And that's not so true today, really.
Lex Fridman (47:42.100)
But in the early days of both of those companies,
James Gosling (47:50.580)
they both did this thing of, I don't care
Lex Fridman (47:56.220)
about the quarterly reports.
James Gosling (47:57.620)
I care about how many happy customers we have.
Lex Fridman (48:02.260)
And having as many happy customers as possible
James Gosling (48:05.900)
can often be an enemy of the bottom line.
Lex Fridman (48:11.340)
Yeah, so how do they make that work?
James Gosling (48:12.780)
I mean, Amazon operated in the negative for a long time.
Lex Fridman (48:15.460)
It's like investing into the future.
James Gosling (48:17.260)
Right.
Lex Fridman (48:18.060)
But so Amazon and Google and Tesla and Facebook, a lot
James Gosling (48:23.900)
of those had what amounted to patient money,
Lex Fridman (48:30.340)
often because there's like a charismatic central figure who
James Gosling (48:36.540)
has a really large block of stock.
Lex Fridman (48:41.020)
And they can just make it so.
Lex Fridman (48:45.620)
So on that topic, just maybe it's a small tangent,
Lex Fridman (48:49.380)
but you've gotten the chance to work
James Gosling (48:51.420)
with some pretty big leaders.
Lex Fridman (48:53.220)
What are your thoughts about on the Tesla side, Elon Musk
James Gosling (48:56.460)
leadership, on the Amazon side, Jeff Bezos,
Lex Fridman (49:00.060)
all of these folks with large amounts of stock and vision
Lex Fridman (49:03.900)
in their company?
Lex Fridman (49:04.940)
I mean, they're founders, either complete founders
James Gosling (49:09.260)
or early on folks.
Lex Fridman (49:11.300)
And Amazon have taken a lot of leaps.
Lex Fridman (49:17.300)
And that probably at the time, people
Lex Fridman (49:20.660)
would criticize as like, what is this bookstore thing?
James Gosling (49:26.340)
Yeah.
Lex Fridman (49:26.860)
And Bezos had a vision.
Lex Fridman (49:31.220)
And he had the ability to just follow it.
Lex Fridman (49:36.460)
Lots of people have visions.
Lex Fridman (49:37.820)
And the average vision is completely idiotic,
Lex Fridman (49:41.500)
and you crash and burn.
James Gosling (49:45.020)
The Silicon Valley crash and burn rate is pretty high.
Lex Fridman (49:52.500)
And they don't necessarily crash and burn
James Gosling (49:54.540)
because they were dumb ideas.
Lex Fridman (49:55.900)
But often, it's just timing and luck.
Lex Fridman (50:00.780)
And you take companies like Tesla,
Lex Fridman (50:07.860)
and really, the original Tesla sort of pre Elon
James Gosling (50:19.220)
was kind of doing sort of OK.
Lex Fridman (50:22.140)
But he just drove them.
Lex Fridman (50:26.300)
And because he had a really strong vision,
Lex Fridman (50:32.180)
he would make calls that were always mostly pretty good.
James Gosling (50:40.220)
I mean, the Model X was kind of a goofball thing to do.
Lex Fridman (50:44.580)
But he did it boldly anyway.
James Gosling (50:46.620)
There's so many people that just said,
Lex Fridman (50:50.100)
there's so many people that oppose them on the door.
James Gosling (50:54.300)
From the engineering perspective,
Lex Fridman (50:55.740)
those doors are ridiculous.
James Gosling (50:58.820)
They are a complete travesty.
Lex Fridman (51:02.060)
But they're exactly the symbol of what great leadership is,
James Gosling (51:05.700)
which is like, you have a vision, and you just go.
Lex Fridman (51:08.980)
If you're going to do something stupid, make it really stupid.
Lex Fridman (51:12.220)
And go all in.
Lex Fridman (51:14.380)
Yeah.
Lex Fridman (51:16.100)
And to Musk's credit, he's a really sharp guy.
Lex Fridman (51:22.500)
So going back in time a little bit to Steve Jobs,
James Gosling (51:26.860)
Steve Jobs was a similar sort of character
Lex Fridman (51:29.580)
who had a strong vision and was really, really smart.
Lex Fridman (51:34.260)
And he wasn't smart about the technology parts of things.
Lex Fridman (51:39.140)
But he was really sharp about the sort of human relationship
James Gosling (51:47.900)
between the relationship between humans and objects.
Lex Fridman (51:54.580)
But he was a jerk.
Lex Fridman (52:01.060)
Can we just linger on that a little bit?
Lex Fridman (52:02.660)
People say he's a jerk.
Lex Fridman (52:06.100)
Is that a feature or a bug?
Lex Fridman (52:08.060)
Well, that's the question, right?
Lex Fridman (52:11.220)
So you take people like Steve, who was really hard on people.
Lex Fridman (52:19.500)
And so the question is, was he needlessly hard on people?
Lex Fridman (52:25.380)
Or was he just making people reach to meet his vision?
Lex Fridman (52:34.420)
And you could kind of spin it either way.
James Gosling (52:41.540)
Well, the results tell a story.
Lex Fridman (52:45.020)
He, through whatever jerk ways he had,
James Gosling (52:47.820)
he made people often do the best work of their life.
Lex Fridman (52:51.420)
Yeah.
James Gosling (52:52.220)
Yeah, and that was absolutely true.
Lex Fridman (52:54.420)
And I interviewed with him several times.
James Gosling (52:59.980)
I did various negotiations with him.
Lex Fridman (53:04.380)
And even though kind of personally I liked him,
James Gosling (53:15.820)
I could never work for him.
Lex Fridman (53:18.540)
Why do you think that?
Lex Fridman (53:22.580)
Can you put into words the kind of tension
Lex Fridman (53:25.500)
that you feel would be destructive as opposed
Lex Fridman (53:29.580)
to constructive?
Lex Fridman (53:32.980)
Oh, he'd yell at people.
James Gosling (53:35.780)
He'd call them names.
Lex Fridman (53:39.020)
And you don't like that?
James Gosling (53:40.140)
No.
Lex Fridman (53:41.780)
No, I don't think you need to do that.
James Gosling (53:43.980)
Yeah.
Lex Fridman (53:46.660)
And I think there's pushing people to excel.
Lex Fridman (53:58.340)
And then there's too far.
Lex Fridman (54:01.580)
And I think he was on the wrong side of the line.
Lex Fridman (54:04.620)
And I've never worked for Musk.
Lex Fridman (54:07.460)
I know a number of people who have, many of them have said,
Lex Fridman (54:11.820)
and it shows up in the press a lot,
Lex Fridman (54:13.820)
that Musk is kind of that way.
Lex Fridman (54:18.260)
And one of the things that I sort of loathe
Lex Fridman (54:21.860)
about Silicon Valley these days is
James Gosling (54:24.700)
that a lot of the high flying successes
Lex Fridman (54:29.460)
are run by people who are complete jerks.
Lex Fridman (54:33.380)
But it seems like there's come this sort of mythology out
Lex Fridman (54:39.700)
of Steve Jobs that the reason that he succeeded
James Gosling (54:44.420)
was because he was super hard on people.
Lex Fridman (54:50.180)
And in a number of corners, people start going,
James Gosling (54:57.260)
oh, if I want to succeed, I need to be a real jerk.
Lex Fridman (55:02.060)
And that, for me, just does not compute.
James Gosling (55:05.860)
I know a lot of successful people
Lex Fridman (55:07.660)
who are not jerks, who are perfectly fine people.
Lex Fridman (55:11.780)
And they tend to not be in the public eye.
Lex Fridman (55:20.660)
The general public somehow lifts the jerks up
James Gosling (55:24.900)
into the hero status.
Lex Fridman (55:28.580)
Right.
James Gosling (55:29.340)
Well, because they do things that get them in the press.
Lex Fridman (55:32.900)
And the people who don't do the kind of things
James Gosling (55:44.180)
that spill into the press.
Lex Fridman (55:47.340)
Yeah, I just talked to Chris Ladner for the second time.
James Gosling (55:54.660)
He's a super nice guy.
Lex Fridman (55:56.700)
Just an example of this kind of individual
James Gosling (55:58.860)
that's in the background.
Lex Fridman (56:00.300)
I feel like he's behind a million technologies.
Lex Fridman (56:03.060)
But he also talked about the jerkiness of some of the folks.
Lex Fridman (56:06.860)
Yeah.
James Gosling (56:07.660)
Yeah, and the fact that being a jerk
Lex Fridman (56:10.660)
has become a required style.
Lex Fridman (56:13.140)
But one thing I maybe want to ask on that
Lex Fridman (56:15.820)
is maybe to push back a little bit.
Lex Fridman (56:17.780)
So there's the jerk side.
Lex Fridman (56:19.460)
But there's also, if I were to criticize
Lex Fridman (56:22.420)
what I've seen in Silicon Valley, which is almost
Lex Fridman (56:25.220)
the resistance to working hard.
Lex Fridman (56:28.380)
So on the jerkiness side, it's so Posty Jobs and Elon kind
Lex Fridman (56:37.660)
of push people to work really hard to do.
Lex Fridman (56:41.820)
And there's a question whether it's
Lex Fridman (56:43.820)
possible to do that nicely.
Lex Fridman (56:45.860)
But one of the things that bothers me,
Lex Fridman (56:47.540)
maybe I'm just Russian and just kind of romanticize
James Gosling (56:51.820)
the whole suffering thing.
Lex Fridman (56:53.300)
But I think working hard is essential for accomplishing
James Gosling (56:57.380)
anything interesting, like really hard.
Lex Fridman (57:00.140)
And in the parlance of Silicon Valley,
James Gosling (57:02.940)
it's probably too hard.
Lex Fridman (57:04.820)
This idea of that you should work smart, not hard often
James Gosling (57:10.340)
to me sounds like you should be lazy.
Lex Fridman (57:12.700)
Because of course you want to be to work smart.
James Gosling (57:15.220)
Of course you would be maximally efficient.
Lex Fridman (57:18.220)
But in order to discover the efficient path
James Gosling (57:20.140)
like we're talking about with the short programs, you have to.
Lex Fridman (57:23.340)
Well, the smart, hard thing isn't an either or.
James Gosling (57:28.620)
It's an and.
Lex Fridman (57:29.540)
It's an and, yeah.
James Gosling (57:30.620)
Right.
Lex Fridman (57:31.500)
And the people who say you should work smart, not hard,
James Gosling (57:42.460)
they pretty much always fail.
Lex Fridman (57:44.300)
Yeah.
James Gosling (57:45.020)
Thank you.
Lex Fridman (57:46.180)
Right.
James Gosling (57:46.660)
I mean, that's just a recipe for disaster.
Lex Fridman (57:49.700)
I mean, there are counterexamples,
Lex Fridman (57:53.460)
but they're more people who benefited from luck.
Lex Fridman (57:58.420)
And you're saying, yeah, exactly.
James Gosling (57:59.940)
Luck and timing, like you said, is often an essential thing.
Lex Fridman (58:04.620)
But you're saying you can push people
James Gosling (58:07.460)
to work hard and do incredible work without being nasty.
Lex Fridman (58:13.580)
Yeah, without being nasty.
James Gosling (58:14.900)
I think Google is a good example of the leadership of Google
Lex Fridman (58:22.100)
throughout its history has been a pretty good example of not
James Gosling (58:26.420)
being nasty and being kind.
Lex Fridman (58:28.140)
Yeah.
James Gosling (58:28.620)
I mean, the twins, Larry and Sergey,
Lex Fridman (58:35.820)
are both pretty nice people.
James Gosling (58:37.620)
Sandra Pichai is very nice.
Lex Fridman (58:39.660)
Yeah.
James Gosling (58:40.740)
Yeah.
Lex Fridman (58:41.260)
And it's a culture of people who work really, really hard.
James Gosling (58:49.860)
Let me ask maybe a little bit of a tense question.
Lex Fridman (58:54.220)
We're talking about Emacs.
James Gosling (58:56.500)
It seems like you've done some incredible work,
Lex Fridman (58:58.900)
so outside of Java, you've done some incredible work that
James Gosling (59:02.020)
didn't become as popular as it could have because of licensing
Lex Fridman (59:06.460)
issues and open source issues.
Lex Fridman (59:11.700)
Is it, what are your thoughts about that entire mess?
Lex Fridman (59:18.740)
Like what's about open source now in retrospect looking back?
James Gosling (59:24.340)
About licensing, about open sourcing,
Lex Fridman (59:27.060)
do you think open source is a good thing, a bad thing?
Lex Fridman (59:33.820)
Do you have regrets?
Lex Fridman (59:35.660)
Do you have wisdom that you've learned
Lex Fridman (59:38.020)
from that whole experience?
Lex Fridman (59:39.900)
So in general, I'm a big fan of open source.
James Gosling (59:45.380)
The way that it can be used to build communities and promote
Lex Fridman (59:49.780)
the development of things and promote collaboration and all
James Gosling (59:54.260)
of that is really pretty grand.
Lex Fridman (59:59.100)
When open source turns into a religion that says all things
🔗 相关节目