« All Episodes

Puzzle Games with Mark Engelberg (Part 1)

Published 10/9/2017

In today's episode, I interview Mark Engelberg. Mark creates puzzle games, and most recently created the "CODE" series of games in collaboration with ThinkFun. Mark's insights into learning and teaching are fantastic. I hope you enjoy this episode!

Today's episode is brought to you by Linode.

Linode provides superfast SSD based Linux servers in the cloud starting at $5 a month. Linode is offering Developer Tea listeners $20 worth of credit if you use the code DEVELOPERTEA2017 at checkout. Head over to spec.fm/linode to learn more about what Linode has to offer to Developer Tea listeners!

Transcript (Generated by OpenAI Whisper)
Why would you teach a child to learn to code? Perhaps the immediate answer is to prepare them for the workforce, that it's some kind of literacy issue, and they need to learn what code is so that one day they can work with code. And I think a better answer may be because teaching a child to code is really analogous to teaching a child to think. And there's a lot of things that a child can learn differently from, for example, a computer science student because they aren't totally focused on becoming marketable. In fact, a child's focus is usually on having the most fun that they can in a given day, and not in a bad way either, perhaps in a productive way. That's what we're talking about in today's episode, more specifically, we're talking about puzzle games. I'm talking with Mark Engelberg. Mark is the creator of a series of games. He partnered with a company called ThinkFun to create a series of games that teach children and really anyone. The age limit is not imposed at any particular ceiling, but anyone can learn from these games. So I'd love for you to go and check out what Mark's games are doing. You can get them at Target, by the way. Target is carrying these games. I actually went to Target the day after the interview and I found the games and I've had the pleasure of actually playing a few of these games. So as always, my goal on the show is to help you become a better developer. And one of the ways that we can do that is to talk with people who are thinking differently about the purpose of code. Talk with people who are thinking differently about the purpose of becoming a developer. And Mark is one of those people. Once again, my name is Jonathan Cutrell. You're listening to Developer Tea. Now let's get straight into the interview with Mark Engelberg. Mark welcome to the show. Hi, thanks. Great to be here. So we should go ahead and let everyone know this isn't the first time Mark and I have talked. And in fact, it's not even the first time that we've recorded an episode of Developer Tea. Unfortunately, the last conversation we had, the audio was corrupted somehow. And so we're actually re-recording this initial conversation. So if we say something that sounds like maybe they've talked before, that's because we have. Yeah. So Mark has been very kind to spend the extra time to come back and redo this episode. I really think the first conversation that we had Mark was enlightening and so exciting to me to talk about education. And we're going to get into all that. But I'm very thankful that you decided to spend that extra time to come back and redo the show with me. Well, yeah, I enjoyed the conversation. So let's do it again for the audience this time. Let's jump straight in. So if people were, let's say I met you on an elevator and we got stuck. So you have a little bit longer than 30 seconds. But if I asked you, what do you do, Mark? What are you involved then? What do you care about? What would you say? Well, I tell people that I invent and develop puzzle games. And when they asked me to explain that a little bit more, I usually give this an example how Sudoku, when it first started out, it was something that people could construct the puzzles by hand and then overnight it just exploded in popularity and suddenly every newspaper in the country wanted to carry their own set of Sudoku puzzles. So they have to suddenly figure out how do we make these puzzles at scale? How do we develop them so that we'll have a big database of puzzles to run every week, calibrated the difficulty just right? How do we do that? So when you're presented with a dilemma like that, you would call somebody like me and I would figure out how to develop the puzzles on a large scale. So I do that for puzzles that other people invent and I also invent puzzle systems myself. This is such an interesting difference and we discussed this before, but I want to draw back into it because I think it's, you know, I've had a chance to kind of let this all over my brain. Maybe I need to do double interviews every time. The idea that we discussed before was this kind of this difference between just a game and puzzle games and what you, what you've created and what we're going to get into talking about in just a little bit is distinct from just a game. Can you kind of explain what the difference is between calling something a game and calling it a puzzle? Yeah, well, I think game is a term that can apply to a whole bunch of things. I mean, we use it to describe board games or video games or adventure games or solitary games. There's all kinds of different games. So I think the game, the term game, the label can apply to a lot of different things. But what I specifically, the niche that I'm focused in is created what I call puzzle games. I think to most people, they would look at it and just say, it looks like a board game because it is a board game. It's something that you buy. It's a physical item. It's not something that you play on the computer. It's something you set up in front of you. So what makes it a little bit different than a typical board game is that it's actually a puzzle system where there's one kind of underlying set of rules, but you're given a book of puzzles. In each puzzle, you set up on the board and then you kind of try to work out how to solve the puzzle in front of you physically. And you can either do that by yourself or you can do that collaboratively with a group of friends. So it's that kind of a board game. So when I'm trying to clarify what I'm talking about to people who only associate the word game with just board games that you sit around and play like monopoly or risk or something or I'm trying to describe it to people who only associate the word game with video games, I usually use the term puzzle game to kind of zone in a little bit more as the kind of game I'm talking about. Sure. Yeah, absolutely. And there's a Southern really interesting aspect, you know, if I sit down to play, I don't know if you've ever played the card game, I call it war, but effectively all it is is doling out cards and then stacking them on top of each other. And whichever card is higher, that person takes those cards. And so it works out that you win half of the time and the other person wins half of the time. So it's statistically it's going to be an even game and you're not going to be able to really develop much skill. Right. There's a little bit of watching. There's like a one element of skill, maybe it's more like a reactive skill than it is anything else, but it certainly is not a puzzle. And that's an interesting distinction. This idea of chance that really doesn't play into puzzles other than maybe, you know, I guess you could consider, you know, your 500 Sudoku games, your chance of getting one particularly well suited to solve, but you know, it's not a chance thing. It is actually solvable. There's no, there's nothing that's playing into it other than solving it. Yeah, each thing you set up is a puzzle that you can work through and solve. There's no random elements to it. Sometimes I think that part of what's fun about this type of game is this feeling of kind of leveling up as you play it. You're working through a book of 40 puzzles and there's also the way I've designed the puzzle games will be talking about in a bit is every 10 puzzles, some new elements are introduced to kind of notch up the level of complexity a bit and make it more exciting like you've unlocked something new. So, but that feeling as you're playing through it, you really feel yourself getting better as you're playing it, developing new skills. And to me, that's a really rewarding thing about this kind of game and that's what makes it a little bit different than just doing like a crossword puzzle in the newspaper or something. I mean, a standalone paper and pencil puzzle that can be a fun, satisfying puzzle experience but it's kind of in isolation. It doesn't feel like part of a connected system that you're playing through. Unless you're constantly getting a paper every day, but I don't know if anybody who really has that kind of paper subscription anymore. Right. So, I'd like to kind of take a step back and rewind, maybe give you a chance to live a little bit of nostalgia for yourself. I'd love to know a story of when you first got really interested or intrigued by puzzles. But we're some of the first puzzles that you encountered that you said, you know what, this is something that I would really like to do professionally. I really like to do this at a level that it becomes part of my career. Yeah. Well, I grew up in the early days of the IBM PC. So like mid 80s when the PC came out and I remember the first day my father, my father worked at IBM and he brought home for one of the long weekends. He borrowed an IBM PC from work to bring home and he had loaded onto it Microsoft Adventure which before Microsoft had acquired it, it was a text adventure game called Colossal Cave. So it was one of the first computer games really but it was completely text-driven. It starts off, you know, you are in a forest next to a cave and you start typing in instructions like Go East and it will describe what's there at the next location and you know, pick up the bird and you type in things and it responds and it was this really deeply engaging experience. I mean, this was like nothing I had ever experienced before that. And this just blew my mind that computers could kind of immerse you in a story in that way. This interactive story, one of the hallmarks of the style of these early text adventure games is that they were very puzzle driven. So the first location you get to, one of the problems is you've got, there's like this bird and you got it captured in a cage but it resists going into the cage. And so there's something you have to figure out to try to get the bird to calm down enough so that you can get it into the cage. Like that was one of the first puzzles as you explore this colossal cavern. And I really like that idea of puzzles just embedded into a narrative structure embedded into that kind of storytelling experience. And then I went on to play things like Zork by Infakom. That was another classic text adventure game and then Sierra Online started coming out with these computer graphics adventure games like Kings Quest and Space Quest and Leisure Suit Larry, those kinds of things. And I just loved all that kind of stuff. And that was what really got me excited about puzzles to me that was that difference between working a puzzle like I said puzzle paper and pencil but feeling that it's part of something bigger. And so even though the puzzle systems and the things I'm creating now, they're not exactly story driven in quite the same way, they're still designed to feel like part of a kind of epic arc that you can feel yourself moving through as you explore these puzzles. So I'm still fascinated by that and still trying to incorporate that into my own work. Yeah, and so this show is for developers and we've been talking about puzzle games, we've been talking about the difference between puzzle game and just a normal game or a game that's based highly on chance versus based entirely on strategy and these ideas of narrative. And the truth is this stuff is so applicable to software developers in a hundred different ways. And what we haven't mentioned yet is that Mark, you're also a software developer. Yeah, I do. And that's why when I mentioned earlier that if you want to make puzzles on a massive scale, you'd contact someone like me and that's because I can apply my programming skills to this task. And I encourage all programmers, all Developer To think about how software development, you can apply that to whatever your interests are. And that's one of the powerful things about software development. There's a professor that I know who loves to say that if you want to do your tax return, you call an accountant. But if you want to do a thousand tax returns, you call a software engineer. Preferably one that also knows something about accounting. But that's kind of my point is, right, software developers have this way of thinking about things that lets them think about how to scale a problem, how to find the kernel of what makes a problem interesting and solve it once in a way that will allow you to solve it again and again in a more general fashion. And that's to me like, that's one of the big ideas of computer science. And then once you have that mindset, you also then have the specific skills as a programmer to apply that to whatever your interests are. That's one of the things I love about software development. There's kind of a basic proof of this, the internet, right? There's content on the internet for almost literally everything you can imagine, right? Beyond that, if you look at things like the App Store, the Play Store, Google Play Store, there's, and maybe not everything, but almost everything. There's an app that is related to that concept or that, you know, field of study or that, you know, there are so many ways of expressing and empowering different ideas with software that realistically, you know, it is in many ways how the PC kind of revolutionized the way we did business. Software can revolutionize really the way we do everything. And it already is doing that. It's already revolutionizing everything. So I think a lot of people, they think that to become a good software developer, they need to learn a lot about computer science or they need to learn a lot about algorithms. And their personality has to kind of wrap around this analytical personality. And they can no longer be interested in the liberal arts. They can no longer be interested in, you know, the things, something you mentioned, narratives. That's off the table now because, you know, being a developer is a sidestep from being an engineer or, you know, a sidestep from being a professional mathematician. And that couldn't be further from the truth. In many ways, you know, developers have that, I guess that perspective has been cast on developers because so much of what has enabled software to be written, depended on those things. Right? I depended on scientific advancement. It depended on, you know, physical, mechanical engineering advancements. But you know, it's kind of like saying, well, in order to be able to drive a car, you must be a mechanic. And that's not really, it's not really true. The programming languages are accessible, and this is actually a pretty good segue. They're accessible to people of all kinds of backgrounds, including even young children can learn these concepts. They can learn how to think in ways that can, you know, essentially be abstracted. They can take knowledge and abstracted into technology. So would you, what do you say to the person who is listening to this? And they've kind of been on the fence about, you know, do I really want to invest in becoming a programmer? Do I really want to invest in becoming a better software developer? Because I really, you know, I'm not super interested in, you know, computer science necessarily. Well, I think you hit the nail on the head earlier. You were talking about how it's, you know, kind of like the way the internet is structured. I would even go further and say it's that new mentality of there's an app for everything. Right? It's not the thing that's happened that there's an app for everything. It comes from having programmers with lots of different interests tackling whatever it is they're interested in. I mean, I think to make a difference in this world, you can either be exceptional at one thing or be pretty good at two different things and figure out a clever way to combine them. And that second path is I think a lot easier for a lot of people to just combine your interests in some way. As far as kids go, you touched on that. That has been a big focus of my life recently. And that's really the focus of these new puzzle games that I've been working on with Think Fun. I had been doing puzzle development with Think Fun for many years and the head of Think Fun. It's actually founded by a husband and wife team and Bill Ritchie, the CEO, he is the younger brother of Dennis Ritchie, who was the inventor of the C programming language. So Bill Ritchie grew up just like even though he's not a programmer himself, he grew up around these, this whole brilliant generation of programmers that kind of created the world we live in right now. So Dennis Ritchie would come home and bring some other brilliant programmer or scientist from where he worked. I think it was Bell Labs or something in the day where C programming language was invented. And they'd come home and they'd talk around the dinner table and Bill would be sitting there listening to this and just kind of absorbing it and soaking it all in. So he grew up really fascinated by programming and how it's been the driving force that's really changed our world. And so Think Fun, as a company, has always been focused on creating puzzles that also help not only entertain but also educate and also just make the players of the games, usually kids, usually kids in kind of the middle school age range, just kind of the, you know, 12 and up or so is probably the most common age range. But a lot of the games are targeted at eight and up officially on the box. But that's the age range that has always been kind of the sweet spot for them. And Bill's really started this idea of how can we bring out a line of puzzle games that would serve to do the educating as well for a whole generation of kids and get them interested about programming and teach them the core concepts that would make them into great computer scientists later in life if they choose to do programming or if they don't choose to do programming as a career, they would have these powerful foundations that would help them in whatever they choose to do. So he came to me because I've been doing puzzle development for many years and he also knew I had experience as a programmer and also experienced teaching programming and I'll talk to you a little more about that later. But he came to me and asked me what I like to develop a line of these games for Target who was interested in having an exclusive line of games to offer in their store because they target has also been interested in doing something like this for the public to offer a line of unique games that really teach computer science concepts from a very young age. And I said sure that sounds fantastic. So I jumped in on that project and two years ago we did the first game in the series was Code Master and now we've come out with a new line of three games that are all part of the same series it's called the Code Programming Series and the first game is on the break and the second one is Rover Control and the third one is Robot Repair. And I actually have all three of those games sitting right next to me because think fun and some of your colleagues Mark were kind enough to send me these games. I've had a chance to go through and look at the material and it is so fun first of all it's really fun which I guess is one of the hopefully one of the goals of a good game right but the quality of the game is really high. By the way just disclaimer think fun is not you know paying Developer Teain any way this is not a sponsored episode or anything like that. But this is really engaging and honestly there's plenty of stuff in here that could be challenging to people of any age group. So like you said it's for you know it says eight and not but really if you have like a teenager and you want to get them interested in thinking this way these are an excellent in road for that right. I think you know and this is kind of something that I'm really passionate about and I think you probably are passionate about this too Mark. I think the way that people especially students are introduced to computer science first of all you know for at least in my high school experience which wasn't too long ago. The way I was introduced to computers as a professional tool was through something like a word processor right. I had to learn the fun every function of the word processor at the learn every function of PowerPoint and this is the way I was taught to think about you know how a computer fits into the professional world. And then the next introduction that I had to computer science you know I didn't go for my computer science degree. I had to kind of find it on my own right. So I did this self teaching iteration kind of thing of trying and failing and trying and failing and not really understanding what I was doing but going through the motions that I read I was supposed to go through. And you know getting interested in watching a video on YouTube that kind of explained a particular subject you know I wanted to build a website and so I would go and learn how to build a website. Well I want to say something and do a database so I would go and learn how to say something. And so this procedural you know discovery process is how I learned accidentally that I enjoyed computer science and a lot of people even if they go for a degree in computer science they never really have the chance to do you know effectively what is happening in these games these fundamental ways of thinking about information and how information moves around and how you operate on that information and how you can pass it from you know one place to another and how that passing of that information you know interesting ways that you can pass things there's so much that you can teach earlier that you know and we discuss this in our first round and you mentioned something that I think is really interesting I'd love for you to expound on this that when someone arrives at basically what amounts to trade school to learn computer science in order to practice as a trade you know they end up missing out on a lot of ways of thinking that could bank them significantly better right out of the gate. Yeah and I mentioned to this to you last time but the way I kind of have been thinking about this is developing the games comes back to how I got into the education side of this. So I was for several years I was a virtual reality program at NASA and then I got into developing computer games but then when my kids were born I decided I wanted to be the stay at home dad and so I resigned for my job I became a stay at home dad and I started homeschooling my kids as they got older and this is around when I also started doing some puzzle development on the side because that was something I could easily fit into my life while I was mostly playing the role of stay at home dad and as they homeschooled one of the things I did is I got in touch with the in our public school district there's a homeschool center here that serves the public students in the public school district who are homeschooled but want to take some elective classes that maybe their parents either don't have the knowledge to teach or maybe they're just not interested in teaching it to their kids so they want some place they can take their kids to to take some electives or to take some subjects that they're not really wanting to teach at home. So I took my kids to that homeschool center so they could experience some classes from some different teachers other than myself and while I was there I was recruited to also teach a whole bunch of math and computer science classes to other students other homeschool students whose parents were bringing them in and what was really cool about this experience is that they told me I could teach whatever I wanted and if you think about how rare that is in this day and age you know there are so many requirements put on every class and it's really difficult for teachers to navigate that but here I was told basically teach whatever you want and I was teaching both computer science and math so there were this allowed me to do a bunch of things. First of all in computer science I was able to sit and think and really ask the question what is the best way to teach computer science if you could start kids as early as you wanted and you could teach them any way you wanted in any order with no constraints what would you do and I was able to experiment I tried pretty much every curriculum that was out there I tested some things on the kids and in different years different classes different techniques I took some of the best ideas and would try that on my kids at home and vice versa I would try some things with my own kids and when they would work really well I would take them in and teach it as a class at the school. So I was able to really explore this concept and I had a lot of these kids for many years so following the same kids not just teaching one grade that's another thing that's really different right most teachers specialize in one grade but here I was following many of these kids through the grades from as early as kindergarten age up all the way through high school and a lot of the high school kids were so advanced by that point I was teaching them college level stuff so you know I was teaching everything from kindergarten basically up to college and computer science and then on top of that a lot of these kids I had control over their math curriculum too and that was another interesting question a lot of computer science teachers are constrained not only by the realities of they've got to prepare kids you know that the kids come in really late they may have a weaker math background and there's nothing they can do about that and they also are constrained by thinking well what is the language that's going to allow them to go out and get an internship this next summer and maybe that learning a trade language maybe isn't the optimal way but they've got to do that anyway because that's what the kids want and that's the best thing for them in that context so there's all these real world constraints on most computer science this is even assuming the school offers computer science the reality is that most schools these days don't offer computer science which is really sad but those that do it's a tremendous amount of compromises but here I I had control over the math curriculum and the computer science curriculum so I could make sure they learned the relevant math that would make computer science really easy and from computer science I had many many years to work with them before they really needed to go out into the real world and do programming if you know so I could focus on what is the core things they need to learn to be really exceptional on this stuff and I was really I thought about it for a long time and observed classes over many years and many students and I formulated some really strong opinions about what are the core ideas that you need to learn ideally as young as possible to have that extra edge so that when you get into a trade programming class later you're one of the kids that it's really easy for because when I would get together with other computer science teachers at these conferences we sit around and have discussions and the one topic that would always come up is the teachers would say you know why is it that some of the kids in my class just get it and some of the kids really struggle with it what's the difference is is it just something fundamental is it an eight is it something that these kids were taught and these other kids weren't and if it is something that can be taught is something I can teach them and these are the kind of conversations that computer science teachers have in their spare time and this is this was a deep fascination to me so I found that in yes there is some core set of skills that if you are exposed to them early they do give you an advantage later and it's it's a really powerful thing to encounter that early so can you guess do you know well I guess we touched on this last time so it's probably not a big surprise to you but well and let me let me try to guess from my perspective and then you can kind of dig in a little bit deeper for the listeners and for me you know one of those skills certainly is being able to and I actually just did another episode on this on the on the concept of communication and I'd love to kind of get bounce this off of you as well the idea that you know I have something in my mind or I have some kind of idea that I need to communicate to another person right and so in order to do that I have to take it out of my mind and put it into some kind of channel for them to to receive on their end and so I'm the sender and I have to encode that information to the other person and I think a lot of a lot of computer science students they don't get this step taught to them very well of encoding something that you understand in such a way that the computer will understand it right so kind of impetizing in a way that's not really the right word for it but putting yourself in the position of the computer so that you can understand how you can best communicate that concept through code to the computer. Yeah that is exactly the exactly right when when we write essays or speeches or anything like that in in English class at school you're always told to think about your audience and how the audience is going to read and interpret that you have to put yourself in the mindset of the person is eventually going to be reading this or listening to your speech or whatever that that's how you construct good writing. When you're writing a program the audience is the computer the computer is the thing that's going to have to execute this program so the the driving skill the fundamental thing that makes students have a huge edge in computer science is if they have that skill of being able to roleplay the computer in their head and mentally step through the code step by step and execute the statements the way the computer would execute it and to those of us who are already working programmers maybe that seems like such an obvious thing that maybe it seems like well doesn't everybody have that skill and the answer is no they don't I mean they they can talk that but it's not something that everybody just automatically has that ability to kind of just methodically step through the code in their head but that's something we can teach and so that is the focus of the second game in the series of new games it's called Rover Control and Rover Control the way the puzzle is structured is you're controlling a robot which is a Martian Rover roaming around the Martian landscape and there's all these paths and it's a line following robot so it understands instructions like the red instruction means follow the red line and green means follow the green line blue means follow the blue line and you're given a program that this Rover is going to follow and it's got a and you need to color the lines like you actually have have dry erase markers in the box of red, blue and green and the the map you have all the paths are uncolored so your challenge is to draw the lines in such a way that this program is actually going to work to get the Rover from where it needs where it starts to where it needs to get to and while doing that the player is stepping through the code mentally in their head to kind of figure out and and this is one reason actually a lot of people ask me we didn't really touch on this in our previous conversation but one of the questions I'm often asked is why are these games unplugged games like why aren't they on the computer yeah and the answer is like they could be good computer games but it's a different kind of experience and one of the things that I really like about the physicality of it is it really forces the player to play the role of the computer and step through the program when you have the when you're playing this on an actual computer or similar kinds of programming games there's this tendency that I've noticed that kids have is they will just kind of do it's almost easier for them to do some trial and error setup and just hit the run button and just see what happens that's that's just our tendency when we're in front of something that can just play it out for us sure when it's a physical game there there is no computer to step through it I mean the only way you're going to know if you have the right solution is if you methodically step through the program yourself and make sure that it actually gets the robot to where it needs to get to so it really puts you in that role today's episode is sponsored by Linode you know I can't think of a better way of spending five dollars a month than to buy your first server if you are very young in your career especially having access to a server and actually doing stuff making projects that live on that server and are accessible to the world you learn so much through the practical steps required in order to walk through that right and Linode makes it easy to get to the important stuff fast that's what Linode is therefore they allow you to spend up instances of Linux distributions effectively very quickly and not only that you can spend up multiple instances very easily and then connect them network them Linode isn't just about spending up these small Linux servers they also provide high-end services for people who are building products at scale so you can start small and scale up with Linode and you get excellent customer service all along the way you get the best dollar per gigabyte deal that's available on the market as far as I know so go and check it out, spec.fm slash Linode by the way these these servers are sitting on Intel E5 processors with a 200 gigabit internal network if you don't know what that means that basically means it's incredibly fast from one server inside of Linode's network to another server inside of their network so go and check it out again, spec.fm slash Linode, Linode is going to give you $20 just for being a Developer Tealistener that you can use on any of their services, $20 worth of credit just for using the code Developer Tea2017 thank you again to Linode for continuing to sponsor Developer Teaou know another episode that I did recently was about expanding your perspective and I'm talking about traits that every good developer, every great developer shares and one of those traits is the ability to expand your perspective beyond yourself right and this this is true for being able to translate that into the computer it's true for being able to understand for example how your contribution and a business scenario translates to value to the customer right this is this is important for understanding how to communicate with your co-workers or with clients or you know with your boss it there's there's so much about that skill that if you if you don't work on developing that skill then you're gonna you're you're really gonna have a hard time not only you know actually creating code that works right but in your professional development in general if you're not able to you know take a step back and you know remove yourself from your own perspective for a second which is very difficult in some would argue that it's impossible at least philosophically but doing that exercise intentionally saying okay I'm gonna remove myself from the way that I'm seeing things and try to see it another way try to see it from a different perspective and and that happens at a very tangible level with code it happens a very kind of a mechanical level with code but it it certainly is the same kind of thinking process that's necessary outside of code it's necessary for dealing with other people as we've already mentioned so that's such a cool such a great skill and you know as you learn how to develop good software or as you learn how to think this way you'll start to recognize that truthfully you know we try to put software into a box but these skills are not just about writing code right these are skills that are about thinking which is why I love that you created these physical games because this I mean you could you could hand this to a you know a young student and say hey this actually has nothing this doesn't have to lead you down the road to coding one day this is this is just good skills to have in general absolutely right like there's nothing wrong with having those extra skills and if you are going into computer science then there's some very concrete things that are covered in these games that will be an advantage to you too like the games cover you know if then else branching and in wild loops and there's something in there that's very similar to four loops so I mean that is if you do go that direction then that is an advantage as well for example one of the biggest misconceptions that I've seen is actually with wild loops which might seem kind of surprising but most students when they first encounter a wild loop their their instinct is that if the condition governing the wild loop is becomes false somewhere when the computers executing in the middle of the loop they expected to just kind of break out of that wild loop wherever it is because that condition was violated and it's a totally reasonable thing to think but that's just not how computers work and so in in rover control all these things are all these programs are written out with a kind of flow chart graphical structure to them so that anybody can follow these programs they're not programming language specific in any way they're just getting to the core deeper concepts but the wild loop in there it's very clear from the flow chart that you're you're testing the condition you're now executing these steps and then you're going back and testing that condition again and it's very clear that all that matters is what is the state of that condition when you're at the point where you're testing that and so the you know as you execute this program you're really you're effectively either with your finger or doing it mentally you're tracking the flow of this program at like an instruction pointer would in the assembly code of a program or something stepping through things line by line and you're you're going through that whole process and if if you play a game like this is a kid when you get to a programming class and they show you a wild loop you're going to be like oh of course that's how wild loops were you know I that's exactly what I remember from playing this game as a kid right yeah and and you're kind of rolling the dice you know that these things are going to create these effectively these neural pathways that you can draw on in a later scenario you know everybody who has become a developer you can probably remember something about the way a tree structure or an array structure or you know a dictionary structure or strings you can probably identify parts and pieces of how you learned how those things work not just you know the technical description but you know some things that I've learned I can remember the room that I was in when I learned them right I can remember certain problems that gave me that epiphany that moment and I you know I draw from those memories I draw from them from those experiences and from those really vivid pieces of my you know of my history with programming I draw from those to be able to identify a particular aspect of of that programming concept right and I think everyone has this whether or not they can articulate every single little thing that builds up their knowledge you know nobody has perfectly clean knowledge about any given subject right because the way that we learn the way that the the human mind works you know what we associate every thought with some other thought it could be that you associate you know accidentally associate something that you ate one day with functional programming somehow those two things are perpetually connected with you know in your mind and there's that's actually a really amazing and kind of mysterious thing about how the human brain works and it's really powerful so what what you're doing with these games with these puzzle games is you're creating those kind of anchor points and so important and have those anchor points but you're creating those anchor points you know I remember some of my geometry lessons and some of my physics lessons in high school those epiphany moments that I had in class or you know when I was studying for a test I still draw on those moments today as a programmer and we're we're hoping to create those moments for students who encounter these games and I love the idea of giving them those moments through play almost invisibly like and that's one of the key things that I think makes this work if I mean it would be possible to design a product just hypothetically where you know you have a program and you show some map and you say the robot starts here where does it end tell me and all they have to do is kind of step through the program and see where it ends that would be that would feel like an exercise you just be doing a bunch of exercises what makes this work is the piece that's missing the the thing that you're not given is something that is challenging and tricky and fun to fill in because the what you're trying to do is color the paths and the paths are designed in a such a way that they kind of circle back on themselves and kind of overlap in interesting ways so that it it it's a real interesting logical deduction challenge to kind of figure out the right way to color these things in even if you perfectly understand the program with no difficulty at all if you're an expert programmer you're still gonna find a fun puzzle underneath so that's what I think is interesting like kids are playing it for the puzzle and they're getting the programming understanding as a side effect it's not doesn't feel like it's just some exercise they're doing sure yeah yeah and that's so important you know and I think that play is we've actually talked about play on the show before we talked a little bit about gamification when you have for over 400 episodes you probably cover all these things but you know this concept of play it's part of the reason why a lot of developers became developers in the first place actually quite literally developing games is is of great interest to people who encounter development concepts through games they want to create their own they have an idea for a game and you know I think it's so interesting that you've actually gone through that and you're using this in a way to teach and inspire it's such a cool thing you know we we talked about this on the last on the last round of this of this interview and we didn't naturally end up there but I want to bring it up because I think it was such a cool conversation to have we we talked about how introducing a student to computer science only through that trade school you know you mentioned briefly the the language getting those those those top tier you know kind of enterprise languages they're typically taught in schools because that's what people are getting hired through and you know it makes sense there's you can't really fault the schools for this because you know a lot of their enrollment depends on the ability for that person to get a job so you had this unique opportunity to kind of go earlier than that and the output of your schooling is not for the person to get hired so that's it's a great opportunity and you mentioned on the previous on our previous episode kind of recording that you would use functional concepts to teach students and love for you to take a minute and just explain why functional makes sense as kind of a foundational what starting point you know I think all mainstream programming languages that are used for work in your day to day life they're not optimized for educational purposes that's that's not their focus they're designed to be you know useful after you've already have a lot of expertise in the language and so we can try it you know we can do a pretty good job of teaching these languages to younger students but I think there's always an advantage to if you have the freedom to do so to pick a language that doesn't necessarily have that focus of being a language you use for work that it's something that is optimized for the beginner experience and one of the I think there's multiple right answers multiple ways you can go about this and I often tell people when they just ask me you know what what programming language should I learn I say well learn what you have great resources and access to and and you have a community of people you can talk with about it and learn from and people who can mentor you like those things are so much more important than the actual language but if you can really do whatever you want and you have the the teacher with the right expertise and you're starting the students from a blank slate my favorite way to teach computer science is to start with functional programming to start with a language like like scheme or actually scheme the dialect of scheme called racket has it it's really designed both for programming language researchers is one audience for the but and part of what makes racket interesting for that audience is they racket is designed with a lot of features that make it easy to create your own language within the language so what these what these researchers did once they had racket available to them as a tool is they designed a series of what they call student languages so racket comes with something called beginner student language an intermediate student language an advanced student language and each one gradually adds just the bare minimum of concepts you need to kind of get to the next level and all the error messages and everything are completely tuned to the level that you're working at like one of the problems with using a mainstream you know programming language that's meant for day-to-day work is as a beginner if there's a lot of rookie mistakes that you'll make and you get these really arcane error messages and that's always frustrating when you're learning it's like that one of the best things you can do is have a tool that gives you good useful error messages that help you learn from your mistakes and learn how to fix them and so they've really addressed that by having a language that only has in it the things you're going to know at that level and nothing else yeah yeah and that's really powerful and on top of that I found that the the functional programming is basically the I I have to describe that to people it's kind of the art of building as much of your program as possible out of pure functions and I define a pure function to be something that for a given input or set of inputs it always is going to return the same output it's very consistent it doesn't it doesn't cause side effects or mutation or like its purpose isn't to print something to the screen it's to return a value it's it's something comes in and something comes out and it's very predictable what that relationship is and one of the reasons I really like starting this way with kids is because it allows them to leverage more of their experience that they're getting from math and from their other classes and their other other tools they're being given to reason about things so one example I like to give is you know the statement we often see in regular programming languages x equals x plus one well that might make sense in programming but in math that's a contradiction you can't have x equals x plus one if you're thinking of it as an algebra equation mm-hmm so because you're talking about any quality statement there you're saying both sides of this are you're asserting that they're true right and so there's this this fundamental assignment even though we use an equal sign for it in many languages it's something that's kind of fundamentally different from equality the way we're used to thinking of equality and that can be a really confusing tricky point for beginners the other nice thing about functional programming languages whether there's a few nice things one is that it makes I talked about how the key mind the key mental ability that you need is ability to interpret the program the way the computer is going to well with imperative programs and mainstream programming languages it's a very sequential step-by-step process with a lot of flow control and it's you know exactly the kind of things we exercise in rover control but that that is a tricky point for a lot of people and functional programming languages have a much simpler evaluation model a functional program you can usually think of it as a series of rewriting steps of variables getting replaced by their values and there's no assignment that happens after that like after the replacement happens that that value just kind of flows through the program and the very the variables just always replaced with that value in every instance in the in that function so you can really you can think of it as a very straightforward you know rewriting evaluation process and it there's not as many temporal aspects time aspects where you have to think about the flow of this statement happens before this statement like those those things just don't come up as much in pure functions so it's it's just a simpler evaluation model so if you're trying to teach kids that trick of you know you got to understand how this program is going to be interpreted before you can hope to write it it's an easier model of how this thing is evaluated than the imperative one so that that's one thing I like about it and and probably the final thing is just that it's easier to write components that are testable and isolation testing yeah as professional programmers we've gotten used to the idea that testing is really important and so we try to teach that younger and younger but testing is so much easier when you're dealing with pure functions because you test it with a given set of inputs you get the right output you know it's always going to behave that way and the whole the whole notion of equality between data structures is so much simpler with when they're immutable and aren't using pointers and mutation so it's easier to just build a test structure and compare the output to some other data structure it's just easier to compare to immutable data structures than mutable ones so if you want to teach the kids how to test their own code it's just easier to do that with functional programming so I just I love it as a starting point and then I found that kids who who begin with that they they later they don't have any trouble adding in the mutation stuff later it's just like this becomes this extra spice they sprinkle in where needed because it because it is a more powerful tool mutation lets you do some things that you can't do without it but you learn to use it only when needed and you learn and you you already have these years of experience of writing most of your code in this very clean subset that's easy to test and easy to read and easy to understand easy to verify it's correct and you're only using the mutation only when it's needed whereas people who come the other direction they're kind of used to using mutation everywhere yeah so yeah it becomes something that they have to train and practice with a lot of exercises to try to learn how to restrain themselves from using this powerful tool that that also you know unfortunately has the potential to make the code more fragile and harder to understand if you use it excessively and so learning learning to not use it so much is actually sometimes it's harder to go that other direction thank you so much for listening to today's episode of Developer Tea interview with Mark Engelberg this is part one of two episodes where I'm interviewing Mark. Mark is a very smart individual and I'm really thankful that he spent some time talking with me I'd love for you to go and check out the games that he's creating these puzzle games it's the code series made by ThinkFun but you can find them at a target if you have a target near you you can go in look in the game section and you're going to find them there thank you so much again to Mark and thank you for listening to Developer Teathank you to Lenoid for helping us make it happen in today's episode Lenoid is today's sponsor remember you can get $20 worth of credit on any Lenoid service just by using the code Developer Tea2017 at checkout. Head over to spec.fm slash Lenoid to learn more about what Lenoid can provide to you. Thank you so much for listening to today's episode make sure if you don't want to miss out on the second part of this interview and also on other episodes you know we're doing three episodes a week make sure you go and subscribe in whatever podcasting app you're listening to right now thank you again for listening and until next time enjoy your tea.