WEBVTT Kind: captions Language: en 00:00:00.000 --> 00:00:03.480 >> Sean: We have had a few questions in from our Computerphile viewers - our loyal viewers. 00:00:03.480 --> 00:00:07.500 There are some obvious joke ones, which we may get to at the end, but starting with: 00:00:07.500 --> 00:00:12.540 "How did you start programming? Where did you start?" >> BWK: It goes back a very long way. 00:00:12.540 --> 00:00:18.420 I think this would go back into the early 1960s, or something like that, and 00:00:18.420 --> 00:00:22.000 therefore memory is both dim and rosy. 00:00:26.789 --> 00:00:33.780 I think my first programming was probably [in] Fortran. I tried it when I was in, probably, my third year at university, so 00:00:33.780 --> 00:00:39.000 it was a long, long time ago, and I don't remember very much about it. 00:00:39.000 --> 00:00:42.660 One thing I do remember is: you read the book, you read the manual. This is 00:00:42.660 --> 00:00:46.020 McCracken's Fortran books, which are really, really good. And you read them and 00:00:46.020 --> 00:00:49.500 you think you understand it completely. And then you set finger to whatever, in 00:00:49.500 --> 00:00:52.829 this case key punch, and you say: "Wait a minute - what do I do? 00:00:52.829 --> 00:00:56.940 I don't know how to get started!" And I think that conceptual hump of 'how you 00:00:56.940 --> 00:01:01.020 get started' is still there for an awful lot of people. You sort of know the rules of the 00:01:01.020 --> 00:01:05.070 language but you don't know how to say anything. Once you're over that then it's 00:01:05.070 --> 00:01:08.729 easy and that's sort of true then for all subsequent languages. But that first 00:01:08.729 --> 00:01:14.010 step was hard. So I think my first language was Fortran; it was probably at 00:01:14.010 --> 00:01:19.560 university; and I also spent a summer working at what was, at the time, Imperial 00:01:19.560 --> 00:01:26.430 Oil, which is a branch of Esso, and so on, in Toronto, and I wrote COBOL there. I was 00:01:26.430 --> 00:01:30.320 probably the world's worst COBOL programmer. Indescribably bad. 00:01:30.320 --> 00:01:34.890 And I haven't actually written any COBOL since but those were the kind of 00:01:34.890 --> 00:01:39.150 early days. I think I didn't really learn to program properly until I went to 00:01:39.150 --> 00:01:42.329 Princeton as a graduate student and then I actually wrote Fortran programs that 00:01:42.329 --> 00:01:46.649 did something, and that was more useful. >> Sean: That was how you started programming. This 00:01:46.649 --> 00:01:49.829 kind of leads on nicely from that. What did you think of C when you first 00:01:49.829 --> 00:01:54.869 encountered it? >> BWK: Again it's one of those things where I don't remember and it was 00:01:54.869 --> 00:01:58.979 also special in that I kind of snuck up on it because I was in the environment 00:01:58.979 --> 00:02:04.259 where it was going on, I had written a little ... I had spent one summer at 00:02:04.259 --> 00:02:08.220 MIT when I was a graduate student. I was there as, in effect, a summer intern. And 00:02:08.220 --> 00:02:11.550 at that point I had written in a language called MAD, the Michigan 00:02:11.550 --> 00:02:15.370 Algorithm Decoder, which a lot of the CTSS system had been 00:02:15.370 --> 00:02:18.220 written in. It was really nice because it was so much cleaner and 00:02:18.220 --> 00:02:24.700 neater than Fortran. And then at the Labs I wrote a little bit of B, which was a 00:02:24.700 --> 00:02:30.790 precursor to C. B was kind of like a stripped-down version of BCPL, which was 00:02:30.790 --> 00:02:36.280 done by Martin Richards at Cambridge. And I never, I think I never wrote any BCPL, 00:02:36.280 --> 00:02:39.760 but I wrote a little bit of B and it was kind of neat and I liked it. And then 00:02:39.760 --> 00:02:44.620 when C came along, it was at that point a relatively easy transition into using 00:02:44.620 --> 00:02:50.860 it, and I pretty much have repressed all of the details but I wrote programs 00:02:50.860 --> 00:02:54.340 early on that were doing text processing, and although C's not the 00:02:54.340 --> 00:02:58.060 greatest language in the world for text processing, at the time it was a lot 00:02:58.060 --> 00:03:01.390 better than any of the alternatives that were available to me and I think period. 00:03:01.390 --> 00:03:05.950 And so I would I found it quite comfortable and actually enjoyed it at that 00:03:05.950 --> 00:03:10.569 point and stayed that way for many many years. >> Sean: Let's move on to the hardest 00:03:10.569 --> 00:03:14.560 challenge. So what has been the hardest challenge for you in your life as a 00:03:14.560 --> 00:03:20.410 computer scientist, which helps narrow it down somewhat. >> BWK: Yeah. Geez. I, 00:03:20.410 --> 00:03:24.700 I mean what are the problems in computing are: "How do you write 00:03:24.700 --> 00:03:29.410 programs that work" and then "How do you make it possible for other people to 00:03:29.410 --> 00:03:32.470 write programs that work?". And it's sort of those are the kinds of things I've 00:03:32.470 --> 00:03:35.709 been interested in all along. So I want to write my own programs and know that 00:03:35.709 --> 00:03:41.079 they work in some reasonable way. And that leads to, you know, building better 00:03:41.079 --> 00:03:44.380 languages, building better tools for helping programmers, and so on. So that's 00:03:44.380 --> 00:03:48.489 one aspect of it. And the other is how do you help other people write their 00:03:48.489 --> 00:03:52.750 programs too, because programming is hard to do, programs are hard to use sometimes, 00:03:52.750 --> 00:03:56.709 and so that leads to, let's call it the documentation side of life: writing 00:03:56.709 --> 00:04:00.190 books about programming. So that's roughly what I would say. Those are hard 00:04:00.190 --> 00:04:04.000 problems, they're not solved yet. I think most people have the same kinds of 00:04:04.000 --> 00:04:11.739 problems in various ways. And programming is different today than it was say 40-ish 00:04:11.739 --> 00:04:15.760 years ago, in the early days of UNIX. In the early days of UNIX you had a very 00:04:15.760 --> 00:04:19.959 self-contained environment. Things were relatively small because you didn't have 00:04:19.959 --> 00:04:23.560 much computing power to deal with. You didn't have any networking issues so you 00:04:23.560 --> 00:04:26.320 didn't have to worry about things far away not working or attacking 00:04:26.320 --> 00:04:29.770 you or anything like that. So life was simpler and in some ways it was more fun 00:04:29.770 --> 00:04:34.180 because you could build really interesting things -- not huge but 00:04:34.180 --> 00:04:39.190 interesting useful things fairly quickly, fairly small. Today a lot more 00:04:39.190 --> 00:04:44.980 programming is enormous collections of libraries that you have to .... basically 00:04:44.980 --> 00:04:48.220 what you're doing is gluing together things that other people wrote, and then 00:04:48.220 --> 00:04:50.890 you're going to Stack Overflow to see why they don't work. And then you're 00:04:50.890 --> 00:04:55.330 adding somebody else's random glue into your own glue. And it's in some ways not 00:04:55.330 --> 00:04:58.900 nearly as much fun, I think. >> Sean: Leading on from a question before about 00:04:58.900 --> 00:05:03.190 programming languages and how it was when you encountered C, which programming 00:05:03.190 --> 00:05:08.320 language is the best successor of C or the most influential? >> BWK: Those are different 00:05:08.320 --> 00:05:13.780 questions or they have different answers. "Best" is a loaded word so I'll probably 00:05:13.780 --> 00:05:18.220 ignore it but there's some obvious things that derive from C. First, 00:05:18.220 --> 00:05:23.320 C++, which has been enormously influential. It was done by Bjarne 00:05:23.320 --> 00:05:28.390 Stroustrup while he was at Bell Labs. Lots of people say that C++ is too big and too 00:05:28.390 --> 00:05:34.000 complicated, and etc., etc., but in fact it is a very powerful language and pretty 00:05:34.000 --> 00:05:37.270 much everything that's in there is in there for a really sound reason. It's not 00:05:37.270 --> 00:05:40.570 somebody doing random invention; it's actually people trying to solve 00:05:40.570 --> 00:05:44.500 real-world problems. And a lot of the programs that we take for granted today, 00:05:44.500 --> 00:05:50.110 that we just use, are C++ programs. If you use anything from Microsoft's Office 00:05:50.110 --> 00:05:53.710 suite, for example, those are C++ programs. You pick your favorite browsers, those 00:05:53.710 --> 00:06:00.430 are C++ programs. So C++ is in some ways, I would argue, one of the most important 00:06:00.430 --> 00:06:05.950 and influential derivatives and it's the first of the derivatives. Another is Java, 00:06:05.950 --> 00:06:12.580 which in some ways is a reaction to C++. Because C++ is big complicated, etc., and 00:06:12.580 --> 00:06:18.280 so Java was an attempt to simplify what was in C++, to make more of the decisions 00:06:18.280 --> 00:06:21.340 for the programmers, so that the programmer didn't have to make them 00:06:21.340 --> 00:06:27.130 himself or herself. It also took advantage of kind of ten years of 00:06:27.130 --> 00:06:31.300 hindsight, because Java came along the early 90s; C++ is the early 80s, so 00:06:31.300 --> 00:06:34.480 there's a decade of improvement both in our understanding of what we're doing, 00:06:34.480 --> 00:06:38.860 but also a decade of Moore's law, giving us, you know, an order of magnitude or so 00:06:38.860 --> 00:06:41.310 of resources to work. And therefore Java 00:06:41.310 --> 00:06:46.470 could use a virtual machine, which C++ was never able to do. So there's another 00:06:46.470 --> 00:06:53.460 example of a derivative of C which, very important, very influential, an awful lot 00:06:53.460 --> 00:06:58.350 of the services that you use at all of these big websites, are written in 00:06:58.350 --> 00:07:06.900 Java as opposed to C++. What is another one? I guess the obvious next one would 00:07:06.900 --> 00:07:11.910 be JavaScript, which takes the surface syntax of C, as many other languages do, 00:07:11.910 --> 00:07:17.790 but takes the surface syntax, makes some decisions differently -- still an 00:07:17.790 --> 00:07:22.530 interpreter for the most part -- but shares that C heritage in a lot of ways 00:07:22.530 --> 00:07:26.280 and then goes off on its own direction. And Javascript is, in terms of just 00:07:26.280 --> 00:07:29.880 lines of code being executed per day, probably dominates all the 00:07:29.880 --> 00:07:34.800 others. And then a tiny bit of self-serving, the AWK language that Al Aho 00:07:34.800 --> 00:07:38.970 and Peter Weinberger and I did, takes the surface syntax of C and then 00:07:38.970 --> 00:07:44.520 wraps it up in a different style. It's an interpreter but it looks like C with 00:07:44.520 --> 00:07:49.320 some variations to make it possible to do other interesting things. So at least 00:07:49.320 --> 00:07:55.380 those. Oh! and then [a] more modern one: 'Go', for example, a language that dates at this 00:07:55.380 --> 00:08:00.840 point from, I think, 2007, so it probably hit the streets in 2009. So, call it a 00:08:00.840 --> 00:08:07.110 decade old. And so Go in many ways looks like a modern C; some people call it 'C 00:08:07.110 --> 00:08:11.460 for the 21st century', and it has its own nice properties and so on. And one of the 00:08:11.460 --> 00:08:15.000 things that it retains that some of the other languages don't is more the 00:08:15.000 --> 00:08:21.120 minimalism that C had originally. So big spectrum of languages that came 00:08:21.120 --> 00:08:27.420 from C, inspired positively, negative reactions, whatever, but all from that 00:08:27.420 --> 00:08:30.320 single source.