< Return to Video

34C3 - Growing Up Software Development

  • 0:03 - 0:07
    34C3 preroll music
  • 0:15 - 0:23
    Angel: Our next speaker is Mike Sperber.
    He's CEO, CTO at active group, co-
  • 0:23 - 0:28
    organizer of the annual BOB conference,
    developer conference, and expert in
  • 0:28 - 0:33
    functional programming. He has about 20
    years of experience in teaching
  • 0:33 - 0:38
    programming in high schools, universities
    and other contexts. In his talk Mike will
  • 0:38 - 0:44
    share his experiences and gives us an idea
    on how changes and culture methods and
  • 0:44 - 0:51
    tools in programming might contribute to
    the future of software and software of the
  • 0:51 - 0:56
    future. Please enjoy the talk by Mike. The
    stage is yours.
  • 0:56 - 1:02
    Speaker: Thank you very much.
    Applause
  • 1:02 - 1:05
    And did she say 20 years?
    I'm older than that.
  • 1:05 - 1:10
    So I appreciate you staying up this late.
    Ah, so I'm all grown up now, so talking
  • 1:10 - 1:15
    about growing up: so I graduated at some
    point and got a degree in computer
  • 1:15 - 1:19
    science, I got a PhD many years ago and
    now I'm CEO of a software company that
  • 1:19 - 1:24
    carries some actual responsibility.
    But as I was preparing this talk
  • 1:24 - 1:25
    I thought back to the
  • 1:25 - 1:30
    past and it happened to be the year in
    1983 when I started hacking and, ah, well
  • 1:30 - 1:36
    I wasn't there. But it must have been the
    year of 1C3 right? Ah, and so if you read
  • 1:36 - 1:40
    what was written about the computing
    revolution that was to come in the early
  • 1:40 - 1:45
    1980s. A lot of what we're having
    arguments about today was already there.
  • 1:45 - 1:49
    Computer security, data governance,
    surveillance. All these things were
  • 1:49 - 1:54
    already on the radar of the media back
    then. But a couple of things were
  • 1:54 - 1:58
    different, also. So here's a major German
    news magazine that had an article on
  • 1:58 - 2:03
    computers in children's rooms. And not
    everybody had a computer back then. So if
  • 2:03 - 2:07
    you were a kid like me who was interested
    in learning about computers and didn't
  • 2:07 - 2:10
    have one at home. There was a place you
    could go to, which was the local
  • 2:10 - 2:14
    department store. And, well, the picture
    isn't very clear, but that's actually a
  • 2:14 - 2:19
    local department store that had rows and
    rows of home computers set up. And
  • 2:19 - 2:25
    plugged in and ready to go for children to
    to play with. And so back then, there
  • 2:25 - 2:29
    were, you don't remember this, but there
    were many different kinds of home
  • 2:29 - 2:33
    computers there was no internet. There was
    very little in the way of readily
  • 2:33 - 2:37
    available literature on how to program
    computers. So we all had to figure it out
  • 2:37 - 2:42
    by try, by trial and error. And we didn't
    really have a good methodology of how to
  • 2:42 - 2:47
    program computers. Now, fast forward, a
    couple of years: I looked unbelievably
  • 2:47 - 2:51
    geeky in 1986. By then I had my own
    computer and that must have been even the
  • 2:51 - 2:58
    second or third one that I had. And you
    know by the time I was an exchange student
  • 2:58 - 3:02
    in the United States. They made me
    president of the computer club. You can
  • 3:02 - 3:06
    see another picture of me right there. And
    that was my first experience of teaching a
  • 3:06 - 3:11
    formal course. So that was in 1988 and
    that was the end of that year. So that
  • 3:11 - 3:16
    means I taught my first computer science
    course thirty years ago.
  • 3:16 - 3:18
    And I then ended
  • 3:18 - 3:22
    up designing the intro programming course
    at the University of Tübingen and taught
  • 3:22 - 3:28
    that over more than 10 years. I taught
    programming to humanities majors. I've
  • 3:28 - 3:32
    done a lot of professional training by now
    and, well, if you're sort of a compulsive
  • 3:32 - 3:37
    educator like I am, everybody around you
    suffers, right? Your co-workers, your
  • 3:37 - 3:42
    friends, my children certainly, my
    relatives. A lot of them have had to
  • 3:42 - 3:47
    endure, you know, one or other kinds of
    programming course from me. So back then,
  • 3:47 - 3:52
    as we were trying to figure out how to
    hack computers, you know as there was very
  • 3:52 - 3:56
    little available literature, we also
    looked for role models and here's an early
  • 3:56 - 4:00
    role models from the 80s, a man named John
    Draper, better known as Captain Crunch
  • 4:00 - 4:04
    because he used the whistle that he found
    in a cereal box to manipulate the US phone
  • 4:04 - 4:09
    system and then actually went to prison
    for it. So but John Draper also is not as
  • 4:09 - 4:13
    well known for actually writing software
    and he produced one of the early word
  • 4:13 - 4:18
    processors that was available on personal
    computers called Easy Rider, that I
  • 4:18 - 4:23
    actually used, and there were reports on
    on the prolific programming style that
  • 4:23 - 4:27
    Draper practiced, so I don't know if you
    can read this, the joke is if Draper were
  • 4:27 - 4:31
    writing math routines for addition he came
    up with the answer two plus two equals
  • 4:31 - 4:35
    five, he would put a clause in the
    program, if two plus three equals five
  • 4:35 - 4:40
    then that answer is four and that's
    generally the way he writes programs.
  • 4:40 - 4:45
    Who's seen programs like this, where yeah,
    a lot of you right, where somebody adds
  • 4:45 - 4:51
    clause after clause of special cases until
    you know, so the special cases encountered
  • 4:51 - 4:58
    in the wild are all covered. So, of
    course, you know it in 1983 we all figured
  • 4:58 - 5:04
    out ourselves but people by 1985 the
    Hacker Bible came out and already worried
  • 5:04 - 5:08
    about how we would educate children about
    computers in the future and so there was
  • 5:08 - 5:14
    an article about computers in school and
    I'm gonna zoom in a little bit and as I'm
  • 5:14 - 5:19
    sure I'm sure you've been involved in many
    discussions on how to teach programming to
  • 5:19 - 5:23
    beginners and as always that discussion
    focuses on the programming language that's
  • 5:23 - 5:27
    being used. Back then, you know the
    popular languages were somewhat different
  • 5:27 - 5:32
    from today. There was BASIC, Pascal. BASIC
    had that reputation of producing spaghetti
  • 5:32 - 5:38
    code, Forth is mentioned, LOGO is
    mentioned and C is mentioned there. And a
  • 5:38 - 5:42
    prominent, back then a prominent,
    professor of computer science in Germany
  • 5:42 - 5:47
    said well as long as you don't program in
    BASIC you'll be fine. Right, the pure fact
  • 5:47 - 5:52
    of not programming BASIC is gonna keep you
    from writing spaghetti code. And as we now
  • 5:52 - 5:56
    know that isn't really true and I'm sure
    most of you have seen really crappy and
  • 5:56 - 6:00
    spaghetti code in production but the
    bullets kind of keep hitting closer,
  • 6:00 - 6:05
    right? I think this must have been two
    years ago when a vulnerability in popular
  • 6:05 - 6:09
    IoT devices essentially brought down the
    internet because they were all assembled
  • 6:09 - 6:14
    into a botnet that brought down a popular
    DNS provider and github went down, I think
  • 6:14 - 6:18
    that's what most of you probably remember.
    There was HeartBleed that I'm sure a lot
  • 6:18 - 6:22
    of you remember, due to a vulnerability
    a buffer overflow because in
  • 6:22 - 6:27
    OpenSSL, which was written in C, there was
    Equifax which divulged a lot of social
  • 6:27 - 6:31
    security numbers because of a bug in
    Struts, in the web framework that they
  • 6:31 - 6:36
    used and more interestingly, I think for,
    for students of the past there was the
  • 6:36 - 6:40
    CloudBleed vulnerability which would
    divulge secret passwords and account
  • 6:40 - 6:45
    information on webpages just as part of
    the web cache. You wouldn't even have to
  • 6:45 - 6:50
    ask it, you know, secret questions as you
    would have to ask CloudBleed and that was
  • 6:50 - 6:54
    oddly reminiscent of something well none
    of you remembers unless you're as old as I
  • 6:54 - 6:58
    am which was the BTX hack which was
    one of the founding stones I think of the
  • 6:58 - 7:04
    Chaos Computer Club, where people were
    able to make the computer of a bank, that
  • 7:04 - 7:09
    was attached to BTX, divulge passwords.
    Essentially a memory dump that will
  • 7:09 - 7:14
    contain passwords and then transfer a lot
    of money from that bank to them and so
  • 7:14 - 7:21
    that felt a lot. So the present in many
    ways it feels a lot like the past did and
  • 7:21 - 7:25
    you would think there would be some kind
    of progress and I think I was as guilty of
  • 7:25 - 7:31
    that as anybody so in 1986 I wrote my
    first book and as many books now and
  • 7:31 - 7:34
    then it focused on a specific programming
    language, of course I picked like the
  • 7:34 - 7:38
    worst programming language in hindsight,
    that I ever could have picked on that it's
  • 7:38 - 7:43
    responsible for a lot of the
    vulnerabilities that we see today. So, but
  • 7:43 - 7:49
    again, you know it was at least, I can say
    it was in 1986, so it was a long time ago.
  • 7:49 - 7:54
    A long time ago. So you would think things
    have changed. So some of you may have been
  • 7:54 - 8:00
    at a talk earlier today about the Bob
    system for teaching for teaching young
  • 8:00 - 8:05
    kids on how to program and Bob prides
    itself on teaching programming in exactly
  • 8:05 - 8:10
    the same way as computer experts would
    program, but it would use an approach used
  • 8:10 - 8:16
    based on gamification to teach students,
    right? And so you know in 1986 we were
  • 8:16 - 8:21
    programming in C, so Bob now is programmed
    in C++, so something has happened since
  • 8:21 - 8:29
    then. And you can look at a lot of pages,
    web pages and systems for teaching
  • 8:29 - 8:33
    beginners on how to program. Here's a
    prominent page supported by a lot of major
  • 8:33 - 8:39
    organizations called start coding de from
    this year and you can see again that a lot
  • 8:39 - 8:43
    of the stuff that it teaches where first
    of all is focused on particular
  • 8:43 - 8:47
    programming languages, on Scratch and
    Python and Processing. So there's right,
  • 8:47 - 8:51
    there's three programming languages
    mentioned there and if you can read the
  • 8:51 - 8:55
    fine print and if you can read German it
    says "spielerische Herangehensweise",
  • 8:55 - 9:00
    which means that there is a that there's a
    fun based, a playful approach to teaching
  • 9:00 - 9:05
    how to program and that's common to a lot
    of things. So if you go to a kids space
  • 9:05 - 9:10
    you will find a section there called
    "Jugend hackt" and you can see that it
  • 9:10 - 9:14
    also takes a very playful approach to
    teaching and if you look at its material a
  • 9:14 - 9:19
    lot of it also features particular
    programming languages. And there's, if you
  • 9:19 - 9:25
    look you, will find that there's a curious
    absence of methodology on these, on all of
  • 9:25 - 9:33
    these pages, and I think part of the
    reason is that, I think, if you teach
  • 9:33 - 9:37
    programming, you can easily get the
    feeling that it's very easy, right? I mean
  • 9:37 - 9:41
    you can teach people to write very trivial
    programs that will blink an LED or do
  • 9:41 - 9:46
    something like that and you know light,
    the lights, the eyes of your students they
  • 9:46 - 9:50
    will just light up and they will just love
    what you teach them, if it's trivial. If
  • 9:50 - 9:54
    it's not so trivial, so I like functional
    programming, which is sometimes not so
  • 9:54 - 9:58
    easy, but in any given group that's large
    enough you will find a few Sheldons that
  • 9:58 - 10:02
    will just eat up everything that you teach
    them and they will come to you. And they
  • 10:02 - 10:06
    will say "oh I just love", whatever it is,
    the lambda calculus, functional
  • 10:06 - 10:10
    programming, whatever and you know, if
    you've been at it for thirty years you
  • 10:10 - 10:13
    notice that it doesn't really matter what
    you teach you will always find a few
  • 10:13 - 10:22
    Sheldons that will tell you that they
    love what you teach them. And so after a
  • 10:22 - 10:26
    while you though, you realize that, well
    there's a few Sheldons but then there's
  • 10:26 - 10:32
    also a lot of students in your class who
    are not Sheldons. And as you're chugging
  • 10:32 - 10:36
    along on your teaching train and you look
    out the back you suddenly realize that
  • 10:36 - 10:41
    you've left a lot of students behind. They
    might still like what you're doing but you
  • 10:41 - 10:46
    really haven't taught them any, you know,
    significant abilities and so over the
  • 10:46 - 10:50
    years I've had a lot of opportunity to
    think why that is. Why is teaching so hard
  • 10:50 - 10:55
    and why is it often unsuccessful? And one
    of the reasons is, that I think if you
  • 10:55 - 11:00
    pick up any almost any book on programming
    or open any webpage that tries to teach
  • 11:00 - 11:06
    your programming, it uses an approach that
    I call teaching by example. So here's a
  • 11:06 - 11:11
    book by a computer science professor, came
    out this year, and you know "Learn Java
  • 11:11 - 11:15
    the easy way" and the easy way is in the
    second chapter right after the
  • 11:15 - 11:20
    introduction, we do an example, right? And
    there's a concrete listing of a concrete
  • 11:20 - 11:26
    program and the text essentially is just a
    commentary for that program and then the
  • 11:26 - 11:31
    expectation is, that from the example that
    you've seen, that exposes various elements
  • 11:31 - 11:36
    of the programming language, like while
    loops and System.out.println and whatever,
  • 11:36 - 11:40
    you will, I think by osmosis, or some
    other magical mechanism absorb the ability
  • 11:40 - 11:46
    to apply the techniques to new problems
    and my experience has been that that often
  • 11:46 - 11:51
    does not work for the great mass of
    students were not Sheldons.
  • 11:51 - 11:56
    I thought back to the great teachers that
    I've had, maybe not in computer science
  • 11:56 - 12:00
    but you know what methods were they using
    and then when I thought about it, I
  • 12:00 - 12:05
    realized that they were using methods that
    were completely different. So here's a
  • 12:05 - 12:11
    picture of my eleventh grade English
    teacher, Anne Carvalho, in 1987. That was,
  • 12:11 - 12:15
    as I was an exchange student in the US and
    at the beginning of the class she handed
  • 12:15 - 12:19
    out a piece of paper, well you can't
    really see it, so I'm gonna zoom in, that
  • 12:19 - 12:24
    said you know, how to write a composition
    in this class, right? And so composition
  • 12:24 - 12:29
    of this class, well here's the second
    section, is the body, right. The body is
  • 12:29 - 12:33
    three paragraphs with each paragraph
    developing one of the areas of the thesis,
  • 12:33 - 12:37
    first area scope, usually one paragraph,
    transition topic sentence. If you look at
  • 12:37 - 12:43
    this, this is a very precise outline that
    explains the function of just about every
  • 12:43 - 12:47
    single sentence in your composition. So
    it's a very rigid harness, if you will,
  • 12:47 - 12:52
    for a composition and you know, coming
    from Germany, Germans are generally very,
  • 12:52 - 12:56
    they don't accept a lot of power distance
    and they don't they authority that much,
  • 12:56 - 13:02
    you know, I was an instant rebel to this
    concept and it took me most of the year to
  • 13:02 - 13:06
    really accept that it was a great way to
    learn how to, to learn one good and
  • 13:06 - 13:11
    working way of writing a composition and
    then I could branch out from there and
  • 13:11 - 13:16
    develop other working ways of composition
    so this is a methodology for doing
  • 13:16 - 13:20
    something that is extremely useful and
    powerful when you teach.
  • 13:20 - 13:23
    And you might say, well we have
    methodologies like that in computer
  • 13:23 - 13:27
    science and in programming as well, you
    know we've been doing object-oriented
  • 13:27 - 13:33
    programming which is supposed to be very
    principled. I've seen a lot of crappy
  • 13:33 - 13:38
    object-oriented code as well. I don't know
    about you. So you know, an object oriented
  • 13:38 - 13:43
    programming well it has encapsulated
    state, it has polymorphism and it has
  • 13:43 - 13:48
    inheritance. Inheritance is particularly
    bad because there's so many different uses
  • 13:48 - 13:52
    of inheritance and typically your
    programming language will only have one
  • 13:52 - 13:57
    mechanism and so people often get it wrong
    and they do inheritance the wrong way
  • 13:57 - 14:01
    around and there's empirical studies but
    there's many other ways in which object-
  • 14:01 - 14:06
    oriented software is sort of ends up
    looking like this. So I don't, yeah
  • 14:06 - 14:10
    anyway, so you know, this is not, this is
    not supposed to be an indictment of the
  • 14:10 - 14:14
    hacker culture that we see a lot of things
    that you know around the corner, you know
  • 14:14 - 14:17
    around here that look like this and
    they're wonderful but they're no
  • 14:17 - 14:21
    substitute for, you know, they are no
    substitute for a method, for
  • 14:21 - 14:28
    methodologically sound development of
    software. So yeah, well many yars ago I
  • 14:28 - 14:33
    thought there has to be a different way
    and I got together with a man called
  • 14:33 - 14:37
    Matthias Felleisen who happens to be a
    fellow German bureaucrat, like just like
  • 14:37 - 14:41
    me, but who lives in the US and who wrote
    a book called "How to design programs"
  • 14:41 - 14:45
    which you can find online, if you're
    interested. You don't even have to buy the
  • 14:45 - 14:50
    paper and we kind of did sort of a German
    version of that working with Matthias
  • 14:50 - 14:56
    called "Dein Programm" which also has a
    free book on it. And the overarching
  • 14:56 - 15:01
    principle of that approach is that we try
    to be systematic about everything, so that
  • 15:01 - 15:08
    we try to attach systematic fixed plans or
    system to every step of program
  • 15:08 - 15:13
    development and these things are called
    design recipes. Just it was a name
  • 15:13 - 15:18
    invented for this. So I'm gonna, well I
    guess I'm going to torture you with one
  • 15:18 - 15:25
    concrete example, a classic example. So
    Matthias was in Texas at the time, so the
  • 15:25 - 15:29
    classic example is animals on the Texas
    Highway. And we're gonna concern ourselves
  • 15:29 - 15:33
    with two kinds of animals, so there's an
    armadillo on the left and there's a
  • 15:33 - 15:38
    rattlesnake on the right and there's of
    course the highway in the middle, okay? So
  • 15:38 - 15:42
    we'll start out with armadillos and for
    the purpose of this application you might
  • 15:42 - 15:46
    just describe armadillos. So what's
    important about armadillos here you'll see
  • 15:46 - 15:51
    why, is an armadillo has the following
    properties: it's alive or dead and it has
  • 15:51 - 15:56
    a certain weight. And so I'm going to
    greatly shorten this process of systematic
  • 15:56 - 16:01
    development here, but what we say is, well
    if you find yourself describing your data,
  • 16:01 - 16:04
    this is a data centered approach, if you
    find yourself describing your data with
  • 16:04 - 16:08
    words like "it has the following
    properties" or "it consists of the
  • 16:08 - 16:13
    following parts" then you're dealing with
    something called compound data, so this is
  • 16:13 - 16:17
    a fixed part of the plan and it has a
    name. That's very important to give names
  • 16:17 - 16:21
    to things, so you can talk about them. And
    so once you've identified that you're
  • 16:21 - 16:25
    dealing with compound data, you can model
    that data and you can translate that model
  • 16:25 - 16:29
    into code and here you see a screenshot of
    a system called DrRacket which is a
  • 16:29 - 16:33
    programming environment, that was
    developed for beginners, and you can see a
  • 16:33 - 16:37
    little program fragment in a programming
    language also developed for beginners, in
  • 16:37 - 16:41
    fact that fragment was developed for
    beginners, that says, well, in the
  • 16:41 - 16:47
    interest of brevity, we're abbreviating
    armadillo to "dillo", so it says, we're
  • 16:47 - 16:51
    dealing with dillos, so we're calling the
    datatype, if you will, we're calling that
  • 16:51 - 16:54
    dillo. If we're dealing with compound
    data, we need one way to construct it,
  • 16:54 - 16:56
    so we need a constructor
  • 16:56 - 17:00
    and so we're gonna call
    the constructor make-dillo, we'll see
  • 17:00 - 17:04
    later that we'll need one way of
    distinguishing dillos from other things,
  • 17:04 - 17:09
    so we'll need what's called a predicate,
    ignore that for now, and on the previous
  • 17:09 - 17:14
    slide or here in the data definition the
    comment that is in yellow, you saw that an
  • 17:14 - 17:19
    armadillo has two components, it has two
    parts and therefore there need to be two,
  • 17:19 - 17:24
    if you will, getter functions and those
    are called dillo-alive P and dillo-wait.
  • 17:24 - 17:29
    Never mind all those parenthesis, at least
    not for the purposes of this presentation,
  • 17:29 - 17:34
    oh and one one more detail maybe is, that
    if you look here, it says language.
  • 17:34 - 17:38
    DrRacket is a programming environment that
    has many different programming languages
  • 17:38 - 17:42
    and this particular one, as I mentioned is
    called "die Macht der Abstraktion" which
  • 17:42 - 17:46
    identifies one particular set of
    programming language levels for beginners.
  • 17:46 - 17:53
    Now, you know, once you have that record
    definition you can immediately call the
  • 17:53 - 17:59
    constructor to go to, to make examples. So
    here's two example armadillos, so you see
  • 17:59 - 18:04
    these two expressions make-dillo and this
    hash mark T means true, so make-dillo true
  • 18:04 - 18:09
    and ten means, well, we have an armadillo
    we're alive is true and the weight is ten
  • 18:09 - 18:14
    so that might mean an armadillo that's
    alive and weighs ten kilos. And then
  • 18:14 - 18:18
    there's another armadillo that well alive
    unfortunately is false, so it's probably
  • 18:18 - 18:23
    dead and it weighs 12 kilos and the
    defines there just say, well we're
  • 18:23 - 18:29
    gonna call the first one d1 and we're
    gonna call the first one d2 - okay? And so
  • 18:29 - 18:34
    one way to talk about these functions that
    we've created is by writing down what we
  • 18:34 - 18:39
    call signatures, they're almost type
    signatures, not quite, let's say what
  • 18:39 - 18:43
    these functions behave like. So the
    constructor function that you just saw
  • 18:43 - 18:47
    applied is called make-dillo and you know
    in these funny programming languages most
  • 18:47 - 18:52
    things are written in prefix notation, so
    make-dillo accepts a boolean and a number,
  • 18:52 - 18:56
    remember that was that a live thing, is
    it's still alive and the number that says
  • 18:56 - 19:01
    how heavy it is and it produces a dillo
    object. And the dillo-alive and dillo-
  • 19:01 - 19:06
    weight getter functions both accept a
    dillo object and the first of them says
  • 19:06 - 19:10
    whether the dillos are live or not, so it
    produces a boolean and the second one
  • 19:10 - 19:16
    produces a number that is the weight of
    the dillo, okay. And so why is this all
  • 19:16 - 19:21
    relevant? Life on the Texas Highway is
    animals get run over by cars, right?
  • 19:21 - 19:26
    So we're gonna write a function that
    simulates that process. So that thing in
  • 19:26 - 19:32
    green is what we call a problem, as a
    short statement on, a short comment on
  • 19:32 - 19:35
    what the function does that we're about to
    write, so we're gonna run over an
  • 19:35 - 19:39
    armadillo and then it says we're gonna
    write a function called run-over-armadillo
  • 19:39 - 19:43
    and it goes from dillo to dillo, which
    means, well, the dillo was not really a
  • 19:43 - 19:48
    dillo, it represents the state of the
    dillo before it gets run over and then one
  • 19:48 - 19:52
    comes out of the right side, on the right
    hand side that says what the state is
  • 19:52 - 19:57
    after I've gone run over by a car, ok? And
    then you can write. So you can see all
  • 19:57 - 20:01
    these things are sort of required elements
    of the curriculum, I'm going over them
  • 20:01 - 20:06
    very quickly. The two next things are
    example and test cases at the same time.
  • 20:06 - 20:10
    So check-expect says, well, if we run over
    that first armadillo it was still alive,
  • 20:10 - 20:15
    it weighed 10 kilos. After we've run it
    over it's dead and it still weighs 10
  • 20:15 - 20:20
    kilos, okay? And the second test case
    says, well, if we run over d2, it is
  • 20:20 - 20:26
    already dead, so after that it's still
    going to be dead and it will weigh 12
  • 20:26 - 20:30
    kilos. Now, from the signature above, you
    know we already know what the function is
  • 20:30 - 20:35
    called and how many arguments it has, it
    has one argument, so we can write
  • 20:35 - 20:39
    something down mechanically that is what
    we call a skeleton, which is that thing in
  • 20:39 - 20:42
    the beginning, the thing at the bottom. So
    we're writing a function or something
  • 20:42 - 20:47
    called run-over-dillo, lambda says that
    it's a function and d says well that dillo
  • 20:47 - 20:55
    up there it's going to be called d here.
    This is a mechanical process and so we see
  • 20:55 - 21:00
    here how that is elaborated. We can do
    more things mechanically from this because
  • 21:00 - 21:06
    dillo is compound data and whenever we
    accept compound data as input we probably
  • 21:06 - 21:10
    need to look at the parts to do anything
    that's meaningful. So we might as well
  • 21:10 - 21:14
    call the two getter functions. So there's
    dillo-alive of d and dillo-weight of d and
  • 21:14 - 21:20
    also compound data comes out as output and
    so, we probably need to call the
  • 21:20 - 21:24
    constructor. In our constructor dillo then
    is supposed to come out the right hand
  • 21:24 - 21:28
    sid. So all of these things can be written
    down and we ask our students to write all
  • 21:28 - 21:33
    this stuff down and also actually write
    down those ellipses marks, the three dots
  • 21:33 - 21:37
    and these are building blocks and they are
    completely mechanical, they have nothing
  • 21:37 - 21:42
    to do with the actual purpose of what
    we're doing and then usually it's pretty
  • 21:42 - 21:46
    easy to then fill in the missing steps and
    say well we are not really interested in
  • 21:46 - 21:51
    whether the dillo was alive or not before.
    We're probably, but we are interested in
  • 21:51 - 21:54
    the weight in constructing that new
    armadillo and does it still run over a
  • 21:54 - 22:00
    function that does that. So a large, so
    you can see that there's a lot of steps,
  • 22:00 - 22:04
    it's an extremely bureaucratic process
    producing that program. And some of those
  • 22:04 - 22:08
    steps are completely mechanical, they
    might be boring but they enable everybody
  • 22:08 - 22:14
    to make progress. And so you might imagine
    I said rattlesnakes and rattlesnakes are
  • 22:14 - 22:19
    very similar to dillos, I'm gonna run over
    those very quickly. So rattlesnake has the
  • 22:19 - 22:22
    following properties: thickness and
    length. And you can see there's a record
  • 22:22 - 22:26
    definition, there's a bunch of signatures
    that come out of that. We can do a purpose
  • 22:26 - 22:30
    statement, says all we're going to run
    over a rattlessnake now, not we can't just
  • 22:30 - 22:35
    do armadillos. There's a couple of test
    cases and rattlesnakes can run over, you
  • 22:35 - 22:39
    know, they get flattened out. So their
    thickness goes down to zero when they get
  • 22:39 - 22:44
    run over. But the important thing is now,
    we might think about, well, we're just
  • 22:44 - 22:48
    going to run over whatever animal comes
    under our wheels next, so we were
  • 22:48 - 22:52
    interested in an animal on the Texas
    Highway and an animal is one of the
  • 22:52 - 22:56
    following: it's either an armadillo or a
    rattlesnake. And whenever you see that
  • 22:56 - 23:00
    wording, it's one of the following: it
    this or that or that or that. You're
  • 23:00 - 23:06
    dealing with something that we call mixed
    data and so, again, this thing has a name.
  • 23:06 - 23:10
    And with mixed data, again, there's a
    fixed set of steps that you go when you
  • 23:10 - 23:15
    program to them. So you define a signature
    that says, well, animal is a signature
  • 23:15 - 23:20
    that's mixed from dillo and rattlesnake
    and we're then going to write a function
  • 23:20 - 23:24
    that runs over an animal and so it doesn't
    have dillo to dillo or it doesn't have
  • 23:24 - 23:28
    rattlesnake to rattlesnake, it has animal
    to animal. It has test cases like as
  • 23:28 - 23:35
    before and, well, remember that there were
    two different kinds of animals on the
  • 23:35 - 23:40
    Texas Highway and in, so we and we need to
    feed them differently, right? It's a
  • 23:40 - 23:44
    different thing of running over an
    armadillo and running over a rattlesnake
  • 23:44 - 23:48
    so for that, we need a conditional and we
    need these predicate function that says,
  • 23:48 - 23:52
    well, that animal a is it an armadillo or
    is it a rattlesnake and then we need to
  • 23:52 - 23:55
    fill in the gaps. And of course we've
    written those functions already, so it
  • 23:55 - 24:00
    gets pretty easy. This is, I don't know if
    you've seen this, and I've run over this
  • 24:00 - 24:04
    very quickly and I've left out a lot of
    steps, this is an extremely bureaucratic
  • 24:04 - 24:08
    process and when you read about this at
    first you think: "this is so boring, I
  • 24:08 - 24:13
    can't, I can't", you know this, you know
    you go like this right. And interestingly
  • 24:13 - 24:18
    if you practice this on your students,
    surprisingly pretty quickly they go like
  • 24:18 - 24:22
    this, because they realize that this
    bureaucratic approach actually makes them
  • 24:22 - 24:26
    produce a working solution on their own.
    Some of them can't believe it, that it's
  • 24:26 - 24:32
    successful, but then they start smiling.
    But it took a long, long time to a develop
  • 24:32 - 24:37
    this approach. So Matthias has been added,
    I think since the early 1990s, I've really
  • 24:37 - 24:42
    been involved in this process, I think
    since since about 2001. So really you need
  • 24:42 - 24:47
    to take an approach to teaching. You need
    to observe how well it does and I can't
  • 24:47 - 24:53
    stress this enough: when you observe it is
    not enough to measure the popularity of
  • 24:53 - 24:57
    what you're doing, it's not enough to ask
    your students "do you like this stuff",
  • 24:57 - 25:02
    right, "is that something that's
    interesting", you know? I've seen a huge
  • 25:02 - 25:07
    bandwidth of things where we were
    unsuccessful, but people just liked it,
  • 25:07 - 25:12
    just people just liked it fine and so,
    this process, you know, we repeated many
  • 25:12 - 25:17
    times and hopefully gonna repeat it many
    times in the future. But it has produced
  • 25:17 - 25:21
    the following insights. You need, so it's
    very useful to have a very bureaucratic
  • 25:21 - 25:26
    approach to programming that we call
    design recipes. I didn't much talk about
  • 25:26 - 25:30
    the fact that it's very helpful to have
    programming languages that are
  • 25:30 - 25:33
    specifically developed for beginners or
    for learners, doesn't have to be
  • 25:33 - 25:37
    beginners. And it also helps to have a
    programming environment that was designed
  • 25:37 - 25:43
    for beginners and, well, you can go either
    to a page called "Program by Design" or
  • 25:43 - 25:47
    "Dein Programm" and you'll find a lot of
    information about that. But it took a lot
  • 25:47 - 25:52
    of work and it's usually, it's not enough
    to just take your professional programming
  • 25:52 - 25:55
    language and stick it on your kids. It
    might be, it might work for trivial
  • 25:55 - 26:00
    programs, but it's not going to scale
    anywhere. So, yeah, well it's about
  • 26:00 - 26:05
    growing up, but I guess this one is about
    growing down. So I think the progression
  • 26:05 - 26:09
    really should lead us, from you know, the
    C and C++ like unsave languages and all
  • 26:09 - 26:15
    the hacking of the past and that we like
    to use when we make exploits to save
  • 26:15 - 26:19
    languages and runtimes and finally, we're
    seeing something like Rust and ATS coming
  • 26:19 - 26:23
    up, I really only know how to do this
    bureaucratic and systematic approach to
  • 26:23 - 26:29
    programming with functional languages and
    if you've watched this closely, you saw
  • 26:29 - 26:33
    that what we did, was type driven, right?
    We looked at the way our data is organized
  • 26:33 - 26:39
    and then organized our programs according
    to that data. Whether you use a statically
  • 26:39 - 26:43
    typed language or not is kind of secondary
    to that, but in the future I think we'll
  • 26:43 - 26:47
    see more of that. You will write down a
    specification of what you're trying to do
  • 26:47 - 26:51
    as part of your types and then your system
    will generate for them and that's also a
  • 26:51 - 26:57
    way of proceeding very systematically. So
    I think when you're teaching programming
  • 26:57 - 27:03
    it's, you know, being inclusive is very,
    very hard, right? It's not enough to get
  • 27:03 - 27:09
    people excited. It really is important to
    impart practical knowledge and competency.
  • 27:09 - 27:13
    And the only way I know don't know how to
    do this, is to teach a systematic
  • 27:13 - 27:18
    approach. You might call it bureaucratic
    if you're German, but to my surprise even
  • 27:18 - 27:24
    the Sheldons like this after a while
    anyway and we should really refocus or we
  • 27:24 - 27:28
    need to focus you know after all the
    exploits we'seen over the past couple of
  • 27:28 - 27:33
    decades on correctness and I think this is
    the path to do that. Thank you very much.
  • 27:33 - 27:35
    Applause
  • 27:35 - 27:41
    Angel: Thank you Mike for this
    presentation. We now have like two or
  • 27:41 - 27:51
    three minutes for questions. Please go to
    the mics one, two, three yourself. Ah, we
  • 27:51 - 27:54
    have from there.
  • 27:57 - 28:00
    Q: Hi! Mic on? Yes. So coming from a lot
  • 28:00 - 28:05
    of the software development world and
    practical experience probably, delivering
  • 28:05 - 28:10
    with other customers, have you got any
    insights into how people would often do
  • 28:10 - 28:14
    teaching by code review, a direction for
    people to go in reading, to learn more
  • 28:14 - 28:18
    about code, learn more about the structure
    of code, in the way that software
  • 28:18 - 28:22
    development often is typically taught? Do
    you have thoughts on that specifically in
  • 28:22 - 28:25
    this?
    A: So I think it's valuable but in my
  • 28:25 - 28:29
    experience it's just not enough, right? So
    the Sheldons of this world, they're able
  • 28:29 - 28:33
    to figure out how to program by
    themselves, essentially, right? By just
  • 28:33 - 28:37
    saying, you know, this piece of code is
    good. That's teaching by example, right?
  • 28:37 - 28:41
    This piece of code is good and this piece
    of code is bad or we can improve upon, it
  • 28:41 - 28:46
    it's just not a constructive way. It's
    helpful, right, to sharpen the sense of,
  • 28:46 - 28:50
    and you know, what helped, it sharpens
    your review facilities which is an
  • 28:50 - 28:55
    important part in learning anything. But
    really, I think, so in my experience it's
  • 28:55 - 29:02
    completely crucial to insist that in
    your teaching methodology, you teach them
  • 29:02 - 29:04
    steps that they can actually follow,
    right?
  • 29:04 - 29:09
    Q: True, I agree on that, but in respect
    of how many modern software development
  • 29:09 - 29:14
    teams work and in a code review you can
    go, this approach will have this and this
  • 29:14 - 29:19
    problem, have you thought about doing it
    this way, what have you considered, do you
  • 29:19 - 29:24
    have any thoughts on that process in
    teaching people in that process, in that
  • 29:24 - 29:27
    duration?
    A: So for beginners my experience has been
  • 29:27 - 29:29
    that it doesn't work very well, right?
    Q: Okay.
  • 29:29 - 29:34
    A: That's a, so it's a common educational
    point, right, that you need to teach
  • 29:34 - 29:38
    people, you know there are very different,
    many different approaches and we're gonna,
  • 29:38 - 29:42
    we're going to judge them and we're going
    to say "this one is okay and this one is
  • 29:42 - 29:46
    maybe a little better". My experience has
    been with the vast majority of students,
  • 29:46 - 29:50
    right, is, if you use that as your main
    teaching paradigm the problem is, they
  • 29:50 - 29:55
    produce zero solutions and so it's a much
    better idea to really insist on that one
  • 29:55 - 29:58
    correct solution and you can branch out
    later.
  • 29:58 - 30:00
    Angel: Okay.
    Speaker: Does that make sense?
  • 30:00 - 30:02
    Angel: Thanks.
    Speaker: Sorry.
  • 30:02 - 30:05
    Angel: Mic 1. No, it's okay. Short, quick
    questions, please.
  • 30:05 - 30:08
    Q: Yeah, well, I hope it's a short
    question. Thank you very much for the
  • 30:08 - 30:13
    talk. I'm gonna crush my brains on what
    you've told for the coming days. There's
  • 30:13 - 30:16
    one thing very popular among youngsters:
    this is Arduino.
  • 30:16 - 30:19
    A: giggles Yeah.
    Q: It's stick up with C and C++ and you
  • 30:19 - 30:22
    get very crappy C code.
    Speaker: Yeah, yeah.
  • 30:22 - 30:28
    Q: So how would you put this, what you've
    told tonight into the environment of such
  • 30:28 - 30:32
    a popular platform like Arduino?
    A: So I think I would try to make the
  • 30:32 - 30:36
    teaching languages work on an Arduino. I
    think that's gonna be very hard with the
  • 30:36 - 30:40
    really really small ones but with this
    sort of medium sized one, it's a might,
  • 30:40 - 30:45
    actually be, might actually be possible.
    But yeah, as you point out
  • 30:45 - 30:50
    inhales/giggles, there's a bunch of
    crappy C code running on Arduino. I can
  • 30:50 - 30:54
    see the attractiveness of that approach,
    but it's not one that I personally prefer.
  • 30:54 - 30:57
    Q: Could Scratch fill the gap?
    A: No.
  • 30:57 - 30:59
    Angel: laughs
    Q: Thank you very much.
  • 30:59 - 31:04
    Angel: That was a quick answer. I'm sorry
    we're running out of time, thanks for your
  • 31:04 - 31:08
    questions and thanks again Mike for your
    wonderful talk. The applause...
  • 31:08 - 31:14
    applause
  • 31:15 - 31:18
    postroll music
  • 31:18 - 31:36
    subtitles created by c3subtitles.de
    in the year 2019. Join, and help us!
Title:
34C3 - Growing Up Software Development
Description:

more » « less
Video Language:
English
Duration:
31:36

English subtitles

Revisions