[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.00,0:00:18.09,Default,,0000,0000,0000,,{\i1}35C3 preroll music{\i0} Dialogue: 0,0:00:18.09,0:00:20.90,Default,,0000,0000,0000,,Herald Angel: Do you remember some days\Nago, where you sit together with your Dialogue: 0,0:00:20.90,0:00:26.68,Default,,0000,0000,0000,,loved ones and you had to fix their\Ncomputers? And told them how things work – Dialogue: 0,0:00:26.68,0:00:31.52,Default,,0000,0000,0000,,and why they are working the strange way\Nthey are working? Imagine you have to do Dialogue: 0,0:00:31.52,0:00:35.97,Default,,0000,0000,0000,,this for teaching them how to program and\Ngive them the passion and the love that Dialogue: 0,0:00:35.97,0:00:41.96,Default,,0000,0000,0000,,you have for programming! So please let's\Ngive Mike Sperber a great applause for his Dialogue: 0,0:00:41.96,0:00:45.54,Default,,0000,0000,0000,,talk "How to Teach Programming to Our\NLoved Ones". Dialogue: 0,0:00:45.54,0:00:52.20,Default,,0000,0000,0000,,{\i1}Applause{\i0}\N Dialogue: 0,0:00:52.20,0:00:53.33,Default,,0000,0000,0000,,Mike Sperber: Thanks so much for that Dialogue: 0,0:00:53.33,0:01:00.22,Default,,0000,0000,0000,,introduction. Let's switch slides back.\NSpeaking of passion. So if you're teaching Dialogue: 0,0:01:00.22,0:01:05.01,Default,,0000,0000,0000,,programming, that's a great ego booster,\Nright? You know that. If your audience is Dialogue: 0,0:01:05.01,0:01:09.89,Default,,0000,0000,0000,,large enough or if you've got super gifted\Nchildren – like you probably all do – then Dialogue: 0,0:01:09.89,0:01:13.27,Default,,0000,0000,0000,,you know, you could teach them just about\Nanything and they will say, they will tell Dialogue: 0,0:01:13.27,0:01:16.60,Default,,0000,0000,0000,,you and they will give you feedback\Ntelling you how wonderful that was. So for Dialogue: 0,0:01:16.60,0:01:21.12,Default,,0000,0000,0000,,example I like functional programming, so\Nthat's a lambda which stands for Dialogue: 0,0:01:21.12,0:01:25.58,Default,,0000,0000,0000,,functional programming. And you know\Nwhenever I teach that to a sufficiently Dialogue: 0,0:01:25.58,0:01:31.02,Default,,0000,0000,0000,,large audience somebody typically looking\Nlike that would come up to me and tell me: Dialogue: 0,0:01:31.02,0:01:34.93,Default,,0000,0000,0000,,"Oh this lambda stuff, this functional\Nprogramming stuff that's the most Dialogue: 0,0:01:34.93,0:01:41.69,Default,,0000,0000,0000,,wonderfullest thing I've ever heard. And\Nyou're a great teacher." And so in the Dialogue: 0,0:01:41.69,0:01:45.11,Default,,0000,0000,0000,,introduction it said something about a\Ncouple of days. So I think I've been Dialogue: 0,0:01:45.11,0:01:51.06,Default,,0000,0000,0000,,teaching for 30 years now; in various\Ncontexts: to high school students, to Dialogue: 0,0:01:51.06,0:01:55.18,Default,,0000,0000,0000,,university students, to kids, to\Nhumanities majors, to computer science Dialogue: 0,0:01:55.18,0:02:01.53,Default,,0000,0000,0000,,majors, to computer science minors, in\Nprofessional training to co-workers. But Dialogue: 0,0:02:01.53,0:02:06.03,Default,,0000,0000,0000,,if I take the totality of my teaching\Nexperience, most of that overall looking Dialogue: 0,0:02:06.03,0:02:10.09,Default,,0000,0000,0000,,back was a failure. And I want to talk\Nabout those failures more about the Dialogue: 0,0:02:10.09,0:02:15.99,Default,,0000,0000,0000,,successes that come from the passion. So\Nif you look at initiatives that aim at Dialogue: 0,0:02:15.99,0:02:20.51,Default,,0000,0000,0000,,fostering programming skills among\Nchildren for example, they always talk Dialogue: 0,0:02:20.51,0:02:26.31,Default,,0000,0000,0000,,about getting people excited and sort of\Nexciting their passion for programming. Dialogue: 0,0:02:26.31,0:02:29.59,Default,,0000,0000,0000,,And you hear politicians talk like that a\Nlot, too. We need to get young people into Dialogue: 0,0:02:29.59,0:02:34.25,Default,,0000,0000,0000,,technology because that is the future. I'm\Nnot sure about that personally, but it Dialogue: 0,0:02:34.25,0:02:38.13,Default,,0000,0000,0000,,always seems to end up in classrooms that\Nlook like this: That typically have a Dialogue: 0,0:02:38.13,0:02:44.06,Default,,0000,0000,0000,,bunch of robots in there, sold by some\Ncompany. And that are supposed to, because Dialogue: 0,0:02:44.06,0:02:48.38,Default,,0000,0000,0000,,robots are for some reason inherently\Ninteresting. They're supposed to get kids Dialogue: 0,0:02:48.38,0:02:52.26,Default,,0000,0000,0000,,or whomever interested in programming,\Nexcited about programming. And that's all Dialogue: 0,0:02:52.26,0:02:57.32,Default,,0000,0000,0000,,good and well. Also I think there's this\Nunderlying assumption that only if we Dialogue: 0,0:02:57.32,0:03:01.88,Default,,0000,0000,0000,,would get people excited and interested in\Nprogramming, they would sort of acquire Dialogue: 0,0:03:01.88,0:03:06.85,Default,,0000,0000,0000,,the required skills by themselves and some\Nprocess of trial and error or osmosis or Dialogue: 0,0:03:06.85,0:03:10.93,Default,,0000,0000,0000,,something like that. And I think the most\Nprominent project that propagated that Dialogue: 0,0:03:10.93,0:03:14.96,Default,,0000,0000,0000,,notion – some of you may remember – was\Nthis One Laptop Per Child initiative a Dialogue: 0,0:03:14.96,0:03:18.36,Default,,0000,0000,0000,,couple of years ago. And you don't … I\Nhaven't seen many of those at this Dialogue: 0,0:03:18.36,0:03:24.12,Default,,0000,0000,0000,,conference. And the reason for that is\Nthat the educational concepts around One Dialogue: 0,0:03:24.12,0:03:27.94,Default,,0000,0000,0000,,Laptop Per Child were based on this idea\Nof – I think – what's called Dialogue: 0,0:03:27.94,0:03:32.04,Default,,0000,0000,0000,,constructivism. This idea that only if you\Ngive children enough material and access Dialogue: 0,0:03:32.04,0:03:36.47,Default,,0000,0000,0000,,to whatever the Internet and teaching\Nmaterials, then they will all figure it Dialogue: 0,0:03:36.47,0:03:40.35,Default,,0000,0000,0000,,all out themselves and they will figure\Nout how to build programs by themselves. Dialogue: 0,0:03:40.35,0:03:44.24,Default,,0000,0000,0000,,And I think one of the underlying problems\N– I mean there were many problems with Dialogue: 0,0:03:44.24,0:03:48.43,Default,,0000,0000,0000,,OLPC. But one of the problems was\Ncertainly that just this approach to Dialogue: 0,0:03:48.43,0:03:53.53,Default,,0000,0000,0000,,didactics and pedagogy doesn't work\Nparticularly well. And you find variations Dialogue: 0,0:03:53.53,0:03:57.54,Default,,0000,0000,0000,,of that pretty much every year. There's an\Neducational initiative built on this Dialogue: 0,0:03:57.54,0:04:02.32,Default,,0000,0000,0000,,notion of inspiring – you know – passion\Nfor programming. You know, last year you Dialogue: 0,0:04:02.32,0:04:08.53,Default,,0000,0000,0000,,would hear about a project called Bob\Nwhich essentially is about programming a Dialogue: 0,0:04:08.53,0:04:11.67,Default,,0000,0000,0000,,little robot-like device, that has\Nblinking lights and things like that. And Dialogue: 0,0:04:11.67,0:04:16.71,Default,,0000,0000,0000,,it's certainly very interesting and you\Nprogram it by – I think you can see that Dialogue: 0,0:04:16.71,0:04:22.51,Default,,0000,0000,0000,,here – you program it by essentially\Ndownloading already … someone already Dialogue: 0,0:04:22.51,0:04:26.32,Default,,0000,0000,0000,,programmed some C++ code for you, and you\Ntake some line in the middle and change it Dialogue: 0,0:04:26.32,0:04:30.10,Default,,0000,0000,0000,,to change the blinking through frequency\Nor something like that. And again all that Dialogue: 0,0:04:30.10,0:04:33.72,Default,,0000,0000,0000,,is good and well; and I don't want to\Ndenigrate that, but it's all good and well Dialogue: 0,0:04:33.72,0:04:39.15,Default,,0000,0000,0000,,for inspiring passion. But all of these\Nprojects have in common is that they are Dialogue: 0,0:04:39.15,0:04:44.09,Default,,0000,0000,0000,,not really about teaching the methodology\Nof programming. And so this is, you know, Dialogue: 0,0:04:44.09,0:04:46.68,Default,,0000,0000,0000,,this is what this talk is about and it's\Nprobably going to be the most boring talk Dialogue: 0,0:04:46.68,0:04:54.32,Default,,0000,0000,0000,,you've ever heard. If you want to inspire\Npassion for programming and for computers, Dialogue: 0,0:04:54.32,0:04:57.42,Default,,0000,0000,0000,,there's lots of projects right outside\Nthis door – specifically today on the Dialogue: 0,0:04:57.42,0:05:01.62,Default,,0000,0000,0000,,Junghackertag – that will tell you how to\Ndo that. The problem is that if you want Dialogue: 0,0:05:01.62,0:05:05.58,Default,,0000,0000,0000,,to transition from these projects to\Nactually serious substantial programming Dialogue: 0,0:05:05.58,0:05:10.43,Default,,0000,0000,0000,,projects that your learners want to\Nundertake by themselves … and if you look Dialogue: 0,0:05:10.43,0:05:15.02,Default,,0000,0000,0000,,closely enough, you will find that a lot\Nof people get frustrated by that Dialogue: 0,0:05:15.02,0:05:19.43,Default,,0000,0000,0000,,experience of writing more complex\Nprograms. And even if they do not get Dialogue: 0,0:05:19.43,0:05:24.90,Default,,0000,0000,0000,,frustrated, their code often ends up\Nlooking like that on the right hand side. Dialogue: 0,0:05:24.90,0:05:30.16,Default,,0000,0000,0000,,And so of course this entire conference is\Nin the spirit of tinkering and building Dialogue: 0,0:05:30.16,0:05:34.37,Default,,0000,0000,0000,,things by trial and error; and you see a\Nlot of things that look like this. But, Dialogue: 0,0:05:34.37,0:05:38.90,Default,,0000,0000,0000,,you know, in the upcoming IOT apocalypse\Nmaybe we want to have a little bit Dialogue: 0,0:05:38.90,0:05:44.17,Default,,0000,0000,0000,,slightly more methodical approach. So the\Nproblem is really that most didactic Dialogue: 0,0:05:44.17,0:05:48.82,Default,,0000,0000,0000,,approaches to programming do not work very\Nwell. For the longest time I really didn't Dialogue: 0,0:05:48.82,0:05:52.76,Default,,0000,0000,0000,,have a good explanation as to why that was\Nand why maybe the stuff that I was doing Dialogue: 0,0:05:52.76,0:05:57.26,Default,,0000,0000,0000,,or that I learned how to do over the years\Nworked better. And so finally I found a Dialogue: 0,0:05:57.26,0:06:02.88,Default,,0000,0000,0000,,great book that confirms some of my\Nbiases, that I read just the day before Dialogue: 0,0:06:02.88,0:06:08.22,Default,,0000,0000,0000,,yesterday – as I was preparing this talk.\NAnd it has a couple of … It's written by a Dialogue: 0,0:06:08.22,0:06:14.74,Default,,0000,0000,0000,,cognitive scientist – Daniel Willingham –\Nand he lists a couple of principles that Dialogue: 0,0:06:14.74,0:06:19.26,Default,,0000,0000,0000,,are active when students learn, right? And\NI think one of the things that's really Dialogue: 0,0:06:19.26,0:06:24.49,Default,,0000,0000,0000,,important is that we all have this\Nidealistic notion that everybody loves to Dialogue: 0,0:06:24.49,0:06:28.57,Default,,0000,0000,0000,,learn, right? But in fact learning is\Nquite a difficult activity and it's quite Dialogue: 0,0:06:28.57,0:06:33.78,Default,,0000,0000,0000,,straining. And – so even though people are\Ncurious about things and they love to look Dialogue: 0,0:06:33.78,0:06:37.35,Default,,0000,0000,0000,,at things and they like to have successful\Nlearning experiences – if that learning Dialogue: 0,0:06:37.35,0:06:42.65,Default,,0000,0000,0000,,experience means they have to think hard,\Nthen at least some people shun those same Dialogue: 0,0:06:42.65,0:06:48.80,Default,,0000,0000,0000,,experiences. Another problem is … so and\Nthat's of course a problem when you Dialogue: 0,0:06:48.80,0:06:52.69,Default,,0000,0000,0000,,transition from a primitive programming\Nenvironment, like Scratch or Bob or Dialogue: 0,0:06:52.69,0:06:57.05,Default,,0000,0000,0000,,something, to more complicated things that\Nyou can easily get frustrated, and then Dialogue: 0,0:06:57.05,0:07:02.60,Default,,0000,0000,0000,,shun away from the learning experiences\Nthat are required to take the next step. Dialogue: 0,0:07:02.60,0:07:05.27,Default,,0000,0000,0000,,Another one that I found interesting is –\Nso these are just all the cognitive Dialogue: 0,0:07:05.27,0:07:09.94,Default,,0000,0000,0000,,principles in that book – so it's kind of\Nvery textual and boring, but I liked it so Dialogue: 0,0:07:09.94,0:07:14.53,Default,,0000,0000,0000,,much. So it says: "Factual knowledge\Nprecedes skill." But if you think, so what Dialogue: 0,0:07:14.53,0:07:19.56,Default,,0000,0000,0000,,it means is really that you need to have …\Nthat if you want to learn a particular Dialogue: 0,0:07:19.56,0:07:23.14,Default,,0000,0000,0000,,skill, you need to associate that with\Nfactual knowledge. But if you think about Dialogue: 0,0:07:23.14,0:07:27.12,Default,,0000,0000,0000,,the factual knowledge that is associated\Nwith programming, then a lot of the Dialogue: 0,0:07:27.12,0:07:31.23,Default,,0000,0000,0000,,principles underlying our everyday\Nprogramming skills are usually unnamed. Dialogue: 0,0:07:31.23,0:07:35.09,Default,,0000,0000,0000,,And they're not really put in specific\Nwords, and so they're not in the form of Dialogue: 0,0:07:35.09,0:07:38.75,Default,,0000,0000,0000,,factual knowledge. And which is why a lot\Nof people have trouble with the skill Dialogue: 0,0:07:38.75,0:07:44.51,Default,,0000,0000,0000,,part. I love this bit which says: "Memory\Nis the residue of thought." Which is that Dialogue: 0,0:07:44.51,0:07:47.38,Default,,0000,0000,0000,,we don't always remember the things that\Nwe should be remembering, but that we Dialogue: 0,0:07:47.38,0:07:51.24,Default,,0000,0000,0000,,remember things that we spend a lot of\Nthought on. And that means in particular Dialogue: 0,0:07:51.24,0:07:54.47,Default,,0000,0000,0000,,for educational initiatives that are\Ncentered around robots – or something Dialogue: 0,0:07:54.47,0:07:58.81,Default,,0000,0000,0000,,that's really … that is supposed to take\Nover the passion part of programming but Dialogue: 0,0:07:58.81,0:08:02.61,Default,,0000,0000,0000,,not really central to the activity of\Nprogramming – people tend to think about Dialogue: 0,0:08:02.61,0:08:06.33,Default,,0000,0000,0000,,the robots: They tend to think about the\Nmotors and actuators and things like that; Dialogue: 0,0:08:06.33,0:08:10.06,Default,,0000,0000,0000,,and those are worthy skills in and of\Nthemselves, but they don't contribute much Dialogue: 0,0:08:10.06,0:08:14.58,Default,,0000,0000,0000,,to the actual skill of programming. I\Nremember asking a proponent of such an Dialogue: 0,0:08:14.58,0:08:18.75,Default,,0000,0000,0000,,educational initiative a number of years\Nback, you know what is it? What is the Dialogue: 0,0:08:18.75,0:08:23.03,Default,,0000,0000,0000,,skill that students take away from your\Nrobot class? And he said "well, after that Dialogue: 0,0:08:23.03,0:08:26.44,Default,,0000,0000,0000,,class where they spend all their free time\Nfor a semester or a year, they really know Dialogue: 0,0:08:26.44,0:08:34.82,Default,,0000,0000,0000,,what pi is. And I don't know for me that\Nis not enough. So another thing is that … Dialogue: 0,0:08:34.82,0:08:39.08,Default,,0000,0000,0000,,maybe that doesn't go so much towards\Ncomputer science or programming experience Dialogue: 0,0:08:39.08,0:08:44.32,Default,,0000,0000,0000,,but also to the way that we do math\Neducation: Is we understand new things in Dialogue: 0,0:08:44.32,0:08:48.82,Default,,0000,0000,0000,,the context of things we already know. In\Nparticular we find it easier to understand Dialogue: 0,0:08:48.82,0:08:56.19,Default,,0000,0000,0000,,concrete things. And I think both in math\Nand computer science a lot of explanations Dialogue: 0,0:08:56.19,0:09:00.24,Default,,0000,0000,0000,,are in the form of explaining some\Nabstract thing rather than showing how to Dialogue: 0,0:09:00.24,0:09:04.44,Default,,0000,0000,0000,,do a concrete thing. And so we'll get\Nback. So this is going to be a major point Dialogue: 0,0:09:04.44,0:09:09.96,Default,,0000,0000,0000,,later on. Something that didn't really\Nneed saying in that book: "Proficiency Dialogue: 0,0:09:09.96,0:09:12.88,Default,,0000,0000,0000,,requires practice." If you want to get\Nbetter at programming, you'll need to Dialogue: 0,0:09:12.88,0:09:17.01,Default,,0000,0000,0000,,practice it with the goal of getting\Nbetter at it. So in the classroom or in a Dialogue: 0,0:09:17.01,0:09:22.26,Default,,0000,0000,0000,,teaching environment you really need to\Ncreate situations that foster successful Dialogue: 0,0:09:22.26,0:09:27.18,Default,,0000,0000,0000,,practice, the successful solution of\Nproblems. So that, you know, this natural Dialogue: 0,0:09:27.18,0:09:32.13,Default,,0000,0000,0000,,curious part in the beginning. So student,\Nso people generally derive a dopamine rush Dialogue: 0,0:09:32.13,0:09:37.45,Default,,0000,0000,0000,,from successfully solving problems. So we\Nreally need to put … we really need to put Dialogue: 0,0:09:37.45,0:09:41.74,Default,,0000,0000,0000,,our students in a situation where they can\Nsuccessfully solve problems – that are not Dialogue: 0,0:09:41.74,0:09:45.21,Default,,0000,0000,0000,,too hard and also not too easy, because if\Nthey're too easy, the dopamine rush will Dialogue: 0,0:09:45.21,0:09:51.55,Default,,0000,0000,0000,,not be big enough. Here's a trap I think\Nthat most people who teach programming Dialogue: 0,0:09:51.55,0:09:54.43,Default,,0000,0000,0000,,know about is that "cognition is\Nfundamentally different early and late in Dialogue: 0,0:09:54.43,0:09:57.95,Default,,0000,0000,0000,,training". And if you're here, most people\Nin this room are late in training. So Dialogue: 0,0:09:57.95,0:10:02.22,Default,,0000,0000,0000,,we've been in touch with computers for a\Nlong time, so our cognitive processes when Dialogue: 0,0:10:02.22,0:10:05.55,Default,,0000,0000,0000,,we think about programming are different\Nthan the cognitive processes of beginning Dialogue: 0,0:10:05.55,0:10:10.07,Default,,0000,0000,0000,,students. Sometimes that's also called the\Ncurse of knowledge. So just because we Dialogue: 0,0:10:10.07,0:10:14.35,Default,,0000,0000,0000,,find some piece of material inspiring or\Ninteresting – or some technique of Dialogue: 0,0:10:14.35,0:10:18.41,Default,,0000,0000,0000,,explaining something very persuasive –\Nthat does not mean that our students find Dialogue: 0,0:10:18.41,0:10:23.07,Default,,0000,0000,0000,,it similarly persuasive and find it\Nsimilarly easy to follow along our Dialogue: 0,0:10:23.07,0:10:28.02,Default,,0000,0000,0000,,teaching. If you're teaching big\Nclassrooms I think there's being have been Dialogue: 0,0:10:28.02,0:10:33.62,Default,,0000,0000,0000,,a big push towards individualistic\Nlearning. And of course that's wonderful. Dialogue: 0,0:10:33.62,0:10:38.12,Default,,0000,0000,0000,,On the other hand our children tend to be\Nquite alike in their style of learning. Dialogue: 0,0:10:38.12,0:10:42.21,Default,,0000,0000,0000,,And so I'm not going be talking about that\Nmuch that very much today but there's Dialogue: 0,0:10:42.21,0:10:46.50,Default,,0000,0000,0000,,still great value in having a classroom\Nwith several students that are all being Dialogue: 0,0:10:46.50,0:10:53.96,Default,,0000,0000,0000,,taught the same thing. Not a subject today\Nbut I could also … that that also has been Dialogue: 0,0:10:53.96,0:10:58.86,Default,,0000,0000,0000,,confirmed by my experience. Generally,\Nsome people think that you know some Dialogue: 0,0:10:58.86,0:11:01.76,Default,,0000,0000,0000,,people are good at math and some people\Nare bad at math. You know girls are always Dialogue: 0,0:11:01.76,0:11:05.96,Default,,0000,0000,0000,,bad at math for some reason and it turns\Nout that this is … Well first of all it's Dialogue: 0,0:11:05.96,0:11:10.58,Default,,0000,0000,0000,,not true. And even if you feel you're bad\Nat something then usually what we call Dialogue: 0,0:11:10.58,0:11:15.44,Default,,0000,0000,0000,,intelligence can be changed through\Nsustained hard work. I think you know 10 Dialogue: 0,0:11:15.44,0:11:20.03,Default,,0000,0000,0000,,or 20 years ago a lot of people believed\Nin IQ that an innate ability to learn Dialogue: 0,0:11:20.03,0:11:24.88,Default,,0000,0000,0000,,things. But it turns out that that most of\Nthe effects of IQ on your ability do Dialogue: 0,0:11:24.88,0:11:28.74,Default,,0000,0000,0000,,things well are quite indirect and through\Nthe environment rather than through some Dialogue: 0,0:11:28.74,0:11:34.74,Default,,0000,0000,0000,,structure in your brain that you were born\Nwith. And so that's something that you Dialogue: 0,0:11:34.74,0:11:39.51,Default,,0000,0000,0000,,really learn when you do 30 years of\Nteaching is really that your teaching can Dialogue: 0,0:11:39.51,0:11:43.78,Default,,0000,0000,0000,,improve over time. But in order to improve\Nyou really must get feedback and you must Dialogue: 0,0:11:43.78,0:11:48.89,Default,,0000,0000,0000,,practice it and get feedback the same way\Nthat the skill itself must be practiced. Dialogue: 0,0:11:48.89,0:11:53.71,Default,,0000,0000,0000,,And that sometimes gets you feedback that\Nis surprising sometimes and also it's Dialogue: 0,0:11:53.71,0:11:58.65,Default,,0000,0000,0000,,often quite quite painful because\Nsometimes you get the feedback that you're Dialogue: 0,0:11:58.65,0:12:04.34,Default,,0000,0000,0000,,teaching just did not work. So really, I\Nwant to aim a programming education at a Dialogue: 0,0:12:04.34,0:12:08.85,Default,,0000,0000,0000,,diverse audience and not just I mean if\Nyou look at the Robot class if you're Dialogue: 0,0:12:08.85,0:12:12.56,Default,,0000,0000,0000,,student population that ends up being in\Nthat robot class is really as diverse as Dialogue: 0,0:12:12.56,0:12:16.67,Default,,0000,0000,0000,,you like it as you'd like it to be. I\Nthink often that is not the case. So the Dialogue: 0,0:12:16.67,0:12:19.71,Default,,0000,0000,0000,,stuff that I'm going to talk about and\Nthen I'm going to talk about has been Dialogue: 0,0:12:19.71,0:12:23.60,Default,,0000,0000,0000,,applied not always by me but to children,\Nto high school students, to university Dialogue: 0,0:12:23.60,0:12:28.41,Default,,0000,0000,0000,,students, professional developers and\Nworks quite well. And what it is based on Dialogue: 0,0:12:28.41,0:12:33.66,Default,,0000,0000,0000,,is a set of systematic methods and I'll\Ntry to show you in great and painstaking Dialogue: 0,0:12:33.66,0:12:40.20,Default,,0000,0000,0000,,detail what that means. And so here are\Nsome references that you can look at. In Dialogue: 0,0:12:40.20,0:12:44.35,Default,,0000,0000,0000,,particular we built on the work of the PLT\Ngroup in the U .S. led by Matthias Dialogue: 0,0:12:44.35,0:12:47.61,Default,,0000,0000,0000,,Felleisen, who have a great book out now.\NI'll give you a reference to that later. Dialogue: 0,0:12:47.61,0:12:53.41,Default,,0000,0000,0000,,There is a there's a significant project\Nfor teaching high school students in the Dialogue: 0,0:12:53.41,0:12:56.14,Default,,0000,0000,0000,,U.S. and there's also a project that I'm\Ninvolved with what's called which is Dialogue: 0,0:12:56.14,0:13:00.66,Default,,0000,0000,0000,,called "Dein Programm", which tries to be\Nsort of the little German sister of that Dialogue: 0,0:13:00.66,0:13:08.73,Default,,0000,0000,0000,,stuff. So one aspect that's important to\Nthis method of teaching is that all the Dialogue: 0,0:13:08.73,0:13:13.67,Default,,0000,0000,0000,,tools that we use are geared towards\Nlearners in particular that means that Dialogue: 0,0:13:13.67,0:13:17.18,Default,,0000,0000,0000,,there is a specific programming\Nenvironment that was made specifically for Dialogue: 0,0:13:17.18,0:13:23.10,Default,,0000,0000,0000,,learners rather than your Emacs or VI or\Nwhatever your favorite thing is that you Dialogue: 0,0:13:23.10,0:13:27.43,Default,,0000,0000,0000,,want to, that you want to inflict on your\Nlearners. I don't think you should. I'm an Dialogue: 0,0:13:27.43,0:13:33.98,Default,,0000,0000,0000,,Emacs person myself. So also what it means\Nis that we have … that we use specific Dialogue: 0,0:13:33.98,0:13:38.08,Default,,0000,0000,0000,,programming languages that are derived\Nfrom real programming languages but that Dialogue: 0,0:13:38.08,0:13:44.25,Default,,0000,0000,0000,,have been modified to be especially\Nsuitable for learners. And also then we Dialogue: 0,0:13:44.25,0:13:50.16,Default,,0000,0000,0000,,have something called the design recipes\Nwhich are a set of methods for systematic Dialogue: 0,0:13:50.16,0:13:55.23,Default,,0000,0000,0000,,program construction that try to provide\Nthis factual basis for the methodology of Dialogue: 0,0:13:55.23,0:13:58.86,Default,,0000,0000,0000,,programming. And so there's programming\Nenvironment … All of this stuff by the way Dialogue: 0,0:13:58.86,0:14:04.90,Default,,0000,0000,0000,,can be downloaded for free. And so there's\Na great system called racket developed by Dialogue: 0,0:14:04.90,0:14:08.92,Default,,0000,0000,0000,,the PLT group but there's a tiny corner in\Nthere that I'm going to refer to today Dialogue: 0,0:14:08.92,0:14:12.96,Default,,0000,0000,0000,,which is great for many things but it was\Noriginally designed and still is great for Dialogue: 0,0:14:12.96,0:14:22.74,Default,,0000,0000,0000,,teaching so. So let me try to switch to\Nthat. I hope that works out. This moment Dialogue: 0,0:14:22.74,0:14:30.83,Default,,0000,0000,0000,,always scares me. So here is the system\Ncalled Doctor racket and you can see it Dialogue: 0,0:14:30.83,0:14:35.40,Default,,0000,0000,0000,,has not very many buttons it does not look\Nlike Eclipse or Visual Studio or something Dialogue: 0,0:14:35.40,0:14:38.66,Default,,0000,0000,0000,,like that does not look like a\Nprofessional programming environment. And Dialogue: 0,0:14:38.66,0:14:43.74,Default,,0000,0000,0000,,the way this works is I'm going to try to\Nshow you how it works is in the upper part Dialogue: 0,0:14:43.74,0:14:47.36,Default,,0000,0000,0000,,of that window there's just the program\Nthat's a text editor with a couple of Dialogue: 0,0:14:47.36,0:14:51.80,Default,,0000,0000,0000,,special features - not very many. And down\Nhere is the REPL, which you can use to Dialogue: 0,0:14:51.80,0:14:55.93,Default,,0000,0000,0000,,interact with the program that you've\Nwritten. I'm not gonna use that very much. Dialogue: 0,0:14:55.93,0:15:00.60,Default,,0000,0000,0000,,But what you can do in the REPL - in the\Nbeginning at least - is you can just type Dialogue: 0,0:15:00.60,0:15:04.91,Default,,0000,0000,0000,,something and it will give you … it will\Nthen immediately tell you the result of Dialogue: 0,0:15:04.91,0:15:10.56,Default,,0000,0000,0000,,the evaluation of what you typed in. And\Nnow you have to remember … This is gonna Dialogue: 0,0:15:10.56,0:15:15.65,Default,,0000,0000,0000,,be alien and strange to you. But the way\Nthis works is these languages are based on Dialogue: 0,0:15:15.65,0:15:20.44,Default,,0000,0000,0000,,Lisp. So they use round parentheses a lot\Nand specifically when … always when you Dialogue: 0,0:15:20.44,0:15:23.21,Default,,0000,0000,0000,,want to put something together they have\Naround parentheses and they have the Dialogue: 0,0:15:23.21,0:15:26.76,Default,,0000,0000,0000,,operator in front and - especially if\Nyou've been programming for a long time - Dialogue: 0,0:15:26.76,0:15:30.30,Default,,0000,0000,0000,,you think "Oh no, this is … Never gonna\Nget used to that!" but I can promise you, Dialogue: 0,0:15:30.30,0:15:35.93,Default,,0000,0000,0000,,your children will have a very easy time\Ndealing with this. So you could go and say Dialogue: 0,0:15:35.93,0:15:39.89,Default,,0000,0000,0000,,you know you could just type a number and\Nit will give you the result. You would Dialogue: 0,0:15:39.89,0:15:48.20,Default,,0000,0000,0000,,type a string, you know, "Mike". It will\Ngive you the result. It … you could go and Dialogue: 0,0:15:48.20,0:15:52.93,Default,,0000,0000,0000,,you could you know, you could combine\Nnumbers, right, by adding them together. Dialogue: 0,0:15:52.93,0:15:57.48,Default,,0000,0000,0000,,You could let's do away with that. Looks\Nlike this. So that's what it what it looks Dialogue: 0,0:15:57.48,0:16:00.97,Default,,0000,0000,0000,,like a compound expression has always\Nparens around it and the operator in Dialogue: 0,0:16:00.97,0:16:04.96,Default,,0000,0000,0000,,front. So you don't really say you know\Nthis number plus that number you say the Dialogue: 0,0:16:04.96,0:16:11.55,Default,,0000,0000,0000,,sum of those two numbers. OK. And so gives\Nme the result of that. What's kind of fun Dialogue: 0,0:16:11.55,0:16:15.98,Default,,0000,0000,0000,,if you're a C programmer or Java\Nprogrammer this is kind of fun, but Dialogue: 0,0:16:15.98,0:16:23.90,Default,,0000,0000,0000,,children love this for some reason I know.\NSo what you can also do is the same way Dialogue: 0,0:16:23.90,0:16:28.28,Default,,0000,0000,0000,,that you're used to having numbers and\Nstrings and whatever and booleans be Dialogue: 0,0:16:28.28,0:16:33.33,Default,,0000,0000,0000,,values. Pictures are also values so that\Nsometimes helps when you're trying to drum Dialogue: 0,0:16:33.33,0:16:37.25,Default,,0000,0000,0000,,up that little piece of motivation that\Nyou need. So you could do like a rectangle Dialogue: 0,0:16:37.25,0:16:44.83,Default,,0000,0000,0000,,that is solid blue and that's a value. And\Nwhatever whenever there is a value you can Dialogue: 0,0:16:44.83,0:16:51.27,Default,,0000,0000,0000,,write a program that binds that value to a\Nname by writing "define". So you could do Dialogue: 0,0:16:51.27,0:16:57.98,Default,,0000,0000,0000,,something really exciting like this. You\Nwould define "pi" for something. We could Dialogue: 0,0:16:57.98,0:17:03.94,Default,,0000,0000,0000,,run that program and then we could put top\Npi here but we could also do you know "r" Dialogue: 0,0:17:03.94,0:17:13.74,Default,,0000,0000,0000,,that rectangle and whatever 50 solid red\Nand we can run that program. And here's Dialogue: 0,0:17:13.74,0:17:20.06,Default,,0000,0000,0000,,that rectangle. What's maybe more\Ninteresting is that we can maybe do Dialogue: 0,0:17:20.06,0:17:25.60,Default,,0000,0000,0000,,another rectangle that's solid blue and\Nyou can also see here's the same principle Dialogue: 0,0:17:25.60,0:17:29.88,Default,,0000,0000,0000,,at work right. Parentheses around the\Ndefine so "define" says it's a definition Dialogue: 0,0:17:29.88,0:17:33.98,Default,,0000,0000,0000,,and the rectangle is just a call to a\Nfunction that comes with Dr. Racket and Dialogue: 0,0:17:33.98,0:17:40.32,Default,,0000,0000,0000,,it's also in front. And so I could do\Nthat. Now I have "r" I have "f2" and I Dialogue: 0,0:17:40.32,0:17:43.99,Default,,0000,0000,0000,,could also do things, things like you know\Nthere's for example a function that takes Dialogue: 0,0:17:43.99,0:17:49.83,Default,,0000,0000,0000,,two pictures and puts them beside each\Nother so there's a little jumping ahead a Dialogue: 0,0:17:49.83,0:17:52.75,Default,,0000,0000,0000,,little bit there's a little algebra of\Npictures in here that you can use to Dialogue: 0,0:17:52.75,0:17:56.18,Default,,0000,0000,0000,,program video games for example later in\Nthe class if that's something that you Dialogue: 0,0:17:56.18,0:18:03.80,Default,,0000,0000,0000,,want to do. So this is not entirely\Nwithout motivational examples. So there's Dialogue: 0,0:18:03.80,0:18:14.06,Default,,0000,0000,0000,,that. Yeah. Let's see how far we can go\Nfrom there. OK. So but getting away from Dialogue: 0,0:18:14.06,0:18:21.20,Default,,0000,0000,0000,,those motivational examples. In German we\Nare very big on traffic rules. Right. Dialogue: 0,0:18:21.20,0:18:24.53,Default,,0000,0000,0000,,Straßenverkehrsordnung. So there are many\Nrules, right, and we'll try to model that. Dialogue: 0,0:18:24.53,0:18:28.58,Default,,0000,0000,0000,,This is going to make this the most boring\Ntalk you've ever heard. So we're gonna Dialogue: 0,0:18:28.58,0:18:34.48,Default,,0000,0000,0000,,categorise German traffic violations. So\Nin particular there's two kinds of traffic Dialogue: 0,0:18:34.48,0:18:38.66,Default,,0000,0000,0000,,violations. There's red light violations\Nwhere it's important where they happen and Dialogue: 0,0:18:38.66,0:18:43.11,Default,,0000,0000,0000,,it's also important what the duration is.\NHow long after the light has turned red Dialogue: 0,0:18:43.11,0:18:48.37,Default,,0000,0000,0000,,passes before you actually cross the\Nintersection or the red light. And then Dialogue: 0,0:18:48.37,0:18:52.14,Default,,0000,0000,0000,,there's a speeding violation where you\Nalso have a place and you just have how Dialogue: 0,0:18:52.14,0:18:56.15,Default,,0000,0000,0000,,many kilometres per hour did you go over\Nthe limit. And we want to write functions Dialogue: 0,0:18:56.15,0:19:00.85,Default,,0000,0000,0000,,and I'll tell you how to do that for\Nyielding the place of a violation and Dialogue: 0,0:19:00.85,0:19:07.25,Default,,0000,0000,0000,,classifying a violation as serious or not.\NAnd for that purpose we're going to do … Dialogue: 0,0:19:07.25,0:19:12.58,Default,,0000,0000,0000,,use something called the design recipe or\Nrather as there's we're going to use Dialogue: 0,0:19:12.58,0:19:15.92,Default,,0000,0000,0000,,several design design recipes and first of\Nall there's an overall design recipes, Dialogue: 0,0:19:15.92,0:19:20.54,Default,,0000,0000,0000,,which says how you write a function. And\Nplease don't fall asleep. There's one, Dialogue: 0,0:19:20.54,0:19:24.76,Default,,0000,0000,0000,,two, three, four, five, six, eight, eight\Nsteps to this. And we always ask our Dialogue: 0,0:19:24.76,0:19:30.01,Default,,0000,0000,0000,,students to always go through those eight\Nsteps and you think: this is off. I mean I Dialogue: 0,0:19:30.01,0:19:33.94,Default,,0000,0000,0000,,hope you do right. You feel this is this\Nalready looks like the most boringest, you Dialogue: 0,0:19:33.94,0:19:37.91,Default,,0000,0000,0000,,know, exposition to programming ever. This\Nis like the German bureaucracy approach to Dialogue: 0,0:19:37.91,0:19:45.80,Default,,0000,0000,0000,,teaching how to program. On the other\Nhand, so, but, you know, it works. That is Dialogue: 0,0:19:45.80,0:19:50.92,Default,,0000,0000,0000,,the point. Specifically each of those\Nsteps is something that is small enough so Dialogue: 0,0:19:50.92,0:19:54.23,Default,,0000,0000,0000,,that students can usually successfully do\Nit. And if you can reward it with credit Dialogue: 0,0:19:54.23,0:19:58.84,Default,,0000,0000,0000,,or candy or whatever then you know\Nstudents will be motivated to get to the Dialogue: 0,0:19:58.84,0:20:03.91,Default,,0000,0000,0000,,next step. You know if you've ever taught\Nunsuccessfully and probably most of you Dialogue: 0,0:20:03.91,0:20:08.17,Default,,0000,0000,0000,,have always taught successfully but what\Nalways happened to me is then when my Dialogue: 0,0:20:08.17,0:20:14.05,Default,,0000,0000,0000,,teaching would be unsuccessful my students\Nwould be staring at a blank screen. Right. Dialogue: 0,0:20:14.05,0:20:17.32,Default,,0000,0000,0000,,And that would give them this problem and\NI felt this problem was really solvable Dialogue: 0,0:20:17.32,0:20:22.54,Default,,0000,0000,0000,,and they would give up before typing the\Nfirst key. Right. They wouldn't know where Dialogue: 0,0:20:22.54,0:20:26.51,Default,,0000,0000,0000,,to begin because there's usually most\Napproaches to teaching how to program are Dialogue: 0,0:20:26.51,0:20:31.12,Default,,0000,0000,0000,,example based. They give you some example.\NYou know, here's that program solves that Dialogue: 0,0:20:31.12,0:20:34.24,Default,,0000,0000,0000,,problem. How here's a different problem,\Nnow solve that. And you already saw how Dialogue: 0,0:20:34.24,0:20:39.67,Default,,0000,0000,0000,,that's done. And that process usually or\Noften does not work. And so this fixed Dialogue: 0,0:20:39.67,0:20:44.02,Default,,0000,0000,0000,,sequence of steps gets students over that\Nhump and I'm gonna try to explain that Dialogue: 0,0:20:44.02,0:20:47.32,Default,,0000,0000,0000,,really in painstaking detail because the\Nbooks don't really do justice to a how Dialogue: 0,0:20:47.32,0:20:52.57,Default,,0000,0000,0000,,bureaucratic and painstaking it is. So you\Nall have the benefit of that. So there's Dialogue: 0,0:20:52.57,0:20:55.99,Default,,0000,0000,0000,,always these eight steps and then there's\Nmore instructions that come with each of Dialogue: 0,0:20:55.99,0:21:01.60,Default,,0000,0000,0000,,those steps. Right. But these instructions\Nare eminently learnable and that's the Dialogue: 0,0:21:01.60,0:21:07.89,Default,,0000,0000,0000,,important aspect here. So in particular.\NSo I'm gonna, sort of, jump in right Dialogue: 0,0:21:07.89,0:21:20.12,Default,,0000,0000,0000,,ahead. Oops, oops. Ah. You see something\Nthat I don't see. There we go. So if you Dialogue: 0,0:21:20.12,0:21:26.89,Default,,0000,0000,0000,,look at this problem statement. So let me\Ngo back one more. So it says the first Dialogue: 0,0:21:26.89,0:21:30.00,Default,,0000,0000,0000,,thing that you do is well you draw a short\Ndescription of a function we already have Dialogue: 0,0:21:30.00,0:21:33.85,Default,,0000,0000,0000,,two short descriptions of the functions\Nyou know find the place of a traffic Dialogue: 0,0:21:33.85,0:21:37.12,Default,,0000,0000,0000,,violation and find out if it's serious or\Nnot. And then it says please conduct a Dialogue: 0,0:21:37.12,0:21:43.39,Default,,0000,0000,0000,,data analysis and data analysis means that\Nyou look at the entities in your problem Dialogue: 0,0:21:43.39,0:21:48.35,Default,,0000,0000,0000,,and and analyze them. And here it says\Nwhile this is all about traffic Dialogue: 0,0:21:48.35,0:21:52.72,Default,,0000,0000,0000,,violations. And it says something of the\Nsort. That there's for example a red light Dialogue: 0,0:21:52.72,0:21:57.18,Default,,0000,0000,0000,,violation. And it says that red light\Nviolation has place and duration and that Dialogue: 0,0:21:57.18,0:22:01.73,Default,,0000,0000,0000,,duration is in seconds. So one thing that\Nyou can do is you can look at the wording Dialogue: 0,0:22:01.73,0:22:05.93,Default,,0000,0000,0000,,of how that data is described and if you\Ndiscover wording that says you know this Dialogue: 0,0:22:05.93,0:22:11.52,Default,,0000,0000,0000,,thing consists of these pieces. Right. Or\Nthis thing has several different Dialogue: 0,0:22:11.52,0:22:18.42,Default,,0000,0000,0000,,properties. This is a phenomenon that we\Ncall compound data and that has a special Dialogue: 0,0:22:18.42,0:22:27.69,Default,,0000,0000,0000,,design recipe that PowerPoint somehow\Nthrew away. See OK it comes up again. So Dialogue: 0,0:22:27.69,0:22:32.34,Default,,0000,0000,0000,,it says well you recognize compound data\Nby a description of your data that uses Dialogue: 0,0:22:32.34,0:22:36.88,Default,,0000,0000,0000,,words like "consists of" or "has". And\Nthen you write a data definition of that Dialogue: 0,0:22:36.88,0:22:41.51,Default,,0000,0000,0000,,form and I will show you how that works.\NThen, something really trivial comes you Dialogue: 0,0:22:41.51,0:22:44.48,Default,,0000,0000,0000,,count the ingredients and you write a\Nwhat's called a record definition that's Dialogue: 0,0:22:44.48,0:22:49.62,Default,,0000,0000,0000,,actual code and then you ensure that the\Ncounts match and these are instructions in Dialogue: 0,0:22:49.62,0:22:57.06,Default,,0000,0000,0000,,the textbook. Right. And students learn to\Nmemorize those instructions and you all Dialogue: 0,0:22:57.06,0:23:04.02,Default,,0000,0000,0000,,going asleep. You know you're all falling\Nasleep. Sorry about that. So let's see Dialogue: 0,0:23:04.02,0:23:09.62,Default,,0000,0000,0000,,where is the right window. Here's the\Nright window. So that's what we were Dialogue: 0,0:23:09.62,0:23:16.38,Default,,0000,0000,0000,,doing. Right. I'm going to leave that here\Nfor your entertainment. It says well a red Dialogue: 0,0:23:16.38,0:23:22.81,Default,,0000,0000,0000,,light violation… So excited, I need to\Ntalk. And we said it has this formulation Dialogue: 0,0:23:22.81,0:23:26.79,Default,,0000,0000,0000,,that says "has". We're just going to write\Nit down in a slightly more systematic way. Dialogue: 0,0:23:26.79,0:23:34.17,Default,,0000,0000,0000,,So, it has a place and it has a duration\Nin seconds. Right. And that's just a piece Dialogue: 0,0:23:34.17,0:23:39.73,Default,,0000,0000,0000,,of natural language and those semicolons,\Nthey make this a comment. OK. So we didn't Dialogue: 0,0:23:39.73,0:23:44.25,Default,,0000,0000,0000,,do much except writing each component of\Nour compound data in a separate line. And Dialogue: 0,0:23:44.25,0:23:47.09,Default,,0000,0000,0000,,then it said - I can't really display it\Nat the same time - then it said, write a Dialogue: 0,0:23:47.09,0:23:52.75,Default,,0000,0000,0000,,record definition and a record definition\Nhas this form. It is, it really it looks a Dialogue: 0,0:23:52.75,0:24:01.23,Default,,0000,0000,0000,,little tedious. But it's actually quite\Nvaluable. So it says we're talking about Dialogue: 0,0:24:01.23,0:24:06.27,Default,,0000,0000,0000,,red light violations so we give our thing\Na name. So that's called "red-light- Dialogue: 0,0:24:06.27,0:24:12.77,Default,,0000,0000,0000,,violation" then we will need to create\N"red-light-violation" objects. So we will Dialogue: 0,0:24:12.77,0:24:15.68,Default,,0000,0000,0000,,need a constructor so I'm going to write\Ndown the name of that constructor. Dialogue: 0,0:24:15.68,0:24:19.82,Default,,0000,0000,0000,,Eventually we will need to distinguish red\Nlight violations from other things. So I'm Dialogue: 0,0:24:19.82,0:24:24.23,Default,,0000,0000,0000,,going to write something it's a predicate\Nthat we'll use a little later and then we Dialogue: 0,0:24:24.23,0:24:28.77,Default,,0000,0000,0000,,have two parts. And I can't emphasize\Nenough how important it is that you sort Dialogue: 0,0:24:28.77,0:24:31.96,Default,,0000,0000,0000,,of remember: two. Right? It has two parts,\Nbecause it says that there's a place and a Dialogue: 0,0:24:31.96,0:24:37.82,Default,,0000,0000,0000,,duration in seconds and we write the names\Nof things that will extract those pieces. Dialogue: 0,0:24:37.82,0:24:42.98,Default,,0000,0000,0000,,So we go here it says "red-light-\Nviolation-place" and "red-light-violation- Dialogue: 0,0:24:42.98,0:24:50.42,Default,,0000,0000,0000,,duration". Or we could, let's call it\Nseconds, so we always know what that is. Dialogue: 0,0:24:50.42,0:24:59.12,Default,,0000,0000,0000,,And now what that does is when I run it is\Nwell it doesn't do anything. But what we Dialogue: 0,0:24:59.12,0:25:05.57,Default,,0000,0000,0000,,can do is. We can now create objects that\Nrepresent red light violations. And so Dialogue: 0,0:25:05.57,0:25:10.53,Default,,0000,0000,0000,,what we could do is… Well let me first\Nshow you how it's done. We do "make-red- Dialogue: 0,0:25:10.53,0:25:16.13,Default,,0000,0000,0000,,light-violation". You know there's one in\NBorg. Somebody who, you know, had a red Dialogue: 0,0:25:16.13,0:25:20.19,Default,,0000,0000,0000,,light violation for four seconds in Borg.\NRight. And then it will display a record Dialogue: 0,0:25:20.19,0:25:28.59,Default,,0000,0000,0000,,value that shows what the parts are that\Nwe had. And so I can copy this up here and Dialogue: 0,0:25:28.59,0:25:37.19,Default,,0000,0000,0000,,call it and make an example out of that.\NAnd so like this. So now we have "rv1" Dialogue: 0,0:25:37.19,0:25:43.77,Default,,0000,0000,0000,,here. So this is what's called a\Nconstructor and this constructor when we Dialogue: 0,0:25:43.77,0:25:48.50,Default,,0000,0000,0000,,call it creates this object and this\Nobject really creates data that is Dialogue: 0,0:25:48.50,0:25:52.62,Default,,0000,0000,0000,,associated with information. So that's an\Nimportant aspect to explain. And so Dialogue: 0,0:25:52.62,0:25:58.44,Default,,0000,0000,0000,,usually we ask students and I can't I'm\Nnot writing this down to explain it to you Dialogue: 0,0:25:58.44,0:26:04.11,Default,,0000,0000,0000,,I'm writing it down to show to you what to\Nexpect from students. And so you go "Oh", Dialogue: 0,0:26:04.11,0:26:21.03,Default,,0000,0000,0000,,make them do it. So this is a red light\Nviolation in Borg, 4 seconds. So it seems Dialogue: 0,0:26:21.03,0:26:28.66,Default,,0000,0000,0000,,really trivial to you but it's important\Nto really … to link the program to the Dialogue: 0,0:26:28.66,0:26:36.46,Default,,0000,0000,0000,,problem domain that we're in, right. So we\Nhave a minor red light violation here. Dialogue: 0,0:26:42.26,0:26:50.82,Default,,0000,0000,0000,,Am I spelling this right? Anyway, so here\Nwe go. And one way to talk about this new Dialogue: 0,0:26:50.82,0:26:54.30,Default,,0000,0000,0000,,function that we created "make-red-light-\Nviolation" is writing down something that Dialogue: 0,0:26:54.30,0:27:00.35,Default,,0000,0000,0000,,we call a signature. It looks like, sort\Nof like a type signature but isn't quite. Dialogue: 0,0:27:00.35,0:27:04.02,Default,,0000,0000,0000,,That's something that we did specifically\Nfor teaching. So you do "make-red-light- Dialogue: 0,0:27:04.02,0:27:12.34,Default,,0000,0000,0000,,violation" and remember in math you would\Nsometimes write f Doppelpunkt, f colon to Dialogue: 0,0:27:12.34,0:27:16.02,Default,,0000,0000,0000,,denote a type. And here we just put the\Ncolon in front. So it says "make-red- Dialogue: 0,0:27:16.02,0:27:20.53,Default,,0000,0000,0000,,light-violation". Well it takes a string,\Nthat says what the places is, it takes Dialogue: 0,0:27:20.53,0:27:25.45,Default,,0000,0000,0000,,some rational number, that says how long\Nit went, how long the red light violation Dialogue: 0,0:27:25.45,0:27:36.04,Default,,0000,0000,0000,,was over the limit, and it creates a red\Nlight violation object. So that's not Dialogue: 0,0:27:36.04,0:27:43.00,Default,,0000,0000,0000,,gonna do much, unless, well let me let me\Nshow you something. If I wrote something Dialogue: 0,0:27:43.00,0:27:58.79,Default,,0000,0000,0000,,else here I wrote a number here.\NSomething… Where'd it go? So it's, so it Dialogue: 0,0:27:58.79,0:28:02.43,Default,,0000,0000,0000,,says it gives an error message here. And\Nit's I think it's due to this full screen Dialogue: 0,0:28:02.43,0:28:18.09,Default,,0000,0000,0000,,mode for some reason. Let me see if we can\Ndo this again. No, not quite. OK, now we Dialogue: 0,0:28:18.09,0:28:23.15,Default,,0000,0000,0000,,know what it is so. So. Yeah it was. So,\Nwhen you. Unfortunately it is in German so Dialogue: 0,0:28:23.15,0:28:26.08,Default,,0000,0000,0000,,I hope some of you read German I'll try to\Ntranslate it says well this program still Dialogue: 0,0:28:26.08,0:28:30.57,Default,,0000,0000,0000,,has to be tested but it says there was a…\NIt says here "Signaturverletzung", which Dialogue: 0,0:28:30.57,0:28:38.04,Default,,0000,0000,0000,,means signature violation. And it says I\Ngot five in this line here. And really, so Dialogue: 0,0:28:38.04,0:28:44.01,Default,,0000,0000,0000,,this is the five. Oops, right here in this\Nline. And it violated the signature here. Dialogue: 0,0:28:44.01,0:28:47.28,Default,,0000,0000,0000,,So it gives you… So the system. That's one\Naspect of what makes the system Dialogue: 0,0:28:47.28,0:28:52.77,Default,,0000,0000,0000,,specifically designed for learners is that\Nit gives you very specific feedback as you Dialogue: 0,0:28:52.77,0:29:02.91,Default,,0000,0000,0000,,run the program. OK. So let's do away with\Nthis. Let's get this down here. So now one Dialogue: 0,0:29:02.91,0:29:06.37,Default,,0000,0000,0000,,of the challenges or one of the problems\Nin the problem statement was to write a Dialogue: 0,0:29:06.37,0:29:11.78,Default,,0000,0000,0000,,function that determines whether a red\Nlight violation is serious or not. And so Dialogue: 0,0:29:11.78,0:29:15.83,Default,,0000,0000,0000,,when we do that, it said, well, you put a\Nshort description in front. And so here's Dialogue: 0,0:29:15.83,0:29:19.93,Default,,0000,0000,0000,,a short description. And there's lots of\Nreligious wars about how many comments you Dialogue: 0,0:29:19.93,0:29:24.41,Default,,0000,0000,0000,,should put in a program but to our\Nlearners we say put one line not more not Dialogue: 0,0:29:24.41,0:29:29.76,Default,,0000,0000,0000,,less in front of every function. And\Nthat's usually about the right level. So Dialogue: 0,0:29:29.76,0:29:37.50,Default,,0000,0000,0000,,is a red light violation serious? So the\Nnext thing is. Well if you remember that Dialogue: 0,0:29:37.50,0:29:41.27,Default,,0000,0000,0000,,slide it says, well, if you're writing a\Nfunction, if you're implementing a piece Dialogue: 0,0:29:41.27,0:29:43.43,Default,,0000,0000,0000,,of functionality, that always ends up\Nbeing a function in functional Dialogue: 0,0:29:43.43,0:29:47.27,Default,,0000,0000,0000,,programming, you write a signature for\Nthat function that talks about what goes Dialogue: 0,0:29:47.27,0:29:53.07,Default,,0000,0000,0000,,in and out of that function. So in this\Ncase. Well we have to make up a name for Dialogue: 0,0:29:53.07,0:30:02.46,Default,,0000,0000,0000,,that. So it practically writes itself here\Nand so we just put so in this language you Dialogue: 0,0:30:02.46,0:30:05.36,Default,,0000,0000,0000,,can put a question mark in the middle of a\Nname and you can also put hyphens in the Dialogue: 0,0:30:05.36,0:30:10.95,Default,,0000,0000,0000,,middle of a name. And what we want is we\Nwant a red light violation to go in and we Dialogue: 0,0:30:10.95,0:30:16.39,Default,,0000,0000,0000,,want a boolean to come out that says\Nwhether that violation was serious or not. Dialogue: 0,0:30:16.39,0:30:20.34,Default,,0000,0000,0000,,So those are already steps in that design\Nrecipe that you saw. And so if you're in a Dialogue: 0,0:30:20.34,0:30:23.71,Default,,0000,0000,0000,,classroom situation or whatever you can\Ngive credit for each immediate step and Dialogue: 0,0:30:23.71,0:30:29.03,Default,,0000,0000,0000,,you should, because those are already\Nthose are all small successes in your Dialogue: 0,0:30:29.03,0:30:33.39,Default,,0000,0000,0000,,programming endeavor. So the next thing\Nthat you should do is, you should write Dialogue: 0,0:30:33.39,0:30:39.14,Default,,0000,0000,0000,,examples or tests. Those are almost the\Nsame thing here. And so, fortunately we Dialogue: 0,0:30:39.14,0:30:43.08,Default,,0000,0000,0000,,already have examples of red light\Nviolations. So we just have to write down Dialogue: 0,0:30:43.08,0:30:49.37,Default,,0000,0000,0000,,how we expect our function to behave with\Nrespect to those examples. So there's Dialogue: 0,0:30:49.37,0:30:53.97,Default,,0000,0000,0000,,something called "check-expect" and I hope\Nyou recognize that principle that we're, Dialogue: 0,0:30:53.97,0:30:59.61,Default,,0000,0000,0000,,that things are always named in the front.\NSo we could say "red-light-violation- Dialogue: 0,0:30:59.61,0:31:03.96,Default,,0000,0000,0000,,serious?". With children you might want to\Npick shorter names if they can't type that Dialogue: 0,0:31:03.96,0:31:12.09,Default,,0000,0000,0000,,fast yet, but with grown ups this works.\NSo the first one is four seconds over, so Dialogue: 0,0:31:12.09,0:31:17.75,Default,,0000,0000,0000,,that's pretty serious. So we expect that\Nto be true and that "#t" means true. And Dialogue: 0,0:31:17.75,0:31:29.90,Default,,0000,0000,0000,,so. And you. And the other one is half a\Nsecond over and that's not so serious Dialogue: 0,0:31:29.90,0:31:35.29,Default,,0000,0000,0000,,under German law. That's fine. OK. So the\Nnext step. So now we've written. So let me Dialogue: 0,0:31:35.29,0:31:40.32,Default,,0000,0000,0000,,let me label those things right. This is\Nthe short description. This is the Dialogue: 0,0:31:40.32,0:31:47.39,Default,,0000,0000,0000,,signature. These are the tests. And now\Nyou write something called the skeleton Dialogue: 0,0:31:47.39,0:31:50.90,Default,,0000,0000,0000,,and the skeleton is just you start writing\Nthe function but you already have some Dialogue: 0,0:31:50.90,0:31:53.72,Default,,0000,0000,0000,,information about that function you know\Nthe name of that function and you know how Dialogue: 0,0:31:53.72,0:32:08.15,Default,,0000,0000,0000,,many things come in and out. So you write\N- oops typo here - so and, well, this is a Dialogue: 0,0:32:08.15,0:32:11.64,Default,,0000,0000,0000,,functional language so somebody always has\Nto write lambda somewhere. So when we make Dialogue: 0,0:32:11.64,0:32:15.01,Default,,0000,0000,0000,,a function in these languages we always\Nwrite lambda. So we want to make a Dialogue: 0,0:32:15.01,0:32:19.37,Default,,0000,0000,0000,,function that accepts one thing and that\Nis a red light violation a red light and Dialogue: 0,0:32:19.37,0:32:27.52,Default,,0000,0000,0000,,we'll just call it "rlv" and we'll just\Nput three dots here. So the three dots I Dialogue: 0,0:32:27.52,0:32:31.18,Default,,0000,0000,0000,,don't mean to say we're gonna fill in the\Nrest later. It means in class when I do Dialogue: 0,0:32:31.18,0:32:35.85,Default,,0000,0000,0000,,this I actually type three dots and in\Nclass especially at the beginning we Dialogue: 0,0:32:35.85,0:32:39.96,Default,,0000,0000,0000,,actually ask our students to type the\Nthree dots because this is the skeleton. Dialogue: 0,0:32:39.96,0:32:47.12,Default,,0000,0000,0000,,This already gives you credit and it's,\Nyou know since this is so easy to do, it Dialogue: 0,0:32:47.12,0:32:52.48,Default,,0000,0000,0000,,really means that there's, you're not\Nstaring at a white piece of paper and Dialogue: 0,0:32:52.48,0:32:57.29,Default,,0000,0000,0000,,maybe you feel encouraged to do that next\Nstep. Now the next step says you have to Dialogue: 0,0:32:57.29,0:33:01.32,Default,,0000,0000,0000,,fill in what's called a template. And\Nthose are elements of the function that Dialogue: 0,0:33:01.32,0:33:07.27,Default,,0000,0000,0000,,you're writing that derive from the data\Nthat goes in and sometimes from the data Dialogue: 0,0:33:07.27,0:33:11.42,Default,,0000,0000,0000,,that goes out. In this case the data that\Ngoes in is one of those red light Dialogue: 0,0:33:11.42,0:33:15.34,Default,,0000,0000,0000,,violation objects and that red light\Nviolation object if you may remember is a Dialogue: 0,0:33:15.34,0:33:19.16,Default,,0000,0000,0000,,compound object it has two pieces. And\Nwhenever you write a function that accepts Dialogue: 0,0:33:19.16,0:33:23.57,Default,,0000,0000,0000,,compound data with two pieces you probably\Nneed to look at those pieces. So, what you Dialogue: 0,0:33:23.57,0:33:31.18,Default,,0000,0000,0000,,do is, you write you have to write\Nsomething that will tell you what those Dialogue: 0,0:33:31.18,0:33:38.35,Default,,0000,0000,0000,,pieces are and remember. So I haven't\Nactually told you how that works. But Dialogue: 0,0:33:38.35,0:33:42.60,Default,,0000,0000,0000,,remember here was the record definition,\Nup here, and it told us and we have a Dialogue: 0,0:33:42.60,0:33:46.56,Default,,0000,0000,0000,,signature there that tells us how to\Nconstruct a red light violation object. Dialogue: 0,0:33:46.56,0:33:50.71,Default,,0000,0000,0000,,And so what we also need is we need a way\Nto get the components out of a red light Dialogue: 0,0:33:50.71,0:33:54.42,Default,,0000,0000,0000,,violation object. So we need what's called\Nselectors or assessors. And those are the Dialogue: 0,0:33:54.42,0:33:58.85,Default,,0000,0000,0000,,things in parentheses here and here and\Nyou can also describe them with Dialogue: 0,0:33:58.85,0:34:06.69,Default,,0000,0000,0000,,signatures. And strangely enough so and\Nhere a red light violation thing goes in Dialogue: 0,0:34:06.69,0:34:20.89,Default,,0000,0000,0000,,and a string comes out. And in this case,\Na red light violation goes in and a - what Dialogue: 0,0:34:20.89,0:34:24.50,Default,,0000,0000,0000,,do we say - a rational comes out. So those\Nare of course… Those signature Dialogue: 0,0:34:24.50,0:34:27.12,Default,,0000,0000,0000,,declarations are redundant. You don't have\Nto put them in there. Redundant with a Dialogue: 0,0:34:27.12,0:34:29.84,Default,,0000,0000,0000,,constructor declaration and you're\Ngoing asleep, you're going asleep Dialogue: 0,0:34:29.84,0:34:30.90,Default,,0000,0000,0000,,anymore... Even Dialogue: 0,0:34:30.90,0:34:35.11,Default,,0000,0000,0000,,more probably than you were. But I had an\Nepiphany in class where I would only write Dialogue: 0,0:34:35.11,0:34:39.80,Default,,0000,0000,0000,,the constructor signature and the students\Nwould ask me to also write the excessive Dialogue: 0,0:34:39.80,0:34:46.02,Default,,0000,0000,0000,,signatures. And so they made me even more\Nbureaucratic than I was already by then I Dialogue: 0,0:34:46.02,0:34:50.69,Default,,0000,0000,0000,,already was by nature. So now here what we\Ndo is we want to get access to the Dialogue: 0,0:34:50.69,0:34:58.65,Default,,0000,0000,0000,,different parts. So we write "red-light-\Nviolation-place" of "rlv". So that's one Dialogue: 0,0:34:58.65,0:35:05.61,Default,,0000,0000,0000,,piece. "-violation-seconds" of "rlv".\NThat's the second part. And those are Dialogue: 0,0:35:05.61,0:35:08.58,Default,,0000,0000,0000,,building blocks. So really if you're\Nreally strict about it you might have Dialogue: 0,0:35:08.58,0:35:16.83,Default,,0000,0000,0000,,people type three dots in here also. So\Nthese just say, these are building blocks Dialogue: 0,0:35:16.83,0:35:20.56,Default,,0000,0000,0000,,for your function. And so you think about\Nhow those parts contribute to the answer Dialogue: 0,0:35:20.56,0:35:25.27,Default,,0000,0000,0000,,to your questions. The question was is the\Nred light cycle violation serious or not. Dialogue: 0,0:35:25.27,0:35:29.12,Default,,0000,0000,0000,,Then you can think about. Well is the\Nplace relevant whether it was serious or Dialogue: 0,0:35:29.12,0:35:33.12,Default,,0000,0000,0000,,not. And in Germany I think it's not. But\Nit is relevant how many seconds you went Dialogue: 0,0:35:33.12,0:35:39.35,Default,,0000,0000,0000,,over. So, you then have– then you go\Nthrough this conscious act of: you've Dialogue: 0,0:35:39.35,0:35:43.67,Default,,0000,0000,0000,,written it down but now you delete it\Nagain because you've done a little bit of Dialogue: 0,0:35:43.67,0:35:51.28,Default,,0000,0000,0000,,thinking. And you go and, well, then you\Nlook up– I look this up on the Internet. Dialogue: 0,0:35:51.28,0:35:56.04,Default,,0000,0000,0000,,If it's over one second then – or if it's\None second or over – then it's serious, Dialogue: 0,0:35:56.04,0:36:03.36,Default,,0000,0000,0000,,and then you delete all the ellipses and\Nmake sure all the parentheses close and Dialogue: 0,0:36:03.36,0:36:10.21,Default,,0000,0000,0000,,then you run the program. And here's still\Nthe signature violation that we need to Dialogue: 0,0:36:10.21,0:36:21.10,Default,,0000,0000,0000,,fix. So it says here again there's a\Nlittle German sentence because these Dialogue: 0,0:36:21.10,0:36:24.87,Default,,0000,0000,0000,,languages were designed for Germans and it\Nsays: both tests were successful, because Dialogue: 0,0:36:24.87,0:36:31.03,Default,,0000,0000,0000,,we wrote two test cases here. OK. So this\Nbureaucratic approach just goes on and on. Dialogue: 0,0:36:31.03,0:36:38.43,Default,,0000,0000,0000,,So I'm just going to go through the second\Niteration more quickly. So it said you Dialogue: 0,0:36:38.43,0:36:45.10,Default,,0000,0000,0000,,know what did it say. It said, it said\Nthis. We also have a speeding violation. Dialogue: 0,0:36:45.10,0:36:50.71,Default,,0000,0000,0000,,So let's go through the motions of that: a\Nspeeding violation has– again, it also has Dialogue: 0,0:36:50.71,0:36:59.10,Default,,0000,0000,0000,,a place and it has, you know, how many\Nkilometers per hour over. And we write a Dialogue: 0,0:36:59.10,0:37:01.43,Default,,0000,0000,0000,,record definition Dialogue: 0,0:37:22.30,0:37:25.87,Default,,0000,0000,0000,,something like this, and we could do,\Nyou know, two speeding Dialogue: 0,0:37:25.87,0:37:31.51,Default,,0000,0000,0000,,vio- so now we have a data definition that\Nsays: oh we've got two components, we've Dialogue: 0,0:37:31.51,0:37:36.64,Default,,0000,0000,0000,,got a record definition that needs to\Nmatch that. You all think this is trivial Dialogue: 0,0:37:36.64,0:37:40.72,Default,,0000,0000,0000,,but with compound data our students often\Nhave trouble. So it serves you well to Dialogue: 0,0:37:40.72,0:37:45.07,Default,,0000,0000,0000,,remind them that there's two pieces, and\Nthose two pieces need to be selectors in Dialogue: 0,0:37:45.07,0:37:52.27,Default,,0000,0000,0000,,the record definition. So we have speeding\Nviolation one, speeding violation on Main Dialogue: 0,0:37:52.27,0:37:59.89,Default,,0000,0000,0000,,Street. You know what, 20 kilometers over,\Nand we have another one, you know low Dialogue: 0,0:37:59.89,0:38:13.47,Default,,0000,0000,0000,,street or whatever, that is 25 kilometers\Nover. So that is two examples right. And Dialogue: 0,0:38:13.47,0:38:23.77,Default,,0000,0000,0000,,we have one on low street, 25 kilometers\Nper hour over limit. So once again the Dialogue: 0,0:38:23.77,0:38:30.100,Default,,0000,0000,0000,,speeding violation constructor has a\Nlittle signature that says well a natural Dialogue: 0,0:38:30.100,0:38:39.62,Default,,0000,0000,0000,,number goes in, speeding violation object\Ncomes out. And so we go through those same Dialogue: 0,0:38:39.62,0:38:43.46,Default,,0000,0000,0000,,notions. I need two things in order to\Ndemonstrate one more thing. So then again Dialogue: 0,0:38:43.46,0:38:59.48,Default,,0000,0000,0000,,the question was: When is a speeding\Nviolation serious? And of course a Dialogue: 0,0:38:59.48,0:39:08.09,Default,,0000,0000,0000,,speeding violation goes in and a boolean\Ncomes out. And so we will write two tests. Dialogue: 0,0:39:08.09,0:39:11.83,Default,,0000,0000,0000,,So speeding violation in Germany is\Nserious when it's 21 kilometres an hour Dialogue: 0,0:39:11.83,0:39:15.31,Default,,0000,0000,0000,,over the limit, or over that. Right. And\Nit gets progressively more serious after Dialogue: 0,0:39:15.31,0:39:22.27,Default,,0000,0000,0000,,that. So. So the first one is not too\Nserious. We'll not get you any points in Dialogue: 0,0:39:22.27,0:39:38.21,Default,,0000,0000,0000,,Flensburg. But the second one is. And once\Nagain we go right, speeding violation Dialogue: 0,0:39:38.21,0:39:50.10,Default,,0000,0000,0000,,serious, we write the skeleton. So then we\Nwrite the skeleton, then we fill in the Dialogue: 0,0:39:50.10,0:39:57.03,Default,,0000,0000,0000,,gaps and says we really should be writing\Ncalls to the accessors. So we have the Dialogue: 0,0:39:57.03,0:40:03.74,Default,,0000,0000,0000,,place of the speeding violation and we\Nhave the kilometers over of the speeding Dialogue: 0,0:40:03.74,0:40:10.30,Default,,0000,0000,0000,,violations. And then we think a little bit\Nand then we realize: oh the place does not Dialogue: 0,0:40:10.30,0:40:14.59,Default,,0000,0000,0000,,matter. So I'm skipping. Of course this\Nall goes on usually over a longer period Dialogue: 0,0:40:14.59,0:40:19.95,Default,,0000,0000,0000,,of time that you're teaching. I'm going\NI'm going pretty fast here. So we do away Dialogue: 0,0:40:19.95,0:40:28.30,Default,,0000,0000,0000,,with that and we go well this really if\Nthis is over 21 then that's bad. Okay. So Dialogue: 0,0:40:28.30,0:40:38.15,Default,,0000,0000,0000,,let's see if that works. It says km per\Nhour over– So then it says all four tests Dialogue: 0,0:40:38.15,0:40:43.58,Default,,0000,0000,0000,,are passed. So that's good. So you know\Nthere is primitive data, there's compound Dialogue: 0,0:40:43.58,0:40:48.46,Default,,0000,0000,0000,,data. You may have noticed that on the\Nslide it said: a traffic violation is Dialogue: 0,0:40:48.46,0:40:53.09,Default,,0000,0000,0000,,either a red light violation or a speeding\Nviolation. So that's not compound data. Dialogue: 0,0:40:53.09,0:40:58.78,Default,,0000,0000,0000,,When you see this formulation in your\Nlanguage that says: it's this or that or Dialogue: 0,0:40:58.78,0:41:02.37,Default,,0000,0000,0000,,that or that, or maybe it is one of the\Nfollowing. Then you're not looking at Dialogue: 0,0:41:02.37,0:41:08.42,Default,,0000,0000,0000,,compound data, you're looking at a\Nphenomenon called "mixed data". So you've Dialogue: 0,0:41:08.42,0:41:14.54,Default,,0000,0000,0000,,seen this, you've seen this, you've seen\Nthis mixed data. So you recognize it by Dialogue: 0,0:41:14.54,0:41:18.76,Default,,0000,0000,0000,,either the words "or" or "one of" and you\Nwrite a data definition that really has Dialogue: 0,0:41:18.76,0:41:22.82,Default,,0000,0000,0000,,that form, you count the alternatives just\Nlike you do with compound data. You write Dialogue: 0,0:41:22.82,0:41:26.29,Default,,0000,0000,0000,,a signature definition. I'll show you how\Nto do that. And you ensure that the counts Dialogue: 0,0:41:26.29,0:41:33.37,Default,,0000,0000,0000,,match. And so the way that you do that is\Nthis. We said data definition, so we said: Dialogue: 0,0:41:33.37,0:41:43.16,Default,,0000,0000,0000,,a traffic violation is one of the\Nfollowing. It's either a red light Dialogue: 0,0:41:43.16,0:41:55.08,Default,,0000,0000,0000,,violation or it is a speeding violation.\NAnd just as with the compound data this Dialogue: 0,0:41:55.08,0:41:58.18,Default,,0000,0000,0000,,little data definition has some code that\Ngoes with it. So we'll just call this Dialogue: 0,0:41:58.18,0:42:04.12,Default,,0000,0000,0000,,thing a traffic violation and we just use\Ndefine to say what that is and define Dialogue: 0,0:42:04.12,0:42:11.27,Default,,0000,0000,0000,,traffic violation, is it just a signature\Nthat says it's mixed, it's mixed data from Dialogue: 0,0:42:11.27,0:42:19.84,Default,,0000,0000,0000,,red light violation and speeding\Nviolation. So here you go. So now we can Dialogue: 0,0:42:19.84,0:42:23.69,Default,,0000,0000,0000,,use that in signatures. You remember the\Nproblem statement didn't say: find out Dialogue: 0,0:42:23.69,0:42:28.30,Default,,0000,0000,0000,,whether a red light violation was serious\Nor a speeding violation was serious, it Dialogue: 0,0:42:28.30,0:42:34.62,Default,,0000,0000,0000,,said: find out whether a traffic violation\Nis serious. So you know it is a traffic Dialogue: 0,0:42:34.62,0:42:40.55,Default,,0000,0000,0000,,violation, but so far we only have\Nfunctions, one works on red light Dialogue: 0,0:42:40.55,0:42:43.73,Default,,0000,0000,0000,,violations, the other one works on\Nspeeding violations, but they don't work Dialogue: 0,0:42:43.73,0:42:53.72,Default,,0000,0000,0000,,on that mixed. So we'll try to do that now\Nand instead of writing red light violation Dialogue: 0,0:42:53.72,0:43:01.12,Default,,0000,0000,0000,,we'll just write traffic violation to\Nboolean. So we could now write tests that Dialogue: 0,0:43:01.12,0:43:05.20,Default,,0000,0000,0000,,match those that are there but I'll spare\Nyou that. But in class we absolutely would Dialogue: 0,0:43:05.20,0:43:15.56,Default,,0000,0000,0000,,need to do that. And now what we do is,\Nwhen we have a traffic violation– Remember Dialogue: 0,0:43:15.56,0:43:20.85,Default,,0000,0000,0000,,how I said if you have compound data, you\Nput calls to the accessors in the body, Dialogue: 0,0:43:20.85,0:43:25.42,Default,,0000,0000,0000,,and then you go on from there. But now\Nwe're looking at mixed data in the input. Dialogue: 0,0:43:25.42,0:43:29.55,Default,,0000,0000,0000,,So mixed data has a different template and\Nthat template says: well if you're looking Dialogue: 0,0:43:29.55,0:43:32.71,Default,,0000,0000,0000,,at mixed data, maybe this or that or that,\Nyou should probably find out what that is Dialogue: 0,0:43:32.71,0:43:40.48,Default,,0000,0000,0000,,before you do anything else. And for doing\Nthat we use a conditional we use something Dialogue: 0,0:43:40.48,0:43:45.43,Default,,0000,0000,0000,,like this– So what we need to do is we\Nneed to distinguish red light violations Dialogue: 0,0:43:45.43,0:43:48.46,Default,,0000,0000,0000,,from speeding violations, so we need some\Nfunction that will tell us which one it Dialogue: 0,0:43:48.46,0:43:54.61,Default,,0000,0000,0000,,is. And this is the last bit up here in\Nthe record definition. You remember that Dialogue: 0,0:43:54.61,0:43:58.31,Default,,0000,0000,0000,,we said red violation here, red light\Nviolation here. This is the name of the Dialogue: 0,0:43:58.31,0:44:04.29,Default,,0000,0000,0000,,constructor, so it is the constructor.\NThese are the accessors. And this is Dialogue: 0,0:44:04.29,0:44:08.23,Default,,0000,0000,0000,,what's called the predicate, and the\Npredicate tells us whether a thing is a Dialogue: 0,0:44:08.23,0:44:14.09,Default,,0000,0000,0000,,red light violation or not. So in this\Ncase the predicate says: red light Dialogue: 0,0:44:14.09,0:44:20.49,Default,,0000,0000,0000,,violation question mark, or "p" is what\Nthe programmers in these languages say. Dialogue: 0,0:44:20.49,0:44:26.19,Default,,0000,0000,0000,,And it takes anything and it tells us\Nwhether it is a red light violation object Dialogue: 0,0:44:26.19,0:44:33.64,Default,,0000,0000,0000,,or not. I'm just gonna copy that down so\Nthat we remember. We're almost done. So of Dialogue: 0,0:44:33.64,0:44:37.12,Default,,0000,0000,0000,,course the same thing goes for speeding\Nviolation. So we need a conditional that Dialogue: 0,0:44:37.12,0:44:41.45,Default,,0000,0000,0000,,has as many branches as we have\Nalternatives in the data definition. And Dialogue: 0,0:44:41.45,0:44:45.42,Default,,0000,0000,0000,,again you think this is super trivial and\Nchildish, but it works very well for Dialogue: 0,0:44:45.42,0:44:50.98,Default,,0000,0000,0000,,making successful programmers. So we need\Ntwo branches, and the way that works is Dialogue: 0,0:44:50.98,0:44:59.12,Default,,0000,0000,0000,,this. So you write this out with ellipses,\Nand then you need to come up with tests Dialogue: 0,0:44:59.12,0:45:03.08,Default,,0000,0000,0000,,for the two branches in this case the\Ntests are: is something a red light Dialogue: 0,0:45:03.08,0:45:11.38,Default,,0000,0000,0000,,violation or is it a speeding violation.\NSo we have this, question mark tv, and we Dialogue: 0,0:45:11.38,0:45:18.82,Default,,0000,0000,0000,,have this which says, speeding violation\Ntv. And now here we just need to put in Dialogue: 0,0:45:18.82,0:45:21.80,Default,,0000,0000,0000,,the answers, and the great thing is we\Nalready have the answers we already have Dialogue: 0,0:45:21.80,0:45:33.30,Default,,0000,0000,0000,,two functions that tell us whether a red\Nlight violation is serious and so we can Dialogue: 0,0:45:33.30,0:45:42.26,Default,,0000,0000,0000,,just call that here and we can do this\Nhere so and then we're done. So I think Dialogue: 0,0:45:42.26,0:45:47.04,Default,,0000,0000,0000,,that's all we can do in this hour that we\Nhave today. So I hope you see two things. Dialogue: 0,0:45:47.04,0:45:56.71,Default,,0000,0000,0000,,First of all this is super boring and\Nsuper bureaucratic. But maybe you can see Dialogue: 0,0:45:56.71,0:46:02.56,Default,,0000,0000,0000,,that every single step that we have here\Nhas is a principle that has a specific Dialogue: 0,0:46:02.56,0:46:06.25,Default,,0000,0000,0000,,name and that you can explain in very\Nspecific concrete terms that are not Dialogue: 0,0:46:06.25,0:46:10.33,Default,,0000,0000,0000,,abstract. And that means it can really\Nexplain every step that's needed to solve Dialogue: 0,0:46:10.33,0:46:16.41,Default,,0000,0000,0000,,this problem. And I can't tell you what a\Ngame changer to that is for teaching. If Dialogue: 0,0:46:16.41,0:46:20.20,Default,,0000,0000,0000,,you really ask yourself if, you know, when\Nyou when you present an example to your Dialogue: 0,0:46:20.20,0:46:24.07,Default,,0000,0000,0000,,students whether you can really explain\Nevery single step and explain to the Dialogue: 0,0:46:24.07,0:46:27.20,Default,,0000,0000,0000,,students here's what you should have\Nthought, you know, here's how you should Dialogue: 0,0:46:27.20,0:46:33.34,Default,,0000,0000,0000,,have picked what to do next. That usually\Nends up badly. So so one of the principles Dialogue: 0,0:46:33.34,0:46:38.89,Default,,0000,0000,0000,,behind this style of teaching is really to\Nbe absolutely sure every single step that Dialogue: 0,0:46:38.89,0:46:42.68,Default,,0000,0000,0000,,you expect your students to make when they\Nsolve a problem has a name and has been Dialogue: 0,0:46:42.68,0:46:46.65,Default,,0000,0000,0000,,explicitly taught in your class. So every\Ntechnique has a name. You noticed me Dialogue: 0,0:46:46.65,0:46:52.22,Default,,0000,0000,0000,,saying compound data and mixed data and\Ndesign recipe and template and skeleton. Dialogue: 0,0:46:52.22,0:46:57.10,Default,,0000,0000,0000,,And so this is the factual knowledge that\Nwe use that precedes the skill that we Dialogue: 0,0:46:57.10,0:47:03.94,Default,,0000,0000,0000,,want to then induce. If you're teaching a\Nclass that has rewards you reward every Dialogue: 0,0:47:03.94,0:47:10.02,Default,,0000,0000,0000,,single step. You really insist on form. I\Nalso can't stress this enough so on our Dialogue: 0,0:47:10.02,0:47:14.43,Default,,0000,0000,0000,,home page you find a paper that says form\Nover function. We don't accept any program Dialogue: 0,0:47:14.43,0:47:19.01,Default,,0000,0000,0000,,that is correct. We just accept the ones\Nthat match the form that you've seen. We Dialogue: 0,0:47:19.01,0:47:22.81,Default,,0000,0000,0000,,also measure success. You know you really\Nneed to look at how well your teaching Dialogue: 0,0:47:22.81,0:47:26.02,Default,,0000,0000,0000,,style is doing and you improve it\Ncontinuously. So those are the important Dialogue: 0,0:47:26.02,0:47:31.65,Default,,0000,0000,0000,,principles. You might think that this\Nstifles creativity. And I really don't Dialogue: 0,0:47:31.65,0:47:35.27,Default,,0000,0000,0000,,think that's true. And I think that is\Nbased on a misguided notion of creativity. Dialogue: 0,0:47:35.27,0:47:39.87,Default,,0000,0000,0000,,So if you talk it successfully creative\Nartists they really also rely on a set of Dialogue: 0,0:47:39.87,0:47:44.80,Default,,0000,0000,0000,,named techniques that they use to tackle a\Ncreative problem. And so somebody always Dialogue: 0,0:47:44.80,0:47:49.23,Default,,0000,0000,0000,,says Mozart you know Mozart never had to\Nlearn or practice before he got to be a Dialogue: 0,0:47:49.23,0:47:54.02,Default,,0000,0000,0000,,great composer but Mozart started it so\Nearly in childhood that he had his 10000 Dialogue: 0,0:47:54.02,0:48:00.67,Default,,0000,0000,0000,,hours of practice in there to be before\Nmost people even start. So this works for. Dialogue: 0,0:48:00.67,0:48:03.50,Default,,0000,0000,0000,,So this has been proven to work this\Napproach for children. I think I would Dialogue: 0,0:48:03.50,0:48:07.84,Default,,0000,0000,0000,,start about 11 years, beginning\Nprogrammers. It's worked for programmers Dialogue: 0,0:48:07.84,0:48:11.84,Default,,0000,0000,0000,,that had learned some other via some other\Napproach you know bad habits and Dialogue: 0,0:48:11.84,0:48:16.06,Default,,0000,0000,0000,,professional developers. There's two\Nwebsites that you can go on to get more Dialogue: 0,0:48:16.06,0:48:20.70,Default,,0000,0000,0000,,information. One is our American sister\Nproject called programmed by design that Dialogue: 0,0:48:20.70,0:48:24.83,Default,,0000,0000,0000,,has lots of material, links and\Npublications. The DrRacket software that I Dialogue: 0,0:48:24.83,0:48:28.94,Default,,0000,0000,0000,,showed you. And there's also a book in\NEnglish how to design programs. And it Dialogue: 0,0:48:28.94,0:48:32.56,Default,,0000,0000,0000,,doesn't say that here but that book is\Navailable for free online but there's also Dialogue: 0,0:48:32.56,0:48:36.99,Default,,0000,0000,0000,,a print version. And similarly if you're\Nlooking for German language material Dialogue: 0,0:48:36.99,0:48:41.12,Default,,0000,0000,0000,,there's "dein programm DOT de" which also\Nhas links and publication, links to the Dialogue: 0,0:48:41.12,0:48:45.71,Default,,0000,0000,0000,,same software. And the draft version of\Nthat book is there too. And hopefully Dialogue: 0,0:48:45.71,0:48:50.27,Default,,0000,0000,0000,,we'll have a print version of that also\Nnext year. And that's all I have for you Dialogue: 0,0:48:50.27,0:48:52.41,Default,,0000,0000,0000,,today. Thank you very much. Dialogue: 0,0:48:52.41,0:49:03.35,Default,,0000,0000,0000,,{\i1}Applause{\i0} Dialogue: 0,0:49:03.35,0:49:06.31,Default,,0000,0000,0000,,Herald angel: Thank you Mike for that\Ntalk. If you have any questions, we do Dialogue: 0,0:49:06.31,0:49:11.22,Default,,0000,0000,0000,,have the microphones lined up here in this\Nrow and in that row and does the signal, Dialogue: 0,0:49:11.22,0:49:17.48,Default,,0000,0000,0000,,yes the signal Angel has a question.\NSignal Angel: Yes, so one IRC user asks Dialogue: 0,0:49:17.48,0:49:23.39,Default,,0000,0000,0000,,what are the benefits of using this\NDrRacket tool instead of for example Dialogue: 0,0:49:23.39,0:49:26.45,Default,,0000,0000,0000,,Python which was also developed for\Nteaching? Dialogue: 0,0:49:26.45,0:49:30.76,Default,,0000,0000,0000,,Mike: So Python is definitely not\Ndeveloped for teaching, not in any Dialogue: 0,0:49:30.76,0:49:36.11,Default,,0000,0000,0000,,meaningful way. So in practice, in\Npractice I think the fundamental diff-, so Dialogue: 0,0:49:36.11,0:49:40.49,Default,,0000,0000,0000,,but there's a lot of educational\Ninitiatives around Python. The thing is Dialogue: 0,0:49:40.49,0:49:47.03,Default,,0000,0000,0000,,really that if you try to name and really\Nformalize the techniques the systematic Dialogue: 0,0:49:47.03,0:49:50.100,Default,,0000,0000,0000,,techniques that I showed you and apply\Nthat to Python programming you will find Dialogue: 0,0:49:50.100,0:49:55.08,Default,,0000,0000,0000,,that very hard. I personally found it\Nimpossible. Most Python programs out there Dialogue: 0,0:49:55.08,0:49:58.14,Default,,0000,0000,0000,,in practice are just not developed\Nsystematically and I don't know how to do Dialogue: 0,0:49:58.14,0:50:02.20,Default,,0000,0000,0000,,that. And so that is where that is much\Nbetter. This corresponds to these Dialogue: 0,0:50:02.20,0:50:08.01,Default,,0000,0000,0000,,programming languages were designed in\Nlockstep with the didactic principles that Dialogue: 0,0:50:08.01,0:50:12.10,Default,,0000,0000,0000,,underlie them and as far as I can tell,\NI'm sorry about that, Python was not Dialogue: 0,0:50:12.10,0:50:16.30,Default,,0000,0000,0000,,developed with any didactic principles in\Nmind whatsoever. Sorry. Dialogue: 0,0:50:16.30,0:50:21.63,Default,,0000,0000,0000,,Herald Angel: OK then. Microphone 2 please\Ngo now. Dialogue: 0,0:50:21.63,0:50:29.31,Default,,0000,0000,0000,,Questioner: I teach roughly 14 years olds\Nin the middle school and also programming Dialogue: 0,0:50:29.31,0:50:34.100,Default,,0000,0000,0000,,and I use the App Inventor right now. The\NApp Inventor, MIT Media Lab App Inventor, Dialogue: 0,0:50:34.100,0:50:43.69,Default,,0000,0000,0000,,I […] with scratch and I'm not sure you,\Nyou said okay you need to buy Lego Dialogue: 0,0:50:43.69,0:50:49.98,Default,,0000,0000,0000,,Mindstorms robots and stuff like that or\Nscratch or MIT App Inventor. That's not Dialogue: 0,0:50:49.98,0:50:51.25,Default,,0000,0000,0000,,the case.\NMike: No. Yeah. Dialogue: 0,0:50:51.25,0:50:58.80,Default,,0000,0000,0000,,Questioner: And what I find difficult for\Nthe students I have there they are not the Dialogue: 0,0:50:58.80,0:51:04.30,Default,,0000,0000,0000,,best from the best parents, then they\Nwould like to show something in the end. Dialogue: 0,0:51:04.30,0:51:08.62,Default,,0000,0000,0000,,And it's your program looks a lot like\NMike: Superball! Dialogue: 0,0:51:08.62,0:51:14.75,Default,,0000,0000,0000,,Questioner: it is really very boring and\N{\i1}laughter{\i0} how do you bring it over that Dialogue: 0,0:51:14.75,0:51:19.45,Default,,0000,0000,0000,,point? I find it so valuable that in the\Nend they can show it on their smartphone. Dialogue: 0,0:51:19.45,0:51:22.54,Default,,0000,0000,0000,,Mike: Yeah, depending on your target\Naudience of course you choose different Dialogue: 0,0:51:22.54,0:51:27.25,Default,,0000,0000,0000,,examples and this example just had a lot\Nof things. You might have seen me show the Dialogue: 0,0:51:27.25,0:51:30.42,Default,,0000,0000,0000,,pictures, show the picture algebra at the\Nbeginning. So that's something that tends Dialogue: 0,0:51:30.42,0:51:34.95,Default,,0000,0000,0000,,to work great for children and older\Nchildren alike and that scales all the way Dialogue: 0,0:51:34.95,0:51:39.52,Default,,0000,0000,0000,,to writing video games and there's an\Nentire book that shows children or young Dialogue: 0,0:51:39.52,0:51:43.71,Default,,0000,0000,0000,,people on how to do that. So that's one of\Nthe great aspects of this. I think that's Dialogue: 0,0:51:43.71,0:51:46.19,Default,,0000,0000,0000,,a fundamental difference to things like\Nscratch and so on this approach to Dialogue: 0,0:51:46.19,0:51:49.98,Default,,0000,0000,0000,,programming scales all the way to\Nprogramm-, to professional programming and Dialogue: 0,0:51:49.98,0:51:54.86,Default,,0000,0000,0000,,it scales to substantial video games. So\Nthe students that we so we always used to Dialogue: 0,0:51:54.86,0:51:58.61,Default,,0000,0000,0000,,do that the halfway point in the first\Nsemester at the university and they were Dialogue: 0,0:51:58.61,0:52:02.32,Default,,0000,0000,0000,,able to write a complete like 80s style\Nyou know frogger or snakes or something Dialogue: 0,0:52:02.32,0:52:05.56,Default,,0000,0000,0000,,like that that looked pretty fancy. And\Nthat's something I think that your Dialogue: 0,0:52:05.56,0:52:09.90,Default,,0000,0000,0000,,children could take home.\NHerald Angel: OK. Then microphone 1. Dialogue: 0,0:52:09.90,0:52:16.73,Default,,0000,0000,0000,,Questioner: Hi, thanks for your talk. I'd\Nlike to know so your approach adds a lot Dialogue: 0,0:52:16.73,0:52:22.89,Default,,0000,0000,0000,,of let's say overhead that is also\Nnecessary to be taught. How do you go Dialogue: 0,0:52:22.89,0:52:29.46,Default,,0000,0000,0000,,about the methodology in the actual\Nclassroom though. Yeah. Do you al-, do you Dialogue: 0,0:52:29.46,0:52:38.09,Default,,0000,0000,0000,,also have some recommendations on how to\Ntackle the actual design of the of the Dialogue: 0,0:52:38.09,0:52:42.08,Default,,0000,0000,0000,,class, what methods do you use, do you use\Na flipped classroom or what do you do? Dialogue: 0,0:52:42.08,0:52:46.59,Default,,0000,0000,0000,,Mike: A good point. So so mostly the\Nclasses that I have taught they are taught Dialogue: 0,0:52:46.59,0:52:50.40,Default,,0000,0000,0000,,just like what I did just now. So I try to\Ndemonstrate that to really make that clear Dialogue: 0,0:52:50.40,0:52:55.51,Default,,0000,0000,0000,,because it hasn't really been documented.\NI could refer you to friends of mine who Dialogue: 0,0:52:55.51,0:53:00.13,Default,,0000,0000,0000,,have taught a flipped version of that\Nwhich also seems to work quite well. But Dialogue: 0,0:53:00.13,0:53:04.26,Default,,0000,0000,0000,,the important thing really I can't stress\Nthis enough that as a teacher and I Dialogue: 0,0:53:04.26,0:53:07.94,Default,,0000,0000,0000,,skipped a couple of corners just now to\Nfit in the time slot was that you go Dialogue: 0,0:53:07.94,0:53:11.93,Default,,0000,0000,0000,,through all of those motions that you\Nalways go through all of that motion and Dialogue: 0,0:53:11.93,0:53:16.39,Default,,0000,0000,0000,,that's a great tool not just for giving\Nevery single step a name but also for Dialogue: 0,0:53:16.39,0:53:21.95,Default,,0000,0000,0000,,pacing the classroom and that and the rest\Nkind of tends to fall in place has been my Dialogue: 0,0:53:21.95,0:53:25.75,Default,,0000,0000,0000,,experience, right. No matter whether\Nyou're looking at you know beginning Dialogue: 0,0:53:25.75,0:53:28.68,Default,,0000,0000,0000,,students or professional programmers. I'm\Nnot sure I answered your questions but Dialogue: 0,0:53:28.68,0:53:34.25,Default,,0000,0000,0000,,maybe you can take the rest offline.\NHerald Angel: Thank you. Microphone 3 Dialogue: 0,0:53:34.25,0:53:37.68,Default,,0000,0000,0000,,please.\NQuestioner: Yes. I think this is very Dialogue: 0,0:53:37.68,0:53:43.81,Default,,0000,0000,0000,,great but it is teaching functional\Nprogramming and many people will very soon Dialogue: 0,0:53:43.81,0:53:50.40,Default,,0000,0000,0000,,need imperative programming. How do you do\Nthe switch or can you do it? Dialogue: 0,0:53:50.40,0:53:54.34,Default,,0000,0000,0000,,Mike: So I I would dispute that but.\N{\i1}Laughter{\i0} Dialogue: 0,0:53:54.34,0:53:57.15,Default,,0000,0000,0000,,Questioner: Well if you want to get paid\Nfor it. Dialogue: 0,0:53:57.15,0:53:59.61,Default,,0000,0000,0000,,Mike: Thank you, go, go.\N{\i1}Laughter{\i0} Dialogue: 0,0:53:59.61,0:54:02.96,Default,,0000,0000,0000,,Mike: So I run a company that does all\Ntheir software projects doing functional Dialogue: 0,0:54:02.96,0:54:06.98,Default,,0000,0000,0000,,programming. Ultimately you will need to\Ntalk about effects. The thing what this Dialogue: 0,0:54:06.98,0:54:12.11,Default,,0000,0000,0000,,does really is I mean if you're writing\Nsoftware professionally you know no matter Dialogue: 0,0:54:12.11,0:54:15.74,Default,,0000,0000,0000,,what the language is, large parts of that\Nshould be functional. So this is a great Dialogue: 0,0:54:15.74,0:54:20.48,Default,,0000,0000,0000,,way to teach good programming discipline\Nand a lot of programs out there don't show Dialogue: 0,0:54:20.48,0:54:25.04,Default,,0000,0000,0000,,good programming discipline. So I think\Nthis would be great to improve upon that. Dialogue: 0,0:54:25.04,0:54:29.18,Default,,0000,0000,0000,,So what this does is it pushes the\Nboundary. To be honest I have no idea how Dialogue: 0,0:54:29.18,0:54:32.51,Default,,0000,0000,0000,,to teach systematic development using\Nimperative languages. I don't know how to Dialogue: 0,0:54:32.51,0:54:35.89,Default,,0000,0000,0000,,do that. I don't know how to do it and I\Ndon't know how to teach doing it. On the Dialogue: 0,0:54:35.89,0:54:40.79,Default,,0000,0000,0000,,other hand what I can do that do here is I\Ncan push the imperative parts of the Dialogue: 0,0:54:40.79,0:54:44.24,Default,,0000,0000,0000,,programming to the fringe and make them\Nless important for the success of my Dialogue: 0,0:54:44.24,0:54:51.53,Default,,0000,0000,0000,,project and for the structure of my\Nproject. So yeah. So you should. This is Dialogue: 0,0:54:51.53,0:54:55.26,Default,,0000,0000,0000,,the good thing because we know functional\Nprogramming works well and we know it is a Dialogue: 0,0:54:55.26,0:55:01.49,Default,,0000,0000,0000,,good foundation for an educational\Ndiscipline. And yeah I can't, I mean there Dialogue: 0,0:55:01.49,0:55:05.60,Default,,0000,0000,0000,,are there are various courses that build\Nup upon this, but ask me offline about Dialogue: 0,0:55:05.60,0:55:08.57,Default,,0000,0000,0000,,that that tackle that imperative\Nprogramming. Dialogue: 0,0:55:08.57,0:55:14.03,Default,,0000,0000,0000,,Herald Angel: OK then microphone 4 please.\NQuestioner: Yeah I'd like to thank you for Dialogue: 0,0:55:14.03,0:55:22.38,Default,,0000,0000,0000,,your talk too and I'm curious what's your\Nexperience how many repetitions do you Dialogue: 0,0:55:22.38,0:55:28.54,Default,,0000,0000,0000,,need to teach your students until they\Nsettle with the principles. Do you teach Dialogue: 0,0:55:28.54,0:55:32.92,Default,,0000,0000,0000,,like three examples or is it up to 10\Nexamples? Dialogue: 0,0:55:32.92,0:55:39.39,Default,,0000,0000,0000,,Mike: I'm not sure I have a solid rule for\Nthat. So my experience has been, so I think Dialogue: 0,0:55:39.39,0:55:44.81,Default,,0000,0000,0000,,every principle here usually has like two\Nin class examples at the university level Dialogue: 0,0:55:44.81,0:55:48.67,Default,,0000,0000,0000,,and then has maybe three or four examples\Nwhere they do exercises and that's usually Dialogue: 0,0:55:48.67,0:55:52.54,Default,,0000,0000,0000,,enough but your experience might vary. I\Ndon't I don't think I have a good rule for Dialogue: 0,0:55:52.54,0:55:58.74,Default,,0000,0000,0000,,that. Generally you might not have gotten\Nfor this but so the point of comparison Dialogue: 0,0:55:58.74,0:56:02.42,Default,,0000,0000,0000,,and where I have the most experience is at\Nthe university level. Overall the Dialogue: 0,0:56:02.42,0:56:06.51,Default,,0000,0000,0000,,progression of material in here is really\Nreally fast compared to your traditional Dialogue: 0,0:56:06.51,0:56:11.97,Default,,0000,0000,0000,,Java course. So you can cover a lot of\Nmaterial using that. I'm not sure how many Dialogue: 0,0:56:11.97,0:56:16.84,Default,,0000,0000,0000,,how many university students or university\Ncourses have successful video games in the Dialogue: 0,0:56:16.84,0:56:21.72,Default,,0000,0000,0000,,middle of the first semester and there are\Nnice programs that are well structured so Dialogue: 0,0:56:21.72,0:56:26.54,Default,,0000,0000,0000,,so surprisingly maybe even though this is\Nso boring and tedious it allows you to Dialogue: 0,0:56:26.54,0:56:30.86,Default,,0000,0000,0000,,write programs successfully quite fast and\Nalso goes to lots of teaching to go quite Dialogue: 0,0:56:30.86,0:56:34.82,Default,,0000,0000,0000,,fast.\NHerald Angel: OK. Microphone 2 please. Dialogue: 0,0:56:34.82,0:56:40.98,Default,,0000,0000,0000,,Questioner: Hello, thank you for your\Ntalk. When I learned programming as a kid Dialogue: 0,0:56:40.98,0:56:50.22,Default,,0000,0000,0000,,quite young and I think that I could\Ntransport tools and the mindset also to Dialogue: 0,0:56:50.22,0:56:53.43,Default,,0000,0000,0000,,mathematics and full blown problems.\NMike: Yes. Dialogue: 0,0:56:53.43,0:57:00.90,Default,,0000,0000,0000,,Questioner: So I just wanted to ask if in\Nyour experience can children also use this Dialogue: 0,0:57:00.90,0:57:07.96,Default,,0000,0000,0000,,systematic way of solving, I mean do they\Nreally make this transition? Can, are they Dialogue: 0,0:57:07.96,0:57:11.31,Default,,0000,0000,0000,,getting better at solving problems?\NMike: Yeah absolutely they do. So if you Dialogue: 0,0:57:11.31,0:57:15.50,Default,,0000,0000,0000,,look at one of the three projects I listed\Nwas the Bootstrap Project which is which Dialogue: 0,0:57:15.50,0:57:19.74,Default,,0000,0000,0000,,is aimed at high school students or middle\Nschool students and there the approach is Dialogue: 0,0:57:19.74,0:57:23.51,Default,,0000,0000,0000,,specifically tied to the algebra part of\Nmathematics and so this is where you'll Dialogue: 0,0:57:23.51,0:57:28.53,Default,,0000,0000,0000,,find exactly what you're looking for. And\Nthat's been that project's been usually Dialogue: 0,0:57:28.53,0:57:32.10,Default,,0000,0000,0000,,successful and they have lots of material\Non how it should be taught. So that's Dialogue: 0,0:57:32.10,0:57:35.10,Default,,0000,0000,0000,,great stuff.\NHerald Angel: Okay, we have two more Dialogue: 0,0:57:35.10,0:57:39.07,Default,,0000,0000,0000,,minutes and two questions. So Microphone 1\Nplease. Dialogue: 0,0:57:39.07,0:57:43.90,Default,,0000,0000,0000,,Questioner: Hi. How do you measure success\Nin your teaching? Dialogue: 0,0:57:43.90,0:57:48.56,Default,,0000,0000,0000,,Mike: So mostly at the university level\Nwe look at the final exams and we have a Dialogue: 0,0:57:48.56,0:57:54.07,Default,,0000,0000,0000,,few papers out that are referenced from\Nthe web page there. That's I mean usually Dialogue: 0,0:57:54.07,0:57:57.20,Default,,0000,0000,0000,,what we do is we have pretty close\Nsupervision, even at the university level. Dialogue: 0,0:57:57.20,0:58:03.07,Default,,0000,0000,0000,,So we look over students' shoulders all\Nthe time to make sure that we're teaching Dialogue: 0,0:58:03.07,0:58:07.36,Default,,0000,0000,0000,,them at the appropriate level and at the\Nappropriate pace. But over the years we've Dialogue: 0,0:58:07.36,0:58:13.20,Default,,0000,0000,0000,,seen measurable improvements by looking at\Nthe final exams and very specific ones. So Dialogue: 0,0:58:13.20,0:58:16.96,Default,,0000,0000,0000,,we don't just look at the overall grade we\Nlook at individual problems and see all Dialogue: 0,0:58:16.96,0:58:21.57,Default,,0000,0000,0000,,the progress has been and what we expect\Nand there's papers out on that. Dialogue: 0,0:58:21.57,0:58:25.44,Default,,0000,0000,0000,,Herald Angel: And micr\Nophone 4 please. Dialogue: 0,0:58:25.44,0:58:33.06,Default,,0000,0000,0000,,Questioner: Is there some kind of auto\Ncompletion in your editor or do you not Dialogue: 0,0:58:33.06,0:58:36.57,Default,,0000,0000,0000,,advise us to use this feature for\Nbeginners? Dialogue: 0,0:58:36.57,0:58:42.11,Default,,0000,0000,0000,,Mike: {\i1}Laughter{\i0}. No there's not auto\Ncompletion as far as I know. I'm not sure Dialogue: 0,0:58:42.11,0:58:47.67,Default,,0000,0000,0000,,I would advise against it. I know that my\NAmerican colleagues they've I mean as Dialogue: 0,0:58:47.67,0:58:51.32,Default,,0000,0000,0000,,you've noticed write the templates as it's\Nsort of always recurring program elements Dialogue: 0,0:58:51.32,0:58:56.29,Default,,0000,0000,0000,,and you could imagine there being a button\Nthat inserts that program fragment and our Dialogue: 0,0:58:56.29,0:59:00.47,Default,,0000,0000,0000,,American friends they experiment with that\Nand they came out not using that in Dialogue: 0,0:59:00.47,0:59:04.04,Default,,0000,0000,0000,,practice anymore. But I can't tell you\Ndetails on how that is. But if you're Dialogue: 0,0:59:04.04,0:59:08.25,Default,,0000,0000,0000,,interested you could send me email and I\Ncould find out. So for some reason so I Dialogue: 0,0:59:08.25,0:59:13.01,Default,,0000,0000,0000,,can't tell you why and I'm not I'm not\Nideologically opposed to that but we're Dialogue: 0,0:59:13.01,0:59:18.67,Default,,0000,0000,0000,,not doing that.\NHerald Angel: OK then. Mike thank you for Dialogue: 0,0:59:18.67,0:59:24.52,Default,,0000,0000,0000,,that very enlightening talk and become a\Nbig applause for that talk. Dialogue: 0,0:59:24.52,0:59:32.12,Default,,0000,0000,0000,,Mike: Thank you very much.\N{\i1}Applause{\i0} Dialogue: 0,0:59:32.12,0:59:37.49,Default,,0000,0000,0000,,{\i1}postroll music{\i0} Dialogue: 0,0:59:37.49,0:59:55.00,Default,,0000,0000,0000,,Subttitles created by c3subtitles.de\Nin the year 2019. Join and help us!