Difference between revisions of "Alan Kay - Programming Languages & Programming"

From Viewpoints Intelligent Archive
Jump to: navigation, search
(Created page with "{{#evt: service=youtubeIA |id=prIwpKL57dM |alignment=left |autoresize=false }}")
 
Line 5: Line 5:
 
|autoresize=false
 
|autoresize=false
 
}}
 
}}
 +
<subtitle id="0:0:3">let me give you the professor LK professor</subtitle>
 +
<subtitle id="0:0:6"> L K is best known for his pioneering work an</subtitle>
 +
<subtitle id="0:0:9"> object-oriented programming language and we know</subtitle>
 +
<subtitle id="0:0:12"> a graphical user interface design and for coining the</subtitle>
 +
<subtitle id="0:0:15"> phrase the best way to predict the future is to invent</subtitle>
 +
<subtitle id="0:0:18"> it into in 2003</subtitle>
 +
<subtitle id="0:0:21"> Professor Alan can receive receive</subtitle>
 +
<subtitle id="0:0:24"> a ACM Turing Award they consider to</subtitle>
 +
<subtitle id="0:0:27"> be the Nobel Prize of computing from work on object-oriented</subtitle>
 +
<subtitle id="0:0:30"> programming let us welcome Professor Alan Kay</subtitle>
 +
<subtitle id="0:0:36">okay</subtitle>
 +
<subtitle id="0:0:39"> the ground rules here are</subtitle>
 +
<subtitle id="0:0:42"> ask questions whenever</subtitle>
 +
<subtitle id="0:0:45"> you have one because these classes</subtitle>
 +
<subtitle id="0:0:48"> go quickly just think of all</subtitle>
 +
<subtitle id="0:0:51"> the money you're paying for hardly getting anything in</subtitle>
 +
<subtitle id="0:0:54"> a in an hour so</subtitle>
 +
<subtitle id="0:0:57"> programming languages in programming</subtitle>
 +
<subtitle id="0:1:0"> one of the problems of talking about this in general especially</subtitle>
 +
<subtitle id="0:1:3"> in one class is that there have been</subtitle>
 +
<subtitle id="0:1:6"> several thousand programming languages</subtitle>
 +
<subtitle id="0:1:9"> designed and implemented over the years</subtitle>
 +
<subtitle id="0:1:12"> at any given time since the</subtitle>
 +
<subtitle id="0:1:15"> early 60s there have been somewhere</subtitle>
 +
<subtitle id="0:1:18"> between 150 to 200 languages in</subtitle>
 +
<subtitle id="0:1:21"> standard use and these</subtitle>
 +
<subtitle id="0:1:24"> languages are rather different from each</subtitle>
 +
<subtitle id="0:1:27"> other in certain ways and rather</subtitle>
 +
<subtitle id="0:1:30"> similar to each other in other ways and so</subtitle>
 +
<subtitle id="0:1:33"> it's very hard to come up with interesting generalizations</subtitle>
 +
<subtitle id="0:1:36"> and</subtitle>
 +
<subtitle id="0:1:39"></subtitle>
 +
<subtitle id="0:1:42"> what we're really talking about here is programming</subtitle>
 +
<subtitle id="0:1:45"> and programming is</subtitle>
 +
<subtitle id="0:1:48"> the simplest thing to describe it's we</subtitle>
 +
<subtitle id="0:1:51"> do something in the computer does something and</subtitle>
 +
<subtitle id="0:1:54"> if it does what we wanted it to do both</subtitle>
 +
<subtitle id="0:1:57"> of us are successful programming</subtitle>
 +
<subtitle id="0:2:0"> languages are usually the vehicle for</subtitle>
 +
<subtitle id="0:2:3"> this and you can think</subtitle>
 +
<subtitle id="0:2:6"> of user interfaces as</subtitle>
 +
<subtitle id="0:2:9"> kind of an impoverished kind</subtitle>
 +
<subtitle id="0:2:12"> of programming language they used to be</subtitle>
 +
<subtitle id="0:2:15"> richer and that</subtitle>
 +
<subtitle id="0:2:18"> the kinds of things that you did</subtitle>
 +
<subtitle id="0:2:21"> in the user interface were part and parcel of the</subtitle>
 +
<subtitle id="0:2:24">you could do and I'm going to show you a few of those things</subtitle>
 +
<subtitle id="0:2:27"> today so I thought what I do is</subtitle>
 +
<subtitle id="0:2:30"> first to just look</subtitle>
 +
<subtitle id="0:2:33">couple of ideas in programming and programming languages</subtitle>
 +
<subtitle id="0:2:36"> and be able to do it</subtitle>
 +
<subtitle id="0:2:39"> so I don't have to explain some</subtitle>
 +
<subtitle id="0:2:42">programming language you've never seen before I'm going to take a</subtitle>
 +
<subtitle id="0:2:45"> programming language that is currently</subtitle>
 +
<subtitle id="0:2:48"> in use by about three million children called eToys</subtitle>
 +
<subtitle id="0:2:51"> it's the parent of</subtitle>
 +
<subtitle id="0:2:54"> another widely used programming</subtitle>
 +
<subtitle id="0:2:57"> language for children called scratch and</subtitle>
 +
<subtitle id="0:3:0"> some</subtitle>
 +
<subtitle id="0:3:3"> of the same people worked on both of those and so I'll first</subtitle>
 +
<subtitle id="0:3:6"> take a look at what that experience is like and</subtitle>
 +
<subtitle id="0:3:9"> so the basic idea in</subtitle>
 +
<subtitle id="0:3:12"> this style of doing</subtitle>
 +
<subtitle id="0:3:15"> programming it's now has a name</subtitle>
 +
<subtitle id="0:3:18"> called live coding</subtitle>
 +
<subtitle id="0:3:21"> but back live coding goes all the way</subtitle>
 +
<subtitle id="0:3:24"> back to the early 60s it</subtitle>
 +
<subtitle id="0:3:27"> just never was in the style of the punch</subtitle>
 +
<subtitle id="0:3:30"> card UNIX approach</subtitle>
 +
<subtitle id="0:3:33"> black screen by terminal</subtitle>
 +
<subtitle id="0:3:36"> way of doing things so the idea is</subtitle>
 +
<subtitle id="0:3:39"> that you</subtitle>
 +
<subtitle id="0:3:42"> just make things in</subtitle>
 +
<subtitle id="0:3:45"> a variety of ways and the computer responds to them there's no</subtitle>
 +
<subtitle id="0:3:48"> no visible compiling or we're</subtitle>
 +
<subtitle id="0:3:51"> editing so pick up some paint</subtitle>
 +
<subtitle id="0:3:54"> one of the things that kids like is</subtitle>
 +
<subtitle id="0:3:57"> to do</subtitle>
 +
<subtitle id="0:4:0"> things that adults do so</subtitle>
 +
<subtitle id="0:4:3"> you can ask them</subtitle>
 +
<subtitle id="0:4:6"> why don't you draw a car from</subtitle>
 +
<subtitle id="0:4:9"> the top view put</subtitle>
 +
<subtitle id="0:4:12"> on some headlights</subtitle>
 +
<subtitle id="0:4:15">and</subtitle>
 +
<subtitle id="0:4:18"> we were at Disney for a while and so</subtitle>
 +
<subtitle id="0:4:21">the thing we learned at Disney is you must always put on some specular</subtitle>
 +
<subtitle id="0:4:24"> reflections</subtitle>
 +
<subtitle id="0:4:27"></subtitle>
 +
<subtitle id="0:4:30"> like that and this this</subtitle>
 +
<subtitle id="0:4:33"> gives you a graphical object and it does the kind</subtitle>
 +
<subtitle id="0:4:36"> of things you'd expect with a graphical object</subtitle>
 +
<subtitle id="0:4:39"> I can give it a name here I'll call it car and</subtitle>
 +
<subtitle id="0:4:42"> what's interesting about this object is it has another</subtitle>
 +
<subtitle id="0:4:45"> view this is the symbolic view of</subtitle>
 +
<subtitle id="0:4:48"> this object and so</subtitle>
 +
<subtitle id="0:4:51"> here's a property of</subtitle>
 +
<subtitle id="0:4:54"> it called the heading of it says the heading is zero</subtitle>
 +
<subtitle id="0:4:57"> and if I rotate the</subtitle>
 +
<subtitle id="0:5:0"> car you can see it's showing me the degrees from</subtitle>
 +
<subtitle id="0:5:3"> north minus and plus and</subtitle>
 +
<subtitle id="0:5:6"> this is interfaces reflexive so if I</subtitle>
 +
<subtitle id="0:5:9"> go in here and right</subtitle>
 +
<subtitle id="0:5:12"> so everything is by connected</subtitle>
 +
<subtitle id="0:5:15"> here and also here here's</subtitle>
 +
<subtitle id="0:5:18"> a behavior of the car turn</subtitle>
 +
<subtitle id="0:5:21"> by five if I click it it turns</subtitle>
 +
<subtitle id="0:5:24"> the car if I drag it out it makes me a little script</subtitle>
 +
<subtitle id="0:5:27"> if I get the script is</subtitle>
 +
<subtitle id="0:5:30"> now just infinitely looping and</subtitle>
 +
<subtitle id="0:5:33"></subtitle>
 +
<subtitle id="0:5:36"> if I</subtitle>
 +
<subtitle id="0:5:39">pull out another thing</subtitle>
 +
<subtitle id="0:5:42"> each time I'm doing this is the</subtitle>
 +
<subtitle id="0:5:45"> there's a compilation going on but</subtitle>
 +
<subtitle id="0:5:48"> it's sub-second so it's actually</subtitle>
 +
<subtitle id="0:5:51"> compiling a code underneath it and</subtitle>
 +
<subtitle id="0:5:54"> I can actually even drive</subtitle>
 +
<subtitle id="0:5:57"> my little car the</subtitle>
 +
<subtitle id="0:6:0"> zero makes it go straight</subtitle>
 +
<subtitle id="0:6:3"> but in fact it's hard to drive the</subtitle>
 +
<subtitle id="0:6:6"> car this way and</subtitle>
 +
<subtitle id="0:6:9"> it's a little bit like kissing your sisters we really want</subtitle>
 +
<subtitle id="0:6:12">steering</subtitle>
 +
<subtitle id="0:6:15"> wheel so</subtitle>
 +
<subtitle id="0:6:18">we'll just make a steering wheel</subtitle>
 +
<subtitle id="0:6:21"></subtitle>
 +
<subtitle id="0:6:24"> and</subtitle>
 +
<subtitle id="0:6:27"> we'll call it wheel</subtitle>
 +
<subtitle id="0:6:30"> and again</subtitle>
 +
<subtitle id="0:6:33"> we look inside here we see oh this is just the same kind</subtitle>
 +
<subtitle id="0:6:36"> of audit it's just got a different costume on</subtitle>
 +
<subtitle id="0:6:39"> it and again it has a</subtitle>
 +
<subtitle id="0:6:42"> heading and I</subtitle>
 +
<subtitle id="0:6:45"> get the same behavior from</subtitle>
 +
<subtitle id="0:6:48"> it but notice that we</subtitle>
 +
<subtitle id="0:6:51"> got the car to turn by changing</subtitle>
 +
<subtitle id="0:6:54"> this number here and that's</subtitle>
 +
<subtitle id="0:6:57"> kind of an invitation of picking up this value and dropping it into</subtitle>
 +
<subtitle id="0:7:0"> the script and</subtitle>
 +
<subtitle id="0:7:3"> now we get to do</subtitle>
 +
