Difference between revisions of "Alan Kay CS1 talk at UCLA (2010)"

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

Latest revision as of 21:59, 6 December 2017

let me introduce professor LDK professor  LMK is best known for pioneering
work on  object-oriented programming language
we've done graphical user interface  design and
for coining the phrase the  best way to predict
the future is can be  invented into
in 2003 prevention Allen  can receive
receive a ACM Turing award
it considered to be the Nobel Prize of  computing
from work on object-oriented  programming that is welcome
question ok  thank you
ok the ground
rules here are  asked questions
whenever you have one  because
these classes go quickly just
hink of all the money you're paying for  hardly getting any
thing 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 its 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
you did in the user interface who are  part and parcel
of the kinds of  programming 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 at a 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 3 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  fact
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 a 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 0 and if i
rotate the car you  can see it's showing
me two degrees from  north minus
and plus and this is  interface is
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  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 to have a
steering wheel so
we'll just
make a steering wheel
and  we'll
call it wheel and
again we look  inside here we see
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 this
so  you're just starting out
here but let
ell you if you program in the 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
o show you that there doesn't have to  be a compile
phase it doesn't have to be  edits of files 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
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 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 get that so it's  another thing
language doesn't allow me to make  objects
by the hundreds of thousands and  run them in parallel then
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 died
and
we get this
longer thing so the kids will say okay  well
how about 80
so now they're starting to root for
the  ones that are maybe
nope
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  things would it be
blurt it out
let's
ee it's a disease that's already killed  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 okay 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
systems dynamics because the world  particularly
biologically is more  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 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 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
do with children is get them to go  around the wall over their classroom
  with their eyes closed and
the way to do  that they soon find out
is you go until  you hit the wall and then you turn
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 car car is always going to go  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
ok  I'm going to
put in two turns by fives  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
55 ok
so  that's no and so for
yes we'll just take  a guess and try minus 5
here and we'll
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
wall
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 when I 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
now somebody isn't talking
ok
so now I'm  going to draw
a couple of pictures for  the wriggly worm part of
this
will
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 to make it wriggle
so i  will
make
a twin to it right here
go  with the wriggle the other way
ok
now i  need to move back and forth between each
one of these and to choose which one of  these i'm
going to need something that  we might call a little data
structure  here i'm going to
now i'm
going to look again see all of  the objects here
have the same kind of  user interface
and 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 I'm going to say what I want
o 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 ok now we could have put
that  in as a feature for the children but
hen
the children wouldn't understand  how to do animation so
trying to teach somebody something you  don't want too many features
you want  them to actually do the programming
  themselves it meanwhile the children  have
forgotten about these other scripts  that are
there so I could turn on
this  one and drive the
drives a little worm  around
or
what
about this one
okay so
okay so that's
kind of simple  programming and
the other thing that you  want to be able
to get a handle on  pretty early in your programming
career  as 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 eat I 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 is rather  like running a program counter
along  when you're doing animations what you're  doing
is saying display the 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 it's 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  construction 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
f the theories about designing  programming languages
is because
  children are part of our world
and  children grow up in to 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
  flyspeck in
the machine is actually some
  logic gates on a chip
one corner of the  chip
and
round it is nano code
microcode  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
coated
ultimately in these terms
  that makes the computer
look like a  small talk machine and at
this level  there's an area on there
manifested where the display is going to  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
  e toya 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 to program  down here and write tons
of programs to  deal with the very same problems another
  way of doing it is fine languages that
  fit 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 in a fair
amount of memory okay  so
that's the kitty world
now let's
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
could
be English but it could be code
  could be in machine
code it could be and  see 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
line so that's a good metric  million lines of
code per meter and  stacked up books and
the Empire State
  Building is twenty-two
thousand 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
only the laptop
if you happen to  be running Microsoft the operating
  system is about 120 million lines of
code remember there's just the operating  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
seven  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 if you read it all
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
out because they don't know whether it's  run or not
and this is it this
is a  problem on the other hand
the looking at  it from
the standpoint of writing code  the
when you look at the actual features
  you get for this 220
million lines of  code it doesn't seem like it should be
  should take 220 million lines of code
  just shouldn't back the first time  around it
