WEBVTT

0:00:14.526 --> 0:00:20.365
<v A>Programming Throwdown Episode 83: Teaching Kids to Code. Take it away, Jason!

0:00:21.276 --> 0:02:04.737
<v B>Hey everybody! So something pretty interesting happened. I knocked over a bottle of Coke, and Coke went absolutely everywhere. This was about a week ago. It completely ruined my keyboard that I bought a long time ago. And so I went on Amazon. I found out the keyboards are way cheaper now. I bought a mechanical keyboard. Actually, I don't know, like I bought a mechanical keyboard way back, but either I just forgot or I wasn't paying attention. But basically there's colors for the switches, and the color doesn't just mean because at first I was like Cherry Red, and the keyboard's black; it didn't make any sense. But basically the colors correspond to how the key feels. So if you have Cherry Red, that's the softest setting. Basically the softer the keyboard is—kind of at least in my opinion the better it feels—but the less you're sort of let's say guaranteed to press the button. So you know, if it's really hard and it makes a big kind of click sound, like I think the Blue mechanical switch does. This makes a big kind of click sound when you press that. To me is kind of annoying, but at least it's like, you know, that you press that key. Like there's no in between. So I chose—I think there's Brown, which is in the middle. I chose Cherry Red, and I love it. I think it's great. I mean, I haven't had an issue actually. It took a little bit of getting used to. So you know, in the beginning, like sometimes I wouldn't totally hit the key, but at this point now, like, you know, I haven't had any issues, and I like the way it feels. And so it's a lot cheaper. So that's kind of what I'm typing on right now.

0:02:04.770 --> 0:02:17.039
<v A>I didn't know for a long time about—I guess they're called mechanical keyboards. I thought you know all mechanics all keyboards are mechanical, but apparently I was wrong as always. So most keyboards that aren't last time ever

0:02:17.039 --> 0:02:18.240
<v B>on the show.

0:02:18.240 --> 0:02:38.723
<v A>Most—most keyboards, not like laptop keyboards, but desktop keyboards are, I guess. I call like membrane switches or rubber dome. So it's like a piece of rubber where the bottom of your key has a bit of metal and the PCB underneath has a bit of metal, and when you push down your key, the two pieces of metal touch, and that's what makes the click. And so they're kind of mushy. Yeah.

0:02:38.858 --> 0:02:45.743
<v B>But the reason why they're not touching all the time is just you have this piece of rubber, and so when you're pushing, you're squishing the rubber. Yeah.

0:02:46.047 --> 0:04:29.895
<v A>And I never knew any different, and in fact, I don't think most people do until you go try one of these quote-unquote mechanical keyboards where there's springs and plastic levers and whether or not there's clicking detents or just tactile bump detents. And as Jason said, there's like six or seven different colors, and there's even a community where people open up the switches and change out the springs. So like you can just the weight of the key on your Reds—you could make it heavier, but you really like the Reds, the slidiness of it, and so you could change it to be slightly stiffer or slightly looser in addition to buying a different color to like get it even more customized. And then you can buy like lubricant to sprinkle down in the key so that the keys slide differently. People mod—like take the Reds stem, it's called—and the Blues clicker or something. I don't know what combinations make sense and just really mod it up so you can take it to the extreme. And then you can also with the mechanical keyboards, it tends to be that you can change your keycaps. So I didn't know about this either, but like my keyboard—the cap actually won't come off the key, and so the thing that has the writing on it, the letter or the number, is attached to the keyboard. You can't pull it off, but on the fancier ones you can, and you can buy replacement ones of varying crazy colors, and there's even like a people probably know this, I guess, but there's like artistic keycaps where you can get like little sculpted superheroes or figure eights Rubik's Cubes, whatever, I guess—kinds of things you want, and they can become very expensive, like $75 to $150 per key, per letter. What? No. Yeah, yeah, yeah. It's like it's like an art collecting, like collectible things. Oh my gosh! But then in addition, you

0:04:29.895 --> 0:04:32.219
<v B>can buy 100 and 107 keys or something.

0:04:32.219 --> 0:04:56.642
<v A>Well, so that's the other thing is you can buy key sizes down from 40 keyboards, which is approximately 40 keys, to 60, to the normal—like I think it's 110 keys, is roughly a full-size keyboard, or TKL, which is you drop the numpad stuff off to the right and you end up with about 70 or 80 keys or something. Okay, that makes sense. Yeah. The

0:04:56.642 --> 0:05:00.040
<v B>Some people who are really crazy built their own keyboard.

0:05:00.405 --> 0:05:32.485
<v A>So this is the rabbit hole I went down. So I wanted a split keyboard. So I want a keyboard where the left and right hand you can adjust them. So people make fun of me at work because I don't have like a super weird keyboard by normal standards, but it's split. So I have it kind of far apart sometimes, like as much as like a foot apart. And then like when I eat lunch, for instance, I have my food in the middle and the keyboard on either side of my food—like on both sides. And so that's what I really like, and it prevents you from cheating. Like your right finger can't type on the left side because it's really far away. Oh!

0:05:32.974 --> 0:05:33.801
<v B>That makes

0:05:34.223 --> 0:06:14.571
<v A>Sense. Yeah, so then I learned about this thing called the Dactyl keyboard (D-A-C-T-Y-L), which turns out is like a 3D printed case for you to mount these mechanical switches in that you can just buy off the internet, and then you hand wire the switches together with diodes and into a microcontroller. In this case, I used a variant of an Arduino—a very small Arduino—and you put one in each half, and then the left half talks to the right half over serial across a headphone cable, like a 3.5 millimeter cable. And then you plug the USB cable into the one on the right, and it acts as a USB device to make your letters.

0:06:14.571 --> 0:06:21.810
<v B>Wait, why would you use a headphone cable and not something easier to program, like I don't know Ethernet or something?

0:06:22.080 --> 0:06:32.374
<v A>Well, well. So the headphone cable connects the two halves because it turns out your computer gets confused if you have two keyboards plugged in—like it doesn't work well. So you only plug one [into] computer. Sorry, go ahead.

0:06:32.374 --> 0:06:35.260
<v B>You have to write your own protocol to get well?

0:06:35.378 --> 0:08:33.620
<v A>So there's an open-source project that's pretty popular with DIY keyboard people called QMK. That people use to do most of this programming, and then you specify a key map because the keyboard doesn't know what the letters are. And you can literally arrange them in not infinite but very large variety of key combinations. And so you tell it which key corresponds to what letter, so you can do things like ColeMac or Dvorak keyboards in addition to the normal QWERTY keys. You can also adjust what the thumb down—this one there's thumb clusters, so the letters your thumb can type, and like space and backspace are like on opposite sides on your thumbs. Another popular one is the ErgoDox, which is a keyboard that's similar to this. Anyway, so the amount of customization goes through the roof, and it's actually a pretty big learning curve because there's also layers. So you can sort of have a button that you push, and all of the keys become—that they do something else. And the whole keyboard, you sort of raise up a layer or lower a layer, and then you have modifiers. So like there's no arrow keys, so you might raise up a layer, and then your arrow keys are on the, you know, WASD or I don't know, J-U-K. You just make whatever you want. And so the amount of estimation goes up, and you have to get kind of used to it. So I yeah, I built one of these and was using it for a while, but I couldn't get over the learning curve. So now it sits unused. But interestingly enough, there's—if you look this up, the guy who made it made a video, and if you're into 3D printing, which you talked about a while, there's a thing called OpenSCAD, which is a way to generate the STL, which is sort of the watertight mesh, the triangles that you feed to a 3D printer to 3D print an object. You can describe that from primitives, sort of like if you've ever used what was the name of one of some of the like POV-Ray? Was it one of the ray tracers where you—

0:08:33.620 --> 0:08:56.160
<v A>sort of describe a scene? It's very much like that. And so it's sort of this very simple programming language. So he didn't like that. So what he did was write Enclosure, a way to generate OpenSCAD, which then you run to generate the STLs and then you print. So you can actually like add rows or columns to the keyboard, and the keyboard becomes sort of like programmatically defined.

0:08:56.672 --> 0:09:06.359
<v B>Wow. So you 3D printed the base of the keyboard? You bought a bunch of like keycaps or keys?

0:09:06.966 --> 0:09:08.384
<v A>I guess keycaps. Yeah.