<subtitle id="0:7:9">so you're just starting out here</subtitle>
 +
<subtitle id="0:7:12"> but let me tell you if you program</subtitle>
 +
<subtitle id="0:7:15">language here at UCLA that doesn't allow you to do this</subtitle>
 +
<subtitle id="0:7:18"> little demo right off the bat something</subtitle>
 +
<subtitle id="0:7:21"> is wrong because we're looking at something that goes</subtitle>
 +
<subtitle id="0:7:24"> back 40 years this</subtitle>
 +
<subtitle id="0:7:27"> is just because you don't know what you're getting into</subtitle>
 +
<subtitle id="0:7:30"> here I'm just trying to show you that there</subtitle>
 +
<subtitle id="0:7:33"> doesn't have to be a compile phase it doesn't</subtitle>
 +
<subtitle id="0:7:36"> have to be edits of files it can all be done</subtitle>
 +
<subtitle id="0:7:39"> lickety-split okay</subtitle>
 +
<subtitle id="0:7:42"> so I've got a little car there and</subtitle>
 +
<subtitle id="0:7:45"> the other thing I can do is</subtitle>
 +
<subtitle id="0:7:48"> make</subtitle>
 +
<subtitle id="0:7:51"> lots of them so I'm</subtitle>
 +
<subtitle id="0:7:54"> going to play a game got</subtitle>
 +
<subtitle id="0:7:57"> a red car and a blue car and I'm</subtitle>
 +
<subtitle id="0:8:0"> going to make them small</subtitle>
 +
<subtitle id="0:8:3"> can you see them blue</subtitle>
 +
<subtitle id="0:8:6"> guy and the red guy there and the</subtitle>
 +
<subtitle id="0:8:9"> two programs I'm going to run here this</subtitle>
 +
<subtitle id="0:8:12"> little kids system has automatic multitasking as</subtitle>
 +
<subtitle id="0:8:15"> many tasks as you want so</subtitle>
 +
<subtitle id="0:8:18"> I'm going to say go forward</subtitle>
 +
<subtitle id="0:8:21"> by one and turn randomly and this</subtitle>
 +
<subtitle id="0:8:24"> one says I do</subtitle>
 +
<subtitle id="0:8:27"> this guy and</subtitle>
 +
<subtitle id="0:8:30">if a blue guy sees</subtitle>
 +
<subtitle id="0:8:33"> touches a red guy then make the blue</subtitle>
 +
<subtitle id="0:8:36"> guy red so this is like an infection programming</subtitle>
 +
<subtitle id="0:8:39"> and so if I say go at</subtitle>
 +
<subtitle id="0:8:42"> the top here I'm plotting the infected</subtitle>
 +
<subtitle id="0:8:45"> against the non infected you can see that the</subtitle>
 +
<subtitle id="0:8:48"> big open space here that</subtitle>
 +
<subtitle id="0:8:51"> the village is is kind of like a</subtitle>
 +
<subtitle id="0:8:54">kind of</subtitle>
 +
<subtitle id="0:8:57"> like a long time constant the probability</subtitle>
 +
<subtitle id="0:9:0"> that the two guys are going to hit is fairly low so I'm</subtitle>
 +
<subtitle id="0:9:3"> going to get that behavior but</subtitle>
 +
<subtitle id="0:9:6"> what about a</subtitle>
 +
<subtitle id="0:9:9"> thousand</subtitle>
 +
<subtitle id="0:9:18"> all of a sudden I</subtitle>
 +
<subtitle id="0:9:21">there's another thing if your programming language doesn't</subtitle>
 +
<subtitle id="0:9:24"> allow you to make objects by the hundreds of thousands</subtitle>
 +
<subtitle id="0:9:27"> and run them in parallel then you have to worry about</subtitle>
 +
<subtitle id="0:9:30"> what kind of language you're programming it so the</subtitle>
 +
<subtitle id="0:9:33">kids with this little program that they wrote there's</subtitle>
 +
<subtitle id="0:9:36"> no mystery here they wrote this program</subtitle>
 +
<subtitle id="0:9:39"> so now they can explore</subtitle>
 +
<subtitle id="0:9:42"> by saying well okay how about 200</subtitle>
 +
<subtitle id="0:9:45"></subtitle>
 +
<subtitle id="0:9:48"> and</subtitle>
 +
<subtitle id="0:9:51"> again the sparseness acts like</subtitle>
 +
<subtitle id="0:9:54"> a longer time constant between</subtitle>
 +
<subtitle id="0:9:57"> infections but</subtitle>
 +
<subtitle id="0:10:0">eventually they all die</subtitle>
 +
<subtitle id="0:10:3"> and</subtitle>
 +
<subtitle id="0:10:6"></subtitle>
 +
<subtitle id="0:10:9"> we get this longer thing so</subtitle>
 +
<subtitle id="0:10:12"> the kids will say okay well how</subtitle>
 +
<subtitle id="0:10:27">now</subtitle>
 +
<subtitle id="0:10:30"> they're starting to root for</subtitle>
 +
<subtitle id="0:10:33"> the ones that are maybe no</subtitle>
 +
<subtitle id="0:10:39">so</subtitle>
 +
<subtitle id="0:10:42"> this is kind of an experiment in system dynamics for 10</subtitle>
 +
<subtitle id="0:10:45"> year olds and</subtitle>
 +
<subtitle id="0:10:48"> it's something that many</subtitle>
 +
<subtitle id="0:10:51"> parts the world don't actually understand on</subtitle>
 +
<subtitle id="0:10:54"> any terms because this</subtitle>
 +
<subtitle id="0:10:57"> first curve that I showed the one that went up rapidly</subtitle>
 +
<subtitle id="0:11:0"> is like typhoid and</subtitle>
 +
<subtitle id="0:11:3"> so</subtitle>
 +
<subtitle id="0:11:6"> if this last one was a disease what would it be like what these</subtitle>
 +
<subtitle id="0:11:9"> disease would it be blurt</subtitle>
 +
<subtitle id="0:11:12"> it out</subtitle>
 +
<subtitle id="0:11:15"> let's see it's a disease that's already</subtitle>
 +
<subtitle id="0:11:18">100 million people yeah come</subtitle>
 +
<subtitle id="0:11:21"> on remember</subtitle>
 +
<subtitle id="0:11:24"> you're in it you're right UCLA now</subtitle>
 +
<subtitle id="0:11:27"> yeah so why does it kill</subtitle>
 +
<subtitle id="0:11:30"> that many people when typhoid is</subtitle>
 +
<subtitle id="0:11:33"> much much more virulent the answer is</subtitle>
 +
<subtitle id="0:11:36"> unless you know that a</subtitle>
 +
<subtitle id="0:11:39"> contagious incurable</subtitle>
 +
<subtitle id="0:11:42"> deadly disease is always going to kill everybody</subtitle>
 +
<subtitle id="0:11:45"> off no matter what the time constant</subtitle>
 +
<subtitle id="0:11:48"> is you're not going to do anything when</subtitle>
 +
<subtitle id="0:11:51"> it doesn't look like anything's going on remember people are also being</subtitle>
 +
<subtitle id="0:11:54"> born so for a while</subtitle>
 +
<subtitle id="0:11:57"> when AIDS is doing its work the population is</subtitle>
 +
<subtitle id="0:12:0"> actually still rising and if you</subtitle>
 +
<subtitle id="0:12:3"> don't happen to know this feature of</subtitle>
 +
<subtitle id="0:12:6"> system dynamics you might just ignore</subtitle>
 +
<subtitle id="0:12:9"> it or say it's just for minorities</subtitle>
 +
<subtitle id="0:12:12"> or something like that then all of a sudden you've</subtitle>
 +
<subtitle id="0:12:15"> got a majority of your population</subtitle>
 +
<subtitle id="0:12:18"> infected ok so that's a little thought experiment</subtitle>
 +
<subtitle id="0:12:21"> that children can do</subtitle>
 +
<subtitle id="0:12:24">it's important because</subtitle>
 +
<subtitle id="0:12:27"> if you think about what is it that we need to know today</subtitle>
 +
<subtitle id="0:12:30"> it's not so much knowing that two plus</subtitle>
 +
<subtitle id="0:12:33"> two equals four or how to compute</subtitle>
 +
<subtitle id="0:12:36"> a tip for a waiter</subtitle>
 +
<subtitle id="0:12:39"> actually has to do with systems dynamics</subtitle>
 +
<subtitle id="0:12:42"> because the world particularly biologically is</subtitle>
 +
<subtitle id="0:12:45">connected in more ways than it ever has been before</subtitle>
 +
<subtitle id="0:12:48"> and also our</subtitle>
 +
<subtitle id="0:12:51"> people</subtitle>
 +
<subtitle id="0:12:54"> in Congress in Washington could do well to do a few</subtitle>
 +
<subtitle id="0:12:57"> of these experiments because they'd actually have some</subtitle>
 +
<subtitle id="0:13:0"> sense of how unstable</subtitle>
 +
<subtitle id="0:13:3"> systems are and you shouldn't monkey</subtitle>
 +
<subtitle id="0:13:6"> with them okay so back</subtitle>
 +
<subtitle id="0:13:9"> back here we'll we'll turn this guy off</subtitle>
 +
<subtitle id="0:13:12"> and I got to do two other quick</subtitle>
 +
<subtitle id="0:13:15"> little experiments here</subtitle>
 +
<subtitle id="0:13:18"> first one is to make a little robot car</subtitle>
 +
<subtitle id="0:13:21"> now that we made one that can be driven</subtitle>
 +
<subtitle id="0:13:24"> and for that I will need a track</subtitle>
 +
<subtitle id="0:13:27"> so I'll get sort</subtitle>
 +
<subtitle id="0:13:30"> of a brown track here</subtitle>
 +
<subtitle id="0:13:33"> and</subtitle>
 +
<subtitle id="0:13:36"> robots need</subtitle>
 +
<subtitle id="0:13:39"> sensors so I need to put a sensor on this guy</subtitle>
 +
<subtitle id="0:13:42"> so</subtitle>
 +
<subtitle id="0:13:45"> I'll just draw one in here</subtitle>
 +
<subtitle id="0:13:48"> like</subtitle>
 +
<subtitle id="0:13:51"> this we'll</subtitle>
 +
<subtitle id="0:13:54"> use this to track where are we where we actually</subtitle>
 +
<subtitle id="0:13:57"> are and now we need</subtitle>
 +
<subtitle id="0:14:0"> to make a program we can think out this program first</subtitle>
 +
<subtitle id="0:14:3"> so one of things we do with children is get</subtitle>
 +
<subtitle id="0:14:6">o go around the wall of their classroom with their eyes closed</subtitle>
 +
<subtitle id="0:14:9"> and the way</subtitle>
 +
<subtitle id="0:14:12"> to do that they soon find out is you go</subtitle>
 +
<subtitle id="0:14:15">you hit the wall and then you turn away but</subtitle>
 +
<subtitle id="0:14:18"> as soon as you lose the wall you have to go back into it</subtitle>
 +
<subtitle id="0:14:21"> you keep on going if you don't</subtitle>
 +
<subtitle id="0:14:24"> do that right away you may lose where the</subtitle>
 +
<subtitle id="0:14:27"> wall actually is so right that</subtitle>
 +
<subtitle id="0:14:30"> that little program</subtitle>
 +
<subtitle id="0:14:33"> we want the</subtitle>
 +
<subtitle id="0:14:36">forward so I can get that we're</subtitle>
 +
<subtitle id="0:14:39"> going to test whether we're touching the wall or not</subtitle>
 +
<subtitle id="0:14:42"> here's a test that will</subtitle>
 +
