James Gosling: Java, JVM, Emacs, and the Early Days of Computing | Lex Fridman Podcast #126Jun 10, 2021
The following is a conversation with James Gosling, the founder and lead designer behind the Java programming language, which in many indexes is either the most popular programming language in the world or is always at least in the top two or three. We only had a limited time for this. conversation, but I'm sure we'll talk again several times on this
podcast. Quick summary of sponsors' public assets. Betterhelp and expressvpn. Check out these sponsors in the description to get a discount and support this
podcastas a side note. that Java is the language with which I first learned object-oriented programming and with it the art and science of software engineering.
earlyin my college education I took a course on concurrent programming with Java, looking back at that time before I fell in love with it. neural networks the art of parallel
computingwas algorithmically and philosophically fascinating to me the concept of a computer in my mind before that it was something that did one thing at a time the idea that we could create an abstraction of parallelism where many could be done things at the same time, while still ensuring stability and correctness, it was beautiful while some people in college took drugs to expand their minds, I took simultaneous programming if you like this, subscribe on youtube, review it with five stars on the podcast Apple, follow on Spotify, support on patreon or Connect with me on Twitter at Lex Friedman as usual.
More Interesting Facts About,
james gosling java jvm emacs and the early days of computing lex fridman podcast 126...
I'll do a few minutes of ads now and no ads in between. I try to make them interesting, but I give you timestamps, so go ahead and jump in, but check out the sponsors. By clicking the links in the description, it's the best way to support this podcast, this program sponsored by public goods, the one-stop shop for healthy, sustainable and affordable household products. I take their fish oil and use their toothbrush, for example, their products are often a minimalist black. and white design that I find simply beautiful some people ask me why I wear this black suit and tie.
There is a simplicity to it that for me focuses my mind on the most important parts of each moment of each day pulling only the thread of the essential in everything that life has for me it is not about how I look, it is about how I feel. I feel, that's what design is to me, creating a conscious internal experience, not an external appearance, anyway, public goods plants a tree for every order placed, which is kind of Visit publicgoods.com lex o use codelex at checkout to get $15 off your first order. This program is also sponsored by Better Help Spelled Help Help.
Check it out at Betterhelp.com Lex, they figure out what you need and match you with a licensed provider. Professional therapist in less than 48 hours, I chat with the person there and I enjoy it, of course, I also talk regularly to David Goggins these
days, who is definitely not a licensed professional therapist, but he helps me meet my demons and mine and feel comfortable to exist. In the presence of him, we are all different, but for me I believe that suffering is essential to creation, but you can suffer beautifully in a way that does not destroy you.
I believe therapy can help in any form it takes and I believe better help is an option worth trying, they are easy, private, affordable and available worldwide. You can communicate via text message at any time and schedule weekly audio and video sessions. Check it out at Betterhelp.com. Lex. This program is also sponsored by expressvpn. You can use it to unblock movies and shows. They are only available in other countries. I did this recently with Star Trek Discovery and Netflix in the UK, mainly because I'm wondering what it's like to live in London. I'm thinking about moving from Boston to a place where I can build the business I've always dreamed of. construction London is probably not in the top three, but certainly in the top ten, the number one choice currently is Austin for many reasons that I will probably talk about another time, San Francisco unfortunately fell from the number one spot, but is still in the race.
If you have any tips let me know anyway check out expressvpn it allows you to change your location to almost 100 countries and is super fast. Go to expressvpn.com lexbod to get three extra months of free expressvpn that's expressvpn.com lex pod and now here's my conversation with
goslingi read somewhere that the square root of two is your favorite irrational number i have no idea Where did that start? Is there any truth to that? Is there something in mathematics or numbers that you find beautiful oh well, is there something in mathematics or numbers that you find beautiful.
There are many things in mathematics that are really beautiful. You know, I used to consider myself very good at math and nowa
daysI consider myself very bad at math. I had never liked the square root of two, but when I was a teenager. There was a book called Dictionary of Curious and Interesting Numbers that for some reason I read through and almost memorized the whole thing and started this weird habit from when I was writing checks, you know, or paying for things with credit cards. I wish the I receive an interesting number. Are there any numbers that have stuck with you and that make you feel good?
They all have a story and, fortunately, I have forgotten most of them. them, uh, like 42 uh, well, yeah, I mean a 42 is pretty magical and then the irrational ones, I mean, but is there a square root or two floors somewhere? Well, it's like the only number that has destroyed a religion in that sense. The Patagorians believed that all numbers were perfect and that anything could be represented as a rational number and in that period of time this proof came out that there was no rational fraction whose value was equal to the square root of two and that means that nothing in this world is perfect, not even mathematics, well, it means that your definition of perfect was imperfect, well, then there are the ghetto and completeness theorems in the 20th century that ruined it once again for everyone, yeah, although although although Girdle's theorem, you know, the lesson that I learn from Girdle's theorem is not that you know there are things you can't know, which is fundamentally what it says, but you know people want black and white answers, they want real or false, but if you allow a three state logic that is true false or maybe then life is good, I feel like there is a parallel with modern political discourse somewhere, but yeah, let me ask you that with your kind of
earlylove o Appreciation of the beauty of mathematics.
Do you see a parallel between that world and the world of programming? You know that programming is all about logical structure. Understand the patterns that emerge from
computing. Understanding more or less, I mean, it's often like you know the way. the possibility graph to find a short path, which means like, find a short program that does the job, yeah, something like that, but then on the topic of irrational numbers, see DC programming? You just painted it so cleanly. a bit of this trajectory to find a nice little program, but do you see it as fundamentally messed up? maybe unlike math, I don't look at it like I mean, you know you see someone who's good at math do math and you know it's often it's quite complicated sometimes it's kind of magical um when I was a graduate student um one of the students was named jim sax he had this this this this reputation of being some kind of walking, talking human uh theorem proving machine and if you were If you had a difficult problem with something, you could approach him in the hallway and say Jim and he would do this, this funny thing where he would stand up, his eyes would go out of focus and he would say, uh, you know, like I make you know like something in the movies today and then you straighten up and say, you log in and you walk away and you you're going fine, then n log in n is the answer, how did it get there?
At that moment, you know, at the end of the hallway. Somewhere, yeah, it's just the oracle, the black box just gives you the answer, yeah, and then you have to figure out the path from the question to the answer, I think in one of the videos I watched you mentioned, uh, don Knuth, uh, well, at least. recommending his uh, you know, his book is something that people should read, oh yeah, but in terms of theoretical computer science knowledge, do you see anything beautiful that has inspired you in talking about n log n in your work on languages? programming? that's in that whole world of algorithms and complexity and you know this kind of more formal mathematical stuff, um, or that didn't really stick with you in your programming life, it did become pretty clear to me because it's one of the things that made me they matter. it's being able to look at a piece of code and being able to prove to myself that it works, you know, and you know, so, for example, I find that I disagree with a lot of people.
All around me, for things like how to design a piece of software, you know? So software engineers get very grumpy about how they format their documents, which are programs, you know where they put new lines and where they put, you know, braces and all the rest of that, and I tend to go for a style that is very dense to minimize white space, um, yeah, well, to maximize the amount I can see at once, so I like to be able to see a whole. function and understand what it does instead of having to scroll scroll scroll and remember well, yeah, I'm with you on that, yeah, that's it, and people don't like that, yeah, I've had, I've had, you know, several times where engineering teams have organized what was effectively an intervention, you know, they invite me to a meeting and everyone arrived before me and they all look at me and say James about your coding style.
I'm a bit of a strange person. Being a programmer because I don't think very well verbally. I am naturally a slow reader. I am what most people would call a visual thinker. So when you think about a show, what do you see? I see the images correctly. So when I look at a piece of code on a piece of paper, it quickly transforms into an image. And you know, it's almost like a piece of machinery with this connected to that and like these shift knobs, yeah, yeah, I see them. It's more like I see the kind of verbal structure or the lexical structure of the letters, so when you watch the show, that's why you want to see everything in the same place, so you can map it to something visual.
Yeah, and it just jumps off the page at me and yeah, what are the inputs and outputs? What the hell is this thing doing? Yes and yes, getting a full view of it. Can we go back to your memory? term memory access what's the first program you wrote oh I have no idea what the first one was, I mean I know the first machine that I learned, that I learned to program on what was a pdp-8 um at the university of Calgary , do you remember the specs, oh yeah, so the thing had 4k of RAM? Nice 12-bit words, the clock speed was about a third of a megahertz, oh, so I didn't even get to the m, okay, yeah.
Yeah, you know, we're like 10,000 times faster these days, um, and it was like a super computer, like a serious computer, no, the pdp 8i was the first thing that people called like a mini computer. They were cheap enough that a university lab could afford to buy one, and there was time to share all that kind of stuff. There was actually a timesharing operating system for that, but the machine I learned about wasn't used much. There was one that was hidden in the back corner of the computer center and it was bought as part of a project to make computer networks, but you know they didn't really use it much.
I was mostly just sitting there and I was like sitting there and I realized I was just sitting there and I started playing with it and no one seemed to care so I kept doing that and I had a keyboard and like a monitor oh this is long before monitors were common, so it was literally a model 33 teletypewriter, okay, with a paper tape reader, okay, so the user interface wasn't very good, yeah, yeah, it was the first computer built with integrated system. circuits, but by integrated circuits I mean they would have like 10 or 12 transistors on a piece of silicon, not the 10 or 12 billion that machines have today, so what do I mean? of hints of the magic of the Moore's Law exponential type of improvement of the potential of the future that was at your fingertips, kind of like oh, that was cool, yeah, it was just a toy, you know, I'd always liked building things , but one of the problems with building things is that you need to have parts, you know you need pieces of wood or wire or switches or things like that and all of that costs money and here you can build arbitrarily complicated things and I don't need any materials. physical, it doesn't require any money, that's right, it's a good way to put programming, you're right, if you love building things that's fine, so you know it's completely accessible, you don't need anything and anyone from anywhere could do it.Cable TV is eyeball catching, you know they didn't see it that way there, so most of the people who worked at the phone company are in cable.
For companies, their view was that their job was to get engaging content to their customers and their customers would pay for it. They would pay for that. Up top, they saw this as a way to draw attention to themselves and then what they were really doing was selling the eyeballs that were glued to their advertising content to advertisers, yes, the Internet was a competition in that sense, right , and they were right, well, yeah, I mean, there was a proposal that we sent to us. detailed proposal that we wrote, you know, back in the sunshine of the early '90s, which was essentially like, look at anyone you know, with Internet technologies, anyone can become a content provider, so you know you could distribute home movies to your parents or your cousins or your who are anywhere else, so anyone can become an editor.
Wow, you were already thinking about that, yeah, yeah, that was like, yeah, that was it. That was like in the early '90s, yeah, and we thought it would be cool, you know, and the kind of content in the What we were thinking about at the time was like, you know, home movies, kids' essays, um, you know, things like grocery stores or you know, you know that or a restaurant that they would really like to start sending information about and um, that's brilliant and the reaction from the cable companies was like no because then we'll be out of business, what is it about? companies that, because they could have done it, they could have been ahead of that wave, they could have heard that and they could have done it, they didn't see a path to revenue.
You know, there's somewhere in there, there's a lesson for big business. I'd like to hear to try to anticipate the renegades, the innovative people like you in the early days writing proposals about what this could be good and that you know you know it wasn't, you know if you're in a position where you are making a lot of money with a particular business model. um, you know, the whole um, thought like you know how to jump the chasm, you know, you know, you can see oh new. Models are emerging that are more effective, such as digital cameras versus film cameras. um you know, I mean why take the leap, why take the leap, because you're making a lot of money on film and, you know, in my past at Sun, one of our big client was Kodak and I ended up interacting quite a bit. with people from Kodak and they actually had a lot of research on digital cameras and you know, the digital imaging business or the development group and they knew that you know, you know, you just look. on the trend lines and you look, you know the emerging quality of these, you know digital cameras and you know you can plot them on the graph, you know and it's like you know film is better today, but you know.
Digital is getting better like that, the lines are going to get crossed and you know the point where the lines get crossed is going to be a collapse in their business and they could see that, they absolutely knew that the problem is you know. up to the point where they hit the wall, they were making tons of money, yeah right, and when they did the math, it never started to make sense for them to lead the charge and be part of a lot of companies' problems because of this. The kind of thing is, you know, if you're going to jump a chasm like that, like Kodak going from film to digital, that's a transition that's going to take a while, right, we've had fights like this with people . like smart cars, the smart card fights were just ridiculous, but that's where visionary leadership comes in, yes, someone needs to come in and say, well, take the leap, well, it's partly taking the leap, but it's also partly to receive the blow, to receive the blow correctly.
So, like this, then, you can draw all the graphs you want that show that you know, if we jump from here, you know, you know, you know, on our current trajectory, we're doing this and there's a cliff if we force ourselves onto it. a transition and we do it proactively so that we can be in the next wave, but there will be a period where we are at a low point and it almost always ends up being a low point when you come out of the abyss, but the way that public companies They work on this planet, they're reporting every quarter and the one thing a CEO should never do is take a big hit, you know, for a quarter and a lot of these transitions involve a big hit for a period of time, you know. one, two, three-quarters, and then there are some companies, like Tesla and Amazon, that are very good examples of companies that take big hits, but they have the luxury of being able to ignore the stock market for a while and that's not so true. . today really, but you know, in the early days of both companies, you know, they both did this.
You know, I don't care about quarterly reports, I care about how many, how many satisfied customers. We're right, and having as many satisfied customers as possible can often be the enemy of the bottom line. Yeah, so how do you make that work? I mean, Amazon operated in a negative way for a long time. It's like investing in the future, right? You know, Amazon, Google, Tesla and Facebook, a lot of them had what amounted to patient money, um often because there's like a charismatic central figure who has a really big block of shares and they can do it like that.
What do you think about that topic? Maybe it's a bit of a tangent, but you've had the opportunity to work with some pretty big leaders. What is your opinion on Elon Musk's leadership on the Tesla side? On the Amazon side. Jeff Bezos. All these people with huge amounts of equity and vision in their company, I mean, they're founders, yeah, or full founders are like people from the beginning and, uh, they're them, Amazon's gone, they've made a lot of leaps, uh , and you know, uh, that probably at that time people would. Criticism like, what is this bookstore thing?
The crash and burn rate of Silicon Valley is pretty high, and it's not like that, they don't necessarily crash and burn because they were dumb ideas, but you know it's often just a matter of timing and timing and luck, and you know you take companies like like tesla um and and and and and you really know the original tesla um you know kind of like pre um elon was doing pretty well, but but he just led them and because he had a really strong vision, you know he would He made calls he always They were, you know, or mostly pretty good.
I mean, the model from the engineering perspective, those doors are ridiculous, it's like, they're a complete farce, but they are, but they're exactly the symbol of what great leadership is, which is like you have a vision. and you just say if you're going to do something stupid, do it really stupid, yeah, and do it all, yeah, yeah, and you know you gotta give him credit for being a really smart guy, so go back in time a little bit to Steve Jobs. , you already know. Steve Jobs was a similar type of character who had a strong vision and was really smart and you know, he wasn't smart in the technological parts of things, but in some ways he was very smart in the human being type. relationship between you know the relationship between humans and objects um and but he was an idiot, you know, can we dwell on that a little bit like people say he's an idiot? um, he's a feature or a bug, well, that's the question, right?
Then you take people like Steve, who was very hard on people and the question is whether he really was unnecessarily hard on people or was he just getting people to come around to his vision and it could be turned around. Well, well, the results tell a story. You know he is, through whatever idiotic ways he had, he made people often do the best work of his life, yes, yes, and that was absolutely true and you know I interviewed him several times. I know several deals with him, and while I personally liked him, I was never able to work for him, so why do you think you can put into words the kind of tension you feel would be destructive rather than constructive? he, he, he yelled at people, he insulted them and you don't like that no, no, no, I don't think you need to do that, yeah, um, and you know, he, you know, I think you know there's he pushes himself to the people to excel and then they go too far and I think he was on the wrong side of the line and I've never worked for Musk.
I know several people who have a lot of them that they've said and you know, it shows up. There's a lot of talk in the press about Musk being like that, and one of the things I hate about Silicon Valley these days is that a lot of the high-flying successes are run by people who are complete idiots, but it seems like this has become like this. , there's this kind of Steve Jobs mythology that's come up that the reason he was successful was because he was so hard on people and and and and and and in various corners people are starting to say oh yes, to be successful I need to be a real asshole, yeah, Of course, and that just doesn't count for me.
I mean, I know a lot of successful people who aren't jerks and who are perfectly good people. You know, they tend not to be in the public eye, the general public, it kind of elevates idiots to hero status, well, them because they do things that get them in the press, yeah, and you know people who, you know, don't do that. kind of stuff that gets leaked in the press um yeah, I just spoke to chris ladner um for the second time, he's a super nice guy, just an example of this kind of nice guy that's in the background, I feel like he's behind a million technologies, but He also talked about the abruptness of some people, yes, yes, and the fact that being a jerk has become the required style, but one thing you might want to ask about that is maybe take a step back a bit. little for the idiot to be there. side, but there's also if I had to criticize what I've seen in Silicon Valley, which is almost the resistance to working hard, so on the shaking side it's, um, it's such published jobs and Elon pushes people to work very hard and There is a question about whether it is possible to do it well, but one of the things that bothers me is that maybe I am just rushing and, you know, romanticizing the whole suffering thing, but I think that working hard is essential to achieve something interesting like really hard and in Silicon Valley parlance, it's probably too hard this idea that you have to work smart, not much, it often seems to me that you should be lazy because of course you want to work smart of course , you want to be as efficient as possible, but in order. to discover the efficient path as we are talking about with the short programs, yes, well, you know, the smart and difficult, yes, it is not one of the two things or it is one and like one and yes, of course, and you know, the, the, the people. those who say you should work smart, not hard, almost always fail, yeah, thanks, sure, I mean, that's just a recipe for disaster, I mean, there are counter examples, but there are more people who benefited from luck and you Yeah, exactly, luck and timing, like you said, is often an essential thing, but you're saying that you know you can be, you can push people to work hard and do amazing work without, without being unpleasant, yeah, without being nasty, I think, um, google.
It is a good example of Google's leadership throughout its history. It has been a very good example of not being unpleasant, I mean the twins Larry and Sergey, they are both quite nice people, Sandra Paches, very kind, yes, yes, Yes, and you know it's a culture of people who work very, very hard, let me ask you a question that may be a little tense. We are talking about
emacs. It sounds like you've done an amazing job. Outside of Java, you've done an amazing job. that didn't become as popular as it could have because of licensing and open source issues, um, what do you think about this whole mess, like what's happening with open source now, in retrospect, looking back, about licensing about open source?
Do you think open source is a good thing or a bad thing? Do you regret it? Do you have the wisdom that you have learned from all that experience? So overall, I'm a big fan of open source and the way it can be used. building communities and promoting the development of things and promoting collaboration and all that is really great when open source becomes a religion that says all things should be open source, right? I get a little weird about that because it's kind of like saying you know some versions of that end up saying that all software engineers have to take a vow of poverty, like it's unethical to have money, yeah, to build a company. , and you know there's a part of me that actually buys into that right because you know people who make billions of dollars off of a patent and the patent came about like you know, literally a lightning bolt that hits you while you're half lying. a week in bed, yeah, that's lucky for you, the way it sometimes explodes into something that seems very exploitative to me, you know, you seea lot of that in, like in the pharmaceutical industry, um, you know, when you know. when you have medications that cost, you know, they cost you like a hundred dollars a day and it's like no, yeah, so the interesting thing about the kind of open source, uh, what bothers me is when something is not open source and because of that , it's a worse product, yeah, so I mean, if I look at your fair implementation of
emacs, that might have been the dominant implementation, since I use emacs, that's my main id.
I apologize to the world, but I still love it, uh, and you know. I could have been using your emacs implementation and why not? Are you using gnu max? I guess the default on Linux is that new, yes, and that through a strange passage started like the one I wrote exactly like that. is that it still has uh, yeah, sure, well, and part of that was because, you know, in the last few years of graduate school, it became very clear to me that I was either going to be mr emax forever or I was leaving. to graduate, I couldn't really do both, it was a difficult decision, it's very interesting to think about you as the pub as if it was a different trajectory that I could have had.
It happened, yeah, that's fascinating, you know, and maybe you know that I could be fabulously rich today if I had become Mr. Emax and Emacs had become a series of word processing applications and all kinds of things, and you know, I would have done it, but I have done it. a long history of financially suboptimal decisions because I didn't want that life right and you know I went to grad school because I wanted to graduate um and you know being Mr. Emax for a while was kind of fun and then it kind of became not fun no fun um and you know, when it wasn't fun and I knew there was no way I could pay my rent right, yeah, and I was like, "Okay, I'm still a grad student like you know." You know I had a research assistantship and I was making a living off of it and I was trying to do my uh, you know, I was doing all my RA where all my RA, you know, being a graduate student job and being Mr.
Emacs, all at the same time, um and I, I decided to choose one and one of the things that I did at that time. I went around, you know all the people I knew on arpanet who could take care of emacs and Well, almost everyone said they had a day job, so I found out you know two people and a couple of people in a garage in New Jersey, complete with a dog, they are willing to take over, but they were going to have to. charge money um but my deal with them was that they would only make it free for universities and schools and stuff and they said sure and you know that upset some people so now you have some.
I don't know the full story. about this, but I think it's something interesting, it has a certain tension with me, Mr. Richard Stallman, because of the and he represents this kind of thing as if you mentioned free software, a kind of dogmatic approach in itself, all information must be free. must be free, so is there an interesting way to paint a picture of the disagreement you have with Richard over the years? My basic opposition is that you know when you say that information should be free, to a really extreme way that it becomes you. I know all the people whose job is producing everything from movies to software.
Everyone should take a vow of poverty because information should be free and that doesn't work for me. And I and I don't, I don't want to. to be filthy rich I'm not filthy rich um, I'm fine um, but actually I know, you know, you know, I can feed my kids, yeah, I totally agree with you, it just saddens me that sometimes the closure of the fountain, for some reason people who like bureaucracy start to build and sometimes it doesn't hurt the product oh absolutely it's always sad and there's and there's a balance there that's a balance um and you know it's It's not difficult, you know, rapacious capitalism, and it's not, and it's not difficult, in the other direction, um, and you know a lot about the open source movement, they've been magical in finding a way to, um, actually make money well.
Things like service and support work for a lot of people, you know, and there are some ways in which it's like, some of them, they're a little bit perverse, right? So, as you know, a part of things like this sarbanes-oxley. law and various people's interpretations of all kinds of accounting principles, um, and this is a global thing, but if you have a corporation that depends on some software, um, you know you often know various accounting and reporting standards, they say if you don't have a support contract for this thing your business depends on then that's bad you know that, so if you have a database you have to pay for support etc. but there is a difference between the type of support contracts that the average open source database producer charges and what someone who is truly rapacious like Oracle charges, it's a balance, it's absolutely a balance and you know there is many different ways to make you know math job training for everyone um and you know that, you know, uh, unbalanced, you know winner takes all that happens in Much of modern commerce um that doesn't work either for me.
I know you've talked about this in quite a few places, but you've created one of the most popular programming languages in the world. This is the programming language that I first learned about object-oriented programming from you. I think it's a programming language that many people use in many different places and on millions of devices today. Java. So the absurd question is: can you tell the story of the origin of Java for so long? Back around 1990 at Sun, there was a group of us who were a little worried that there were things going on in the computing universe that the computing industry was missing, so a few of us started this project at Sun that really was successful.
I mean, we started talking about it in 1990 and it really started in 91 and it was about knowing what was happening in terms of computer hardware and processors and networks and all that stuff that was outside of the computer industry. and that was everything from the first flashes of cell phones that were happening back then, to elevators and locomotives and process control systems in factories and all kinds of audio and video equipment that all had processors in them. . they and everyone was doing things with them and it felt like something was happening there that we needed to understand and then c c and c plus plus was already in the air oh no c and c plus plus absolutely owned the universe at that moment everything was written in c and z plus plus so , where was the hunch that there was a need for a revolution?
Well, so the need for a revolution was not about a language, it was about it being just as simple and vague, since there are things happening out there and we understand them, we need to understand them, so some of us made several trips around kind of epic road trips, literal road trips, literal road trips, it's like getting on a plane, going to Japan, visiting. you know toshiba and Sharp and mitsubishi and sony and all these people and you know because we worked for Sun we had you know people who were willing to give us presentations you know we visited you know Samsung and um you know a lot of Korean companies and we toured all over Europe, we went to places like Phillips , Siemens and Thompson, and what did you see there?
For me, one of the things that was left out was that they were doing all the usual IT stuff. computer things that people had been doing like 20 years before, what really left me out was that they were reinventing computer networks and they were making all the mistakes that people in the computer industry had made since I had been doing a lot of work in the networking area, you know, you know, we would go and visit, you know, company I know if that had any impact on any of them, but that particular story of, you know, kind of a repeat of the computer industry disasters. um was there and we and one of the things that we thought was okay, maybe we could do something useful here, like introduce them a little bit, but at the same time we learned a lot of things from these, you know, mainly consumer electronics companies. and You know, top of the list was that they considered their relationship with the customer sacred.
They were never willing to make compromises with each other for security reasons, so one of the things that had always made me nervous in the computer industry was that people were willing to make compromises on reliability to get performance, you know, you know they want faster, faster, it breaks a little more often because it's fast, you know, maybe you run it a little hotter than you should or would like. What always surprised me was the way the people at Cray Super Computers got their division really fast, was that they did Newton-Raphson approximations and so you know the bottoms of you know, a over b , we.
They're essentially random numbers, um, what could go wrong, what could go wrong, right, and you know just figuring out how to nail the bottom, um, how to make sure you know that if you put a piece of toast in a toaster, it's not going to come out. killing the client is not going to burst into flames and burn down the house, so those are, I guess, those are the principles that were inspiring, but how did they do it from the days of uh Java? It's called oak because of a tree outside the window. I know how it became this amazing, powerful language, so it was a lot of things, so after all, you know we started, you know, the way we decided we could understand things better was by building a demo, building a prototype of something.
Well, then, because it was easy and fun, we decided to build a control system for some home electronics, you know, TV, VCR, that kind of thing and while we were building it, you know, we discovered that there were some things about standard practice in C programming that, um, was really getting in the way and it wasn't exactly, you know, because we were writing all the C code and the C plus plus code that we couldn't write to do the right thing, but one of The things that were weird in the group was that we had a guy who's who, you know, his high-level job was a business guy, you know, he was kind of an MBA degree guy.
You know, think about business plans and all that, and you know there were a lot of things that, you know, talked about things going wrong and, um, or things going bad, things going right and you know. We think about you know things like safety and security requirements, some low-level details and you see like naked suggestions, yeah, and you know, in the early '90s, it was well understood that you know the number one source for this kind of stuff. . security vulnerabilities are suggestions, they were just suggestions, they were just bugs, yeah right, and it was like you knew that 50 60 70 of all the security vulnerabilities were bugs and the vast majority of them were like buffer overflows, yeah, so you think we have to fix this.
I have to make sure that this can't happen and that was something original to me, this can't go on, and one of the things that I find really entertaining this year was, um, I forget which newspaper published it, but this article appeared. It was an examination, it was kind of the result of an examination of all the security vulnerabilities in Chrome and Chrome is like a giant piece of C-plus plus code and 60 or 70 percent of all the security vulnerabilities were stupid hacks. pointer. and I thought it's been 30 years and we're still there, we're still there and we're still there and you know, you know, that's one of those you know, slap yourself on the forehead and I just want to cry, would you attribute uh or It's a simplification excessive, but would you attribute the creation of Java to uh, to see the limits?
Obvious problems. Well, I mean, that was one of the trigger points and the currency that you mentioned. Attendance was a big problem. You know this because when you interact with people you know that the last thing you want to see is something like waiting and you know the problems about the software development process. You know when failures occur. Can you recover from them? What can you do to solve it? It's easier to create and delete complex data structures, what can you do to fix it? You know one of the most common marine problems, which is storage leaks, um, and it's the evil twin, the um, the piece of memory released but still in use.
I know you release something and then you keep using it oh yeah you know that so when I was originally thinking about it I was thinking about it in terms of sort of safety and security issues and one of the things that I came to believe. I came to understand that it wasn't just about safety and security, it was about developer speed, so I became very religious about it because at that point I had spent a lot of my life hunting for mysterious pointer bugs and you know. like two-thirds of my time as a software developer, you know, becauseThey'd done some weird things with rounding, they'd done some weird things with their transcendental features that could turn into a mushroom cloud of, you know, weirdness and name-dropping in the name of optimization, but from a developer perspective, that is not like that. well their problems with transcendental functions were just stupid, okay that's not even a tradeoff, it's absolutely yes, they were doing rank reduction on the first sign and cosine using a slightly wrong value for pi, I got it, forward. ten minutes, so in the interest of time, two questions, one about Android and one about life.
So one, I mean, we could talk for many more hours. I hope we can eventually talk again, but I have to ask you about Android and using Java. there because it's one of the many places where Java has a big impact in this world, just in your opinion, are there things that make you happy about the way Andro, uh, Java is used in the Android world and are there things What would you like them to be? different, I don't know how to give a short answer to that, but I have to give a short answer so you know I'm happy they did it.
Java had been running on cell phones at that point for quite a few years and it worked very, very well, there were things about how they did it and, in particular, various ways in which, you know, they violated all kinds of contracts, the guy who ran it is Andy Rubin, he crossed a lot of lines there are some lines crossed yeah there were lines crossed that since you know have multiplied into giant court cases um and you know they didn't need to do that and in fact it would have been a lot cheaper for That they didn't cross lines, I mean, I guess they didn't anticipate the success of this whole effort, or do you think it was already clear at that point that this was going to explode?
I guess, in a way, I came to believe it. that no matter what Andy did, he was going to explode, okay, he, he, he, you know, I started thinking of him like he was a bomb maker, yeah, some of the best things in this world come through a some of the uh uh explosive good and some of the worst and some of the worst beautifully expressed, but is there um and like you said, I mean, that makes you proud that Java is itself, in the millions, I mean, it could be ? billions of devices and yeah, well, I mean it was on billions of phones before Android came out, um and you know, I'm as proud as you know of the way that the smart card standards adopted Java and made it .
You know, everyone involved in that did a very good job and that's, you know, billions and billions. That's crazy, SIM cards, you know, SIM cards in your pocket, yeah, I mean, they're out of that world for a decade, so no. I know how it's evolved, but you know it's been crazy, so on that topic let me ask you again, there are a million technical things we could talk about, but let me ask you the absurd, the old philosophical question about life, what do you think? I hope that when you look back on your life and people are talking about you 500 years from now, what do you hope your legacy will be?
People are not afraid to take a leap of faith. I mean, you know I have this. this kind of weird story of doing weird things and it worked out pretty well and I think some of the weirdest things I've ever done have been the coolest and some of them crashed and burned and um Yeah, you know, I think more than half of the things I've done have crashed and burned, which has occasionally been really annoying, but you still kept doing it, but yeah, yeah, yeah, and you know that they know you even when things fail. and burn out, at least you learn something from it by way of advice, you know, people, developers, engineers, scientists, they're just young people, to look up to you, what advice would you give them about how to approach their life? fear of risk it's okay to do stupid things once maybe even a couple of times you know you know you get a pass the first time or two you do something stupid you know the third or fourth time yeah, not so much um but also you know, no I know why, but very early on I started thinking about ethical choices in my life and since I'm a huge science fiction fan, I started thinking about almost every technical decision I make in terms of how Do you want to know?
Are you building Blade Runner or Star Trek? Which is better? What future would you prefer to live in? Know? So what's the answer to that? Well, I'd rather live in the universe of the Star Trek soundtrack. Yeah, that opens up a whole topic about AI, but it's really interesting, yeah, yeah, it's a really interesting idea, so your favorite AI system would be Star Trek data. My least favorite would easily be Skynet. Yes, beautifully said, no. I think there's a better way to end this James, I can't say enough what an honor it is to meet you and talk to you.
Thank you very much for wasting my time today. Not a waste at all, thanks James. That's fine thanks. for listening to this conversation with
goslingand thanks to our sponsors public goods best help and expressvpn check out these sponsors in the description to get a discount and support this podcast if you enjoy this subscribe on youtube review it with 5 stars on Apple Podcast follow us on Spotify , support on Patreon or connect with me on Twitter at Lex Friedman and now let me leave you with some words from James Gosling. One of the most difficult things in life is making decisions.
Thanks for listening and I hope to see you next time.
If you have any copyright issue, please Contact