0:09:08.772 --> 0:09:13.180
<v B>And then you bought the mechanical switches, yes, and you soldered it all?

0:09:13.480 --> 0:09:14.678
<v A>Together? Yes, with like wires and...

0:09:14.729 --> 0:09:16.821
<v B>So is this what you use every day? No. So...

0:09:16.889 --> 0:09:21.512
<v A>I couldn't get over the learning curve of it. It was too—it was too custom.

0:09:21.816 --> 0:09:27.739
<v B>I see, but if you had made one that was like so what was hard about it?

0:09:27.739 --> 0:09:42.623
<v A>I don't know. If you look at the pictures, for this one, it's that the things you would normally do kind of like with your pinkies, like the Backspace, Delete, or whatever, and then it has become on your thumbs. So like the Shifts aren't with your pinkies; they become with your thumbs. Yeah. So

0:09:42.994 --> 0:10:26.211
<v B>For people who—are you listening to this? Which is almost everybody. Basically, like imagine, imagine you know if you took a keyboard and you kind of broke it into four pieces. And there's a piece for each of your what's the word for this? There's okay, there's a piece for each of your opposable thumbs—that's two pieces—and then there's a piece for each of your rest of your of each of your hands what's left over. So you have these four pieces and you have these like you know two kind of little squares for your opposable thumbs that kind of hang on to the other, to the rest of the to the either side of the keyboard. Yeah, and I can imagine it's really hard to get used.

0:10:26.717 --> 0:11:42.760
<v A>To. Yeah. So my friend has one of the ErgoDoks, which is the same thing as this but basically like pushed down flat so without the curviness. So if you took this whole thing and like flattened it down, that was pretty popular. He has that one, and it took him probably like two solid weeks, and he was a much better typist than I am. I'm a terrible typist, actually. Is that the right word for that? Oh well. And so he got terrible—it's got good alliteration there. We go! Terrifically terrible typist Patrick was typing terrifically terribly one day, and that sounds like a typing test. Oh, that's right. So it's like Flanda, and it's called the ErgoDock. So he got one of these keyboards; his was pre-made, but you know, he learned to type on it, and it took him solid like two weeks to even become like passable at it. And then he was telling me the other day, he's like, 'Yeah, I think I kind of just want to go back to using a normal keyboard.' Like it's—he still feels like he doesn't—he is not as comfortable to him. Like he still occasionally makes mistakes. So I think it's one of those things that either jives with you or it doesn't, but I don't know how you try it without trying it. You have to have it at your desk, commit to it, try to use it, and then decide if you like it or not. And in this case for me, the experience was fun and having built it, it worked. It was great, and I just didn't end up wanting to use it.

0:11:42.760 --> 0:11:54.670
<v B>Yeah, but I think if you maybe if you built one that was a little bit more traditional, you could use it every day. That's my new project. Would it ever be—would it ever be comfortable enough where you could use it every day? Oh, I think could it ever be comparable to?

0:11:55.446 --> 0:12:01.605
<v A>Yeah, people use the similar, I guess, idea that this Kinesis. There's this Kinesis keyboard which has been—oh yeah.

0:12:01.605 --> 0:12:03.630
<v B>There's a buddy at work who

0:12:03.630 --> 0:12:08.744
<v A>has that? Yeah, I think it's pretty similar to that. I think it's a similar idea. Strain. Yeah. So this

0:12:08.929 --> 0:12:31.280
<v B>would be really cool like if you are a—you know developer—you could totally build your own keyboard with one of these, like you know cheap 3D printers, or you could do the thing where you 3D print it and they mail it to you, and you could bring in your homemade keyboard and do all your development on that. That would be some serious street cred. I mean, that's

0:12:31.280 --> 0:12:35.153
<v A>basically I think this guy has like a video where he talks about this. Yeah. Yeah.

0:12:35.524 --> 0:12:40.502
<v B>It's like if you really need that—that you know promotion at work, you want to find out how to take it to the next level. Jason's

0:12:40.502 --> 0:12:44.029
<v A>contention is this is like instant promotion material. I'm not sure I agree.

0:12:44.198 --> 0:12:58.154
<v B>Instant promotion guaranteed. Oh, your boss just walks by and he's like, uh, you know, turns to your person next to you. You go, 'Hey, did you finish that report?' Blah blah blah. He walks by your desk. He's like, 'Have I given you that promotion yet?' I think.

0:12:58.778 --> 0:13:07.400
<v A>This is how you move from being like, 'Oh, I was a kid who was picked on in high school,' to like, 'Oh, a lot of people at work are like me. Oh, nope, I'm back to being picked on again.'

0:13:12.970 --> 0:13:14.826
<v B>Oh my goodness, I'll have to tell you.

0:13:14.826 --> 0:13:20.631
<v A>One day the time when I sat in a tent at work where I installed a tent over my computer.

0:13:21.002 --> 0:13:27.972
<v B>Monitor. What we have to keep going? Okay, we'll have to do that next show. That sounds bizarre. All right.

0:13:27.972 --> 0:13:42.754
<v A>It was logical, I promise. All right, the Nebraska problem. So, this is an article that's actually quite old from 2014, but the game, The Witness, which was written by—oh, why is his name escaping me? It just escaped.

0:13:42.788 --> 0:13:43.969
<v B>Me. Oh, Jonathan Blum.

0:13:43.969 --> 0:15:11.979
<v A>Thank you. So it's not by him though; that is the guy who made The Witness, but he had like other people helping him. This is by—well, I think it's one of the people who helped him out on it. He worked on it. I haven't dug quite into it: Casey Muratore. But anyway, so for some reason this got linked a while ago and I sort of kept it in my backlog and didn't lose all my bookmarks. And so I had this, and he's going through in this article basically ways of putting down clumps of grass, which you're like, 'Oh, Patrick, why do we care? Like, this is a programming podcast, and we're now how long into the podcast, and we've not talked about programming.' So, he's talking about randomly choosing locations to put down grass. And one of the things he points out, which comes up again and again—which is why I want to talk about this—is that randomness is actually pretty hard. So both for reasons of like we're not going to get into, quantum physics and what is truly random, and that most of the time what we call random is pseudo-random. I'm not talking about that; I mean although those things are interesting and we'd love to talk about them, just from the fact that if you say he wanted to put down clumps of grass, and if you just randomly uniformly sample the space, pseudo-randomly sample the space, you end up with clumps in some areas and gaps in other areas. Which actually, although might be truly random, looks bad. It doesn't look natural because grass doesn't end up being truly randomly distributed that way. And so you have some areas where it's dense and some areas but it's not. So now you need to—there's.

0:15:11.979 --> 0:15:16.292
<v B>There's a natural process where grass is spreading and dying, right? So what?

0:15:16.529 --> 0:17:15.560
<v A>He—yes. And so what he's trying to do is I don't know that he's per se seeking the biological defendable way of grass to be laid out in a field, but he's showing how to do random sampling with what is that called? Like Poisson distribution or something where you're trying to like sample at a set distance away from other plants. So you're more likely to spawn where in an area where there are no plants than in an area with other plants. Yeah, and and then also you could add increase the number of plants per area, like the density in total. But all of this story is to gaps, and he goes down to trying various methods and how to choose, and what he comes up with is—he goes on this deep dive and talks about how he acknowledges this is a deep dive, but it becomes this burning question in his mind. And what he kind of figures out is actually he doesn't want something truly random. What he finds out is that by choosing a pattern which is complex enough but has certain properties, he can get what he wants, which is that when you're looking at it from sort of eye level out towards a horizon, he can get it where there's no gaps and that it's not clear that it's a pattern, but yet it is. And you can use less features, less of these plants, and get the same effect. And all of that to say that his quote unquote random sampling in the end is actually—that he said he doesn't go, he's probably not going to end up implementing it, but that was this; he called it staggered concentric intersections, right? Just sort of like this pattern with certain properties allowed him to cover the space in a way that was actually better than the truly just random distribution. And this comes up and came up actually at work where we kind of ran into this. People were trying to test some stuff, and they were using just truly random tests, but what they were turning out is they weren't getting sort of great coverage, and what they didn't want was a random sampling of the parameters. We actually wanted was.