<subtitle id="0:14:45"> test</subtitle>
 +
<subtitle id="0:14:48"> let's see how about</subtitle>
 +
<subtitle id="0:14:51"> the</subtitle>
 +
<subtitle id="0:14:54"> cars blue color</subtitle>
 +
<subtitle id="0:14:57"> sees the walls brown color and</subtitle>
 +
<subtitle id="0:15:0"> then we have to figure out which way to turn</subtitle>
 +
<subtitle id="0:15:3"> here</subtitle>
 +
<subtitle id="0:15:6"></subtitle>
 +
<subtitle id="0:15:9"> okay I'm going to put in two turns by 5's</subtitle>
 +
<subtitle id="0:15:12"> but let's think it through so</subtitle>
 +
<subtitle id="0:15:15"> if we don't have the wall here which way do we want to turn</subtitle>
 +
<subtitle id="0:15:18"> five or</subtitle>
 +
<subtitle id="0:15:21"> minus five five okay</subtitle>
 +
<subtitle id="0:15:24"> so</subtitle>
 +
<subtitle id="0:15:27"> that's no and so four yes we'll</subtitle>
 +
<subtitle id="0:15:30"> just take a guess and try minus five here</subtitle>
 +
<subtitle id="0:15:33"> and we'll just start it going</subtitle>
 +
<subtitle id="0:15:39">okay</subtitle>
 +
<subtitle id="0:15:42"> who can see what the flaw with this program</subtitle>
 +
<subtitle id="0:15:45"> it is</subtitle>
 +
<subtitle id="0:15:48"> somebody tell me</subtitle>
 +
<subtitle id="0:15:51"> well</subtitle>
 +
<subtitle id="0:15:54"> don't worry about efficiency</subtitle>
 +
<subtitle id="0:15:57"> we aren't humans aren't efficient but we're smart</subtitle>
 +
<subtitle id="0:16:0"> what's the</subtitle>
 +
<subtitle id="0:16:3"> condition under which it can lose this</subtitle>
 +
<subtitle id="0:16:6"> law it's</subtitle>
 +
<subtitle id="0:16:9"> going to do with the Sun but if I made</subtitle>
 +
<subtitle id="0:16:12"> a sharp turn right it's got a fixed radius</subtitle>
 +
<subtitle id="0:16:15"> to get back so probably</subtitle>
 +
<subtitle id="0:16:18">lose the wall I might even want to stop</subtitle>
 +
<subtitle id="0:16:21"> the car slowed it way way down to</subtitle>
 +
<subtitle id="0:16:24"> give me a real chance of contacting the wall again</subtitle>
 +
<subtitle id="0:16:27"> okay so</subtitle>
 +
<subtitle id="0:16:30">that's a little experiment</subtitle>
 +
<subtitle id="0:16:33"> in making a feedback thing</subtitle>
 +
<subtitle id="0:16:36"> now what I want to do is to</subtitle>
 +
<subtitle id="0:16:39"> turn this thing into a wriggly</subtitle>
 +
<subtitle id="0:16:42"> worm and to do that</subtitle>
 +
<subtitle id="0:16:45"> I want</subtitle>
 +
<subtitle id="0:16:48"> to make a script that is going to</subtitle>
 +
<subtitle id="0:16:51"> change its shape so</subtitle>
 +
<subtitle id="0:16:54"> here's my little thing it says car</subtitle>
 +
<subtitle id="0:16:57"> look like something but I don't have anything</subtitle>
 +
<subtitle id="0:17:0"> to make it look like so</subtitle>
 +
<subtitle id="0:17:3"> I will</subtitle>
 +
<subtitle id="0:17:6"> somebody talking</subtitle>
 +
<subtitle id="0:17:9">now</subtitle>
 +
<subtitle id="0:17:12"> somebody isn't talking okay</subtitle>
 +
<subtitle id="0:17:15"> so now I'm going</subtitle>
 +
<subtitle id="0:17:18"> to draw a couple of</subtitle>
 +
<subtitle id="0:17:21"> pictures for the wriggly worm part of this</subtitle>
 +
<subtitle id="0:17:24"></subtitle>
 +
<subtitle id="0:17:27"> I'll make a blue top and</subtitle>
 +
<subtitle id="0:17:30"> maybe</subtitle>
 +
<subtitle id="0:17:33"> a brown bottom here</subtitle>
 +
<subtitle id="0:17:36"> and just to test this out</subtitle>
 +
<subtitle id="0:17:39"> this</subtitle>
 +
<subtitle id="0:17:42"> one is called sketch one so if I say do it</subtitle>
 +
<subtitle id="0:17:45"> okay so that worked and</subtitle>
 +
<subtitle id="0:17:48"> but I need another one in order</subtitle>
 +
<subtitle id="0:17:54">so I will</subtitle>
 +
<subtitle id="0:17:57"> make a twin to</subtitle>
 +
<subtitle id="0:18:3">but with</subtitle>
 +
<subtitle id="0:18:6"> the wriggle the other way</subtitle>
 +
<subtitle id="0:18:9"> okay now I need</subtitle>
 +
<subtitle id="0:18:12"> to move back and forth between each one of these and</subtitle>
 +
<subtitle id="0:18:15">which one of these I'm going to need something</subtitle>
 +
<subtitle id="0:18:18"> that we might call a little data structure here</subtitle>
 +
<subtitle id="0:18:21"> I'm going to put the worms in it</subtitle>
 +
<subtitle id="0:18:24"></subtitle>
 +
<subtitle id="0:18:27"> now I'm going to look again</subtitle>
 +
<subtitle id="0:18:30"> see all of the objects here have</subtitle>
 +
<subtitle id="0:18:33">same kind of user interface I'm going to look down here</subtitle>
 +
<subtitle id="0:18:36"> and see oh yeah here's here's</subtitle>
 +
<subtitle id="0:18:39"> the cursor here's one that says the holders</subtitle>
 +
<subtitle id="0:18:42"> player at the cursor so</subtitle>
 +
<subtitle id="0:18:45"> I'm going to put that in there and</subtitle>
 +
<subtitle id="0:18:48"> here's the cursor control so</subtitle>
 +
<subtitle id="0:18:51"> I'm going to toss that in there and we're going</subtitle>
 +
<subtitle id="0:18:54"> to say what I want to do is just increase the cursor</subtitle>
 +
<subtitle id="0:18:57"> over and over again and so</subtitle>
 +
<subtitle id="0:19:0"> now I'll start this script up</subtitle>
 +
<subtitle id="0:19:3"> and you see what it's doing here okay</subtitle>
 +
<subtitle id="0:19:6"> now we could have put that in as a feature for</subtitle>
 +
<subtitle id="0:19:9"> the children</subtitle>
 +
<subtitle id="0:19:12"> but then the children wouldn't understand</subtitle>
 +
<subtitle id="0:19:15"> how to do animation so when you're trying to teach</subtitle>
 +
<subtitle id="0:19:18">something you don't want too many features you want them to actually</subtitle>
 +
<subtitle id="0:19:21"> do the programming themselves</subtitle>
 +
<subtitle id="0:19:24">children have forgotten about these</subtitle>
 +
<subtitle id="0:19:27"> other scripts that are there</subtitle>
 +
<subtitle id="0:19:30"> so I could turn on this one and drive the</subtitle>
 +
<subtitle id="0:19:33"> drive</subtitle>
 +
<subtitle id="0:19:36"> the little worm around</subtitle>
 +
<subtitle id="0:19:39"> or</subtitle>
 +
<subtitle id="0:19:42"> what about this</subtitle>
 +
<subtitle id="0:19:54">okay so</subtitle>
 +
<subtitle id="0:19:57"> okay so that's kind of simple programming</subtitle>
 +
<subtitle id="0:20:0"> and the</subtitle>
 +
<subtitle id="0:20:3"> other thing that you want to be able to get a</subtitle>
 +
<subtitle id="0:20:6">pretty early in your programming career is meta programming</subtitle>
 +
<subtitle id="0:20:9"> and meta</subtitle>
 +
<subtitle id="0:20:12"> programming in this case means I want to</subtitle>
 +
<subtitle id="0:20:15"> I want to make another language other than eToys</subtitle>
 +
<subtitle id="0:20:18"> and I'm going to do it</subtitle>
 +
<subtitle id="0:20:21"> for the particle system kinds</subtitle>
 +
<subtitle id="0:20:24"> of stuff so</subtitle>
 +
<subtitle id="0:20:27"> here's the these are now</subtitle>
 +
<subtitle id="0:20:30"> etoy objects in there</subtitle>
 +
<subtitle id="0:20:33">these are the scripts for the whole interpreter</subtitle>
 +
<subtitle id="0:20:36"> I'm going to use the animate remember</subtitle>
 +
<subtitle id="0:20:39"> the animation thing so if you know a little</subtitle>
 +
<subtitle id="0:20:42"> bit about program counters the anime animation system</subtitle>
 +
<subtitle id="0:20:45">like running a program counter along when</subtitle>
 +
<subtitle id="0:20:48"> you're doing animations what you're doing is saying display that</subtitle>
 +
<subtitle id="0:20:51"> the guy that's that's there</subtitle>
 +
<subtitle id="0:20:54"> in this case we're going to execute instructions</subtitle>
 +
<subtitle id="0:20:57"> and so I'm actually</subtitle>
 +
<subtitle id="0:21:0"> going to turn on the eval here</subtitle>
 +
<subtitle id="0:21:3"> you can see it may be a little quivering a little</subtitle>
 +
<subtitle id="0:21:6"> bit here dying for some input</subtitle>
 +
<subtitle id="0:21:9"> and then the the instructions</subtitle>
 +
<subtitle id="0:21:12"> are going to be implemented</subtitle>
 +
<subtitle id="0:21:15"> using these scripts which have already written and</subtitle>
 +
<subtitle id="0:21:18"> now I just have to build the instruction</subtitle>
 +
<subtitle id="0:21:21"> and so this</subtitle>
 +
<subtitle id="0:21:24"> one's is a test that says if</subtitle>
 +
<subtitle id="0:21:27"> you can move this one says</subtitle>
 +
<subtitle id="0:21:30"> then move okay so now it's executing that instruction</subtitle>
 +
<subtitle id="0:21:33"> and this one says</subtitle>
 +
<subtitle id="0:21:36"> if a</subtitle>
 +
<subtitle id="0:21:39"> blue guy hits a red guy then</subtitle>
 +
<subtitle id="0:21:42"> make them both red let's</subtitle>
 +
<subtitle id="0:21:45"> see if we're lucky here yep</subtitle>
 +
<subtitle id="0:21:48"> okay so</subtitle>
 +
<subtitle id="0:21:51"> programming it and again when you're when</subtitle>
 +
<subtitle id="0:21:54"> you're taking that java class and you</subtitle>
 +
<subtitle id="0:21:57"> spent the first couple of weeks not really writing a</subtitle>
 +
<subtitle id="0:22:0"> program yet think about what's like to write another</subtitle>
 +
<subtitle id="0:22:3"> programming language in Java</subtitle>
 +
<subtitle id="0:22:6"> should be really easy but</subtitle>
 +
<subtitle id="0:22:9"> it isn't okay so</subtitle>
 +
<subtitle id="0:22:12"></subtitle>
 +
<subtitle id="0:22:15"> so one of the one of the theories</subtitle>
 +
<subtitle id="0:22:18"> about designing programming languages is</subtitle>
 +
<subtitle id="0:22:21"> because children</subtitle>
 +
<subtitle id="0:22:24"> are part of our world and children grow up into</subtitle>
 +
