back to indexJames Gosling: Java, JVM, Emacs, and the Early Days of Computing | Lex Fridman Podcast #126
link |
The following is a conversation with James Gosling, the founder and lead
link |
designer behind the Java programming language, which in many indices is the
link |
most popular programming language in the world, or is always at least in the top
link |
We only had a limited time for this conversation, but I'm sure we'll talk
link |
again several times in this podcast.
link |
Quick summary of the sponsors, Public Goods, BetterHelp, and ExpressVPN.
link |
Please check out these sponsors in the description to get a discount
link |
and to support this podcast.
link |
As a side note, let me say that Java is the language with which I first learned
link |
object oriented programming, and with it, the art and science of software
link |
Also early on in my undergraduate education, I took a course on concurrent
link |
programming with Java.
link |
Looking back at that time, before I fell in love with neural networks, the art
link |
of parallel computing was both algorithmically and philosophically
link |
fascinating to me.
link |
The concept of a computer in my mind before then was something that does
link |
one thing at a time, the idea that we could create an abstraction of
link |
parallelism where you could do many things at the same time, while still
link |
guaranteeing stability and correctness, was beautiful.
link |
While some folks in college took drugs to expand their mind, I took concurrent
link |
If you enjoy this thing, subscribe on YouTube, review it with five stars on
link |
Apple Podcasts, follow on Spotify, support on Patreon, or connect with me
link |
on Twitter at Lex Friedman.
link |
As usual, I'll do a few minutes of ads now and no ads in the middle.
link |
I try to make these interesting, but I do give you timestamps, so go ahead
link |
and skip, but please do check out the sponsors by clicking the links in the
link |
It's the best way to support this podcast.
link |
This show sponsored by Public Goods, the one stop shop for affordable,
link |
sustainable, healthy household products.
link |
I take their fish oil and use their toothbrush, for example.
link |
Their products often have a minimalist black and white design that I find
link |
to be just beautiful.
link |
Some people ask why I wear this black suit and tie.
link |
There's a simplicity to it that to me focuses my mind on the most important
link |
bits of every moment of every day, pulling only at the thread of the
link |
essential in all that life has to throw at me.
link |
It's not about how I look, it's about how I feel.
link |
That's what design is to me, creating an inner conscious experience,
link |
not an external look.
link |
Anyway, Public Goods plants one tree for every order placed, which is kind of cool.
link |
Visit publicgoods.com slash Lex, or use code Lex at checkout to get 15 bucks
link |
off your first order.
link |
This show is also sponsored by BetterHelp, spelled H E L P, help.
link |
Check it out at betterhelp.com slash Lex.
link |
They figure out what you need and match you with a licensed professional
link |
therapist in under 48 hours.
link |
I chat with the person on there and enjoy it.
link |
Of course, I also regularly talk to David Goggins these days, who is definitely not
link |
a licensed professional therapist, but he does help me meet his and my demons and
link |
become comfortable to exist in their presence.
link |
Everyone is different, but for me, I think suffering is essential for creation, but
link |
you can suffer beautifully in a way that doesn't destroy you.
link |
I think therapy can help in whatever form that therapy takes.
link |
And I do think that BetterHelp is an option worth trying.
link |
They're easy, private, affordable, and available worldwide.
link |
You can communicate by text anytime and schedule weekly audio and video sessions.
link |
Check it out at betterhelp.com slash Lex.
link |
This show is also sponsored by Express CPM.
link |
You can use it to unlock movies and shows that are only
link |
available in other countries.
link |
I did this recently with Star Trek Discovery and UK Netflix, mostly because
link |
I wonder what it's like to live in London.
link |
I'm thinking of moving from Boston to a place where I can build the
link |
business I've always dreamed of building.
link |
London is probably not in the top three, but top 10 for sure.
link |
The number one show I've been to is the one that I'm most excited about.
link |
The number one choice currently is Austin.
link |
For many reasons that I'll probably speak to another time.
link |
San Francisco, unfortunately dropped out from the number one spot,
link |
but it's still in the running.
link |
If you have advice, let me know.
link |
Anyway, check out ExpressVPN.
link |
It lets you change your location to almost 100 countries and it's super fast.
link |
Go to expressvpn.com slash LexPod to get an extra three
link |
months of ExpressVPN for free.
link |
That's expressvpn.com slash LexPod.
link |
And now here's my conversation with James Gosling.
link |
I've read somewhere that the square root of two is your favorite irrational number.
link |
I have no idea where that got started.
link |
Is there any truth to it?
link |
Is there anything in mathematics or numbers that you find beautiful?
link |
Oh, well, there's lots of things in math that's really beautiful.
link |
I used to consider myself really good at math and these days I consider
link |
myself really bad at math.
link |
I never really had a thing for the square root of two, but when I was a teenager,
link |
there was this book called The Dictionary of Curious and Interesting Numbers,
link |
which for some reason I read through and damn near memorized the whole thing.
link |
And I started this weird habit of when I was like filling out checks or paying for things
link |
with credit cards, I would want to make the receipt add up to a new number.
link |
Is there some numbers that stuck with you that just kind of make you feel good?
link |
They all have a story and fortunately, I've actually mostly forgotten all of them.
link |
Are they, uh, so like 42, uh, well, yeah, I mean, that one 42 is pretty magical.
link |
And then the irrationals, I mean, but is there a square root of two story in there
link |
somewhere, how did that come about?
link |
It's, it's like the only number that has destroyed a religion in which way, well,
link |
the, the pathogorians, they, they believed that all numbers were perfect and you
link |
could re represent anything as, as a, as a rational number.
link |
And, um, in that, in that time period, um, the, this proof came out that there was no,
link |
you know, rational fraction whose value was equal to the square root of two.
link |
And that, that means nothing in this world, right?
link |
So, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so, so,
link |
in this world is perfect, not even mathematics.
link |
Well, it means that your definition of perfect was imperfect.
link |
Well then, then there's the Gaitl incompleteness theorems and the 20th
link |
century that ruined it once again for everybody.
link |
Although, although, although Goerl's theorem, um, you know, the lesson I take
link |
from Goerl's theorem is not that, you know, there are things you can't know,
link |
which is fundamentally what it says.
link |
But people want black and white answers.
link |
They want true or false.
link |
But if you allow a three state logic
link |
that is true, false, or maybe,
link |
I feel like there's a parallel to modern political discourse
link |
in there somewhere, but let me ask.
link |
So with your kind of early love or appreciation
link |
of the beauty of mathematics,
link |
do you see a parallel between that world
link |
and the world of programming?
link |
Programming is all about logical structure,
link |
understanding the patterns that come out of computation,
link |
understanding sort of, I mean, it's often like the path
link |
through the graph of possibilities to find a short route.
link |
Meaning like find a short program
link |
that gets the job done kind of thing.
link |
But so then on the topic of irrational numbers,
link |
do you see programming?
link |
You just painted it so cleanly.
link |
It's a little of this trajectory
link |
to find like a nice little program,
link |
but do you see it as fundamentally messy?
link |
Maybe unlike mathematics?
link |
I don't think of it as, I mean, you know,
link |
you watch somebody who's good at math do math
link |
and you know, often it's fairly messy.
link |
Sometimes it's kind of magical.
link |
When I was a grad student, one of the students,
link |
his name was Jim Sachs, was he had this reputation
link |
of being sort of a walking, talking human
link |
theorem proving machine.
link |
And if you were having a hard problem with something,
link |
you could just like accost him in the hall
link |
and say, Jim, and he would do this funny thing
link |
where he would stand up straight.
link |
His eyes would kind of defocus.
link |
He'd go, you know, just like something in today's movies.
link |
And then he'd straighten up and say n log n and walk away.
link |
And you'd go, well, okay, so n log n is the answer.
link |
How did he get there?
link |
By which time he's, you know, down the hallway somewhere.
link |
Yeah, he's just the oracle, the black box
link |
that just gives you the answer.
link |
Yeah, and then you have to figure out the path
link |
from the question to the answer.
link |
I think in one of the videos I watched,
link |
you mentioned Don Knuth, well, at least recommending his,
link |
you know, his book is something people should read.
link |
But in terms of, you know, theoretical computer science,
link |
do you see something beautiful that has been inspiring
link |
to you, speaking of n log n, in your work
link |
on programming languages, that's in that whole world
link |
of algorithms and complexity and, you know,
link |
these kinds of more formal mathematical things?
link |
Or did that not really stick with you
link |
in your programming life?
link |
It did stick pretty clearly for me,
link |
because one of the things that I care about
link |
is being able to sort of look at a piece of code
link |
and be able to prove to myself that it works.
link |
And, you know, so for example, I find that I'm at odds
link |
with many of the people around me over issues
link |
about like how you lay out a piece of software, right?
link |
You know, so software engineers get really cranky
link |
about how they format the documents that are the programs,
link |
you know, where they put new lines and where they put,
link |
The braces and all the rest of that, right.
link |
And I tend to go for a style that's very dense.
link |
Minimize the white space.
link |
Yeah, well, to maximize the amount
link |
that I can see at once, right?
link |
So I like to be able to see a whole function
link |
and to understand what it does,
link |
rather than have to go scroll, scroll, scroll
link |
and remember, right?
link |
Yeah, I'm with you on that.
link |
And people don't like that.
link |
Yeah, I've had, you know, multiple times
link |
when engineering teams have staged
link |
what was effectively an intervention.
link |
You know, where they invite me to a meeting
link |
and everybody's arrived before me
link |
and they all look at me and say,
link |
James, about your coding style, I'm sort of an odd person
link |
to be programming because I don't think very well verbally.
link |
I am just naturally a slow reader.
link |
I'm what most people would call a visual thinker.
link |
So when you think about a program,
link |
I see pictures, right?
link |
So when I look at a piece of code on a piece of paper,
link |
it very quickly gets transformed into a picture.
link |
And, you know, it's almost like a piece of machinery
link |
with, you know, this connected to that and.
link |
Like these gears and different sizes.
link |
Yeah, yeah, I see them more like that
link |
than I see the sort of verbal structure
link |
or the lexical structure of letters.
link |
So then when you look at the program,
link |
that's why you want to see it all in the same place,
link |
then you can just map it to something visual.
link |
Yeah, and it just kind of like,
link |
like it leaps off the page at me and.
link |
Yeah, what are the inputs, what are the outputs?
link |
What the heck is this thing doing?
link |
Getting a whole vision of it.
link |
Can we go back into your memory?
link |
Memory, long term memory access.
link |
What's the first program you've ever written?
link |
Oh, I have no idea what the first one was.
link |
I mean, I know the first machine
link |
that I learned to program on.
link |
Was a PDP eight at the University of Calgary.
link |
Do you remember the specs?
link |
Oh yeah, so the thing had 4K of RAM.
link |
The clock rate was,
link |
it was about a third of a megahertz.
link |
Oh, so you didn't even get to the M, okay.
link |
Yeah, yeah, so we're like 10,000 times faster these days.
link |
10,000 times faster these days.
link |
And was this kind of like a super computer,
link |
like a serious computer for.
link |
No, the PDP eight I was the first thing
link |
that people were calling like mini computer.
link |
They were sort of inexpensive enough
link |
that a university lab could maybe afford to buy one.
link |
And was there time sharing, all that kind of stuff?
link |
There actually was a time sharing OS for that,
link |
but it wasn't used really widely.
link |
The machine that I learned on was one
link |
that was kind of hidden in the back corner
link |
of the computer center.
link |
And it was bought as part of a project
link |
to do computer networking,
link |
but they didn't actually use it very much.
link |
It was mostly just kind of sitting there
link |
and it was kind of sitting there
link |
and I noticed it was just kind of sitting there.
link |
And so I started fooling around with it
link |
and nobody seemed to mind.
link |
So I just kept doing that and.
link |
And it had a keyboard and like a monitor, are we?
link |
Oh, this is way before monitors were common.
link |
So it was literally a model 33 teletype
link |
with a paper tape reader.
link |
Okay, so the user interface wasn't very good.
link |
Yeah, it was the first computer ever built
link |
with integrated circuits, but by integrated circuits,
link |
I mean that they would have like 10 or 12 transistors
link |
on one piece of silicon,
link |
not the 10 or 12 billion that the machines have today.
link |
So what did that, I mean, feel like if you remember those?
link |
I mean, did you have kind of inklings of the magic
link |
of exponential kind of improvement of Moore's law
link |
of the potential of the future that,
link |
was that your fingertips kind of thing?
link |
Or was it just a cool?
link |
Yeah, it was just a toy.
link |
I had always liked building stuff,
link |
but one of the problems with building stuff
link |
is that you need to have parts.
link |
You need to have pieces of wood or wire or switches
link |
or stuff like that.
link |
And those all cost money.
link |
And here you could build.
link |
You could build arbitrarily complicated things
link |
and I didn't need any physical materials.
link |
It required no money.
link |
That's a good way to put programming.
link |
You're right, it's, if you love building things,
link |
completely accessible, you don't need anything.
link |
Anybody from anywhere could just build
link |
something really cool.
link |
If you've got access to a computer,
link |
you can build all kinds of crazy stuff.
link |
And when you were somebody like me
link |
who had like really no money, and I mean,
link |
I remember just lusting after being
link |
able to buy like a transistor.
link |
And when I would do sort of electronics kind of projects,
link |
they were mostly made, done by like dumpster diving for trash.
link |
And one of my big hauls was discarded relay racks
link |
from the back of the phone company switching center.
link |
That was the big memorable treasure.
link |
Yeah, that was a really.
link |
What do you use that for?
link |
I built a machine that played tic tac toe.
link |
Of course, the thing that was really hard
link |
was that all the relays required a specific voltage.
link |
But getting a power supply that would do that voltage
link |
And since I had a bunch of trashed television sets,
link |
I had to sort of cobble together something
link |
that was wrong but worked.
link |
So I was actually running these relays at 300 volts.
link |
And none of the electrical connections
link |
were like properly sealed off.
link |
Surprised you survived that period of your life.
link |
Oh, for so many reasons.
link |
For so many reasons.
link |
I mean, it's pretty common for teenage geeks
link |
to discover, oh, thermite.
link |
That's real easy to make.
link |
Well, I'm glad you did.
link |
But do you remember what program in Calgary
link |
that you wrote, anything that stands out?
link |
And what language?
link |
Well, so mostly anything of any size was assembly code.
link |
And actually, before I learned assembly code,
link |
there was this programming language
link |
on the PDP 8 called Focal 5.
link |
And Focal 5 was kind of like a really stripped down Fortran.
link |
And I remember building programs that did things
link |
like play blackjack or solitaire.
link |
Or for some reason or other, the things that I really liked
link |
were ones where they were just like plotting graphs.
link |
So something with like a function or data,
link |
and then you plot it.
link |
Yeah, I did a bunches of those things
link |
and went, ooh, pretty pictures.
link |
And so this would like print out, again, no monitors.
link |
Right, so it was like on a teletype.
link |
So it's using something that's kind of like a typewriter.
link |
And then using those to plot functions.
link |
So when, I apologize to romanticize things,
link |
but when did you first fall in love with programming?
link |
What was the first programming language?
link |
Like as a serious, maybe, software engineer,
link |
where you thought this is a beautiful thing?
link |
I guess I never really thought of any particular language
link |
as being beautiful, because it was never really
link |
about the language for me.
link |
It was about what you could do with it.
link |
And even today, people try to get me
link |
into arguments about particular forms of syntax
link |
And I'm like, who cares?
link |
It's about what you can do, not how you spell the word.
link |
And so back in those days, I learned like PL1 and Fortran
link |
and COBOL, and by the time that people were willing to hire me
link |
to do stuff, it was mostly assembly code and PDP assembly
link |
code and Fortran code and control data assembly
link |
code for the CDC 6400, which was an early, I guess,
link |
Even though that supercomputer has less compute power
link |
than my phone by a lot.
link |
And that was mostly, like you said, Fortran world.
link |
That said, you've also showed appreciation
link |
for the greatest language ever that I
link |
think everyone agrees is Lisp.
link |
Well, Lisp is definitely on my list of the greatest ones
link |
that have existed.
link |
Is it at number one?
link |
Or I mean, are you, I mean?
link |
You know, the thing is that it's, you know,
link |
I wouldn't put it number one, no.
link |
Is it the parentheses?
link |
What do you not love about Lisp?
link |
Well, I guess the number one thing
link |
to not love about it is so freaking many parentheses.
link |
On the love thing is, you know, out of those tons
link |
of parentheses, you actually get an interesting language
link |
And I've always thought that there was a friendlier version
link |
of Lisp hiding out there somewhere.
link |
But I've never really spent much time thinking about it.
link |
But, you know, so like up the food chain for me from Lisp
link |
is Simula, which a very small number of people
link |
But a lot of people, I think you had a huge influence, right,
link |
on the programming.
link |
But in the Simula, I apologize if I'm wrong on this,
link |
but is that one of the first functional languages?
link |
No, it was the first object oriented programming language.
link |
It's really where object oriented and languages sort
link |
And it was also the language where coroutines first showed
link |
up as a part of the language.
link |
So you could have a programming style that was,
link |
you could think of it as sort of multi threaded
link |
with a lot of parallelism.
link |
There's ideas of parallelism in there?
link |
Yeah, so that was back, you know,
link |
so the first Simula spec was Simula 67.
link |
So it had coroutines, which are almost threads.
link |
The thing about coroutines is that they
link |
don't have true concurrency.
link |
So you can get away without really complex locking.
link |
You can't useably do coroutines on the multi core machine.
link |
Or if you try to do coroutines on the multi core machine,
link |
you don't actually get to use the multiple cores.
link |
Either that or you, because you start then
link |
having to get into the universe of semaphores and locks
link |
and things like that.
link |
But in terms of the style of programming,
link |
you could write code and think of it as being multi threaded.
link |
The mental model was very much a multi threaded one.
link |
And all kinds of problems you could
link |
approach very differently.
link |
To return to the world of Lisp for a brief moment,
link |
at CMU you wrote a version of Emacs
link |
that I think was very impactful on the history of Emacs.
link |
What was your motivation for doing so?
link |
At that time, so that was in like 85 or 86.
link |
I had been using Unix for a few years.
link |
And most of the editing was this tool
link |
called ED, which was sort of an ancestor of VI.
link |
Is it a pretty good editor, not a good editor?
link |
Well, if what you're using, if your input device
link |
is a teletype, it's pretty good.
link |
It's certainly more humane than TECO,
link |
which was kind of the common thing
link |
in a lot of the DEC universe at the time.
link |
TECO is spelled TK, is that the?
link |
No, TECO, T E C O, the text editor and corrector.
link |
Corrector, wow, so many features.
link |
And the original Emacs came out as,
link |
so Emacs stands for editor macros.
link |
And TECO had a way of writing macros.
link |
And so the original Emacs from MIT
link |
started out as a collection of macros for TECO.
link |
But then the Emacs style got popular originally at MIT.
link |
And then people did a few other implementations
link |
of Emacs that were, the code base was entirely different,
link |
but it was sort of the philosophical style
link |
of the original Emacs.
link |
What was the philosophy of Emacs?
link |
And by the way, were all the implementations always in C?
link |
And then how does Lisp fit into the picture?
link |
No, so the very first Emacs was written
link |
as a bunch of macros for the TECO text editor.
link |
Wow, that's so interesting.
link |
And the macro language for TECO was probably
link |
the most ridiculously obscure format.
link |
If you just look at a TECO program on a page,
link |
you think it was just random characters.
link |
It really looks like just line noise.
link |
So it's kind of like LaTeX or something.
link |
Oh, way worse than LaTeX.
link |
Way, way worse than LaTeX.
link |
But if you use TECO a lot, which I did,
link |
TECO was completely optimized for touch typing at high speed.
link |
So there were no two character commands.
link |
Well, there were a few, but mostly they
link |
were just one character.
link |
So every character on the keyboard was a separate command.
link |
And actually, every character on the keyboard
link |
was usually two or three commands
link |
because you could hit Shift and Control and all
link |
It's just a way of very tightly encoding it.
link |
And mostly what Emacs did was it made that visual.
link |
So one way to think of TECO is use Emacs with your eyes
link |
closed, where you have to maintain
link |
a mental model of a mental image of your document.
link |
You have to go, OK, so the cursor is between the A and the E.
link |
And I want to exchange those, so I do these things.
link |
So it is almost exactly the Emacs command set.
link |
Well, it's roughly the same as Emacs command set,
link |
but using Emacs with your eyes closed.
link |
So part of what Emacs added to the whole thing
link |
was being able to visually see what
link |
you were editing in a form that matched your document.
link |
And a lot of things changed in the command set because it
link |
It was really flexible.
link |
You could add new commands for all kinds of things.
link |
And then people rewrote Emacs multiple times in Lisp.
link |
There was one done at MIT for the Lisp machine.
link |
There was one done for Multics.
link |
And one summer, I got a summer job
link |
to work on the Pascal compiler for Multics.
link |
And that was actually the first time I used Emacs.
link |
To write the compilers.
link |
You've worked on compilers, too.
link |
That's fascinating.
link |
Yeah, so I did a lot of work.
link |
I spent a really intense three months
link |
working on this Pascal compiler, basically living in Emacs.
link |
And it was the one written in Mac Lisp by Bernie Greenberg.
link |
And I thought, wow, this is just a way better way
link |
And then I got back to CMU, where
link |
we had one of everything and two of a bunch of things
link |
and four of a few things.
link |
And since I mostly worked in the Unix universe,
link |
and Unix didn't have an Emacs, I decided
link |
that I needed to fix that problem.
link |
So I wrote this implementation of Emacs in C,
link |
because at the time, C was really the only language that
link |
And you were comfortable with C as well at that point?
link |
Yeah, at that time, I had done a lot of C coding.
link |
This was in, like, 86.
link |
And it was running well enough for me
link |
to use it to edit itself within a month or two.
link |
And then it kind of took over the university.
link |
And it spread outside.
link |
Yeah, and then it went outside.
link |
And largely because Unix kind of took over the research
link |
community on the ARPANET, and Emacs
link |
was kind of the best editor out there.
link |
It kind of took over.
link |
And there was actually a brief period
link |
where I actually had login IDs on every nonmilitary host
link |
Because people would say, oh, can we install this?
link |
And I'd like, well, yeah, but you'll need some help.
link |
The days when security wasn't.
link |
When nobody cared.
link |
I can ask briefly, what were those early days of ARPANET
link |
and the internet like?
link |
Did you, again, sorry for the silly question,
link |
but could you have possibly imagined
link |
that the internet would look like what it is today?
link |
Some of it is remarkably unchanged.
link |
So one of the things that I noticed really early on
link |
when I was at Carnegie Mellon was
link |
that a lot of social life became centered around the ARPANET.
link |
So things like between email and text messaging.
link |
Because text messaging was a part of the ARPANET
link |
There were no cell phones, but you're sitting at a terminal
link |
and you're typing stuff.
link |
So essentially email, or what is text messaging?
link |
Well, just like a one line message.
link |
So it's like sending a one line message to somebody.
link |
And so pretty much everything from arranging lunch
link |
to going out on dates was all like driven by social media.
link |
Right, in the 80s.
link |
Easier than phone calls, yeah.
link |
And my life had gotten to where I
link |
was living on social media from the early mid 80s.
link |
And so when it sort of transformed into the internet
link |
and social media explodes, I was kind of like,
link |
what's the big deal?
link |
It's just a scale thing.
link |
Right, the scale thing is just astonishing.
link |
But the fundamentals in some ways remain the same.
link |
The fundamentals have hardly changed.
link |
And the technologies behind the networking
link |
have changed significantly.
link |
The watershed moment of going from the ARPANET
link |
And then people starting to just scale and scale and scale.
link |
I mean, the scaling that happened in the early 90s
link |
and the way that so many vested interests fought the internet.
link |
What was the, oh, because you can't really
link |
control the internet.
link |
Yeah, so who fought the internet?
link |
So fundamentally, the cable TV companies
link |
and broadcasters and phone companies,
link |
at the deepest fibers of their being, they hated the internet.
link |
But it was often kind of a funny thing because, so think
link |
of a cable company.
link |
Most of the employees of a cable company,
link |
their job is getting TV shows, movies, whatever,
link |
out to their customers.
link |
They view their business as serving their customers.
link |
But as you climb up the hierarchy in the cable companies,
link |
that view shifts because really the business of the cable
link |
companies had always been selling eyeballs
link |
And that view of a cable company
link |
didn't really dawn on most people who
link |
worked at the cable companies.
link |
But I had various dust ups with various cable companies
link |
where you could see in the stratified layers
link |
of the corporation that this view of the reason
link |
that you have cable TV is to capture eyeballs.
link |
So they didn't see it that way.
link |
Well, so most of the people who worked at the phone company
link |
or at the cable companies, their view
link |
was that their job was getting delightful content out
link |
to their customers.
link |
And their customers would pay for that.
link |
Higher up, they viewed this as a way of attracting eyeballs
link |
And then what they were really doing
link |
was selling the eyeballs that were glued to their content
link |
to the advertisers.
link |
To the advertisers, yeah.
link |
And so the internet was a competition in that sense.
link |
I mean, there was one proposal that we sent,
link |
one detailed proposal that we wrote up back
link |
at Sun in the early 90s that was essentially like, look,
link |
anybody with internet technologies,
link |
anybody can become provider of content.
link |
So you could be distributing home movies
link |
to your parents or your cousins or who are anywhere else.
link |
So anybody can become a publisher.
link |
Wow, you were thinking about that already.
link |
Netflix, Netflix, YouTube.
link |
Yeah, that was like in the early 90s.
link |
And we thought, this would be great.
link |
And the kind of content we were thinking about at the time
link |
was like home movies, kids essays,
link |
stuff from grocery stores or a restaurant
link |
that they could actually start sending information about.
link |
And the reaction of the cable companies
link |
was like, fuck no.
link |
Because then we're out of business.
link |
What is it about companies that, because they could have just,
link |
they could have been ahead of that wave.
link |
They could have listened to that.
link |
And they could have.
link |
They didn't see a path to revenue.
link |
Somewhere in there, there's a lesson for big companies,
link |
like to listen, to try to anticipate the renegade,
link |
the out there, out of the box, people like yourself
link |
in the early days writing proposals
link |
about what this could possibly be.
link |
Well, and that wasn't.
link |
If you're in a position where you're
link |
making truckloads of money off of a particular business model,
link |
the whole thought of leaping the chasm,
link |
you can see, oh, new models that are more effective
link |
are emerging, so like digital cameras versus film cameras.
link |
Why take the leap?
link |
Why take the leap?
link |
Because you're making so much money off of film.
link |
And in my past at Sun, one of our big customers was Kodak.
link |
And I ended up interacting with folks from Kodak quite a lot.
link |
And they actually had a big digital camera research
link |
and digital imaging business, or development group.
link |
And they knew that you just look at the trend lines
link |
and you look at the emerging quality of these digital
link |
And you can just plot it on the graph.
link |
And it's like, sure, film is better today.
link |
But digital is improving like this.
link |
The lines are going to cross.
link |
And the point at which the lines cross
link |
is going to be a collapse in their business.
link |
And they could see that.
link |
They absolutely knew that.
link |
The problem is that up to the point where they hit the wall,
link |
they were making truckloads of money.
link |
And when they did the math, it never
link |
started to make sense for them to kind of lead the charge.
link |
And part of the issues for a lot of companies
link |
for this kind of stuff is that if you're
link |
going to leap over a chasm like that,
link |
like with Kodak going from film to digital,
link |
that's a transition that's going to take a while.
link |
We had fights like this with people over smart cards.
link |
The smart cards fights were just ludicrous.
link |
But that's where visionary leadership comes in, right?
link |
Somebody needs to roll in and say, then take the leap.
link |
Well, it's partly take the leap,
link |
but it's also partly take the hit.
link |
Take the hit in the short term.
link |
So you can draw the graphs you want that show that if we leap
link |
from here, on our present trajectory, we're doing this
link |
and there's a cliff.
link |
If we force ourselves into a transition
link |
and we proactively do that, we can be on the next wave.
link |
But there will be a period when we're in a trough.
link |
And pretty much always there ends up being a trough
link |
as you leap the chasm.
link |
But the way that public companies work on this planet,
link |
they're reporting every quarter.
link |
And the one thing that a CEO must never do is take a big hit.
link |
Over some quarter.
link |
And many of these transitions involve a big hit
link |
for a period of time, one, two, three quarters.
link |
And so you get some companies and like Tesla and Amazon
link |
are really good examples of companies that take huge hits.
link |
But they have the luxury of being
link |
able to ignore the stock market for a little while.
link |
And that's not so true today, really.
link |
But in the early days of both of those companies,
link |
they both did this thing of, I don't care
link |
about the quarterly reports.
link |
I care about how many happy customers we have.
link |
And having as many happy customers as possible
link |
can often be an enemy of the bottom line.
link |
Yeah, so how do they make that work?
link |
I mean, Amazon operated in the negative for a long time.
link |
It's like investing into the future.
link |
But so Amazon and Google and Tesla and Facebook, a lot
link |
of those had what amounted to patient money,
link |
often because there's like a charismatic central figure who
link |
has a really large block of stock.
link |
And they can just make it so.
link |
So on that topic, just maybe it's a small tangent,
link |
but you've gotten the chance to work
link |
with some pretty big leaders.
link |
What are your thoughts about on the Tesla side, Elon Musk
link |
leadership, on the Amazon side, Jeff Bezos,
link |
all of these folks with large amounts of stock and vision
link |
I mean, they're founders, either complete founders
link |
or early on folks.
link |
And Amazon have taken a lot of leaps.
link |
And that probably at the time, people
link |
would criticize as like, what is this bookstore thing?
link |
And Bezos had a vision.
link |
And he had the ability to just follow it.
link |
Lots of people have visions.
link |
And the average vision is completely idiotic,
link |
and you crash and burn.
link |
The Silicon Valley crash and burn rate is pretty high.
link |
And they don't necessarily crash and burn
link |
because they were dumb ideas.
link |
But often, it's just timing and luck.
link |
And you take companies like Tesla,
link |
and really, the original Tesla sort of pre Elon
link |
was kind of doing sort of OK.
link |
But he just drove them.
link |
And because he had a really strong vision,
link |
he would make calls that were always mostly pretty good.
link |
I mean, the Model X was kind of a goofball thing to do.
link |
But he did it boldly anyway.
link |
There's so many people that just said,
link |
there's so many people that oppose them on the door.
link |
From the engineering perspective,
link |
those doors are ridiculous.
link |
They are a complete travesty.
link |
But they're exactly the symbol of what great leadership is,
link |
which is like, you have a vision, and you just go.
link |
If you're going to do something stupid, make it really stupid.
link |
And to Musk's credit, he's a really sharp guy.
link |
So going back in time a little bit to Steve Jobs,
link |
Steve Jobs was a similar sort of character
link |
who had a strong vision and was really, really smart.
link |
And he wasn't smart about the technology parts of things.
link |
But he was really sharp about the sort of human relationship
link |
between the relationship between humans and objects.
link |
But he was a jerk.
link |
Can we just linger on that a little bit?
link |
People say he's a jerk.
link |
Is that a feature or a bug?
link |
Well, that's the question, right?
link |
So you take people like Steve, who was really hard on people.
link |
And so the question is, was he needlessly hard on people?
link |
Or was he just making people reach to meet his vision?
link |
And you could kind of spin it either way.
link |
Well, the results tell a story.
link |
He, through whatever jerk ways he had,
link |
he made people often do the best work of their life.
link |
Yeah, and that was absolutely true.
link |
And I interviewed with him several times.
link |
I did various negotiations with him.
link |
And even though kind of personally I liked him,
link |
I could never work for him.
link |
Why do you think that?
link |
Can you put into words the kind of tension
link |
that you feel would be destructive as opposed
link |
Oh, he'd yell at people.
link |
He'd call them names.
link |
And you don't like that?
link |
No, I don't think you need to do that.
link |
And I think there's pushing people to excel.
link |
And then there's too far.
link |
And I think he was on the wrong side of the line.
link |
And I've never worked for Musk.
link |
I know a number of people who have, many of them have said,
link |
and it shows up in the press a lot,
link |
that Musk is kind of that way.
link |
And one of the things that I sort of loathe
link |
about Silicon Valley these days is
link |
that a lot of the high flying successes
link |
are run by people who are complete jerks.
link |
But it seems like there's come this sort of mythology out
link |
of Steve Jobs that the reason that he succeeded
link |
was because he was super hard on people.
link |
And in a number of corners, people start going,
link |
oh, if I want to succeed, I need to be a real jerk.
link |
And that, for me, just does not compute.
link |
I know a lot of successful people
link |
who are not jerks, who are perfectly fine people.
link |
And they tend to not be in the public eye.
link |
The general public somehow lifts the jerks up
link |
into the hero status.
link |
Well, because they do things that get them in the press.
link |
And the people who don't do the kind of things
link |
that spill into the press.
link |
Yeah, I just talked to Chris Ladner for the second time.
link |
He's a super nice guy.
link |
Just an example of this kind of individual
link |
that's in the background.
link |
I feel like he's behind a million technologies.
link |
But he also talked about the jerkiness of some of the folks.
link |
Yeah, and the fact that being a jerk
link |
has become a required style.
link |
But one thing I maybe want to ask on that
link |
is maybe to push back a little bit.
link |
So there's the jerk side.
link |
But there's also, if I were to criticize
link |
what I've seen in Silicon Valley, which is almost
link |
the resistance to working hard.
link |
So on the jerkiness side, it's so Posty Jobs and Elon kind
link |
of push people to work really hard to do.
link |
And there's a question whether it's
link |
possible to do that nicely.
link |
But one of the things that bothers me,
link |
maybe I'm just Russian and just kind of romanticize
link |
the whole suffering thing.
link |
But I think working hard is essential for accomplishing
link |
anything interesting, like really hard.
link |
And in the parlance of Silicon Valley,
link |
it's probably too hard.
link |
This idea of that you should work smart, not hard often
link |
to me sounds like you should be lazy.
link |
Because of course you want to be to work smart.
link |
Of course you would be maximally efficient.
link |
But in order to discover the efficient path
link |
like we're talking about with the short programs, you have to.
link |
Well, the smart, hard thing isn't an either or.
link |
It's an and, yeah.
link |
And the people who say you should work smart, not hard,
link |
they pretty much always fail.
link |
I mean, that's just a recipe for disaster.
link |
I mean, there are counterexamples,
link |
but they're more people who benefited from luck.
link |
And you're saying, yeah, exactly.
link |
Luck and timing, like you said, is often an essential thing.
link |
But you're saying you can push people
link |
to work hard and do incredible work without being nasty.
link |
Yeah, without being nasty.
link |
I think Google is a good example of the leadership of Google
link |
throughout its history has been a pretty good example of not
link |
being nasty and being kind.
link |
I mean, the twins, Larry and Sergey,
link |
are both pretty nice people.
link |
Sandra Pichai is very nice.
link |
And it's a culture of people who work really, really hard.
link |
Let me ask maybe a little bit of a tense question.
link |
We're talking about Emacs.
link |
It seems like you've done some incredible work,
link |
so outside of Java, you've done some incredible work that
link |
didn't become as popular as it could have because of licensing
link |
issues and open source issues.
link |
Is it, what are your thoughts about that entire mess?
link |
Like what's about open source now in retrospect looking back?
link |
About licensing, about open sourcing,
link |
do you think open source is a good thing, a bad thing?
link |
Do you have regrets?
link |
Do you have wisdom that you've learned
link |
from that whole experience?
link |
So in general, I'm a big fan of open source.
link |
The way that it can be used to build communities and promote
link |
the development of things and promote collaboration and all
link |
of that is really pretty grand.
link |
When open source turns into a religion that says all things
link |
must be open source, I get kind of weird about that
link |
because it's sort of like saying some versions of that
link |
end up saying that all software engineers
link |
must take a vow of poverty, right, as though.
link |
It's unethical to have money.
link |
To build a company, right.
link |
And there's a slice of me that actually kind of buys into that
link |
because people who make billions of dollars off of a patent,
link |
and the patent came from literally a stroke
link |
of lightning that hits you as you lie half awake in bed.
link |
Yeah, that's lucky.
link |
The way that that sometimes sort of explodes
link |
into something that looks to me a lot like exploitation,
link |
you see a lot of that in the drug industry.
link |
You know, when you've got medications that cost you
link |
like $100 a day, and it's like, no.
link |
Yeah, so the interesting thing about the sort of open source,
link |
what bothers me is when something is not open source,
link |
and because of that, it's a worse product.
link |
So like, I mean, if I look at your just implementation
link |
of Emacs, like that could have been the dominant implementation.
link |
That's my main ID.
link |
I apologize to the world, but I still love it.
link |
And I could have been using your implementation of Emacs.
link |
So are you using the GNU Emacs?
link |
I guess the default on Linux is that GNU?
link |
And that, through a strange passage,
link |
started out as the one that I wrote.
link |
So it still has a, yeah.
link |
Well, and part of that was because in the last couple
link |
of years of grad school, it became really clear
link |
to me that I was either going to be Mr. Emacs forever
link |
or I was going to graduate.
link |
I couldn't actually do both.
link |
Was that a hard decision?
link |
That's so interesting to think about you as a,
link |
like it's a different trajectory that could have happened.
link |
That's fascinating.
link |
And maybe I could be fabulously wealthy today
link |
if I had become Mr. Emacs, and Emacs
link |
had mushroomed into a series of text processing applications
link |
and all kinds of stuff.
link |
And I would have, you know.
link |
But I have a long history of financially suboptimal
link |
decisions because I didn't want that life, right?
link |
And I went to grad school because I wanted to graduate.
link |
And being Mr. Emacs for a while was kind of fun,
link |
and then it kind of became not fun.
link |
And when it was not fun, there was
link |
no way I could pay my rent, right?
link |
And I was like, OK, do I carry on as a grad student?
link |
I had a research assistantship, and I
link |
was sort of living off of that.
link |
And I was trying to do my, you know,
link |
I was doing all my RA work, all my RA,
link |
you know, being grad student work
link |
and being Mr. Emacs all at the same time.
link |
And I decided to pick one.
link |
And one of the things that I did at the time
link |
was I went around all the people I knew on the ARPANET who
link |
might be able to take over looking after Emacs.
link |
And pretty much everybody said, eh, I got a day job.
link |
So I actually found two folks and a couple
link |
of folks in a garage in New Jersey, complete with a dog,
link |
who were willing to take it over.
link |
But they were going to have to charge money.
link |
But my deal with them was that they would only,
link |
that they would make it free for universities and schools
link |
And they said sure.
link |
And you know, that upset some people.
link |
So you have some, now I don't know the full history of this,
link |
but I think it's kind of interesting.
link |
You have some tension with Mr. Richard Stallman over the,
link |
and he kind of represents this kind of,
link |
like you mentioned, free software,
link |
sort of a dogmatic focus on, yeah.
link |
All information must be free.
link |
So what, is there an interesting way
link |
to paint a picture of the disagreement
link |
you have with Richard through the years?
link |
My basic opposition is that when you say information
link |
must be free, to a really extreme form that
link |
turns into all people whose job is
link |
the production of everything from movies to software.
link |
They must all take a vow of poverty
link |
because information must be free.
link |
And that doesn't work for me.
link |
And I don't want to be wildly rich.
link |
I am not wildly rich.
link |
But I do actually, I can feed my children.
link |
Yeah, I totally agree with you.
link |
It does just make me sad that sometimes
link |
the closing of the source, for some reason
link |
that people that, like a bureaucracy begins to build,
link |
and sometimes it doesn't, it hurts the product.
link |
And there is a balance in there.
link |
There's a balance.
link |
And it's not hard over rapacious capitalism.
link |
And it's not hard over in the other direction.
link |
And a lot of the open source movement,
link |
they have been managing to find the path
link |
to actually making money.
link |
So doing things like service and support
link |
works for a lot of people.
link |
And there are some ways where it's kind of, some of them
link |
are a little perverse.
link |
So as a part of things like this Sarbanes–Oxley Act
link |
and various people's interpretations
link |
of all kinds of accounting principles.
link |
And this is kind of a worldwide thing.
link |
But if you've got a corporation that
link |
is depending on some piece of software,
link |
often various accounting and reporting standards
link |
say if you don't have a support contract on this thing
link |
that your business is depending on, then that's bad.
link |
So if you've got a database, you need to pay for support.
link |
But there's a difference between the sort of support contracts
link |
that the average open source database producer charges
link |
and what somebody who is truly rapacious like Oracle charges.
link |
Yeah, so it's a balance, like you said.
link |
It is absolutely a balance.
link |
And there are a lot of different ways
link |
to make the math work out for everybody.
link |
And the very unbalanced sort of like the winner
link |
takes all thing that happens in so much of modern commerce,
link |
that just doesn't work for me either.
link |
I know you've talked about this in quite a few places,
link |
but you have created one of the most popular programming
link |
languages in the world.
link |
This is a programming language that I first
link |
learned about object oriented programming with.
link |
I think it's a programming language
link |
that a lot of people use in a lot of different places
link |
and millions of devices today, Java.
link |
So the absurd question, but can you
link |
tell the origin story of Java?
link |
So a long time ago at Sun in about 1990,
link |
there was a group of us who were kind of worried
link |
that there was stuff going on in the universe of computing
link |
that the computing industry was missing out on.
link |
And so a few of us started this project
link |
at Sun that really got going.
link |
I mean, we started talking about it in 1990,
link |
and it really got going in 91.
link |
And it was all about what was happening
link |
in terms of computing hardware processors
link |
and networking and all of that that was outside
link |
of the computer industry.
link |
And that was everything from the sort
link |
of early glimmers of cell phones that were happening then
link |
to you look at elevators and locomotives
link |
and process control systems in factories
link |
and all kinds of audio equipment and video equipment.
link |
They all had processors in them, and they were all
link |
doing stuff with them.
link |
And it sort of felt like there was something going on there
link |
that we needed to understand.
link |
So C and C++ was in the air already.
link |
Oh, no, C and C++ absolutely owned the universe
link |
Everything was written in C and C++.
link |
So where was the hunch that there
link |
was a need for a revolution?
link |
Well, so the need for a revolution
link |
was not about a language.
link |
It was just as simple and vague as there
link |
are things happening out there.
link |
We need to understand them.
link |
We need to understand them.
link |
And so a few of us went on several somewhat epic road
link |
Literal road trips?
link |
Literal road trips.
link |
It's like get on an airplane, go to Japan,
link |
visit Toshiba and Sharp and Mitsubishi and Sony
link |
and all of these folks.
link |
And because we worked for Sun, we
link |
had folks who were willing to give us introductions.
link |
We visited Samsung and a bunch of Korean companies.
link |
And we went all over Europe.
link |
We went to places like Philips and Siemens and Thomson.
link |
And what did you see there?
link |
For me, one of the things that sort of leapt out
link |
was that they were doing all the usual computer things
link |
that people had been doing like 20 years before.
link |
The thing that really leapt out to me
link |
was that they were sort of reinventing
link |
computer networking.
link |
And they were making all the mistakes
link |
that people in the computer industry had made.
link |
And since I had been doing a lot of work in the networking
link |
area, we'd go and visit Company X.
link |
They'd describe this networking thing that they were doing.
link |
And just without any thought, I could tell them
link |
like the 25 things that were going
link |
to be complete disasters with that thing
link |
that they were doing.
link |
And I don't know whether that had any impact on any of them.
link |
But that particular story of repeating the disasters
link |
of the computer science industry was there.
link |
And one of the things we thought was, well,
link |
maybe we could do something useful here with bringing them
link |
But also, at the same time, we learned a bunch of things
link |
from these mostly consumer electronics companies.
link |
And high on the list was that they
link |
viewed their relationship with the customer as sacred.
link |
They were never, ever willing to make tradeoffs
link |
between for safety.
link |
So one of the things that had always
link |
made me nervous in the computer industry
link |
was that people were willing to make tradeoffs in reliability
link |
to get performance.
link |
They want faster, faster.
link |
It breaks a little more often because it's fast.
link |
Maybe you run it a little hotter than you should.
link |
Or the one that always blew my mind
link |
was the way that the folks at Cray Supercomputers
link |
got their division to be really fast
link |
was that they did Newton Raphson approximations.
link |
And so the bottom several bits of A over B
link |
were essentially random numbers.
link |
What could possibly go wrong?
link |
What could go wrong?
link |
And just figuring out how to nail the bottom bit,
link |
how to make sure that if you put a piece of toast in a toaster,
link |
it's not going to kill the customer.
link |
It's not going to burst into flames and burn the house down.
link |
So I guess those are the principles that were inspiring.
link |
But how did, from the days of Java's called oak,
link |
because of a tree outside the window story
link |
that a lot of people know, how did it
link |
become this incredible, powerful language?
link |
Well, so it was a bunch of things.
link |
So after all that, the way that we
link |
decided that we could understand things better
link |
was by building a demo, building a prototype of something.
link |
So because it was easy and fun, we
link |
decided to build a control system for some home
link |
electronics, TV, VCR, that kind of stuff.
link |
And as we were building it, we discovered
link |
that there were some things about standard practice
link |
in C programming that were really getting in the way.
link |
And it wasn't exactly because we were writing all this C code
link |
and C++ code that we couldn't write it to do the right thing.
link |
But one of the things that was weird in the group
link |
was that we had a guy whose top level job was
link |
he was a business guy.
link |
He was an MBA kind of person, think about business plans
link |
And there were a bunch of things that were kind of,
link |
and we would talk about things that were going wrong
link |
and things that were going wrong,
link |
things that were going right.
link |
And as we thought about things like the requirements
link |
for security and safety, some low level details
link |
and see like naked pointers.
link |
And so back in the early 90s, it was well understood
link |
that the number one source of security vulnerabilities.
link |
Was just pointers, was just bugs.
link |
And it was like 50%, 60%, 70% of all security vulnerabilities
link |
And the vast majority of them were like buffer overflows.
link |
So you're like, we have to fix this.
link |
We have to make sure that this cannot happen.
link |
And that was kind of the original thing for me
link |
was this cannot continue.
link |
And one of the things I find really entertaining this year
link |
was, I forget which Rag published it,
link |
but there was this article that came out
link |
that was sort of the result of an examination
link |
of all the security vulnerabilities in Chrome.
link |
And Chrome is like a giant piece of C++ code.
link |
And 60% or 70% of all the security vulnerabilities
link |
were stupid pointer tricks.
link |
And I thought, it's 30 years later and we're still there.
link |
And we're still there.
link |
And that's one of those slap your forehead
link |
and just want to cry moments.
link |
Would you attribute, or is that too much of a simplification,
link |
but would you attribute the creation of Java
link |
Well, I mean, that was one of the trigger points.
link |
Concurrency you've mentioned.
link |
Concurrency was a big deal.
link |
Because when you're interacting with people,
link |
the last thing you ever want to see
link |
is the thing like waiting and issues
link |
about the software development process.
link |
When faults happen, can you recover from them?
link |
What can you do to make it easier
link |
to create and eliminate complex data structures?
link |
What can you do to fix one of the most common C problems,
link |
which is storage leaks?
link |
And it's evil twin, the freed but still being used
link |
You free something and then you keep using it.
link |
So when I was originally thinking about that,
link |
I was thinking about it in terms of safety and security issues.
link |
And one of the things I came to understand
link |
was that it wasn't just about safety and security,
link |
but it was about developer velocity.
link |
So and I got really religious about this
link |
because at that point, I had spent an ungodly amount
link |
of my life hunting down mystery pointer bugs.
link |
And two thirds of my time as a software developer
link |
was because the mystery pointer bugs tend
link |
to be the hardest to find because they tend
link |
to be very, very statistical.
link |
The ones that hurt, they're like a one in a million chance.
link |
But nevertheless, create an infinite amount of suffering.
link |
Because when you're doing a billion operations a second,
link |
one in a million chance means it's going to happen.
link |
And so I got really religious about this thing,
link |
about making it so that if something fails,
link |
it fails immediately and visibly.
link |
And one of the things that was a real attraction of Java
link |
to lots of development shops was that we get our code up
link |
and running twice as fast.
link |
You mean like the entirety of the development process,
link |
debugging, all that kind of stuff?
link |
Yeah, so if you measure time from you first touch fingers
link |
to keyboard until you get your first demo out,
link |
not much different.
link |
But if you look from fingers touching keyboard
link |
to solid piece of software that you could release
link |
in production, it would be way faster.
link |
And I think what people don't often realize is, yeah,
link |
there's things that really slow you down,
link |
like the hard to catch bugs probably
link |
is the thing that really slows down the entire time.
link |
It really slows things down.
link |
But also, one of the things that you get out
link |
of object oriented programming is a strict methodology
link |
about what are the interfaces between things
link |
and being really clear about how parts relate to each other.
link |
And what that helps with is so many times
link |
what people do is they kind of like sneak around the side.
link |
So if you've built something and people are using it
link |
and you say, well, OK, I built this thing.
link |
You use it this way.
link |
And then you change it in such a way
link |
that it still does what you said it does.
link |
It just does it a little bit different.
link |
Then you find out that somebody out there
link |
was sneaking around the side.
link |
They sort of tunneled in a back door.
link |
And this person, their code broke.
link |
And because they were sneaking through a side door.
link |
And normally, the attitude is, dummy.
link |
But a lot of times, you can't just slap their hand
link |
and tell them to not do that.
link |
Because it's some bank's account reconciliation system
link |
that some developer decided, oh, I'm lazy.
link |
I'll just sneak through the back door.
link |
Because the language allows it.
link |
I mean, you can't even mad at them.
link |
And so one of the things I did that, on the one hand,
link |
upset a bunch of people was I made it
link |
so that you really couldn't go through back doors.
link |
So the whole point of that was to say,
link |
if the interface here isn't right,
link |
the wrong way to deal with that is to go through a back door.
link |
The right way to deal with it is to walk up
link |
to the developer of this thing and say, fix it.
link |
And so it was kind of like a social engineering thing.
link |
And people ended up discovering that that really
link |
made a difference in terms of.
link |
And a bunch of this stuff, if you're just screwing around
link |
writing your own class project scale stuff,
link |
a lot of this stuff isn't quite so important
link |
because you're both sides of the interface.
link |
But when you're building larger, more complex pieces of software
link |
that have a lot of people working on them,
link |
and especially when they span organizations,
link |
having clarity about how that stuff gets structured
link |
And especially, there's so much software
link |
that is fundamentally untestable until you do the real thing.
link |
It's better to write good code in the beginning
link |
as opposed to writing crappy code
link |
and then trying to fix it and trying to scramble and figure
link |
out, and through testing, figure out where the bugs are.
link |
Yeah, it's like, which shortcut caused that rocket
link |
to not get where it was needed to go?
link |
So I think one of the most beautiful ideas philosophically
link |
and technically is of a virtual machine, a Java virtual machine.
link |
Again, I apologize to romanticize things,
link |
but how did the idea of the JVM come to be?
link |
How to you radical of an idea it is?
link |
Because it seems to me to be just a really interesting idea
link |
in the history of programming.
link |
So the Java virtual machine, you can think of it
link |
in different ways because it was carefully designed
link |
to have different ways of viewing it.
link |
So one view of it that most people don't really realize
link |
is there is that you can view it as sort
link |
of an encoding of the abstract syntax tree
link |
in reverse Polish notation.
link |
I don't know if that makes any sense at all.
link |
I could explain it, and that would blow all of our time.
link |
But the other way to think of it and the way
link |
that it ends up being explained is
link |
that it's like the instruction set of an abstract machine
link |
that's designed such that you can translate
link |
that abstract machine to a physical machine.
link |
And the reason that that's important,
link |
so if you wind back to the early 90s
link |
when we were talking to all of these companies doing
link |
consumer electronics, and you talk to the purchasing people,
link |
there were interesting conversations with purchasing.
link |
So if you look at how these devices come together,
link |
they're sheet metal and gears and circuit boards
link |
and capacitors and resistors and stuff.
link |
And everything you buy has multiple sources.
link |
So you can buy a capacitor from here.
link |
You can buy a capacitor from there.
link |
And you've got kind of a market so that you can actually
link |
get a decent price for a capacitor.
link |
But CPUs, and particularly in the early 90s,
link |
CPUs were all different and all proprietary.
link |
So if you use the chip from Intel,
link |
you had to be an Intel customer till the end of time.
link |
Because if you wrote a bunch of software,
link |
when you wrote software using whatever technique you wanted,
link |
and C was particularly bad about this
link |
because there was a lot of properties
link |
of the underlying machine that came through.
link |
So you were stuck.
link |
So the code you wrote, you were stuck
link |
to that particular machine.
link |
You were stuck to that particular machine,
link |
which meant that they couldn't decide,
link |
you know, Intel is screwing us.
link |
I'll start buying chips from Bob's Better Chips.
link |
This drove the purchasing people absolutely insane
link |
that they were welded into this decision.
link |
And they would have to make this decision
link |
before the first line of software was written.
link |
That's funny that you're talking about the purchasing people.
link |
So there's one perspective, right?
link |
There's a lot of other perspectives
link |
that all probably hated this idea.
link |
But from a technical aspect,
link |
just like the creation of an abstraction layer
link |
that's agnostic to the underlying machine
link |
from the perspective of the developer,
link |
I mean, that's brilliant.
link |
Well, and so that's like across the spectrum
link |
of providers of chips.
link |
But then there's also the time thing
link |
because, you know, as you went from one generation
link |
to the next generation to the next generation,
link |
they were all different.
link |
And you would often have to rewrite your software.
link |
Oh, you mean generations of machines of different kinds?
link |
So like one of the things that sucked about a year out
link |
of my life was when Sun went from the Motorola 68010
link |
processor to the 68020 processor.
link |
Then they had a number of differences.
link |
And one of them hit us really hard.
link |
And I ended up being the point guy
link |
on the worst case of where the new instruction cache
link |
architecture hurt us.
link |
Well, OK, so I mean, so one of this idea, I mean, OK.
link |
So yeah, you articulate a really clear fundamental problem
link |
in all of computing.
link |
But where do you get the guts to think
link |
we can actually solve this?
link |
You know, in our conversations with all of these vendors,
link |
these problems started to show up.
link |
And I kind of had this epiphany because it reminded me
link |
of a summer job that I had had in grad school.
link |
So back in grad school, my thesis advisor,
link |
well, I had two thesis advisors for bizarre reasons.
link |
One of them was a guy named Raj Reddy.
link |
The other one was Bob Sproul.
link |
And Raj, I love Raj.
link |
I really love both of them.
link |
So the department had bought a bunch of early workstations
link |
from a company called Three Rivers Computer Company.
link |
And Three Rivers Computer Company
link |
was a bunch of electrical engineers
link |
who wanted to do as little software as possible.
link |
So they knew that they'd need to have compilers and an OS
link |
and stuff like that.
link |
And they didn't want to do any of that.
link |
And they wanted to do that for as close to zero money
link |
So what they did was they built a machine whose instruction set
link |
was literally the byte code for UCSD Pascal, the P code.
link |
And so we had a bunch of software
link |
that was written for this machine.
link |
And for various reasons, the company
link |
wasn't doing terrifically well.
link |
We had all this software on these machines.
link |
And we wanted it to run on other machines, principally
link |
And so Raj asked me if I could come up
link |
with a way to port all of this software from the PERC machines
link |
And I think what he had in mind was something
link |
that would translate from Pascal to C or Pascal to, actually,
link |
at those times, pretty much it was
link |
you could translate to C or C. And if you
link |
didn't like translate to C, you could translate to C.
link |
There was, it's like the Henry Ford, any color you want,
link |
just as long as it's black.
link |
And I went, that's really hard.
link |
And I noticed that, and I was looking at stuff.
link |
And I went, oh, I bet I could rewrite the P code
link |
into VAX assembly code.
link |
And then I started to realize that there
link |
were some properties of P code that
link |
made that really easy, some properties that
link |
made it really hard.
link |
So I ended up writing this thing that
link |
translated from P code on the Three Rivers PERCs
link |
into assembly code on the VAX.
link |
And I actually got higher quality code than the C compiler.
link |
And so everything just got really fast.
link |
It was really easy.
link |
It was like, wow, I thought that was a sleazy hack
link |
because I was lazy.
link |
And in actual fact, it worked really well.
link |
And I tried to convince people that that was maybe
link |
a good thesis topic.
link |
And nobody was, it was like, nah.
link |
That's, I mean, it's kind of a brilliant idea, right?
link |
Or maybe you didn't have the, you
link |
weren't able to articulate the big picture of it.
link |
And I think that was a key part.
link |
But so then clock comes forward a few years.
link |
And it's like, we've got to be able to,
link |
if they want to be able to switch
link |
from this weird microprocessor to that weird and totally
link |
different microprocessor, how do you do that?
link |
And I kind of went, oh, maybe by doing something kind of
link |
in the space of Pascal P code, I could do multiple translations
link |
to multiple translators.
link |
And I spent some time thinking about that
link |
and thinking about what worked and what didn't work
link |
when I did the P code to Vax translator.
link |
And I talked to some of the folks
link |
who were involved in Smalltalk because Smalltalk also
link |
And then I kind of went, yeah, I want to do that.
link |
Because that actually, and it had the other advantage
link |
that you could either interpret it or compile it.
link |
And interpreters are usually easier to do,
link |
but not as fast as a compiler.
link |
So I figured, good, I can be lazy again.
link |
Sometimes I think that most of my good ideas
link |
are driven by laziness.
link |
And often I find that some of people's stupidest ideas
link |
are because they're insufficiently lazy.
link |
They just want to build something really complicated.
link |
And it's like, it doesn't need to be that complicated.
link |
Yeah, and so that's how that came out.
link |
But that also turned into almost a religious position
link |
on my part, which got me in several other fights.
link |
So one of the things that was a real difference
link |
was the way that arithmetic worked.
link |
And once upon a time, it wasn't always just
link |
two's complement arithmetic.
link |
There were some machines that had one's complement
link |
arithmetic, which was like almost anything built by CDC.
link |
And occasionally, there were machines
link |
that were decimal arithmetic.
link |
And I was like, this is crazy.
link |
Pretty much two's complement integer arithmetic has one.
link |
One of the other places where there was a lot of variability
link |
was in the way that floating point behaved.
link |
And that was causing people throughout the software
link |
industry much pain because you couldn't
link |
do a numerical computing library that
link |
would work on CDC and then have it work on an IBM machine
link |
and work on a DEC machine.
link |
And as a part of that whole struggle,
link |
there had been this big body of work on floating point
link |
And this thing emerged that came to be called IEEE 754,
link |
which is the floating point standard that pretty much
link |
has taken over the entire universe.
link |
And at the time I was doing Java,
link |
it had pretty much completed taking over the universe.
link |
There were still a few pockets of holdouts,
link |
but I was like, it's important to be
link |
able to say what two plus two means.
link |
And so I went that.
link |
And one of the ways that I got into fights with people
link |
was that there were a few machines that did not
link |
implement IEEE 754 correctly.
link |
Well, of course, that's all short term kind of fights.
link |
I think in the long term, I think this vision is one out.
link |
Yeah, and I think it's worked out over time.
link |
I mean, the biggest fights were with Intel
link |
because they had done some strange things with rounding.
link |
They'd done some strange things with their transcendental
link |
functions, which turned into a mushroom cloud of weirdness.
link |
And in the name of optimization, but from the perspective
link |
of the developer, that's not good.
link |
Well, their issues with transcendental functions
link |
OK, so that's not even a trade off.
link |
That's just absolutely.
link |
Yeah, they were doing range reduction for sine and cosine
link |
using a slightly wrong value for pi.
link |
We've got 10 minutes.
link |
So in the interest of time, two questions.
link |
So one about Android and one about life.
link |
So one, I mean, we could talk for many more hours.
link |
I hope eventually we might talk again.
link |
But I got to ask you about Android and the use of Java
link |
there because it's one of the many places where Java just
link |
has a huge impact on this world.
link |
Just on your opinion, is there things
link |
that make you happy about the way Java
link |
is used in the Android world?
link |
And are there things that you wish were different?
link |
I don't know how to do a short answer to that.
link |
But I have to do a short answer to that.
link |
So I'm happy that they did it.
link |
Java had been running on cell phones
link |
at that time for quite a few years.
link |
And it worked really, really well.
link |
There were things about how they did it.
link |
And in particular, various ways that they kind of violated
link |
all kinds of contracts.
link |
The guy who led it, Andy Rubin, he crossed a lot of lines.
link |
There's some lines crossed.
link |
Yeah, lines were crossed that have since mushroomed
link |
into giant court cases.
link |
And they didn't need to do that.
link |
And in fact, it would have been so much cheaper for them
link |
to not cross lines.
link |
I mean, I suppose they didn't anticipate
link |
the success of this whole endeavor.
link |
Or do you think at that time it was already clear
link |
that this is going to blow up?
link |
I guess I sort of came to believe
link |
that it didn't matter what Andy did,
link |
it was going to blow up.
link |
I kind of started to think of him as a manufacturer of bombs.
link |
Yeah, some of the best things in this world
link |
come about through a little bit of explosive.
link |
Well, and some of the worst.
link |
And some of the worst, beautifully put.
link |
And like you said, I mean, does that
link |
make you proud that Java is in millions?
link |
I mean, it could be billions of devices.
link |
Yeah, well, I mean, it was in billions of phones
link |
before Android came along.
link |
And I'm just as proud of the way that the smart card standards
link |
And everybody involved in that did a really good job.
link |
And that's billions and billions.
link |
The SIM cards, the SIM cards in your pocket.
link |
I've been outside of that world for a decade.
link |
So I don't know how that has evolved.
link |
But it's just been crazy.
link |
So on that topic, let me ask, again,
link |
there's a million technical things we could talk about.
link |
But let me ask the absurd, the old philosophical question
link |
What do you hope when you look back at your life
link |
and the people talk about you, write about you 500 years
link |
from now, what do you hope your legacy is?
link |
People not being afraid to take a leap of faith.
link |
I mean, I've got this kind of weird history
link |
of doing weird stuff.
link |
And it worked out pretty damn well.
link |
And I think some of the weirder stuff that I've done
link |
has been the coolest.
link |
And some of it crashed and burned.
link |
And I think well over half of the stuff that I've done
link |
has crashed and burned, which has occasionally
link |
been really annoying.
link |
But still, you kept doing it.
link |
And even when things crash and burn,
link |
you at least learn something from it.
link |
By way of advice, people, developers, engineers,
link |
scientists, or just people who are young, to look up to you,
link |
what advice would you give them how to approach their life?
link |
Don't be afraid of risk.
link |
It's OK to do stupid things once.
link |
Maybe a couple of times you get a pass on the first time
link |
or two that you do something stupid.
link |
The third or fourth time, yeah, not so much.
link |
But also, I don't know why, but really early on,
link |
I started to think about ethical choices in my life.
link |
And because I'm a big science fiction fan,
link |
I got to thinking about just about every technical decision
link |
I make in terms of, are you building
link |
Blade Runner or Star Trek?
link |
Which one's better?
link |
Which future would you rather live in?
link |
So what's the answer to that?
link |
Well, I would sure rather live in the universe of Star Trek.
link |
That opens up a whole topic about AI,
link |
but that's a really interesting idea.
link |
So your favorite AI system would be data from Star Trek.
link |
And my least favorite would easily be Skynet.
link |
I don't think there's a better way to end it, James.
link |
I can't say enough how much of an honor
link |
it is to meet you, to talk to you.
link |
Thanks so much for wasting your time with me today.
link |
Not a waste at all.
link |
All right, thanks.
link |
Thanks for listening to this conversation with James
link |
Gosling, and thank you to our sponsors, Public Goods,
link |
BetterHelp, and ExpressVPN.
link |
Please check out these sponsors in the description
link |
to get a discount and to support this podcast.
link |
If you enjoy this thing, subscribe on YouTube,
link |
review it with five stars on Apple Podcast,
link |
follow on Spotify, support on Patreon,
link |
or connect with me on Twitter at Lex Friedman.
link |
And now, let me leave you with some words from James Gosling.
link |
One of the toughest things about life is making choices.
link |
Thank you for listening, and hope to see you next time.