0:17:15.560 --> 0:17:33.064
<v A>Some sort of preset coverage so you could kind of guarantee that you covered as much of the input space as you can? So given that hey, you're only going to be able to run a hundred tests, how do you pick the hundred tests so that you get the most coverage possible instead of having risks of getting them clumped together?

0:17:33.351 --> 0:17:48.201
<v B>Yeah, that makes sense. So basically like if some input is almost always two or something like that, but it has a range of zero to a hundred, you don't want to waste a lot of time trying things that are way out there. Well, so yeah, that.

0:17:48.201 --> 0:17:49.416
<v A>would be like if you

0:17:49.416 --> 0:17:51.424
<v B>have this grass that's in the middle of nowhere. Yeah.

0:17:51.441 --> 0:18:36.092
<v A>So that would be like the reversing or the other way around is saying like, you know, hey, you want to make sure that this is well behaved, that you get different behavior across zero to 100. But if you just pick 10 random samples, like you're going to get giant gaps most likely versus what you could do is sample, you know, if you have to sample zero to 100, you could do 10, 20, 30, 40, 50, 60. You know, you could evenly space them and at least try to cover more of the area, and the size of the gaps you have is going to be smaller. And so there's a trade here. Without knowing what you're trying to solve, you can't say a priori, you know, hey, it's always better to random or it's somewhere in the middle. You want something that's random-ish, but what you don't want is probably truly random because truly random, you're going to end up with these gaps, these areas that aren't covered. That.

0:18:36.430 --> 0:19:21.115
<v B>Makes sense. Yeah, there's something like this in machine learning. I can't remember the term. Um, I mean, I think it's actually from statistics. It's called pseudo-random, but it's kind of overloading the term. But basically, it's a random number, but you take as a prior the past numbers, and so there's a—there's a penalty for being close to one of the past numbers. And so it's like this biased random number generator where it's more likely to generate a number that's far away from all the numbers it's generated in the past. Yeah, it's meant for like, yeah, like if you had say two dimensions, it'll try to generate a point that's far away from the other points, but then it'll make one random, so it's like a combination of those two.

0:19:21.300 --> 0:19:26.042
<v A>Objectives. Yeah. So anyways, interesting read and random is hard. Yeah, there's

0:19:26.940 --> 0:21:26.600
<v B>lots of random. So if you want to implement pseudo-random numbers, you can do that in PyTorch, and PyTorch 1.0 came out um in the past. I think it was last week or two weeks ago. Um but basically, you know, TensorFlow is super, super popular. A lot of people are using TensorFlow, and TensorFlow is great. Um PyTorch, you know, learned a lot of lessons from TensorFlow, and one of the things that PyTorch does really well is they have an immediate mode, and then they have sort of a static mode. So the idea is, if you remember, like, you know, if you have compiled languages—interpreted languages, right? Compiled languages are generally faster because they can sort of look ahead, see sort of what's going to happen, or you know, they can analyze the entire file, take their time to try to optimize it and do all of that before you run it versus an interpreted, you know, code. In theory, you could be kind of rewriting the code even as you're going along and things like that, so you don't have the same assumptions. And so it's—it's in machine learning, you have sort of a similar concept where you have dynamic computation graphs or static computation graphs. And as you would expect, if you have a static computation graph, it's going to go much faster because um for example, if there's some intermediate result that you're not using—let's say you have, you know, Z equals X plus Y, but you're not printing Z or really doing anything with Z. You just maybe you calculated it by accident or you deleted some other code that was using it. Um it just will skip that line. It says, 'Oh, I don't need Z.' So boom, it's gone, right? Um so that's a pretty extreme example, but even if you know you're writing your code in a way where you're using everything, it's still much, much faster. It'll do all sorts of nice things there. Um but there are times that you need the dynamic graph, so specifically when you're

0:21:26.600 --> 0:22:35.200
<v B>trying to improve a model, like you're trying to have it train and learn and get better. That's when you typically need a dynamic graph because you have to sort of react. It's like let's say the model is really good, so you just want to stop training, right? Or let's say at the beginning of training you want to do something, and then over time you want to like switch to something else, right? So that's when a dynamic graph is really useful. And also, dynamic graph is easier to debug because, you know, because it's dynamic, you can stop it at any time. Um and so you can do all of that and then say, 'Okay, now I'm—I'm good with this. I want to switch to the static graph and get the speed.' I mean, so I think TensorFlow 3, I want to say, is going to have this as well. So, you know, it's one of these things where, you know, everyone's learning from each other. If you have like a huge project in TensorFlow, I probably wouldn't rewrite it. Um but PyTorch is super nice if you're starting from scratch. Uh, you know, PyTorch would definitely be the way to go at least right now, and uh, you know, the 1.0 release came out, which really means that, you know, they have good documentation and all of that. So check it out.

0:22:35.200 --> 0:23:03.156
<v A>Switching gears completely. Don't have a good segue. Is the cosmic ladder. So again, this is not really news, but this was a very interesting thing for me, so I thought I'd share it that um somehow this came up. What were we talking about? Something. And I did some research and found out how do you tell how far away something is in space? So it turns out like a lot of people think they know, and most people don't. So most engineers—well, most people probably don't care to be fair—but

0:23:03.915 --> 0:23:09.974
<v B>Most. Yeah, actually I have no idea. I mean, I guess you have to do it based on the movement, right?

0:23:09.974 --> 0:23:27.000
<v A>Okay. So this is what most engineers end up guessing is that—I'll say what you're saying is parallax, which is if you know that the Earth is moving and you see how things are moving relative to each other, you can, you know, sort of use trigonometry roughly and tell how far away something is. Yeah, right?

0:23:27.372 --> 0:23:28.536
<v B>Sure, but it turns

0:23:28.739 --> 0:25:23.439
<v A>out that only works out to a kind of a certain distance because other things are just—I mean, I think it's like roughly 10 to the 24 miles away or something like it. It basically breaks down, right? You end up with your noise and your measurement is so big that you can't get useful information about how things orders of magnitude further away end up still tiny in your computation. And so the cosmic ladder is a term that has Wikipedia entry and everything, but the link I'll give here is by a person named Terry Tau, and they—I have no idea their pedigree as astronomers, as an astronomer, but they have a pretty cool presentation and PDF and PowerPoint slide about essentially climbing the ladder how that you and it takes you through the history and sort of the techniques. And of at least it was straightforward to understand or make me think I understand how it works about how that you're able to measure things on Earth, figure out how far away the Moon is, for instance. Well, first, how big is the Earth? Like how did they even figure out how big the Earth was once you figure out how big the Earth is, you can make an estimate of how far away the Moon is by sort of measuring various various things. I won't recite because I'll mess them up. Um then as you get better, like now we can tell how big the Moon is because we can use radar systems to measure like how far away it is and reference it to things on the ground, and we get better and we can see how the first initial guess is how close or bad they were. Um then to about a hundred light-years away, you can use what Jason was sort of saying by like movement around the Sun. You can use sort of parallax, but what do you use for things that are like 10 to the 5 light-years away? Um you have to use various fitting techniques to things which

0:25:23.440 --> 0:26:48.623
<v A>You believe have constantness. So if you imagine, and I might mess these up, so as you start going far away, you start saying, 'Hey, it is repeatable that when a supernova occurs, that a supernova has a set brightness.' So if I observe this and this isn't exactly true, I'm waving my hands a lot. If I know a supernova has a set brightness, then if I see a supernova and I measure how bright it is, then I know how far away it is. And so by having a predictive model of how two things like how two binary dwarf stars orbit each other, how fast that should happen, and then by measuring, you know, how far apart they are, how big they are, I can tell how far away they are. You can start to use periods of movement, these kinds of things, to try to guess how far away things are. And essentially talking about how once you can measure things a little further away, then you can use those things to measure the things further away, and you can sort of walk your way up the ladder. To me, it was just like, 'Whoa! I wow, that's never really thought about it that like some of these phenomena are predicted by current physics of occurring in a set way, like things will, and certain stars will implode based on their mass and size, and therefore you can predict their brightness. And as we get better at understanding those predictions, then we can use them to sort of measure how far away they are. Wow, that's amazing.'