<subtitle id="0:22:27"> be being us we should</subtitle>
 +
<subtitle id="0:22:30"> be able to have them be able to start</subtitle>
 +
<subtitle id="0:22:33"> learning how to program this is we're</subtitle>
 +
<subtitle id="0:22:36"> learning how to program and then if you do that well</subtitle>
 +
<subtitle id="0:22:39"> the stuff that children</subtitle>
 +
<subtitle id="0:22:42"> find easy and powerful or</subtitle>
 +
<subtitle id="0:22:45"> actually clues for how to design a programming</subtitle>
 +
<subtitle id="0:22:48"> language yourself okay</subtitle>
 +
<subtitle id="0:22:51"> and so what we've been looking at here is here's</subtitle>
 +
<subtitle id="0:22:54"> computer memory and</subtitle>
 +
<subtitle id="0:22:57"> down a</subtitle>
 +
<subtitle id="0:23:0"> fly speck in the machine is</subtitle>
 +
<subtitle id="0:23:3"> actually some logic gates</subtitle>
 +
<subtitle id="0:23:6"> on a chip one</subtitle>
 +
<subtitle id="0:23:9"> corner of the chip and</subtitle>
 +
<subtitle id="0:23:12"> around it is</subtitle>
 +
<subtitle id="0:23:15"> nano code micro code</subtitle>
 +
<subtitle id="0:23:18"> on the chip</subtitle>
 +
<subtitle id="0:23:21"> itself and that</subtitle>
 +
<subtitle id="0:23:24"> might be an 86 architecture kind</subtitle>
 +
<subtitle id="0:23:27"> of chip but most of the chips are done the same way there's</subtitle>
 +
<subtitle id="0:23:30"> some simple logic</subtitle>
 +
<subtitle id="0:23:33"> like this is the arithmetic is our registers the</subtitle>
 +
<subtitle id="0:23:36"> arithmetic unit and so forth</subtitle>
 +
<subtitle id="0:23:39"> then it's made into a slightly more complicated</subtitle>
 +
<subtitle id="0:23:42"> processor by putting a lowest level of programming</subtitle>
 +
<subtitle id="0:23:45"> they're in pretty elemental terms</subtitle>
 +
<subtitle id="0:23:48"> that's not always easy to write these</subtitle>
 +
<subtitle id="0:23:51"> low level programs and</subtitle>
 +
<subtitle id="0:23:54"> then nobody</subtitle>
 +
<subtitle id="0:23:57"> wants to program in that so</subtitle>
 +
<subtitle id="0:24:0"> in this case what we're looking at is a</subtitle>
 +
<subtitle id="0:24:3"> virtual machine</subtitle>
 +
<subtitle id="0:24:6"> coded ultimately in</subtitle>
 +
<subtitle id="0:24:9"> these terms that</subtitle>
 +
<subtitle id="0:24:12"> makes the computer look like a small talk machine</subtitle>
 +
<subtitle id="0:24:15"> and at this level</subtitle>
 +
<subtitle id="0:24:18">there's an area on there that's manifested where</subtitle>
 +
<subtitle id="0:24:21">go and</subtitle>
 +
<subtitle id="0:24:24"> then in that we</subtitle>
 +
<subtitle id="0:24:27"> write a development system you still haven't seen</subtitle>
 +
<subtitle id="0:24:30"> yes I'm</subtitle>
 +
<subtitle id="0:24:33"> not going to but thank</subtitle>
 +
<subtitle id="0:24:36"> you for the thought that's too complicated small</subtitle>
 +
<subtitle id="0:24:39">talk is a programming language that's all we need to know it</subtitle>
 +
<subtitle id="0:24:42"> has a development system that's written in itself</subtitle>
 +
<subtitle id="0:24:45"> and</subtitle>
 +
<subtitle id="0:24:48"> the etoys system</subtitle>
 +
<subtitle id="0:24:51"> that you saw which is putting up this</subtitle>
 +
<subtitle id="0:24:54"> slide here is written in small talk</subtitle>
 +
<subtitle id="0:24:57"> and then</subtitle>
 +
<subtitle id="0:25:0"> I just made a little interpreter</subtitle>
 +
<subtitle id="0:25:3"> in the eToys machine for doing</subtitle>
 +
<subtitle id="0:25:6"> the rule-based particle system stuff</subtitle>
 +
<subtitle id="0:25:9"> and this is a very typical way of</subtitle>
 +
<subtitle id="0:25:12"> going about handling problems</subtitle>
 +
<subtitle id="0:25:15"> it's not the only way</subtitle>
 +
<subtitle id="0:25:18"> some people like the program down here</subtitle>
 +
<subtitle id="0:25:21"> and write tons of programs to deal</subtitle>
 +
<subtitle id="0:25:24"> with the very same problems another way of doing it is</subtitle>
 +
<subtitle id="0:25:27"> fine languages v the problems gracefully</subtitle>
 +
<subtitle id="0:25:30"> and then the amount of code you</subtitle>
 +
<subtitle id="0:25:33"> have to write to get to the next level is not that large</subtitle>
 +
<subtitle id="0:25:36"> and all of this is kind of an</subtitle>
 +
<subtitle id="0:25:39"> example of</subtitle>
 +
<subtitle id="0:25:42"> Turing's idea of being able</subtitle>
 +
<subtitle id="0:25:45"> to simulate any kind of mechanism on a</subtitle>
 +
<subtitle id="0:25:48"> relatively simple mechanism that has a few</subtitle>
 +
<subtitle id="0:25:51"> pieces of logic and a fair amount of memory</subtitle>
 +
<subtitle id="0:25:54"> okay so that's the kiddie</subtitle>
 +
<subtitle id="0:26:0">now let's take a look at the adult world where</subtitle>
 +
<subtitle id="0:26:3"> we're going to go from programs that have</subtitle>
 +
<subtitle id="0:26:6"> tens of lines in the kiddie</subtitle>
 +
<subtitle id="0:26:9">world but can still do interesting things to adult</subtitle>
 +
<subtitle id="0:26:12"> programs which tend to have zillions of lines and</subtitle>
 +
<subtitle id="0:26:15"> are surprisingly weak</subtitle>
 +
<subtitle id="0:26:18"> and in order to come up with a metric for this</subtitle>
 +
<subtitle id="0:26:21"> I'm going to use a metric of lines</subtitle>
 +
<subtitle id="0:26:24"> of code it's not the</subtitle>
 +
<subtitle id="0:26:27"> only metric you could use but a line of code is something</subtitle>
 +
<subtitle id="0:26:30"> that a programmer has to write so it is one kind</subtitle>
 +
<subtitle id="0:26:33"> of unit of work and it's also unit of space</subtitle>
 +
<subtitle id="0:26:36"> so a 400-page</subtitle>
 +
<subtitle id="0:26:39"> book has 20,000 lines</subtitle>
 +
<subtitle id="0:26:42">could be English</subtitle>
 +
<subtitle id="0:26:45"> but it could be code could</subtitle>
 +
<subtitle id="0:26:48"> be in machine code it could be in C</subtitle>
 +
<subtitle id="0:26:51"> it could be in Java and a</subtitle>
 +
<subtitle id="0:26:54"> foot of books is about 300,000</subtitle>
 +
<subtitle id="0:26:57"> lines and a meter of books stacked</subtitle>
 +
<subtitle id="0:27:0"> up like this is a million lines so that's a good metric</subtitle>
 +
<subtitle id="0:27:3"> million lines of code per meter and stacked</subtitle>
 +
<subtitle id="0:27:6"> up books and</subtitle>
 +
<subtitle id="0:27:9"></subtitle>
 +
<subtitle id="0:27:12"> the Empire State Building is</subtitle>
 +
<subtitle id="0:27:15"> 22,000 books high</subtitle>
 +
<subtitle id="0:27:18"> and 440</subtitle>
 +
<subtitle id="0:27:21"> million lines of code right</subtitle>
 +
<subtitle id="0:27:24"> so if you've ever heard anybody heard</subtitle>
 +
<subtitle id="0:27:27"> of any programming systems that have 400 million</subtitle>
 +
<subtitle id="0:27:30"> lines of code yes</subtitle>
 +
<subtitle id="0:27:33"> though come on</subtitle>
 +
<subtitle id="0:27:36">yeah</subtitle>
 +
<subtitle id="0:27:39"> yeah take a look at our government sometime</subtitle>
 +
<subtitle id="0:27:42"> in fact if you</subtitle>
 +
<subtitle id="0:27:45"> look at your own little</subtitle>
 +
<subtitle id="0:27:48"> own laptop if you happen to be running</subtitle>
 +
<subtitle id="0:27:51"> Microsoft the operating system is about 120</subtitle>
 +
<subtitle id="0:27:54"> million lines of code remember</subtitle>
 +
<subtitle id="0:27:57">system it hasn't done anything for you yet</subtitle>
 +
<subtitle id="0:28:0"> just sitting there and then Microsoft</subtitle>
 +
<subtitle id="0:28:3"> Office is over a hundred million lines of code</subtitle>
 +
<subtitle id="0:28:6"> so that's</subtitle>
 +
<subtitle id="0:28:9"> 220 million lines</subtitle>
 +
<subtitle id="0:28:12"> of code it's about eleven</subtitle>
 +
<subtitle id="0:28:15"> thousand books of code</subtitle>
 +
<subtitle id="0:28:18"> anybody ever read all that code</subtitle>
 +
<subtitle id="0:28:21"> no way very</subtitle>
 +
<subtitle id="0:28:24"> few people who read it all have read eleven</subtitle>
 +
<subtitle id="0:28:27"> thousand books of anything I can guarantee</subtitle>
 +
<subtitle id="0:28:30">you read it all you're not going to read eleven thousand</subtitle>
 +
<subtitle id="0:28:33"> books of code so most of the code has</subtitle>
 +
<subtitle id="0:28:36"> never been over viewed by any</subtitle>
 +
<subtitle id="0:28:39"> single person or even any single group in</subtitle>
 +
<subtitle id="0:28:42"> fact much of the code in there is code</subtitle>
 +
<subtitle id="0:28:45"> that isn't even run but they're afraid to take it out</subtitle>
 +
<subtitle id="0:28:48">hey don't know whether it's run or not and</subtitle>
 +
<subtitle id="0:28:51"> this is it this is a problem on the</subtitle>
 +
<subtitle id="0:28:54"> other hand of the</subtitle>
 +
<subtitle id="0:28:57"> looking at it from the standpoint of writing</subtitle>
 +
<subtitle id="0:29:0"> code the when you look at</subtitle>
 +
<subtitle id="0:29:3"> the actual features you</subtitle>
 +
<subtitle id="0:29:6">this two hundred and twenty million lines of code it</subtitle>
 +
<subtitle id="0:29:9"> doesn't seem like it should be should take two</subtitle>
 +
<subtitle id="0:29:12"> hundred and twenty million lines of code just</subtitle>
 +
<subtitle id="0:29:15">shouldn't back the first time around it was done at Xerox PARC</subtitle>
 +
<subtitle id="0:29:18"> did about half of this and it only took</subtitle>
 +
<subtitle id="0:29:21"> ten thousand lines of code so something</subtitle>
 +
<subtitle id="0:29:24"> happened some kind of explosion</subtitle>
 +
<subtitle id="0:29:27"> of complications and complexity</subtitle>
 +
<subtitle id="0:29:30"> and here just to</subtitle>
 +
<subtitle id="0:29:33"> make you feel better I located a large financial products</subtitle>
 +
<subtitle id="0:29:36"> company whose name I will not put here</subtitle>
 +