was done it 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  maintained
  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
mainframes they have a hundred and  seventy thousand
screens they have to  deal with and
that's about 20,000 books  or
almost an empire state building
worth  of code
however if you're looking
for a  job 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
hiring people this is why they're crying  for programmers
not to do better
but  just to take 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
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
about or literally billions of lines of  code because
machine code is written one  instruction per line of code
and maybe
  see 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 job 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 there's
hot not a lot of  the organization
of code at this level  which is a little bit more like
the way  biology organizes itself
almost none of  this still
being done
ok 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  and in
between is just a lot of work for  any kind of
because there's packaging this  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 not  popular so virtually
all of the  programming in business in the u.s.
  today is done at this level still and
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 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 in two 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 10 times  the
size of this room it
was close to  the size of at least the first franz
  hall building it
had its own roof it was  the
building and it was
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 this place okay so
this  will give you an idea
  so it 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 sketchpad solving  the problem
for him all
right so this  way you program this system
was by  telling it what you wanted
to have true  and sketchpad 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 guidelines
now he says
okay let's make the  guidelines transparent and
now we've got  a hole in the flange and
you notice it  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
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 crosspieces
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
till get something that obeys the  constraints
that i gave it now i could  have put in absolute numbers in
there  you could have putted ratios
this is why  it's called sketch pad
the idea is you  should be able to work
quickly get a  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
class in an object-oriented language  which
he called a master so what he
there was the master drawing of a rivet  and
what he's manipulating here is an  instance of
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 is
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
ok 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 is 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 of this thing  was that sketch pad
know ahead of time what you were going  to try and do in
it the ideas you should  be able to do everything 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 in one year and he said well I  didn't know
it was hard since
then ok 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 the size of a  building was about
card  today
but
to
celebrate the anniversary  of
this system a couple of the guys at  viewpoints
Burke freudenberg and Yoshi  Yoshi ki o Shiva
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
move
things in you can turn on gravity
ou 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  if still wiggling
just like wheel  bridges
do and
I can tenderize
me 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 the  sky 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 thing they were  sure about was they
needed better  looking display so here's the very
thing rendered with them with a modern  display and we
can do a few more tricks  like
we can give letters wait
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
constraints that Ivan used but a  different kind
of constraint for  instance this one looks suspiciously  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 know  laut 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
yeah so remember
all those costumes  that's all that bridge
was and we can  repurpose those costumes
into something  else like the
user interface of this  system I'm giving
the right so this is a
  system that we programmed ourselves at  viewpoints
and it's a system
I'm giving  this talking I'm not obviously not using  PowerPoint
because you can't program in  PowerPoint and
I'm using it to show you  i'm
going to show you one example  because that's all I have time
for
and  that is how the graphics in this
we're programmed now
usually the  graphics in your personal computer are
about half a million to a million lines  of code to
do all of the
compositing and  so forth
and what we're going to look at  here is just take a look
at the  rendering part
of this a render of being
  able to paint a pixel with the right
  shade so Dan a meringue here is a  graduate
student at UC San Diego works  with us came
up with this formula so  it's a nice little piece of math
to  represent it here's a
programming  language that is as close to the formula  as
possible it's about twice the size of  the
math but it actually runs and it  handles all rendering
stuff done like
  this and
I'll just to give you
now we have this
flow of stuff with this  programming
graphics language sets up  and
what we what we wind up getting is
  something that's very complex to look at
  and debug but Bret Victor look them
up  on Google did this visualizer
that's  created automatically from the
code i  just showed you and this
is a live  system so
here's a tourney i'm going to  turn
a addy into a
be here
and if i want  to know where
this pixel and the  rendering comes from i
can just put the  mouse on it and
touches this if i want  to see where this guy
is handled in the  code if i want
to see how the pipeline
  that's set up here of these
five small  programs
here i can just go here if I  want it where did this pixel come from
what
happens if I turn this
so when  you're doing languages of
the future the  system is going to have to also produce
  the debuggers along with the languages
  themselves okay I think I
think it's a  hard stop at ten of so
I won't put any  strain on you but if
you're interested  hang around and ask some questions and  with