0:26:48.623 --> 0:27:52.680
<v B>Don't. If you have that reminds me. Now, I hope this isn't like totally off topic, but I think it's similar. You know how they measure? I always wondered how they measure the weight of really small things, like for example, how do you measure the mass of a quark? Okay? And it turns out it's actually similar. So they—you know, you can't obviously put a quark on a scale or anything like that. But what you can do is you can see what happens when a quark runs into something, and so you can see what happens when it bumps into something bigger than it. And then you can kind of see what happens when those things bump into something else, so on and so forth. And you can walk the—that sort of ladder backwards from something that is, you know, just big enough where you can weigh it, and then looking at how the dynamics change when it collides into something smaller, and you keep walking that ladder down until you get to a quark. And they actually use that same technique as you described to measure the mass of

0:27:52.680 --> 0:28:19.562
<v A>a quark? Okay. Yeah, very so I probably did a terrible job if there's any astronomers in the audience. I'm sorry, but I found this interesting, and it turns out I'm not claiming what I said was more great. You should go read about it. But yeah, so it was surprising to me how much I didn't know about how distances were measured. I guess like Jason was saying, 'I never thought about how you would measure the weight of a quark.' But I guess it makes sense. I guess the mass you measure it by bouncing it off other stuff and seeing how much it affects it.'

0:28:19.900 --> 0:28:20.680
<v B>Yeah, yeah, totally.

0:28:20.997 --> 0:28:22.296
<v A>Yeah, people are probably

0:28:22.296 --> 0:30:20.639
<v B>Groaning. Cool. No, I thought that was actually one of the better, more interesting news stories we've had. So mine is much more straightforward and practical. It's an article on how to develop a boilerplate REST API, and so I actually found this because I was trying to do this, and I've done this before. So I was really just looking for, you know, more recent version of this. And I went through a few of them. I was actually really happy with this one. And basically, you know, I wanted to spin up a really simple website, and I wanted it to—you just have a few calls people would call it with a few different, you know, URLs, and it would just spit back, you know, some JSON data. And so I wanted something very simple that could do that. It was going to talk to a database that, you know, had had data from another program, and I was really interested in that other program. So I want something quick, easy, low maintenance, and whenever I need something like this, I always turn to Express.js. I like it because it's—it's Node.js. It's pretty easy to use if I want to access it from a browser and do some client-side stuff that's also going to be in JavaScript. So that's convenient. And you know, the biggest thing is I wanted it to be kind of ready to go. I basically wanted it to, you know, bootstrap this app and get it to a point where I can just, you know, create a URL handle GET and POST and just put what I need in there and launch it. And this website actually goes into good detail about—you know, there's a thing called—there's actually a binary called Express from the Express.js team, and you pass some commands, some switches to it, and it just builds a whole website from nothing. And it talks about kind of what those switches do, you know, because if you set different ones, your website's gonna look a little different. So yeah, check that out. It's got it kind of

0:30:20.640 --> 0:30:22.581
<v B>covers everything in good detail.

0:30:23.037 --> 0:30:24.994
<v A>So time for Book of

0:30:25.332 --> 0:32:08.877
<v B>The show, Book of the Show. My book of the show is Enlightenment Now by Steven Pinker. It's pretty cool. It covers, as it suggests, the Enlightenment period, and it talks about how it actually kind of frames the current day as a second enlightenment. So I'm not gonna go through the whole book. It's pretty long book. I'm not gonna spoil the ending, although it's a historical book, so you're kind of living the ending. But yeah, the idea is you had the Dark Ages. A lot of, you know, works of knowledge were lost. They were either burned or they—the people carrying them fled out of Europe. And then you talk about the Enlightenment where, you know, all of this knowledge was restored. And really people's perception changed. Actually, one of the things that I found really fascinating is they talk about the difference before and after the Enlightenment in terms of what people believed. So for example, people believed before the Enlightenment that if you let's say killed someone with a knife and you brought that knife, you know, later on, even years later to the body or the grave of the person, that the person would bleed. So in other words, like you kill someone with a knife and two weeks later if you brought the knife to the person's corpse, the corpse would start bleeding, and that's how you could tell, you know, who is guilty, like who did it—like spontaneously bleed. And that was just one thing, but basically, you know, people I mean they believed alchemy, right? That like you could turn metal to gold. Maybe that's true. How

0:32:11.104 --> 0:34:00.606
<v B>I mean, it was supernova maybe or something. But yeah, I mean people believed just unbelievable things. I mean, we've all heard about like that—that maggots, you know, are created in meat, you know, like things like that. And he just lists off all these things that people believed, and they're all just, you know, ridiculous kind of superstition, right? They're just perversions of nature. And then he just says, 'You know, and in 50 or 100 years later, all of that is gone.' Like, like people just, you know, would look at you like you're crazy. Like they would now if you if you said any of these things. And just what an enormous transformation that was. And he's talking—he talks about basically how we've been going through just enormous transformations ever since the Enlightenment. And I thought it was a fascinating book. I'm still about halfway through it. The one thing I'll say is, I don't think Steven Pinker is a good writer. So he has amazing TED Talks. I feel like his writing quality is very poor to be completely honest. There's—I would say in about 10 or 20 percent of the sentences, he puts a string of about eight or ten adjectives. I'm not even okay. It's like, you know, 'We thought that we were in the dark, gloomy, like despot blah blah blah blah blah blah era, but now we're in the blah blah,' and like so many adjectives, and it just—it was almost like just... it became kind of like a joke where I started counting all the adjectives.' So yeah, you know, you have to sort of get past the writing in a sense, but the content, I felt like, was really fascinating. And I would still, you know, even knowing that, I would still read it again, like if I—if I wasn't already halfway through it.

0:34:00.977 --> 0:35:57.972
<v A>my book will probably not enlighten you it's a fiction book the bands of mourning uh which is a brandon sanderson novel who i recommend i feel like i'm on a i think he released a lot of books and i uh have been sort of catching up on them versus a lot of authors i am caught up on so i feel like his name gets brought up a bunch um i it's not that i i wish i had other stuff i've just been reading a lot of uh more parts of series and so since i like brandon sanderson so much and constantly try to tell people how they should read brandon sanderson books um i will say that i've this is the third book in the second trilogy of this sort of like part of his universe so book six or whatever um and i think there's one more in this trilogy which is set sort of at a later date from the first trilogy in this part um but it's a it's in the mistborn series and so uh it's related to those books can't say a lot because it's the sixth book so uh it will just spoil literally everything so i can't talk about it um but if you have not heard me say how amazing brandon sanderson is brandon sanderson is amazing and go read his books uh cool uh the first mistborn is good to start with and uh yeah you i don't know if you want recommendations i'm not on social media but jason can tell me people are asking um but also i mean i think there's plenty of guides just like where to start brandon sanderson i'm also reading the the his stormlight archives is another series he's writing he's a very you say like prolific is that the right word yeah i guess prolific writer he writes a lot like he comes out with a lot of books um and like very big books and i have no idea how other writers which i won't name seem to struggle like getting their series done or coming out with their next book this guy just burns through them i don't i think maybe maybe it's just like a what do you call a like a machine learned

0:35:57.972 --> 0:35:59.862
<v B>writer like he just it's just like

0:35:59.862 --> 0:36:00.587
<v A>a Markov process.

0:36:00.840 --> 0:36:01.860
<v B>And he just...

0:36:01.860 --> 0:36:13.260
<v A>like it's just randomly generating the sentences for him, but he's done. He's like the world's best trainer of a Markov process, and he's just like, yeah, yeah, I don't care if it is. I don't even care.

0:36:13.260 --> 0:36:27.604
<v B>I wonder if what's actually happening is—is he's got a team of people who really help him, and and he is at the, you know, he's orchestrating it, but other people are maybe filling in some of the thematic points or something. I don't know; it could be.

0:36:27.604 --> 0:36:49.795
<v A>I mean, I don't think so. I was trying to think is—I think we were talking about how oh, I thought I knew how to measure how far away stars were. It turns out I didn't. I think if you actually sit down and calculate the amount of time it takes to write even a thousand-page book, like just write the words if you worked on it each day for a few hours—yeah, right? It's not that long. I don't think oh, I thought you were gonna say...

0:36:49.795 --> 0:36:50.369
<v B>It's very long.

0:36:50.760 --> 0:37:01.354
<v A>No, I think it's right. A thousand-page book. How many words are on a page? Like roughly what? Okay, I think do this on the air. I should have come prepared so we'll...