<subtitle id="0:29:39"> that has more than 400 million lines</subtitle>
 +
<subtitle id="0:29:42"> of code in its primary offerings</subtitle>
 +
<subtitle id="0:29:45"> to its customers so this is what they</subtitle>
 +
<subtitle id="0:29:48"> are actually maintaining and</subtitle>
 +
<subtitle id="0:29:51"> you can tell they're a little old-fashioned because their user interface</subtitle>
 +
<subtitle id="0:29:54"> is given in terms of screens which</subtitle>
 +
<subtitle id="0:29:57"> harks back to the days of mainframes they</subtitle>
 +
<subtitle id="0:30:0"> have 170,000 screens they</subtitle>
 +
<subtitle id="0:30:3"> have to deal with and that's about twenty thousand</subtitle>
 +
<subtitle id="0:30:6"> books or almost an</subtitle>
 +
<subtitle id="0:30:9"> Empire State Building worth of code</subtitle>
 +
<subtitle id="0:30:12">however</subtitle>
 +
<subtitle id="0:30:15"> if you're looking for a job if you came</subtitle>
 +
<subtitle id="0:30:18"> to UCLA to learn to program and get a job it's</subtitle>
 +
<subtitle id="0:30:21"> just this kind of stuff that you actually have to learn</subtitle>
 +
<subtitle id="0:30:24"> about because that is what business is mired in</subtitle>
 +
<subtitle id="0:30:27"> right now this is what they're hiring people this</subtitle>
 +
<subtitle id="0:30:30"> is why they're crying for programmers</subtitle>
 +
<subtitle id="0:30:33"> not to do better but</subtitle>
 +
<subtitle id="0:30:36">ake care of the mess that is already there think</subtitle>
 +
<subtitle id="0:30:39"> about that</subtitle>
 +
<subtitle id="0:30:42">okay so</subtitle>
 +
<subtitle id="0:30:45"> I'm going to stick to</subtitle>
 +
<subtitle id="0:30:48"> I'll show you a couple of examples in the time</subtitle>
 +
<subtitle id="0:30:51">that's left of what might be done about this</subtitle>
 +
<subtitle id="0:30:54"> part</subtitle>
 +
<subtitle id="0:30:57"> of personal competed these several hundred millions of lines of</subtitle>
 +
<subtitle id="0:31:0"> code okay so</subtitle>
 +
<subtitle id="0:31:3"> let's take a look at this problem</subtitle>
 +
<subtitle id="0:31:6"> from a slightly different perspective</subtitle>
 +
<subtitle id="0:31:9"> over here we've got some</subtitle>
 +
<subtitle id="0:31:12"> gates over</subtitle>
 +
<subtitle id="0:31:15"> here we've got a problem</subtitle>
 +
<subtitle id="0:31:18"> this is what we need we need</subtitle>
 +
<subtitle id="0:31:21"> to do something over here and the question</subtitle>
 +
<subtitle id="0:31:24"> is is what is it going to take us to get from there to there</subtitle>
 +
<subtitle id="0:31:27"> these days and</subtitle>
 +
<subtitle id="0:31:30"> so in</subtitle>
 +
<subtitle id="0:31:33"> terms of machine code lots</subtitle>
 +
<subtitle id="0:31:36"> of the kinds of things I'm talking about or literally billions</subtitle>
 +
<subtitle id="0:31:39"> of lines of code because machine code is written one</subtitle>
 +
<subtitle id="0:31:42"> instruction per line of code and</subtitle>
 +
<subtitle id="0:31:45"> maybe C</subtitle>
 +
<subtitle id="0:31:48"> gives eight to ten</subtitle>
 +
<subtitle id="0:31:51"> machine code instructions per line</subtitle>
 +
<subtitle id="0:31:54"> of code so maybe something that would be</subtitle>
 +
<subtitle id="0:31:57"> billions would be hundreds of millions in</subtitle>
 +
<subtitle id="0:32:0"> C and</subtitle>
 +
<subtitle id="0:32:3"> we can imagine a</subtitle>
 +
<subtitle id="0:32:6"> higher-level language than C</subtitle>
 +
<subtitle id="0:32:9"> not the Java is that</subtitle>
 +
<subtitle id="0:32:12"> much higher level language higher level</subtitle>
 +
<subtitle id="0:32:15"> in C but could imagine something</subtitle>
 +
<subtitle id="0:32:18"> higher level you can imagine something higher level imagine</subtitle>
 +
<subtitle id="0:32:21"> something it might do a lot of these tasks in just</subtitle>
 +
<subtitle id="0:32:24"> thousands of lines of code and the</subtitle>
 +
<subtitle id="0:32:27"> question is why</subtitle>
 +
<subtitle id="0:32:30"> do we stay here down</subtitle>
 +
<subtitle id="0:32:33"> at the gear level for most of the</subtitle>
 +
<subtitle id="0:32:36"> programmatic that is still done today and</subtitle>
 +
<subtitle id="0:32:39"> this huh not</subtitle>
 +
<subtitle id="0:32:42"> a lot of the organization of code at</subtitle>
 +
<subtitle id="0:32:45">is a little bit more like the way biology</subtitle>
 +
<subtitle id="0:32:48"> organizes itself almost</subtitle>
 +
<subtitle id="0:32:51"> none of this still being done</subtitle>
 +
<subtitle id="0:32:54">okay</subtitle>
 +
<subtitle id="0:32:57"> so the programming effort comes</subtitle>
 +
<subtitle id="0:33:0"> down as we go to higher and higher level</subtitle>
 +
<subtitle id="0:33:3"> languages but</subtitle>
 +
<subtitle id="0:33:6"> computer science has not</subtitle>
 +
<subtitle id="0:33:9"> actually been</subtitle>
 +
<subtitle id="0:33:12"> up to the challenge of putting in the amount</subtitle>
 +
<subtitle id="0:33:15"> of invention that's necessary to make programming</subtitle>
 +
<subtitle id="0:33:18">systems that do this amount of work for us so</subtitle>
 +
<subtitle id="0:33:21"> we can think of an in-between is</subtitle>
 +
<subtitle id="0:33:24">just a lot of work for any kind of programming language you do because there's</subtitle>
 +
<subtitle id="0:33:27"> packaging there's documentation there's debuggers</subtitle>
 +
<subtitle id="0:33:30"> there's an enormous amount of</subtitle>
 +
<subtitle id="0:33:33"> work that has to be done and the</subtitle>
 +
<subtitle id="0:33:36"> idea is that with more work which</subtitle>
 +
<subtitle id="0:33:39">gets tougher as you come this way you actually</subtitle>
 +
<subtitle id="0:33:42"> reduce the general programming effort so this is</subtitle>
 +
<subtitle id="0:33:45">popular so virtually all of the programming in</subtitle>
 +
<subtitle id="0:33:48"> business in the u.s. today is done</subtitle>
 +
<subtitle id="0:33:51"> at this level still this is a level that</subtitle>
 +
<subtitle id="0:33:54"> is really not different from the level of programming in the</subtitle>
 +
<subtitle id="0:33:57"> 60s almost nothing has changed</subtitle>
 +
<subtitle id="0:34:0"> new languages have come along but they have not</subtitle>
 +
<subtitle id="0:34:3"> up to their level in any significant way</subtitle>
 +
<subtitle id="0:34:6"> but</subtitle>
 +
<subtitle id="0:34:9"> just to go against</subtitle>
 +
<subtitle id="0:34:12"> the tide here even though you're going to be studying</subtitle>
 +
<subtitle id="0:34:15"> a lot of this stuff here I just want to make you aware of</subtitle>
 +
<subtitle id="0:34:18"> these ideas down here which</subtitle>
 +
<subtitle id="0:34:21"> if you're interested in research and in making things</subtitle>
 +
<subtitle id="0:34:24"> better you might poke your head into</subtitle>
 +
<subtitle id="0:34:27"> now what's funny</subtitle>
 +
<subtitle id="0:34:30"> about history is that there</subtitle>
 +
<subtitle id="0:34:33"> are people who are absolute geniuses who</subtitle>
 +
<subtitle id="0:34:36"> transcend the time in which they</subtitle>
 +
<subtitle id="0:34:39"> live so 50</subtitle>
 +
<subtitle id="0:34:42"> years ago there</subtitle>
 +
<subtitle id="0:34:45"> was no computer graphics this is the</subtitle>
 +
<subtitle id="0:34:48"> guy who invented computer graphics and he</subtitle>
 +
<subtitle id="0:34:51"> also invented object-oriented</subtitle>
 +
<subtitle id="0:34:54"> design systems</subtitle>
 +
<subtitle id="0:34:57"> so he actually did</subtitle>
 +
<subtitle id="0:35:0"> the work in 62 and wrote it</subtitle>
 +
<subtitle id="0:35:3"> up in 63 so this is still the 50th anniversary of this</subtitle>
 +
<subtitle id="0:35:6"> I thought you'd like to see what this</subtitle>
 +
<subtitle id="0:35:9"> very first interactive</subtitle>
 +
<subtitle id="0:35:12"> graphic system looked like and what it could do</subtitle>
 +
<subtitle id="0:35:15">now the first thing you have to visualize is this guy is</subtitle>
 +
<subtitle id="0:35:18"> sitting here with</subtitle>
 +
<subtitle id="0:35:21"> a pointer in his hand a light pen but</subtitle>
 +
<subtitle id="0:35:24"> he's in a computer that is about eight times maybe</subtitle>
 +
<subtitle id="0:35:27"> ten times the size of this room</subtitle>
 +
<subtitle id="0:35:30"> it was close to the size of</subtitle>
 +
<subtitle id="0:35:33"> at least the first Fran's hall building</subtitle>
 +
<subtitle id="0:35:36"> it had its own roof</subtitle>
 +
<subtitle id="0:35:39"> it was the building and</subtitle>
 +
<subtitle id="0:35:42"> it was an air defense computer and from</subtitle>
 +
<subtitle id="0:35:45">three o'clock in the morning to six o'clock in the morning they let this one guy</subtitle>
 +
<subtitle id="0:35:48"> play around with it and</subtitle>
 +
<subtitle id="0:35:51"> so here's what he did and</subtitle>
 +
<subtitle id="0:35:54"> by the way this is not actually a computer display it just was</subtitle>
 +
<subtitle id="0:35:57"> an oscilloscope that put up spots</subtitle>
 +
<subtitle id="0:36:0"> so the first thing he had to do was to write</subtitle>
 +
<subtitle id="0:36:3"> programs that would make lines and arcs</subtitle>
 +
<subtitle id="0:36:6"> and and so forth and about</subtitle>
 +
<subtitle id="0:36:9"> a third of the capacity of this enormous</subtitle>
 +
<subtitle id="0:36:12"> machine was used just to make a simulated</subtitle>
 +
<subtitle id="0:36:15">graphics display because there were no graphics displays</subtitle>
 +
<subtitle id="0:36:18"> okay so this</subtitle>
 +
<subtitle id="0:36:21"> will give you an idea so</subtitle>
 +
<subtitle id="0:36:24"> he gets some ink</subtitle>
 +
<subtitle id="0:36:33">and he just sketches in this flange</subtitle>
 +
<subtitle id="0:36:36">because look at he's pointing at it now and he's</subtitle>
 +
<subtitle id="0:36:39"> giving it a constraint to make everybody mutually</subtitle>
 +
<subtitle id="0:36:42"> perpendicular and what you saw</subtitle>
 +
<subtitle id="0:36:45"> there was sketch pad solving the problem for him</subtitle>
 +