0:37:01.354 --> 0:37:09.480
<v B>say to write 200 words, I think it's gonna take you—I feel like it would take a thousand hours to write a thousand-page book. So it...

0:37:09.480 --> 0:37:16.643
<v A>says it's about 250 to 300 pages per word or per page? 250 words per page. Yeah.

0:37:16.643 --> 0:37:45.027
<v B>So yeah, I would say about a thousand hours just to write it assuming like let's say you were just copying from another book, right? Like what's your words per minute when you type? Oh, really bad. I told you I'm a terrible typist. So let's say your words per minute is—is uh 50, then that would be full five minutes. Yeah, that's not very. Yeah, okay, copying would definitely be faster than that. Okay, well, um yeah, whatever he writes.

0:37:45.027 --> 0:37:45.955
<v A>Really fast? I don't...

0:37:45.955 --> 0:37:54.662
<v B>know how he does it. Yeah, I mean, it's that either way it sounds remarkable that he can get that much done. So yeah, so about five minutes per page? About 5,000 minutes? Is that right? Yeah.

0:37:54.662 --> 0:37:56.384
<v A>5,000 minutes. So yeah, so you

0:37:56.519 --> 0:37:59.927
<v B>could knock it out in a few weeks if you're just.

0:37:59.927 --> 0:38:39.094
<v A>I guess it probably takes him like three—three-ish months, let's say, or whatever. You know, four-ish months to write it if you like write a good solid chunk every day and you know where you're going. And then he can do them in parallel. So if he has people, like you point out, not help him write but help them do the editing, like he writes the rough cut and has a lot of good people to help him proofread and edit it, then you could sort of do two or three books per year. I just think a lot of authors, you know, there's like they do book tours. It's like a whole process getting in a groove. You see this with musicians, like I always think about this. Musicians come out with albums like once every couple years. Yeah, if that, but like how long does it really take to make an album? Like, I mean, I don't.

0:38:39.094 --> 0:38:48.980
<v B>Yeah, I mean, it's basically—it's basically two or three weeks to make the album, but then you know you're on tour playing the same song in every city for two years.

0:38:48.980 --> 0:38:58.860
<v A>But you're—I mean, you're on tour playing the same, but you're only doing that a couple hours a day, right? What's that? I said, uh, you're only playing a couple hours a day for your concerts though.

0:38:58.860 --> 0:39:03.920
<v B>Yeah, right. Yeah, the concerts—you're just you're just reciting. You're not actually making music.

0:39:04.964 --> 0:39:08.524
<v A>Yeah, basically I just don't understand like creative work, I guess.

0:39:08.997 --> 0:39:13.469
<v B>Yeah, it's mind-boggling that somebody can produce that much content. So I mean, meanwhile, I write

0:39:13.469 --> 0:39:15.380
<v A>a few lines of code a day, and

0:39:15.380 --> 0:39:36.824
<v B>that's it maybe? Yeah, when I hear about these indie game developers who do everything themselves, like they do all the art, they write all the dialogue, they do everything themselves. Yeah, it boggles my mind, but I mean, they also take, you know, like—they also take a long time to make the game. That's true, but not

0:39:37.397 --> 0:39:42.561
<v A>always. You ever what was what's the name of that jam? The Code Jam? They do it like in a day?

0:39:42.848 --> 0:39:43.979
<v B>Oh yeah, Loot Them Dare.

0:39:43.979 --> 0:39:48.687
<v A>Some of those games are pretty cool. I mean, they're not like true Triple-A titles, but it's true.

0:39:48.990 --> 0:39:58.140
<v B>They have a good mechanic, and then they can always kind of write the game around that. All right, if you want to read about Brendan Sanderson?

0:39:58.660 --> 0:39:59.740
<v A>Did I say?

0:40:00.077 --> 0:40:26.520
<v B>That Brandon Sanderson, Brandon Sanderson, or Steven Pinker? You can do it on Audible. I actually listen to Enlightenment Now on Audible, and I listen to a couple of other books. I wouldn't really put them as Book of the Show. Um, I was running a bit behind in the sense that I was accumulating some credits on Audible, and so I got a couple of light-hearted books, and so actually, I'll make a Book of the Show next time, but

0:40:26.520 --> 0:40:27.786
<v A>I got a couple of comedy

0:40:27.786 --> 0:40:32.376
<v B>books. I got a couple of serious books, and I've been really doubling down on Audible. It's been a lot of fun.

0:40:32.764 --> 0:40:33.608
<v A>Nice. Yep. Yeah, if

0:40:33.996 --> 0:41:19.035
<v B>you don't want to support us on Audible, if you already have an Audible account or you just want to find a different way to support the show, we are on Patreon. If you donate—I think it's as little as a dollar. I don't think they'll let you donate fractions of a dollar—but no matter what you donate, you get all the benefits. So you get the RSS feed, which is much faster than the default RSS feed; like the download rate is much higher. And you get to be in the raffle, which is coming up. So this Christmas—last Christmas, you know, we gave out, you know, laser-printed programming throwdown logos and some T-shirts. This Christmas, we'll give out some more T-shirts, and we'll have to figure out what we're going to do for

0:41:19.035 --> 0:41:23.322
<v A>for all the Patreon folks. We'll try and do something a little different this year, but

0:41:23.322 --> 0:42:55.259
<v B>yeah, you'll get—you'll get involved in that. You'll be raffled in the raffle for a T-shirt. And you'll definitely—we'll try and get something to everybody. So yeah, check us out on Patreon. Time for, and with that tools of the show. Tools of the Show: my tool of the show is Quip. So Quip is pretty cool if you've ever used a Google Doc and you've done it in a collaborative way where you and someone else are both writing in the same doc, then you basically use Quip. So it's very similar. The big thing about Quip is it's—it's better for kind of let's say group projects, so it has folders. Although I guess now Google Docs has a lot of the same features, but you know Quip is very sort of compartmentalized, so you can have, you know, a whole Quip kind of group for let's say you're working on a book or something like that with a group of people. You can all be in the same sort of Quip server, and it kind of keeps things organized like that. You can share things, you can collaborate. We use it at work. It's—it's actually really nice. And also if you're doing anything sort of private, you can actually host Quip. Like I think it costs money, but you can host Quip yourself. Like you can buy a license and all of that, if you don't use Google Docs like your business or something like that. But yeah, we've been—you know, I use it almost every day, and it works really well. What is your tool of the show?

0:42:56.303 --> 0:43:17.240
<v A>Oh, my tool of the show is a game surprise. Don't do useful. It's Stardew Valley, which has been out for a while, and I think we may have even talked about it. I don't know that it's ever been the Tool of the Show, but we may have talked about it before, but it recently came out on—I believe both iOS and Android. I always mean to look this up, and I forgot. So yes, it is. Oh, really? No way. Uh-huh.

0:43:18.173 --> 0:43:19.169
<v B>Yeah, so iOS.

0:43:19.169 --> 0:43:32.980
<v A>Is out now? Android is coming out. It says cool. So, um, I've been playing this. Android release date is—I'm gonna scan this while we talk. Oh oh, pop over die. So yeah, basically.

0:43:32.980 --> 0:43:49.122
<v B>Stardew Valley is actually one of these games that was created by just one person. Um, they did all the dialogue, they did all the art, everything. Um, but it took that person literally like I think seven years to make that game. Oh wow, unbelievable level of effort. I didn't realize that. Yeah.

0:43:49.392 --> 0:44:04.647
<v A>So, I can't tell if it's out or not on Android. Someone with an Android phone will have to check, but it is on the App Store. I've been playing on my iPad. I don't know how it would play on an iPhone. Um, but on an iPad, it's pretty good. It's one of those things where I always feel I'm just gonna play it for a few more. Oh, there goes an—

0:44:05.069 --> 0:45:07.118
<v B>Hour. Yeah. Well, the thing about Stardew Valley is um, but basically, just a recap is you're kind of like a farmer. Um, but some of the sort of ingredients, more advanced things, you have to go into dangerous places. So you're like a farmer and a soldier at the same time. Um, and the game can only save at night. So basically, you do a bunch of things, and then—and then during the day, you get so tired from doing these things that you have to go to sleep, or—or maybe you don't get that tired, but at nighttime, you're forced to go to sleep. But then it's like the moment the game saves is the moment when you have something to do. It's like, oh, now I have all this energy and the game just saved. Um, and it's like when you don't have any energy and you're really ready to like call it a night, that's when like you can't really save. You have to wait until night's over. So anyways, I'm kind of messing this up, but basically the way they do this save really kind of keeps you playing. It's that's a great hook. Yeah.