<subtitle id="0:36:48"> right so this way</subtitle>
 +
<subtitle id="0:36:51"> you program this system was by</subtitle>
 +
<subtitle id="0:36:54">telling it what you wanted to have true and sketch bad</subtitle>
 +
<subtitle id="0:36:57"> and figure out how to have it be true same idea</subtitle>
 +
<subtitle id="0:37:0"> here make these two guys parallel</subtitle>
 +
<subtitle id="0:37:3"> now the constraint</subtitle>
 +
<subtitle id="0:37:6"> is collinearity</subtitle>
 +
<subtitle id="0:37:9"> put these lines down these</subtitle>
 +
<subtitle id="0:37:12"> dashes I'm putting in here down on top of</subtitle>
 +
<subtitle id="0:37:15"> the</subtitle>
 +
<subtitle id="0:37:24">now he says okay let's make the guidelines transparent</subtitle>
 +
<subtitle id="0:37:27"> and now we've got a hole in the flange</subtitle>
 +
<subtitle id="0:37:30"> and you</subtitle>
 +
<subtitle id="0:37:33">has continued assuming the first clipping window</subtitle>
 +
<subtitle id="0:37:36"> ever done is that actually</subtitle>
 +
<subtitle id="0:37:39"> the drawing is done on a sheet</subtitle>
 +
<subtitle id="0:37:42">of virtual paper about a third of a mile square</subtitle>
 +
<subtitle id="0:37:45"> now he wants to make a rivet</subtitle>
 +
<subtitle id="0:37:48"> he's</subtitle>
 +
<subtitle id="0:37:51"> going to use the center here for the arc</subtitle>
 +
<subtitle id="0:37:54">and</subtitle>
 +
<subtitle id="0:37:57"> now he's going to do the same trick he's going to say to these</subtitle>
 +
<subtitle id="0:38:0"> guys take these guys to make them all</subtitle>
 +
<subtitle id="0:38:3"> mutually poopin perpendicular that's going to drag the</subtitle>
 +
<subtitle id="0:38:6"> cross pieces that's going to drag</subtitle>
 +
<subtitle id="0:38:9"> the top of</subtitle>
 +
<subtitle id="0:38:12"> the rivet now he's going to show</subtitle>
 +
<subtitle id="0:38:15"> I'll start off with different</subtitle>
 +
<subtitle id="0:38:18">initial starting conditions and I'll still get something</subtitle>
 +
<subtitle id="0:38:21"> that obeys the constraints that I gave it now</subtitle>
 +
<subtitle id="0:38:24">have put in absolute numbers in there you could have put in ratios</subtitle>
 +
<subtitle id="0:38:27"> this</subtitle>
 +
<subtitle id="0:38:30"> is why it's called sketchpad the</subtitle>
 +
<subtitle id="0:38:33"> idea is you should be able to work quickly get</subtitle>
 +
<subtitle id="0:38:36">rough idea of it and then tell the computer the</subtitle>
 +
<subtitle id="0:38:39"> rules that if they were solved was completed</subtitle>
 +
<subtitle id="0:38:42"> okay now</subtitle>
 +
<subtitle id="0:38:45"> he's showing that</subtitle>
 +
<subtitle id="0:38:48"> what he drew is not</subtitle>
 +
<subtitle id="0:38:51"> just a rivet but</subtitle>
 +
<subtitle id="0:38:54"> it what it's what we call a class in an object-oriented</subtitle>
 +
<subtitle id="0:38:57"> language which he called a master</subtitle>
 +
<subtitle id="0:39:0"> so what he drew there was the master drawing</subtitle>
 +
<subtitle id="0:39:3"> of a rivet and what he's manipulating</subtitle>
 +
<subtitle id="0:39:6"> here is an instance of the rivet</subtitle>
 +
<subtitle id="0:39:15">so now he's</subtitle>
 +
<subtitle id="0:39:18"> showing yeah I can make more instances</subtitle>
 +
<subtitle id="0:39:21"> of the rivet and</subtitle>
 +
<subtitle id="0:39:24"> I can make them different sizes and</subtitle>
 +
<subtitle id="0:39:27"> so forth but he forgot</subtitle>
 +
<subtitle id="0:39:30"> that cross P so he goes to the master makes</subtitle>
 +
<subtitle id="0:39:33"> those guys transparent and we can see the rivet</subtitle>
 +
<subtitle id="0:39:36"> feels the instances of the rivet feels those</subtitle>
 +
<subtitle id="0:39:39"> things then the last</subtitle>
 +
<subtitle id="0:39:42"> part of this demo is</subtitle>
 +
<subtitle id="0:39:45"> that</subtitle>
 +
<subtitle id="0:39:48"> he can take anything</subtitle>
 +
<subtitle id="0:39:51"> that he's constructed and make</subtitle>
 +
<subtitle id="0:39:54"> it into a master so now this is a master drawing</subtitle>
 +
<subtitle id="0:39:57"> of a flange with a rivet in it</subtitle>
 +
<subtitle id="0:40:0"> and now he's</subtitle>
 +
<subtitle id="0:40:3"> making</subtitle>
 +
<subtitle id="0:40:6"> instances of those okay</subtitle>
 +
<subtitle id="0:40:9"> so this is a yes</subtitle>
 +
<subtitle id="0:40:12"> go ahead</subtitle>
 +
<subtitle id="0:40:27">yeah</subtitle>
 +
<subtitle id="0:40:30"> yeah in fact on the larger movie</subtitle>
 +
<subtitle id="0:40:33"> which you can find online you can see</subtitle>
 +
<subtitle id="0:40:36">the sheet is populated with lots of different things</subtitle>
 +
<subtitle id="0:40:39"> on it yes oh okay</subtitle>
 +
<subtitle id="0:40:42"> okay so</subtitle>
 +
<subtitle id="0:40:45"> so you have to realize this was a PhD</subtitle>
 +
<subtitle id="0:40:48">thesis this is done in one year by one person and</subtitle>
 +
<subtitle id="0:40:51"> what the</subtitle>
 +
<subtitle id="0:40:54"> contributions were is</subtitle>
 +
<subtitle id="0:40:57"> first interactive computer graphics</subtitle>
 +
<subtitle id="0:41:0"> object-oriented</subtitle>
 +
<subtitle id="0:41:3"> design structures</subtitle>
 +
<subtitle id="0:41:6"> constraints for programming</subtitle>
 +
<subtitle id="0:41:9"> so you didn't program it using sequential code</subtitle>
 +
<subtitle id="0:41:12"> at all and</subtitle>
 +
<subtitle id="0:41:15"> one of the great</subtitle>
 +
<subtitle id="0:41:18"> final things he did was to show</subtitle>
 +
<subtitle id="0:41:21"> how you could make a bridge</subtitle>
 +
<subtitle id="0:41:24"> simulation without sketchpad knowing about bridges</subtitle>
 +
<subtitle id="0:41:27"> ahead of time because the whole point</subtitle>
 +
<subtitle id="0:41:30">was that sketch pad was not supposed to know ahead of time what</subtitle>
 +
<subtitle id="0:41:33">o try and do in it the</subtitle>
 +
<subtitle id="0:41:36"> idea is you should be able to do everything and in fact the</subtitle>
 +
<subtitle id="0:41:39"> all of these drawings were made by</subtitle>
 +
<subtitle id="0:41:42"> sketch pad and the the text</subtitle>
 +
<subtitle id="0:41:45"> here these each text figure is actually</subtitle>
 +
<subtitle id="0:41:48"> a drawing and sketch pad so there's a master for</subtitle>
 +
<subtitle id="0:41:51"> F and everywhere there's an F there's an instance</subtitle>
 +
<subtitle id="0:41:54"> of it so the whole system was done and this</subtitle>
 +
<subtitle id="0:41:57"> thing and I wants to ask Ivan how</subtitle>
 +
<subtitle id="0:42:0"> could you have done computer graphics</subtitle>
 +
<subtitle id="0:42:3"> object-oriented design and</subtitle>
 +
<subtitle id="0:42:6"></subtitle>
 +
<subtitle id="0:42:9"> constraint based programming all by yourself</subtitle>
 +
<subtitle id="0:42:12">year and he said well I didn't know it was hard</subtitle>
 +
<subtitle id="0:42:15"> that's then okay so the</subtitle>
 +
<subtitle id="0:42:18"> bridge there's no movie of the bridge because</subtitle>
 +
<subtitle id="0:42:21"> it took the supercomputer back in</subtitle>
 +
<subtitle id="0:42:24"> 1962 about 20 seconds</subtitle>
 +
<subtitle id="0:42:27"> for each time step on it</subtitle>
 +
<subtitle id="0:42:30"> because of the computer power of this computer</subtitle>
 +
<subtitle id="0:42:33">size of a building was about that of a greeting card</subtitle>
 +
<subtitle id="0:42:36"> today</subtitle>
 +
<subtitle id="0:42:39"> but</subtitle>
 +
<subtitle id="0:42:42"> to celebrate</subtitle>
 +
<subtitle id="0:42:45"> the anniversary of this system</subtitle>
 +
<subtitle id="0:42:48"> a couple of the guys at viewpoints Burke Freudenberg and</subtitle>
 +
<subtitle id="0:42:51"> Yoshi Yoshi ki Oshima made</subtitle>
 +
<subtitle id="0:42:54"> a version of this of</subtitle>
 +
<subtitle id="0:42:57"> this bridge sketch</subtitle>
 +
<subtitle id="0:43:0"> N and we put in the twinkling</subtitle>
 +
<subtitle id="0:43:3"> there so it looked like the</subtitle>
 +
<subtitle id="0:43:6"> display back then and so you can</subtitle>
 +
<subtitle id="0:43:9"> move things in you</subtitle>
 +
<subtitle id="0:43:12"> can turn on gravity</subtitle>
 +
<subtitle id="0:43:15"> you can hang away from it</subtitle>
 +
<subtitle id="0:43:18"> even when it</subtitle>
 +
<subtitle id="0:43:21"> settles down</subtitle>
 +
<subtitle id="0:43:24"> it has a really settle down if I turn</subtitle>
 +
<subtitle id="0:43:27"> on the decimal points here see</subtitle>
 +
<subtitle id="0:43:30"> it's still wiggling just</subtitle>
 +
<subtitle id="0:43:33"> like wheel bridges do</subtitle>
 +
<subtitle id="0:43:36"> and I can</subtitle>
 +
<subtitle id="0:43:39"> interesting to watch what happens when</subtitle>
 +
<subtitle id="0:43:42"> I stick this beam in</subtitle>
 +
<subtitle id="0:43:45"> here take a look at the numbers of the</subtitle>
 +
<subtitle id="0:43:48"> stress and strain around it when I drop this guy in here</subtitle>
 +
<subtitle id="0:43:51"> and notice this</subtitle>
 +
<subtitle id="0:43:54"> guy over on the Left felt that</subtitle>
 +
<subtitle id="0:43:57"> ripple across</subtitle>
 +
<subtitle id="0:44:3">yeah so</subtitle>
 +
<subtitle id="0:44:6"> one of the main</subtitle>
 +
<subtitle id="0:44:9"> things that's got people going from sketchpad</subtitle>
 +
<subtitle id="0:44:12"> most it was too hard for people to really</subtitle>
 +
<subtitle id="0:44:15"> know what to do with but one</subtitle>
 +
<subtitle id="0:44:18">sure about was they need a better looking display so</subtitle>
 +
<subtitle id="0:44:21"> here's the very same thing rendered with them</subtitle>
 +
<subtitle id="0:44:24"> with a modern display and we can do a few more tricks like</subtitle>
 +