0:45:07.489 --> 0:45:47.584
<v A>I mean, I think said another way: when you wake up first thing in the morning, it's a new day, but that means you need to do all the day's chores. Like you have to make sure all your plans are watered. You need to go take care of stuff. So when you have the most energy, you have the most things you need to do. And then by the end of the day, you run out of energy, but you can't get new one without ending the day and having to go spend your energy again. So you can try to cook yourself meals or do other things to restore your energy. But yeah, as Jason's pointing out, mostly you have a set number of things you need to do and then a bunch of the optional things, and turns out it's kind of like real life. Uh, you have more things that you need or want to do during the day than you have energy to do or time to get done. Yeah.

0:45:47.955 --> 0:45:49.930
<v B>I mean, put it another way. I'll take a second. Oh, here.

0:45:49.930 --> 0:45:51.685
<v A>We go—we're gonna just go round.

0:45:52.073 --> 0:45:58.975
<v B>And around the most exciting part of the game happens right after you save. That's maybe the better way of saying what?

0:45:58.975 --> 0:45:59.616
<v A>I was trying—

0:45:59.616 --> 0:46:27.339
<v B>To say earlier. So it's like as soon as you save, as soon as the game saves, you have all these things you need to do and they're all really fulfilling. It's like, oh, I have a plant that—that's ready for a harvest, and I have a new like set of grapes or something like that. It's like the coolest stuff in the game is always right after you save. And so once you've done that cool stuff, then you're kind of stuck until you don't want to waste the rest of the day. So you're stuck until it saves, and then right when it saves, there's something else cool to do. Yeah.

0:46:27.340 --> 0:46:58.814
<v A>So I—I mean, I enjoy there's the new trend which this isn't—this game has been out for a while, but it's just coming to mobile or to iOS and Android. And I don't know how all those are mobile anymore anyways, but um is that it's open world without being too much to do. So there's always something simple you can do. There's enough story where it's trying to push you like, 'Hey, go check this out,' or 'go check that out.' The trend in open-world games seems to be a lot like 'Do anything you want,' and then that just makes me not want to do anything at all.

0:47:00.855 --> 0:47:30.977
<v B>Yeah, that totally makes sense. It's—it's just directed enough. Cool. All right. So on to the topic. The topic is teaching kids to code, and um this is there's a lot going on here actually. We should start—we should preface this by saying you know why we could—why we're an authority on this. Why would you even listen to us talk about this? So don't what that's pretty nihilistic. Nihilistic. Um, thank you. Yeah. So basically um

0:47:31.028 --> 0:47:32.074
<v A>So we.

0:47:32.969 --> 0:48:09.030
<v B>I think relatively different backgrounds. Maybe not that different. So your dad was also a coder? Yes, right? In my case, my dad was an engineer, wasn't really a coder, but my aunt was a Software Engineer. So we definitely both kind of had it in the family, in a sense, and we can talk about I guess how our family got us into coding or at least how our family was part of that. And then now we also have kids. Your kids are probably too young to really do a lot of coding. I mean mine definitely are, but do your kids do any coding?

0:48:09.030 --> 0:48:37.900
<v A>No, so they don't do coding yet. My older daughter has wanted to; she calls it like have computer lessons, but it turns out the thing that you at least I never think about is how much it requires reading. So yeah, if your kids can't actually like read at a significant level, it's pretty hard to get them to sort of do some fundamental things on the computer. So like anytime there's an error message pop up, they don't know what it says.

0:48:37.900 --> 0:48:55.892
<v B>Yeah, exactly. Yeah, so our kids are still too young, but we could talk about I guess that's actually when it's most interesting, right? Because I mean if someone is like 18 or something, then it's—or that's a bad example. Someone's like, I don't know, 14, then maybe it's the same instructions as if they were 18, right? But I.

0:48:55.892 --> 0:50:16.926
<v A>I do say that I think my kids have begun to engage on things where for me like teaching them to code is not so much about like in a programming language but I guess teaching them things which are I guess I take for granted but are not always immediately obvious to people, like describing a sequence of events unambiguously to be done. And so yeah, doing exercises with them where I'm like we're gonna play a game and then trying to have them like let's say what you want done, but then oh wait, what you said was ambiguous and therefore can be executed in lots of ways, or playing, you know, playing board games or What-If experiments with them and having them try to think like why something happened. It's like I know you could just try this or do this in this video game we're playing, but why not? What do you think will happen? Like let's not just go mash the button until the door opens. Like what thing do you think we could do that would open the door in this game? And trying to have them think about like sort of cause and effect when even we're doing other tasks because I think that's something that a lot of gets missed, which is a lot of stuff gets missed, which is people just sort of bang their way through games or playing stuff until it works. But trying to anticipate like if I do this action, that thing's gonna happen. And I guess it's almost about teaching a kid how to debug before teaching them to program, but I spend a lot of time doing that with my kids.

0:50:17.160 --> 0:51:19.532
<v B>Yeah, I mean, I play a lot of board games with my son too. And I think you know my parents also play a lot of board games with me. We used to play Monopoly and stuff like that. And you know the interesting thing about board games is there are some things of board games you can control and there are some things you can't. And I think that as an adult it's kind of obvious, but as a kid I think that that's a really kind of important thing to learn. Like if you know if your parents like always get bad rolls on Monopoly and they end up with no properties and they lose—like you know a lot of kids think their parents are kind of superheroes, right? So it's like where you see your parents fail, you kind of see like oh okay, that was kind of randomness. You know my dad got go to jail three times in a row or something like that, and he's you know frustrated about it or whatever, and then he loses. It's like okay, that was something you couldn't control, but you know not putting houses anywhere, you know, that caused me to lose, and I could just put houses, you know.

0:51:19.785 --> 0:51:21.962
<v A>What I mean sort of like as you said the cause.

0:51:21.962 --> 0:51:37.589
<v B>And effect and also more like the framing, like understanding the where you have sort of control and where things are happening outside of your control and being able to disambiguate those two, like pulling the signal from the noise.

0:51:37.892 --> 0:51:38.888
<v A>Yeah, that makes.

0:51:39.023 --> 0:52:58.032
<v B>Sense. Yeah, I think you know actually we interviewed Mark Ingelberg a while back, and he—people should definitely check that interview out. It was fascinating, but he actually you know made several games and puzzles and things like that. And so that's I think that's a great way to get started is by checking out you know board games. Like when I was a kid, I didn't really know of any—I'm sure they existed, but I didn't really know of any sort of educational board games. We mostly just played, you know, Monopoly. We played sorry, we played just, you know, I guess just adult board games actually. I do remember playing Chutes and Ladders and things like that too. But now, I mean there's—there's games for kids and to some extent games for adults that are that are way better. Like they're they're better balanced; they like kind of teach you more. And so Think Fun, you know, has put out some really fantastic games, and they're actually coming out with I think a couple new games. I saw on their website they're coming out with Potato Pirates, which is a game for like seven and up, and they're coming out with some game called Hacker for 10 and up. Yeah, I haven't had a chance to really play those yet or I don't think they're out yet, but you know there's educational games, I think.

0:52:58.032 --> 0:54:43.163
<v A>Are really nice. So the games that Mark built and like this Robot Turtles and stuff what it taught me is like when playing with my kids, the thing that's interesting is having them learn which at first I didn't get, but when you say go left, they think about like I'm viewing the board, the thing is going to go to my left. And it's like no, it's executing from some other point of view. So like I'm moving this robot forward, so in Robot Turtles there's lots of things—roughly you're describing some sequence of actions you wanted to take, like go straight, rotate left, go straight. And this like when you're in an area and teachers like teaching the kids the context in which something runs, which to me at first was like oh, I don't they're having struggles with this, and this doesn't seem related to programming, but I've come around to actually thinking that programming is about putting yourself in the context of the code running, which is the things around you when you run matter a lot. So if I add one to a number when the number is 10, it becomes 11, not going from zero to one or whatever. You know, like understanding keeping in mind what the current state is. And so like looking at visually at the board and saying hey, the turtle is currently facing to the left. If I have it turn left, it's not going to go to my left; it's going to go down. Yeah, and to me it's like oh, this is this is obvious, right? Like oh, this is easy. But but to a kid, like wrapping yourself up and I need to put myself in his shoes or into the context of where the program is at where it's running, and then having kid be able to walk back to where it went wrong is actually pretty useful. And as Jason pointed out, I mean as far as like becoming an expert on it—I mean TBD we'll see—like I don't know if it'll help my kids because I never played these kind of games growing up, but it is interesting to play them with the kids.