<subtitle id="0:44:27"> we can</subtitle>
 +
<subtitle id="0:44:39">okay and we programmed this a little bit</subtitle>
 +
<subtitle id="0:44:42"> differently than fact we've done this several times</subtitle>
 +
<subtitle id="0:44:45"> now one of the students in this class last year</subtitle>
 +
<subtitle id="0:44:48"> Matthew Goldberg what</subtitle>
 +
<subtitle id="0:44:51"> did an internship with us</subtitle>
 +
<subtitle id="0:44:54"> and did</subtitle>
 +
<subtitle id="0:44:57"> a different version of this did</subtitle>
 +
<subtitle id="0:45:0"> a nice job of it we</subtitle>
 +
<subtitle id="0:45:3"> programmed it up in terms of</subtitle>
 +
<subtitle id="0:45:6"> three constraints</subtitle>
 +
<subtitle id="0:45:9"> not the same kind of constraints</subtitle>
 +
<subtitle id="0:45:12">used but a different kind of constraint for instance this</subtitle>
 +
<subtitle id="0:45:15">like it might have something to do with gravity so</subtitle>
 +
<subtitle id="0:45:18"> this is way</subtitle>
 +
<subtitle id="0:45:21"> to think of is this the three line program here</subtitle>
 +
<subtitle id="0:45:24"> so if I turn this off</subtitle>
 +
<subtitle id="0:45:27"> so</subtitle>
 +
<subtitle id="0:45:30"> all we've got left is the spring tension here</subtitle>
 +
<subtitle id="0:45:33"> should all null out which</subtitle>
 +
<subtitle id="0:45:36"> it does so we'll turn gravity back on again</subtitle>
 +
<subtitle id="0:45:45">and</subtitle>
 +
<subtitle id="0:45:48"> this bottom guy is</subtitle>
 +
<subtitle id="0:45:51"> the constraint for these pins</subtitle>
 +
<subtitle id="0:45:54"> so this bridge is pinned together and</subtitle>
 +
<subtitle id="0:45:57"> if I turn off the pin constraint</subtitle>
 +
<subtitle id="0:46:0"> that's holding everything together in this simulation</subtitle>

Revision as of 06:36, 24 November 2021