0:54:43.804 --> 0:54:48.360
<v B>What did you do? Because you—if you didn't if you weren't playing board games and then?

0:54:48.529 --> 0:56:18.440
<v A>Yeah, so slightly older than that, but I think once I was in later elementary and early middle school, we had programming books and compilers on my computer. Programming books around the house and compilers on the computer. Um, and so I taught myself sort of how to use QBasic by reading the book. And I like if I had got stuck or had a problem, I'd get my you know dad to help me or whatever, which he would to some extent, although I guess now his mindset was probably like, 'I did this all day; I don't want to come home and do this with my kid.' You know, like I can't blame him. So we didn't do it for like hours upon end, but I would try to make rudimentary like drawing programs in QBasic. Like, oh, I'm gonna make Pac-Man, and I would try to like make the little circle mouth open and close by sort of trying to figure out like, 'Oh, I found some code for drawing a circle. Cool! Now I can like translate the circle.' Like how do I open the circle to like have the mouth like chomp? And I didn't know about sprites or like like so I would like try to find little math equations that would draw it on the board in various ways. And so I would start with that kind of stuff. Um, and then also eventually like when I was in—I guess high school—I learned C. That would have been like 10th and 11th grade, but when I was in middle school mostly like goofing around like on QBasic and trying stuff in that, getting it to you know print funny messages out, make little goofy things, and in middle school actually on my calculator, like I would always program. I guess it was some form of BASIC on the calculator.

0:56:19.384 --> 0:56:20.430
<v B>Oh yeah, TI-BASIC.

0:56:20.430 --> 0:57:04.474
<v A>Yeah, okay. Yeah, yeah, okay. So I like TI-BASIC and I would do um like wrote like a little RPG for myself where I would like you know randomly choose a number and attack monsters. And if you succeed, you would get gold, and if you like got attacked—no way. I did exactly the same thing. I think the like text-based adventure is like just interesting enough without running into like becoming too complicated too fast where you have spaghetti code and you can't manage the sort of game state. And so I think it makes a lot of sense. And so yeah, I would program then the if you beat the final—I think there was like 10 bad guys—it would draw little animated fireworks on the screen by drawing random line segments and connecting them. Nice! That's awesome. Yeah, I mean.

0:57:04.744 --> 0:57:44.687
<v B>I have a somewhat similar story. Like um yeah, as I said my parents weren't like software engineers or anything like that, so they couldn't really—there wasn't really any resources like that. But I did get a uh I got an Atari 800 and it came with this program called Delta Drawing that was basically turtle graphics. So you have a little arrow, and you could you know draw forward, you could turn right, turn left, and it kind of taught me about like egocentric um you know movement and all of that. And uh the Delta Drawing book had a bunch of recipes, so I would just punch in like literally what it said and hit go, and then I'd get a car or something like that.

0:57:45.143 --> 0:57:46.037
<v A>It's amazing drawing that.

0:57:46.037 --> 0:58:03.030
<v B>Like I could never make by myself, but if I just follow the recipe, you know it would make a car. And then also like when you messed up in the recipe, you know you'd get like a car, but the wheel would be just totally in the wrong place, and so you could kind of look and see, 'Oh, this is what I did wrong.'

0:58:03.030 --> 0:58:05.663
<v A>And this is how it affected the car. You know. Um, so.

0:58:06.500 --> 0:58:52.913
<v B>Yeah, I kind of uh got really into Delta Drawing and uh doing a lot of that. Um yeah, my aunt was was a software engineer, and she got me a computer and uh kind of walked me through BASIC and things like that. I ended up—I don't think I did too much with BASIC. Um oh, I made a I made a game that my cousins and I played where um it was called arm wrestling, and basically you had to hit the space bar so many times per second or maybe it was per 10 seconds or something, and every time you pass that threshold—so every 10 seconds you pass the threshold—you started winning. And if you did, if you won three in a row, then you won the arm wrestling, and uh we broke the space bar on the keyboard.

0:58:52.913 --> 0:58:55.343
<v A>Oh, that's pretty cool, and then you broke.

0:58:55.343 --> 0:59:41.007
<v B>yeah and this was back like you know at the atari where the keyboard was like uh basically you couldn't detach it or anything so we basically broke the atari with that game um and uh uh you know i ended up not being that big a deal but it was kind of goofy but yeah i actually didn't get into coding until much much later um so yeah around like mid high school that's when uh i took a course i took the computer science course and they taught us um c but uh yeah there was a huge gap where i wasn't really doing any coding but i was always really into board games and um just yeah i just played a ton of board games and did a lot of reading um uh you know like like not reading but like like uh puzzle books and things like that yeah i

0:59:41.294 --> 1:00:40.727
<v A>mean i feel like at least between us it's pretty similar and i actually think that's a common thing which is there's a certain maturity of certain amount of breadth of skills you need to have before you can sit down and write we've talked about this on the program but like write computers so like write computer programs so if you say i want to build a 3d graphics game well you're going to have to know like enough trigonometry and geometry to be able to do like 3d computation that's pretty high bar actually yeah and so like that's really tough but having a kid be introduced to like late elementary middle school so i guess for people not in the states i'd be like you know 10 years old i think you can start to introduce kids into like what loops are and printing your name but i don't think they're going to engage at the level of building large amounts of software because i think it just takes focus now of course it could be an exception where like you probably don't need any help and you become like a contributor to linux kernel at like 10 sure yeah there's always

1:00:41.031 --> 1:00:42.719
<v B>like savants yeah but i mean

1:00:42.719 --> 1:01:54.454
<v A>I think for the most part, like teaching a kid to code is about keeping them in that mindset of, like Jason was pointing out, breaking it but trying to understand why it broke. If you just succeed by randomly trying, I don't find that doesn't seem like a good way to kind of progress. So now it's not that there aren't times when it's called for, just like trying random things until it works. Like I know there's an off-by-one error here somewhere, but for the most part, thinking through the code and anticipating what it's going to do seems to benefit me more. And I think as Jason was pointing out, those are skills you learn by playing board games, by, you know, doing scientific pursuits and activities, and even the scientific method to some extent, right? Like predicting what's going to happen, trying to say how would I test whether this is true or not? I think having those kinds of approaches are actually enormously beneficial. And so when you say, you know, kind of teaching kids to program or teaching kids to code, I actually think it's about not so much what language do you teach them, but about these kind of underlying concepts. Getting into intricacies of a type system is probably not super engaging to a nine-year-old. Yeah, right. Yeah.

1:01:55.602 --> 1:03:39.299
<v B>Mean, I think another sort of line to walk—one thing where it gets kind of difficult is when you want to help, but then you can't help too much. Yes. So it's like, yeah, sometimes, you know, we had this game where you just build train tracks and then you could put a train down the track. The train goes on the tracks, and it's—it's a simple idea. It's just like you're dragging tracks and you're laying them down on these tiles, but the thing is the tracks have to sort of line up, right? So I mean, if you have like if you wanted to, if you had a train that was going—let's say west to east—you couldn't just put a track that's going south to north. Like you have to have one of the curvy tracks; it has to be contiguous, right? And we got this game like about a year or two ago, and so even my son was maybe like three, and he just found it really frustrating. And you know, if I just left it like to do it, he just would have given up. But I stayed with him, and like, you know, I made the tracks and things like that, and so he couldn't really make any mistakes because I felt like it was just—it was just too far advanced. But then now he just does it on his own totally. So it's like it's really hard to sort of strike that balance between like you want them to make mistakes, but then you don't want them to lose interest either or get really frustrated or whatever that is. I think with kids especially, it's like a very difficult line to walk. But yeah, I mean, well, that's—I think that's true probably for anything, but especially something like coding if you want to get them to something kind of like that's pretty advanced. It's really hard to have that sort of those stepping.