let me give you the professor LK professor
L K is best known for his pioneering work an
object-oriented programming language and we know
a graphical user interface design and for coining the
phrase the best way to predict the future is to invent
it into in 2003
Professor Alan can receive receive
a ACM Turing Award they consider to
be the Nobel Prize of computing from work on object-oriented
programming let us welcome Professor Alan Kay
okay
the ground rules here are
ask questions whenever
you have one because these classes
go quickly just think of all
the money you're paying for hardly getting anything in
a in an hour so
programming languages in programming
one of the problems of talking about this in general especially
in one class is that there have been
several thousand programming languages
designed and implemented over the years
at any given time since the
early 60s there have been somewhere
between 150 to 200 languages in
standard use and these
languages are rather different from each
other in certain ways and rather
similar to each other in other ways and so
it's very hard to come up with interesting generalizations
and
what we're really talking about here is programming
and programming is
the simplest thing to describe it's we
do something in the computer does something and
if it does what we wanted it to do both
of us are successful programming
languages are usually the vehicle for
this and you can think
of user interfaces as
kind of an impoverished kind
of programming language they used to be
richer and that
the kinds of things that you did
in the user interface were part and parcel of the
you could do and I'm going to show you a few of those things
today so I thought what I do is
first to just look
couple of ideas in programming and programming languages
and be able to do it
so I don't have to explain some
programming language you've never seen before I'm going to take a
programming language that is currently
in use by about three million children called eToys
it's the parent of
another widely used programming
language for children called scratch and
some
of the same people worked on both of those and so I'll first
take a look at what that experience is like and
so the basic idea in
this style of doing
programming it's now has a name
called live coding
but back live coding goes all the way
back to the early 60s it
just never was in the style of the punch
card UNIX approach
black screen by terminal
way of doing things so the idea is
that you
just make things in
a variety of ways and the computer responds to them there's no
no visible compiling or we're
editing so pick up some paint
one of the things that kids like is
to do
things that adults do so
you can ask them
why don't you draw a car from
the top view put
on some headlights
and
we were at Disney for a while and so
the thing we learned at Disney is you must always put on some specular
reflections
like that and this this
gives you a graphical object and it does the kind
of things you'd expect with a graphical object
I can give it a name here I'll call it car and
what's interesting about this object is it has another
view this is the symbolic view of
this object and so
here's a property of
it called the heading of it says the heading is zero
and if I rotate the
car you can see it's showing me the degrees from
north minus and plus and
this is interfaces reflexive so if I
go in here and right
so everything is by connected
here and also here here's
a behavior of the car turn
by five if I click it it turns
the car if I drag it out it makes me a little script
if I get the script is
now just infinitely looping and
if I
pull out another thing
each time I'm doing this is the
there's a compilation going on but
it's sub-second so it's actually
compiling a code underneath it and
I can actually even drive
my little car the
zero makes it go straight
but in fact it's hard to drive the
car this way and
it's a little bit like kissing your sisters we really want
steering
wheel so
we'll just make a steering wheel
and
we'll call it wheel
and again
we look inside here we see oh this is just the same kind
of audit it's just got a different costume on
it and again it has a
heading and I
get the same behavior from
it but notice that we
got the car to turn by changing
this number here and that's
kind of an invitation of picking up this value and dropping it into
the script and
now we get to do
so you're just starting out here
but let me tell you if you program
language here at UCLA that doesn't allow you to do this
little demo right off the bat something
is wrong because we're looking at something that goes
back 40 years this
is just because you don't know what you're getting into
here I'm just trying to show you that there
doesn't have to be a compile phase it doesn't
have to be edits of files it can all be done
lickety-split okay
so I've got a little car there and
the other thing I can do is
make
lots of them so I'm
going to play a game got
a red car and a blue car and I'm
going to make them small
can you see them blue
guy and the red guy there and the
two programs I'm going to run here this
little kids system has automatic multitasking as
many tasks as you want so
I'm going to say go forward
by one and turn randomly and this
one says I do
this guy and
if a blue guy sees
touches a red guy then make the blue
guy red so this is like an infection programming
and so if I say go at
the top here I'm plotting the infected
against the non infected you can see that the
big open space here that
the village is is kind of like a
kind of
like a long time constant the probability
that the two guys are going to hit is fairly low so I'm
going to get that behavior but
what about a
thousand
all of a sudden I
there's another thing if your programming language doesn't
allow you to make objects by the hundreds of thousands
and run them in parallel then you have to worry about
what kind of language you're programming it so the
kids with this little program that they wrote there's
no mystery here they wrote this program
so now they can explore
by saying well okay how about 200
and
again the sparseness acts like
a longer time constant between
infections but
eventually they all die
and
we get this longer thing so
the kids will say okay well how
now
they're starting to root for
the ones that are maybe no
so
this is kind of an experiment in system dynamics for 10
year olds and
it's something that many
parts the world don't actually understand on
any terms because this
first curve that I showed the one that went up rapidly
is like typhoid and
so
if this last one was a disease what would it be like what these
disease would it be blurt
it out
let's see it's a disease that's already
100 million people yeah come
on remember
you're in it you're right UCLA now
yeah so why does it kill
that many people when typhoid is
much much more virulent the answer is
unless you know that a
contagious incurable
deadly disease is always going to kill everybody
off no matter what the time constant
is you're not going to do anything when
it doesn't look like anything's going on remember people are also being
born so for a while
when AIDS is doing its work the population is
actually still rising and if you
don't happen to know this feature of
system dynamics you might just ignore
it or say it's just for minorities
or something like that then all of a sudden you've
got a majority of your population
infected ok so that's a little thought experiment
that children can do
it's important because
if you think about what is it that we need to know today
it's not so much knowing that two plus
two equals four or how to compute
a tip for a waiter
actually has to do with systems dynamics
because the world particularly biologically is
connected in more ways than it ever has been before
and also our
people
in Congress in Washington could do well to do a few
of these experiments because they'd actually have some
sense of how unstable
systems are and you shouldn't monkey
with them okay so back
back here we'll we'll turn this guy off
and I got to do two other quick
little experiments here
first one is to make a little robot car
now that we made one that can be driven
and for that I will need a track
so I'll get sort
of a brown track here
and
robots need
sensors so I need to put a sensor on this guy
so
I'll just draw one in here
like
this we'll
use this to track where are we where we actually
are and now we need
to make a program we can think out this program first
so one of things we do with children is get
o go around the wall of their classroom with their eyes closed
and the way
to do that they soon find out is you go
you hit the wall and then you turn away but
as soon as you lose the wall you have to go back into it
you keep on going if you don't
do that right away you may lose where the
wall actually is so right that
that little program
we want the
forward so I can get that we're
going to test whether we're touching the wall or not
here's a test that will
test
let's see how about
the
cars blue color
sees the walls brown color and
then we have to figure out which way to turn
here
okay I'm going to put in two turns by 5's
but let's think it through so
if we don't have the wall here which way do we want to turn
five or
minus five five okay
so
that's no and so four yes we'll
just take a guess and try minus five here
and we'll just start it going
okay
who can see what the flaw with this program
it is
somebody tell me
well
don't worry about efficiency
we aren't humans aren't efficient but we're smart
what's the
condition under which it can lose this
law it's
going to do with the Sun but if I made
a sharp turn right it's got a fixed radius
to get back so probably
lose the wall I might even want to stop
the car slowed it way way down to
give me a real chance of contacting the wall again
okay so
that's a little experiment
in making a feedback thing
now what I want to do is to
turn this thing into a wriggly
worm and to do that
I want
to make a script that is going to
change its shape so
here's my little thing it says car
look like something but I don't have anything
to make it look like so
I will
somebody talking
now
somebody isn't talking okay
so now I'm going
to draw a couple of
pictures for the wriggly worm part of this
I'll make a blue top and
maybe
a brown bottom here
and just to test this out
this
one is called sketch one so if I say do it
okay so that worked and
but I need another one in order
so I will
make a twin to
but with
the wriggle the other way
okay now I need
to move back and forth between each one of these and
which one of these I'm going to need something
that we might call a little data structure here
I'm going to put the worms in it
now I'm going to look again
see all of the objects here have
same kind of user interface I'm going to look down here
and see oh yeah here's here's
the cursor here's one that says the holders
player at the cursor so
I'm going to put that in there and
here's the cursor control so
I'm going to toss that in there and we're going
to say what I want to do is just increase the cursor
over and over again and so
now I'll start this script up
and you see what it's doing here okay
now we could have put that in as a feature for
the children
but then the children wouldn't understand
how to do animation so when you're trying to teach
something you don't want too many features you want them to actually
do the programming themselves
children have forgotten about these
other scripts that are there
so I could turn on this one and drive the
drive
the little worm around
or
what about this
okay so
okay so that's kind of simple programming
and the
other thing that you want to be able to get a
pretty early in your programming career is meta programming
and meta
programming in this case means I want to
I want to make another language other than eToys
and I'm going to do it
for the particle system kinds
of stuff so
here's the these are now
etoy objects in there
these are the scripts for the whole interpreter
I'm going to use the animate remember
the animation thing so if you know a little
bit about program counters the anime animation system
like running a program counter along when
you're doing animations what you're doing is saying display that
the guy that's that's there
in this case we're going to execute instructions
and so I'm actually
going to turn on the eval here
you can see it may be a little quivering a little
bit here dying for some input
and then the the instructions
are going to be implemented
using these scripts which have already written and
now I just have to build the instruction
and so this
one's is a test that says if
you can move this one says
then move okay so now it's executing that instruction
and this one says
if a
blue guy hits a red guy then
make them both red let's
see if we're lucky here yep
okay so
programming it and again when you're when
you're taking that java class and you
spent the first couple of weeks not really writing a
program yet think about what's like to write another
programming language in Java
should be really easy but
it isn't okay so
so one of the one of the theories
about designing programming languages is
because children
are part of our world and children grow up into
be being us we should
be able to have them be able to start
learning how to program this is we're
learning how to program and then if you do that well
the stuff that children
find easy and powerful or
actually clues for how to design a programming
language yourself okay
and so what we've been looking at here is here's
computer memory and
down a
fly speck in the machine is
actually some logic gates
on a chip one
corner of the chip and
around it is
nano code micro code
on the chip
itself and that
might be an 86 architecture kind
of chip but most of the chips are done the same way there's
some simple logic
like this is the arithmetic is our registers the
arithmetic unit and so forth
then it's made into a slightly more complicated
processor by putting a lowest level of programming
they're in pretty elemental terms
that's not always easy to write these
low level programs and
then nobody
wants to program in that so
in this case what we're looking at is a
virtual machine
coded ultimately in
these terms that
makes the computer look like a small talk machine
and at this level
there's an area on there that's manifested where
go and
then in that we
write a development system you still haven't seen
yes I'm
not going to but thank
you for the thought that's too complicated small
talk is a programming language that's all we need to know it
has a development system that's written in itself
and
the etoys system
that you saw which is putting up this
slide here is written in small talk
and then
I just made a little interpreter
in the eToys machine for doing
the rule-based particle system stuff
and this is a very typical way of
going about handling problems
it's not the only way
some people like the program down here
and write tons of programs to deal
with the very same problems another way of doing it is
fine languages v the problems gracefully
and then the amount of code you
have to write to get to the next level is not that large
and all of this is kind of an
example of
Turing's idea of being able
to simulate any kind of mechanism on a
relatively simple mechanism that has a few
pieces of logic and a fair amount of memory
okay so that's the kiddie
now let's take a look at the adult world where
we're going to go from programs that have
tens of lines in the kiddie
world but can still do interesting things to adult
programs which tend to have zillions of lines and
are surprisingly weak
and in order to come up with a metric for this
I'm going to use a metric of lines
of code it's not the
only metric you could use but a line of code is something
that a programmer has to write so it is one kind
of unit of work and it's also unit of space
so a 400-page
book has 20,000 lines
could be English
but it could be code could
be in machine code it could be in C
it could be in Java and a
foot of books is about 300,000
lines and a meter of books stacked
up like this is a million lines so that's a good metric
million lines of code per meter and stacked
up books and
the Empire State Building is
22,000 books high
and 440
million lines of code right
so if you've ever heard anybody heard
of any programming systems that have 400 million
lines of code yes
though come on
yeah
yeah take a look at our government sometime
in fact if you
look at your own little
own laptop if you happen to be running
Microsoft the operating system is about 120
million lines of code remember
system it hasn't done anything for you yet
just sitting there and then Microsoft
Office is over a hundred million lines of code
so that's
220 million lines
of code it's about eleven
thousand books of code
anybody ever read all that code
no way very
few people who read it all have read eleven
thousand books of anything I can guarantee
you read it all you're not going to read eleven thousand
books of code so most of the code has
never been over viewed by any
single person or even any single group in
fact much of the code in there is code
that isn't even run but they're afraid to take it out
hey don't know whether it's run or not and
this is it this is a problem on the
other hand of the
looking at it from the standpoint of writing
code the when you look at
the actual features you
this two hundred and twenty million lines of code it
doesn't seem like it should be should take two
hundred and twenty million lines of code just
shouldn't back the first time around it was done at Xerox PARC
did about half of this and it only took
ten thousand lines of code so something
happened some kind of explosion
of complications and complexity
and here just to
make you feel better I located a large financial products
company whose name I will not put here
that has more than 400 million lines
of code in its primary offerings
to its customers so this is what they
are actually maintaining and
you can tell they're a little old-fashioned because their user interface
is given in terms of screens which
harks back to the days of mainframes they
have 170,000 screens they
have to deal with and that's about twenty thousand
books or almost an
Empire State Building worth of code
however
if you're looking for a job if you came
to UCLA to learn to program and get a job it's
just this kind of stuff that you actually have to learn
about because that is what business is mired in
right now this is what they're hiring people this
is why they're crying for programmers
not to do better but
ake care of the mess that is already there think
about that
okay so
I'm going to stick to
I'll show you a couple of examples in the time
that's left of what might be done about this
part
of personal competed these several hundred millions of lines of
code okay so
let's take a look at this problem
from a slightly different perspective
over here we've got some
gates over
here we've got a problem
this is what we need we need
to do something over here and the question
is is what is it going to take us to get from there to there
these days and
so in
terms of machine code lots
of the kinds of things I'm talking about or literally billions
of lines of code because machine code is written one
instruction per line of code and
maybe C
gives eight to ten
machine code instructions per line
of code so maybe something that would be
billions would be hundreds of millions in
C and
we can imagine a
higher-level language than C
not the Java is that
much higher level language higher level
in C but could imagine something
higher level you can imagine something higher level imagine
something it might do a lot of these tasks in just
thousands of lines of code and the
question is why
do we stay here down
at the gear level for most of the
programmatic that is still done today and
this huh not
a lot of the organization of code at
is a little bit more like the way biology
organizes itself almost
none of this still being done
okay
so the programming effort comes
down as we go to higher and higher level
languages but
computer science has not
actually been
up to the challenge of putting in the amount
of invention that's necessary to make programming
systems that do this amount of work for us so
we can think of an in-between is
just a lot of work for any kind of programming language you do because there's
packaging there's documentation there's debuggers
there's an enormous amount of
work that has to be done and the
idea is that with more work which
gets tougher as you come this way you actually
reduce the general programming effort so this is
popular so virtually all of the programming in
business in the u.s. today is done
at this level still this is a level that
is really not different from the level of programming in the
60s almost nothing has changed
new languages have come along but they have not
up to their level in any significant way
but
just to go against
the tide here even though you're going to be studying
a lot of this stuff here I just want to make you aware of
these ideas down here which
if you're interested in research and in making things
better you might poke your head into
now what's funny
about history is that there
are people who are absolute geniuses who
transcend the time in which they
live so 50
years ago there
was no computer graphics this is the
guy who invented computer graphics and he
also invented object-oriented
design systems
so he actually did
the work in 62 and wrote it
up in 63 so this is still the 50th anniversary of this
I thought you'd like to see what this
very first interactive
graphic system looked like and what it could do
now the first thing you have to visualize is this guy is
sitting here with
a pointer in his hand a light pen but
he's in a computer that is about eight times maybe
ten times the size of this room
it was close to the size of
at least the first Fran's hall building
it had its own roof
it was the building and
it was an air defense computer and from
three o'clock in the morning to six o'clock in the morning they let this one guy
play around with it and
so here's what he did and
by the way this is not actually a computer display it just was
an oscilloscope that put up spots
so the first thing he had to do was to write
programs that would make lines and arcs
and and so forth and about
a third of the capacity of this enormous
machine was used just to make a simulated
graphics display because there were no graphics displays
okay so this
will give you an idea so
he gets some ink
and he just sketches in this flange
because look at he's pointing at it now and he's
giving it a constraint to make everybody mutually
perpendicular and what you saw
there was sketch pad solving the problem for him
right so this way
you program this system was by
telling it what you wanted to have true and sketch bad
and figure out how to have it be true same idea
here make these two guys parallel
now the constraint
is collinearity
put these lines down these
dashes I'm putting in here down on top of
the
now he says okay let's make the guidelines transparent
and now we've got a hole in the flange
and you
has continued assuming the first clipping window
ever done is that actually
the drawing is done on a sheet
of virtual paper about a third of a mile square
now he wants to make a rivet
he's
going to use the center here for the arc
and
now he's going to do the same trick he's going to say to these
guys take these guys to make them all
mutually poopin perpendicular that's going to drag the
cross pieces that's going to drag
the top of
the rivet now he's going to show
I'll start off with different
initial starting conditions and I'll still get something
that obeys the constraints that I gave it now
have put in absolute numbers in there you could have put in ratios
this
is why it's called sketchpad the
idea is you should be able to work quickly get
rough idea of it and then tell the computer the
rules that if they were solved was completed
okay now
he's showing that
what he drew is not
just a rivet but
it what it's what we call a class in an object-oriented
language which he called a master
so what he drew there was the master drawing
of a rivet and what he's manipulating
here is an instance of the rivet
so now he's
showing yeah I can make more instances
of the rivet and
I can make them different sizes and
so forth but he forgot
that cross P so he goes to the master makes
those guys transparent and we can see the rivet
feels the instances of the rivet feels those
things then the last
part of this demo is
that
he can take anything
that he's constructed and make
it into a master so now this is a master drawing
of a flange with a rivet in it
and now he's
making
instances of those okay
so this is a yes
go ahead
yeah
yeah in fact on the larger movie
which you can find online you can see
the sheet is populated with lots of different things
on it yes oh okay
okay so
so you have to realize this was a PhD
thesis this is done in one year by one person and
what the
contributions were is
first interactive computer graphics
object-oriented
design structures
constraints for programming
so you didn't program it using sequential code
at all and
one of the great
final things he did was to show
how you could make a bridge
simulation without sketchpad knowing about bridges
ahead of time because the whole point
was that sketch pad was not supposed to know ahead of time what
o try and do in it the
idea is you should be able to do everything and in fact the
all of these drawings were made by
sketch pad and the the text
here these each text figure is actually
a drawing and sketch pad so there's a master for
F and everywhere there's an F there's an instance
of it so the whole system was done and this
thing and I wants to ask Ivan how
could you have done computer graphics
object-oriented design and
constraint based programming all by yourself
year and he said well I didn't know it was hard
that's then okay so the
bridge there's no movie of the bridge because
it took the supercomputer back in
1962 about 20 seconds
for each time step on it
because of the computer power of this computer
size of a building was about that of a greeting card
today
but
to celebrate
the anniversary of this system
a couple of the guys at viewpoints Burke Freudenberg and
Yoshi Yoshi ki Oshima made
a version of this of
this bridge sketch
N and we put in the twinkling
there so it looked like the
display back then and so you can
move things in you
can turn on gravity
you can hang away from it
even when it
settles down
it has a really settle down if I turn
on the decimal points here see
it's still wiggling just
like wheel bridges do
and I can
interesting to watch what happens when
I stick this beam in
here take a look at the numbers of the
stress and strain around it when I drop this guy in here
and notice this
guy over on the Left felt that
ripple across
yeah so
one of the main
things that's got people going from sketchpad
most it was too hard for people to really
know what to do with but one
sure about was they need a better looking display so
here's the very same thing rendered with them
with a modern display and we can do a few more tricks like
we can
okay and we programmed this a little bit
differently than fact we've done this several times
now one of the students in this class last year
Matthew Goldberg what
did an internship with us
and did
a different version of this did
a nice job of it we
programmed it up in terms of
three constraints
not the same kind of constraints
used but a different kind of constraint for instance this
like it might have something to do with gravity so
this is way
to think of is this the three line program here
so if I turn this off
so
all we've got left is the spring tension here
should all null out which
it does so we'll turn gravity back on again
and
this bottom guy is
the constraint for these pins
so this bridge is pinned together and
if I turn off the pin constraint
that's holding everything together in this simulation