1:03:39.300 --> 1:04:08.745
<v A>So if you have a kid who you think is ready to actually learn a programming language instead of a computer and type, and what would you do? What language would you use? Would you do a web something? Would you do Python non-web like interactive? Like both of you and I described something that was—I mean, we're maybe a little predating the web. But this sort of interactive console graphics getting used to how to deal with that—not console graphics, but just like a text input and back and forth. I mean, do you think that's the

1:04:08.745 --> 1:05:17.899
<v B>way to go? No. I mean, so I actually now that I remember—you know, I totally forgot about this until just now—but there was something, I think it was called like HyperText or something like that, but basically it was meant for presentations. Think of it as like basically PowerPoint, but there was sort of logic. So like in PowerPoint, you know, you can have animations; you press the button and you go to the next slide, but it actually just slides in some text and things like that. So this was like, you know, it was actually meant for giving really interesting kind of kiosk-type presentations, like interactive presentations. And so it had some very basic branching and things like that. But the nice thing about it was it was all graphical. I mean, think of like just PowerPoint, okay? You're not writing any code or anything. And so I think something like that. So we actually have something called a KODI—K-O-D-I—and um has this graphical programming language where you just kind of drag and drop little modules and stitch them together. I feel like that's probably the best way to start. I probably wouldn't start by typing on the keyboard, especially nowadays with iPads and all of that.

1:05:18.675 --> 1:05:57.340
<v A>Sure. So I've tried these like there's some coding games and I've had my kids play those on the iPad where you know tell a person right, right jump, right, you know, and those trick pretty good. And I know Apple made these Swift Playgrounds which I tried. I thought they were kind of interesting, but they're still a little premature for kids. But I think that's—those seem really well done, and I think actually like as goofy as it sounds having something where there's graphical interaction and also like good documentation so it's well thought through what's supposed to happen because a lot of times when I would do examples or coding questions there's enough ambiguity where there's frustration about what you're supposed to do to progress forward.

1:05:57.340 --> 1:07:56.035
<v B>Yep. Yeah. I played one—my son and I played one on the iPad called Codable, and basically you're this little fuzzball, and it's—it's basically like Turtle Graphics. So you say, 'You know, go right, go up, go right, go up.' You have to kind of plan it all in advance, and then when you hit go, it executes that. And then you can kind of see like, oh shoot, you know, I wasn't supposed to go up twice or whatever. But yeah, those—I think those games are really where it's at. I would probably stay away from as Patrick said, like you know, as soon as you get into real coding, you have to do a lot of reading. And even if you're, you know, even once you know our kids could read, you know, at adult level and all that, it's still pretty taxing, you know, until you become a teenager. It's probably pretty exhausting to read because you have to really think hard about it. It's not like as unconscious as it is for, you know, an adult. And so a lot of these graphical things are really the way to go. But I guess like the high level here is just to get kids into logic. So there's—you know, there's these board games, you know, that teach like strategy and all of that. There's these apps, there's visual programming languages, and they all kind of teach the basics around sort of logic, around understanding sort of cause and effect, you know? Like did you lose three times in a row just randomness, like if you're playing Chutes and Ladders and you lose, you can't really say, 'Oh, I wish I could have done things differently.' But even just knowing and understanding that the game is just completely random—that by in and of itself is a good lesson. Like just understanding that, you know, you're following this process but you have no control. It's really just about understanding the game versus, you know, I don't know Monopoly or something where you have a lot of control. There's a lot of things you can do and the things you do matter. I think that—getting kids to understand that is is

1:07:56.035 --> 1:08:04.506
<v A>really important. That makes sense. Yeah, I guess this wasn't so much a like strict curriculum on how to teach kids to code, but I'm not sure that one exists. Yeah.

1:08:04.725 --> 1:09:13.639
<v B>Mean, honestly, you know, and where we live, you know, we've talked about this Patrick, and I live in the Valley, and um yeah, the—I don't know about you, but we have so many of these coding camps in my neighborhood. There's literally eight coding camps on this one street. So if I go, you know, a couple blocks from my house, it puts me on this pretty main road, and there's eight coding camps. And I just don't—yeah, I think that's not the way to go. I mean, I think it's—it's one of these things that it's very—it's a deceptive goal. Like if you start marching towards the goal, I don't think you actually get there. I think actually you could sort of stunt the growth. I feel like the coding really comes like after someone has already understood a lot more fundamental stuff. And and of course, there's always savants who made their first app when they're 12 years old and things like that, but I think in general, like, you know, jumping straight into Python or something like that might actually distract from the overall goal, which is really to build a foundation in like logic and causality.

1:09:14.132 --> 1:09:17.963
<v A>I think I agree. Yeah. So if anyone has any cool resources,

1:09:17.963 --> 1:10:06.276
<v B>So just to recap real quick, you know, I think board games are really solid. I think there's a bunch of really cool apps, there's all sorts of visual programming languages. Just to list a few, I mean, there's Scratch, there's Logo, um there's an app called ScratchJr which is like a limited version of Scratch, but you know you can find out if you look up 'visual programming languages for kids.' You'll find a ton of these in every possible conceivable OS. Um and then you know, you want to balance between being frustrated and, you know, just giving away all the answers, right? So as a parent that's a—that's a challenge. As a guardian that's a challenge. But yeah, I think that's—that's basically the high level of it, and don't just, you know, hand a five-year-old a C book because that's not gonna work well.

1:10:06.884 --> 1:10:10.630
<v A>Maybe do it one time to see if you have a savant, and then yeah, then don't. Yeah.

1:10:10.984 --> 1:11:15.025
<v B>I mean, if they ask you—if they say, 'Hey, you know, this is pretty cool, but I really want to learn Assembly.' Well, then you know go for it. Yeah. Oh, the other thing actually, just one other thing I thought of is, you know, I've been doing and I think you also fit this category. We do a lot of robotic stuff, and in general, if you do anything related to coding or anything related to—I don't know building anything, yeah, just find a way to get your kids involved. We've been doing—I've been doing a lot of robotics things, and you know my son doesn't have the attention span for it, but what I did is I got a buddy of mine to do it too. And so when there's two of us and two kids, then it's like, you know, the kids can kind of chase each other a bit or, you know, when they do pay attention, we're there. Um and or we could take turns, like I can keep the two kids from, you know, stepping on nails while, you know, my friend does some work on the robot, and then we can switch. So that also worked out pretty well. Um but yeah, did your dad ever get you involved in any of his side projects or anything?

1:11:15.025 --> 1:11:28.964
<v A>Like that. So my dad never really had side projects like that, but I mean when we would do science fair each year or whatever—I don't know if that's the other thing—but we would have to do a science project, and he would always get involved with us, doing those experiments and helping us. And yeah, I guess we did.

1:11:28.964 --> 1:12:13.460
<v B>Do stuff sometimes. Yeah, yeah, my dad, you know, did a lot of. He's a mechanical, you know, engineer, so he did a lot of mechanical stuff, and he'd always have me like help him like set up pulleys and stuff like that in the house—wait, set up pulleys in the house? That sounds like... Yeah, I mean, in the garage. In the garage. But yeah, he literally had this whole pulley system, and it's pretty wild. I mean, he would be able to pull like boats. He had boats like just attached to the roof of the ceiling of the garage, so like you would just park the car under a huge boat, and there was this like crazy pulley system which gives you all this mechanical advantage, but you have to turn a winch like a hundred times to get this boat to go up, you know, four feet. So he just had all these crazy things that sound pretty cool.

1:12:14.172 --> 1:12:15.555
<v A>Actually? Do you have pictures? You guys seem...

1:12:16.770 --> 1:12:22.460
<v B>Like, you just have pictures? Yeah, I gotta send you a picture of my dad's garage. I'll ask him to take a picture. We could put it on the blog.

1:12:22.460 --> 1:12:25.799
<v A>Yeah, yeah. Give me famous internet famous internet.

1:12:26.288 --> 1:12:28.220
<v B>Points. That's right. Cool. Catch you later.

1:12:32.363 --> 1:13:03.240
<v B>The intro music is Axo by Binar Pilot. Programming Throwdown is distributed under a Creative Commons Attribution-ShareAlike 2.0 license. You're free to share, copy, distribute, transmit the work, to remix, adapt the work, but you must provide attribution to Patrick and I, and ShareAlike in kind. That's right. Thank you.

