The Modern .NET Show

Episode 96 - The Programmer's Brain with Felienne Hermans

Embedded Player

Episode 96 - The Programmer’s Brain with Felienne Hermans
The .NET Core Podcast

Episode 96 - The Programmer's Brain with Felienne Hermans

Supporting The Show

If this episode was interesting or useful to you, please consider supporting the show with one of the above options.

Episode Transcription

Hello everyone and welcome to THE .NET Core Podcast. An award-winning podcast where we reach into the core of the .NET technology stack and, with the help of the .NET community, present you with the information that you need in order to grok the many moving parts of one of the biggest cross-platform, multi-application frameworks on the planet.

I am your host, Jamie “GaProgMan” Taylor. In this episode I talked with Felienne Hermans about her book The Programmer’s Brain. This was a slight departure for the normal content of the show, as I feel that the knowledge found in Felienne’s book is rather important to all developers who want to learn new things - which, let’s face it, is what we do on a daily basis.

Along the way, we talked about how learning works, how our brains work with prior knowledge and context to solve new problems, and how IDEs should really allow us developers to make annotations without affecting the code base itself. We also discussed both Heady (a programming language for students in the 11-16 year old range), and Felienne’s Code Reading Club.

So let’s sit back, open up a terminal, type in dotnet new podcast and let the show begin.

The following is a machine transcription, as such there may be subtle errors. If you would like to help to fix this transcription, please see this GitHub repository

Jamie

So the first thing I’d like to say Felienne is thank you ever so much for agreeing to be on the show. I know that we’re not really going to talk about dotnet and C Sharp today. But I figured that is a skill that I think all developers should have, we should all know a little bit about how our brains work. And how we learn stuff, even if we each have slightly different ways of learning is important to know the fundamentals, as this will help to boost your learning and help you to write code for other developers. And I often say that, “as soon as you hit save, you are a different developer,” you might not be able to remember or understand the problem from a few minutes ago, as soon as you hit that Save button.

So I’d like to say, thank you so much for being on the show. And well, welcome to the show, by the way. Would you mind giving us a bit of introduction to yourself for some of the work that you do?

Felienne

Yeah, of course, thanks for having me on the show. My name is Felienne Hermans, and my main job is that I’m an associate professor at Leiden University in Netherlands where I research how people learn programming. And in addition to that, I also teach in high school myself, and in the teachers school, so I also help prospective teachers to be computer science teachers in high school in the future.

Jamie

That’s that’s a lot. I mean, I just write business line applications that feed something into a database, get something out of a database, and then put it back in, right. That’s all I do. You’re doing loads of stuff.

Felienne

Yeah, I guess it’s true.

Jamie

Oh, my goodness. Okay. So one of the things that we’re going to talk about is a book that you released, I believe it was 2021 that it came out.

Felienne

Yep

Jamie

I heard about it in 2021. And it’s called the programmers brain. And it’s all about how your brain works, right? And I feel like it’s not necessarily that us programmers, our brains work differently to everyone else, we have a certain flavour that makes things maybe a little bit more logical. But everyone’s brain on a fundamental level works the same way. Right?

Felienne

Yeah, sure

Jamie

But when it comes to learning, right, we all take information in we store it somehow. And then when we need it, we pull it back from long term memory. Right? That’s, that’s what I knew going into the book.

Felienne

Yes. That’s kinda correct.

Jamie

Okay, excellent. Um, so. So. I mean, is that the way that it works? Or is there a is like, how, how does the information jump off of the screen into - now I’m assuming that I’m talking about a person who can see right - How does information when I look at a screen, it jumps off the screen into my eyes, some magic happens, and then I remember it two weeks later; what’s that all about?

Felienne

Yeah, so there’s some basic building blocks in between. Firstly, information is stored, well first is your sensory memory. So this can be through your eyes or through your ears, if some people also listen to code, if they don’t have a vision well enough to read both with our eyes. And then this is a little bit like, like an I/O buffer. So very briefly, your senses store information. And already there’s some information that is lost. So not even all information that you see and hear goes into your brain, because otherwise it will be very overwhelming with all the sounds and colours around you.

Then the first thing happens is the information then from the sensory memory goes to the short term memory. And this is also a bit like a buffer, also a very short buffer. So the information can live there for a few seconds. And only very limited pieces of information can be stored in your short term memory. Some of this information might then travel on to your long term memory. So some of the things that you might look at, you might remember. Like I might remember your name, or the fact that I was on a podcast this morning. Some information is stored to me, but maybe I get 100 emails. And you know, some of them I might forget about they will not go into my long term memory. And in many things that influence what what goes into your long term memory, something is very special, very important to you. If you can read an angry email, more likely that it will be remembered because there’s emotions associated with it.

So one thing that is important to remember is that which we sometimes forget, I think as programmers is that it is not enough to see something once than it isn’t necessarily always stored in your long term memory. And I do struggle with that myself still in teaching students, right? It’s like, “teacher, how does a while loop work?” I’m like, “well, I explained this to you once two weeks ago. How do you remember that well?” Sometimes it takes a bit of time.

Jamie

So what I’m getting, I mean, this is a jokey aside. But what I’m getting from that is, the angrier I am when I’m reading code, the more chance is kind of going in, because there’s an emotion involved.

Felienne

Yes, but it also could be another emotion because we like happiness, trust or something that you enjoy a bit more but I mean, it is true. If there’s code that you really struggle with to understand, and it takes you a long time you’re like, “oh, this was really hard,” then there is maybe a bigger likelihood that you will remember. Although it might also be the case that you remember the emotion but most things you learn.

Jamie

Sure, sure, I can I can attest to that as an allegorical story. Yeah, there have been plenty of times when I’ve been looking at some code that’s maybe intentionally obfuscated, maybe the original author is trying to be really clever and said, “hey, I can do this in one line,” and it’s actually across 15 lines in the IDE - it’s a single statement, but it’s 15 lines long. And you know, that, I then get angry, and I can’t, I can’t understand what’s going on. So I, I can, I can, I can attest to that. Because all you’re going to remember is the emotion, right.

Felienne

Yeah.

Jamie

You’re going to see the piece of code and you’re going to be like, “this is the piece of code that made me angry last time.” You’re not going to remember, “this is a piece of code that does that really clever thing. But a really horrible way.”

Felienne

Yeah. Especially if code is very difficult. So there’s also a part of the brain that we didn’t talk about yet, which is the working memory. So your working memory is a little bit like the processor in your brain that’s really processes information. So the busier your working memory is with something, the harder it can be to remember something. So if you are really struggling with code, and your brain is very much focused on, “what is going on here?” then your working memory is so full, so overloaded, that it doesn’t have enough space left, so to say, to actually source something for your long term memory. So sometimes it can also be this code that you really struggled with the most - independent of whether or not the made you angry or happy - code that is really difficult to understand will then also be difficult to remember, because your brain was very much focused on what is going on, and did not have enough room left to actually remember something. So sometimes you had this go through like, “oh, I remembered it was really hard. I remember struggling with this in the past, but I don’t remember what the outcome was.” And this is because you’re working memory was working too hard. And it didn’t give you space to save.

Jamie

Okay, excellent. So what you’re saying is: I shouldn’t work too hard. That’s what you say, right? Don’t want too hard, Jamie.

Felienne

Yes, yeah. So if you feel that something is really hard. And you also want to remember, sometimes you do something as a one on one time, you dive into a library, and you figure out how to do it, you do it, and then you’re done. But if you realise that this is something that you want to do more often - code that you will interact with more often - it is a good idea to not neccessarily work hard, because remembering the thing is also hard. But to slow down and to try to deliberately write down to things you found, even though in the moment you might think, “oh, I have no time for this. No, I want to understand.” So do try to take a bit of room a bit of a breather, and like, “okay, so what is it I’ve done so far, let me write this down.” Well, then you can also commit this to documentation, but also just the act of stopping and giving your working memory a little but of time to catch up that will help him.

Jamie

I see, that’s, that’s really interesting to me, because some of the some of the junior developers that I’ve worked with - and I fell into this trap when I was a lot younger myself - would be, “I have the computer, I have the keyboard, I have the mouse, that’s all I need. I will just type type, type, type, type type, and eventually the programme will work.” Whereas what I what I found myself doing these days, and I think it’s, it’s very different to something that you mentioned in the book that I’d like to talk about in a minute, is I’ll have a piece of paper, or if I’m a little bit more worried about the environment, I have a tablet that I can write on. And I just write down things like, “what do I need to do? What can I see right now? What is it that I think the code does,” right? And then I start to answer those questions as I’m looking through the code, rather than trying to do it all at once in my head. I actually think, “what is the code doing? What do I need it to do? What do I have? What do I, like, what is the inputs into this system, this method, this function? And what is the expected output? And how do I get from A to B?” Rather than just going , “right, okay. Type type type type type.” And then hopefully it works.

Felienne

Yeah. And I think this is this the your first sort of intuition or the intuition of young developers to just type a lot, I think this is not something that magically happens. This is partly also due to the way we teach in university, right? Because what do you do in university, you get a prompt like, “oh, you have to write code that,” I don’t know, “prints all prime numbers up to certain thresholds,” or “calculate the square area or something.” And so it’s always very focused on writing code, there’s not a course in university that is reading code and debugging or, “here’s a library someone wrote 20 years ago, figure out what’s there,” or, “decide if this is a library you want to use.” These are not really skills that we practice. So it’s sort of it’s reasonable in an undergrad programme or three or four or five years, students are writing posts all the time, then they think, “okay, this is a job, this literally is a job.”

Jamie

Absolutely. And I wonder if that’s, I think we’ve, we’ve kind of discussed this on a on a well - I say we, right - my co hosts and I have discussed this on a different show before about the differences between academic study of programming and the real world, right. And there is there is a, there is a difference. And I think, perhaps, because in academia, you have a semester, which is, what, 12 weeks, 13 weeks, maybe two semesters, to teach someone enough of something so that they can go out into the real world and do it. And, you know, as much as programming is, the act of programming is different to the act of building an application or, or something like that, right? Because programming, you sit down and you turn your - this is my understanding, right; this this may not be everyone’s understanding, it may not be the academic understanding may not even be your understanding or anyone else’s. My understanding of programming is turning a, a set of rules into some syntax for a computer to run through. The act of building an application is partially programming, mostly debugging, and mostly reading other people’s code and glueing bits together, right?

Felienne

Yes. And also, of course, in university, we don’t emphasise teamwork that much. So there might be a lot of programming courses in which we asks to this individual work. And then maybe here and there, there’s something like software engineering course, in which you work as a team. But programming as a team, programming is also different than developing software together with different people, which almost everyone works with other people in open source or in companies. But that’s also not really a skill that we we practice how to write something so that you can reasonably expect other people to read it, what types of other people’s might might go base attracts what type of juniors are rehiring? You know, did they learn us? How did they learn JavaScript? or Java? Or C? What is their prior knowledge that we should expect for people to join?

Jamie

And I think, I think that’s, I think that’s, again, I think it’s required, because in any university setting in a schooling setting, in a code camp setting, wherever you’re learning, you only have a certain amount of time to teach as much as possible, right? Yeah. And I remember, when I was at university, one of my lecturers was teaching a C sharp, but was using the command line and notepad. And so every every lecture was kind of like watching, like, these days, it would be Twitch, right? What he was doing, he was doing live streaming, but he wasn’t doing it, he was doing it inside of a lecture theatre. What he do is, plug his laptop in, bring it up on the screen, do go into the command line, do notepad, and then some file.cs type has come down with the font set to a million or whatever. And then do C SC, which is the C sharp compiler at the command line, pass in the name of the source file, and it would build and he would say to is I’m not going to teach you Visual Studio, because you’re not learning Visual Studio, you’re learning programming. And I think that was a that was a key difference. For me, that was a big differentiator. He didn’t, he didn’t spend time showing us how to use Visual Studio or how to use any of the tools that were available that were visual that were the full ID tool set, because he was teaching us how to Bubblesort teaching us how to insert sort teaching us how to write to the screen, none of none of that is has a requirement on these tools. But it was there. They’re nice to have, right? Where he was focusing all of his time and attention on notepad works. The compiler works, I’m just going to do those two, because obviously, there’s updates for things all the time, right. And he could walk into a lecture and everything’s broken.

Felienne

Yeah. And this is actually a really nice teaching strategy. So I’m not sure I agree with no personal training tools. I think I don’t agree there. But I do agree with showing the act of programming as a teacher rather than just having slides with code because in avoidable probably your professor also made sciples Right this happens or he makes up two or three variable names. This is just a thing that happens look, oh, no, I meant the other Paragon especially with no bad without those cookies. And this is very valuable actually. So students see oh, you know, this is what an error message looks like. This is what might be the root cause if I see this error message, oh, experienced programmers, they still forget semicolons so does x have Yeah, but you know, sometimes see on Twitch that, like live programming as as a as a short, almost an excess of performance. That is a very veiled way of teaching.

Jamie

Absolutely. And I think like he says it was a lot. So there were other lecturers who would bring in slides of code samples. And it would be so here is the code sample for yes. And opening a socket and sending. Yeah, right. And at that point, I don’t wish to be to be offensive to that lecturer. Nobody’s paying attention, right? If you’re forcing the everyone in the lecture theatre to read something that is 75 lines, lines long on a single slide, or split across two slides, no one’s paying attention, because different people read at different speeds, as you were saying, people have working memory that works at different speeds. And so if I’m struggling to follow along, and then the slide switches, I’ve, I’ve lost that working memory of, I’ve lost the context of what was on the first code sample. Did anyone write that down? No, no one wrote that down. Because we’re all we’re all at university, we’re all 18. We don’t we’re not thinking that we need to copy this down. Because we don’t know that, you know, that we’re going to get copies of the slides. Or even worse, if if A and this is, from my perspective, my opinion, if a lecturer gives that hands out the slides beforehand, why do I need to go to the lecture? Because I could just sit and read the slides, right? Because a lot of people fall into that trap of putting a million points on the slide, and just standing there and saying, So slide one says, point one is, and the compiler takes the code and produces object code, instead of actually using it as a prompt to remind them of what to say, it’s all there on the slide. So I don’t have to be at the theatre or the lecture theatre, because I could just read the slides, right?

Felienne

Yeah, even if like imagine slides would be perfectly executed, and everyone pay attention, this is possible. And then still, you wouldn’t teach something like error messages or making a typo, right? Unless you also put that on the screen. But then it’s not all the slides, it’s not so authentic, very authentic, to see a teacher be confused in front of the classroom, and see their solutions to that process of getting out of confusion. That’s really something you get from live coding, and you don’t get him slides.

Jamie

Absolutely. You know, the, when a when someone is teaching someone else and provides a perfect example of this is what it looks like when you do so let’s, let’s step outside of programming, right? Let’s say you’re going to learn to drive and your driving instructor says okay, so we turn the key, and the engine starts, we put it into gear, assuming a manual transmission, take the parking brake off, and press on the accelerator and we start going. That’s brilliant. But what if the car engine stalls when you turn it on? If you don’t know what that means? You have no idea of how to get out of that situation. And if if that if the car genuinely stalls, whilst the instructor is showing you, you then get an insight into how to get out of that situation. I don’t know if automatic transmission can stall but as an example, right? Yes. Okay. And that that sort of debugging process is, I feel almost as important as the programming, right? Because without wanting to sound horrible, it doesn’t take comparing the debugging to learning syntax. I feel like debugging is harder for most people, not for everyone, but for most people than actually learning the syntax, right? Because you given enough time, you can learn the syntax. You can’t learn debugging, just by looking at the code, right? You need to actually get as it will get your hands dirty, get your out, you get to get into up to your elbows in the problem and figure out, right, okay, maybe is a missing semicolon, like you said, or maybe, maybe I’ve put a typo in here, or maybe the variable doesn’t exist, that kind of thing.

Felienne

Yeah, so So I do agree that this isn’t something you have to do. But I think what we sometimes mean by that maybe not you haven’t read my book, but other people is that this is the only way and the only act that you do while learning debugging. And there I think we might not be right. So as with syntax, you have to know where you can semicolon with debugging. There’s also strategies that you can know about. And I never, I was never told any of this. I figured out all of this vibrant out by myself and with friends at university strategies like oh, if God isn’t working and aligned gives an arrow out or you can comment that line out. You just do two slashes there or pounds, whatever. Language three, you can temporarily disable a certain line of code, and you can do that with it with a comment. And many IDE have a shortcut to do that. You know, I still see students in every line like we did put upon time, and I do this for 10 lines. This is not effective. So I make them so much more effective. This is why I like teaching the IDE as well. I say well, what do you If you do Ctrl, or Command, question mark, it does the whole block. And then of course, it’s not about teaching that shortcut. But knowing does, really unlocks more debugging power, because if you can do a whole block at a time, then it makes you, it makes you more. Now, a quicker and more flexible, oh, I can try this, I can try this. Other things like putting printf statements in a certain place to actually output something that is valuable. I have many students at the end of their undergrad that they don’t know debugging, but also they don’t know the debugger. Like look, you can put a breakpoint there. And as you click the breakpoint, you can put a condition so that it only stops if a certain value is true, or neutral, or zero or whatever. Those are all things. Yes, you can figure them out as many people have figured them out sort of by themselves. But these are all things you can explicitly teach and you can quiz students. So you know the shortcuts for this. Do you know how to share two conditional breakpoints? If I set a breakpoint here, and now I run the code? Can you predict what will happen? This will look better. We talked about this earlier in the episodes, if you’re debugging and also learning the debugger at the same time, maybe you remember nothing because your brain was so busy, you don’t remember how to how to use the debugger. And you also don’t remember what the building strategy you are applying. So yes, it is so much true that it is a thing you can practice. But then probably the thing that you’re practising while we were doing debugging is not so much learning the techniques if you’ve learned them before, but more sort of getting comfortable with confusion and frustration, and training your seminar because the first time your code base, you’re like, ah help. Oh, no. And I have this with with middle schooler like, Teacher, Teacher, I probably but she was like, Oh, don’t worry, this will be fine. Let’s look at it together. So what’s your training that was really your your seminar for confusion, which is something that now as someone who’s reading decades of programming experience, something breaks, and I’m still a bit like, oh, no, something is broken. For that I can tell myself, don’t worry, you’ve been here before, probably something very small is a mess. And I can tell myself that it will be fine. And I think that is the thing that yes, you only get this by experience by having been in a situation where like, I will never know how to fix this, and it hasn’t come out at the auto size. That’s definitely something you can only practice.

Jamie

Sure. And I feel that personally, I feel that when when it comes to people who are at the beginning of their their career be that academic or like the the academic side of it, or like the experience side of it, I feel like that can be helped by pairing them up with someone who is slightly more senior. But I feel like it’s more in the workplace. Because I’m not sure that that happens at Academia. Like I say it’s been years since I was in academia or any kind of code camp situation. So perhaps that the a way to do that is to sort of get students to talk and exchange ideas, or maybe pair them up with someone who has a little more experience. But like I say, I don’t know whether that happens in academia. Yeah,

Felienne

I do think that happens if only because the student numbers are growing everywhere, because computer science is a super hot topic to study. So I guess inevitably, there’s a little bit more group work just because it’s practical. And we like an institution I work. We used to have 50 undergrads, and now we have 400 undergrads. So yeah, I know, there is a little bit more group work just because it’s practical. And also, of course, students can learn from each other. Although Yes, sadly, my book didn’t talk about this, I wish there would be more room and time to talk about Israel. But there is also a group dynamic there it is, at least you have to be aware of, because you know, who is more likely to be computer science in high school who’s more likely to already have so this will be whiteboards. And you really think I don’t want to be paired with I don’t want to be in a classroom where I make some groups. And in all the groups it is the whiteboards that are explaining to the rest of the group what they already know. Because this might accidentally strengthen some stereotypes, right? Then maybe the people from other backgrounds, girls, non binary students might be like, Oh, they already know everything. So clearly, this is not the course for me, because I was already supposed to know all these things. And people like me don’t know all these things. So maybe I’ll just go to my own study with a little bit more diversity in gender. So that is definitely something as well as easy solution. But this is something at least you have to be aware of. If you choose those assignment types were part of the Google I think, part of that this will not be rattled with the pronouns from copywriting.

Jamie

Sure, sure. Yeah, I fully appreciate that. And that’s, I guess that’s one of the the slightly more difficult aspects of, especially if teaching Getting the skills is how do I sort of group the students together such that none of that happens? And like you say, it’s not an easy problem to solve, right? It’s an NP hard problem, right?

Felienne

Yes, yes.

Jamie

Excellent. Okay, so we talked a little bit about the book, what we’re, so what I’d like to do is give the listeners a bit of a flavour of some of the stuff that’s in there. We talked a little bit about the theory about others, short term memory, working memory and long term memory. But let’s say I am, let’s say I’m, I have some code to learn, or I have some will come on to code to write in a moment, let’s I have some code to learn. Do you have any effective strategies, let’s say I’ve never seen this code base before, all I’m looking at is one function. It’s about 20 lines long, it does something that to me immediately, because I’ve never seen it is rather complex. I know about short term memory, long term memory working memory. I know that working working memory is like you say it’s kind of like my processor is going to be pulling information from here there everywhere. And sort of combining it and working on it all. I know that my long term memory is things where perhaps I have my experience, or maybe have a little bit of knowledge of how this language works, or have a little bit of knowledge of what I think it’s supposed to do. I’m I’m I’m understanding from our conversation, that short term memory is where maybe the code I’m reading is living is is all of that correct? Am I Am I barking up the wrong tree? If I got to completely? No,

Felienne

absolutely not. So the first thing is that is interesting to understand what is your prior knowledge? So you’re saying I have a multi this code base before, but that’s not the whole part. So first, we want to understand, do you really know the programming language? So one thing on my checklist would be do you really understand all the syntactic concepts that you understand the separate parts? Or is an MIB a for loop an if statement or some initialization codes, you don’t know how it all ties together, but at least you understand the individual parts? Because if this is the first thing that you’re don’t want to say, failing, but information that you’re lacking, then it makes not so much sense to continue? And really, first of all, understand what is the syntax? And another thing is like, what is the domain? So it might be that this is a part of a code base that you work on? And you know, with everything, it’s like, there’s I don’t know, a customer and an order and an account that they give very simple example that we talked about, do you know with all these words, or is also the domain for? Because if the domain is for you, you know, the programming language or you know, to go into the domain, you don’t know exactly know, what it what is it? That’s what does it mean that someone has employment is temporary? Is that? Should there be an end date, start date, salary? So that’s the next step is Do you understand all the domain concepts if you don’t, if there’s words in there, where you don’t exactly know what they mean in this context, and that is also something you want to fix before. And that ties into your, your final question you’re like, is all of the goes in your shorts or memory? It depends. That’s the confusing thing that if you are an experienced, C sharp developer, then something like for each customer and customers surrounded by round brackets, and then curly brackets, and then something is done over the customers to do this is like one block, you look at it and immediately say, someone is looking over a list, that someone might be coming from Python or from C which are filtering for each, but it would be for I smaller than the length of the list. And then you have to also get customers at the location I rather than looping over the customers directly. Maybe this isn’t one chunk one unit of information, maybe this goal doesn’t fit in their short term memory. So you can only get big rocks in your short term memory if you really have this prior knowledge. So that will be my advice, which is again, yeah, there’s another thing that we commonly do. examine our prior knowledge and offended if necessary, is like, oh, let’s run the goat. Oh, I don’t understand it. Let’s run it again. That’s basically the tools we have. Let’s use the debugger and step through it. Let’s put some print statements in places. But the other other things you can do like critically examine, what do I already know? What movies do I have about the elements of this book?

Jamie

Excellent. And what’s great about that is hardly any of that is related to actually solving the problem of putting whatever new statements are in there, right? And only one of those things actually requires knowledge of the language itself. You were saying there? Do I know the syntax of the language? Maybe I don’t need to know so much of the syntax of the language. If I understand, like you were saying the context, the domain, what it’s expecting what it’s expecting to do. For instance, my friend James, he, last year became a Python developer had worked in dotnet, for something like 1213 years beforehand, knew nothing of Python, but fell into it because he understood the domain that he was trying to solve in the projects he was working on. He understood the context of what was happening in this in this code base, and was able to learn the bits that he didn’t know as he was going. Right. You were saying there about? Do I understand there is there is a foreach loop. If I’m not a C sharp dotnet developer, I may not know know what a foreach loop is? That if I can find out? Yeah, if I can find out what that means. That means that that chunk of code then becomes not not immediately not mysterious, that’s double negative, I do apologise, stop, it doesn’t stop that code from being mysterious. It makes it less mysterious. I understand now that this is looping through this collection and doing something to it. Whereas previously was, is four lines of code that I don’t understand. And I’m just gonna, I’m gonna sit back and panic, like you were saying earlier.

Felienne

Yeah, exactly. Yeah, we’re really fun. So one of the things that I’m involved in is called code reading clubs. And maybe we can put a link in the show notes. And this is where we get together monthly with people that are interested. And together with a group of other organisers, we take a random code snippet for something from GitHub, and we read it together. And indeed, very often, you see, and we always speak different languages, very often languages that we are most familiar with ourselves. Sometimes we don’t even know what the programming languages, but even not knowing that, if you know a bit of the domain, if you gain understanding of what’s more or less there, then you can still read code if you don’t understand the syntax, because many things are quite similar, right. So if you understand the structure, the concepts and the codecs the domain, then you can feel the syntax gap. And the other thing is also so much true. If you really know the programming language very well. And all the variable names are a bit weird, or maybe written in there for a natural language that you don’t know, then you can fill those gaps. But if you are in a situation where you don’t have both little chance using this code base, read and understand.

Jamie

Sure, you need a foundation of knowledge. It doesn’t have to be the syntax doesn’t have to be the language, it doesn’t have to be the context, it needs to be something right. That’s there’s my opinion. And based on what you were saying, a friend of mine once said to me, you need a solid foundation of your knowledge, because you can’t build a house on sand, is what she was

Felienne

saying. This is very true.

Jamie

And without that sort of base level of some knowledge, it doesn’t like you were saying there, it doesn’t have to be the language doesn’t have to be the context doesn’t have to be the domain. But it kind of has to be one or some of these, it needs to be little bits. And then like you say you could fill in those gaps. All right. Excellent. Okay. So one of the things that I really liked that you’d said that, and something that you mentioned in the book is reading code. And I feel like a lot of developers don’t actually go out of their way to read other code. B in the code bases, they work in B in a language that they work in bead in a problem domain that they work in, or be completely outside of that problem domain. I recently, was really enjoying a number of weeks ago, at the time of recording, one of the podcasts I listened to called coding blocks had a game jam. And what they did was they got anyone who was willing to do it was was encouraged to live code on Twitch, the game that they were making in the 48 hours that they were that they were doing it. And some people were using languages and frameworks that they had no idea with, they have no experience with they’ve got no idea what they’re doing. That’s unfair to say, I don’t want to say they don’t have an idea of what they do. But you know what I mean, they new to the language that you new to the framework. Yes. And some people who were games developers were saying, Well, you know, I’ve done this in C, C++ and Python. But what about if I tried a JavaScript? And yeah, we’re doing what you were saying there. They have the context, they have the domain knowledge, learning in your language, or they have the language knowledge, learning a new tool, learning a new framework, they have that base level of knowledge to sit with. And I feel like in order for them to take part in this, they were reading through code and learning, learning new stuff, and learning new techniques, learning new technologies. And I think that that is something that a lot of developers, at least in my experience, don’t tend to do that often. I’ll go on to GitHub, like you were saying with you, with your your code reading club. Let’s go to GitHub. Let’s grab a random file, maybe not even the whole file justice method, and see if we can figure out what it does. And I feel like not enough Developers do that, I think.

Felienne

Yes. Yeah. So that has to do with many things. Of course. Firstly, it is again, we don’t really practice this. Many of the things we do as a community to get better are also emphasising writing. So like, Oh, you want to learn rust? Well, why don’t you make this little To Do app, right? No one says, Oh, if you want to look, maybe you read some code snippets. So that is definitely part of it. But it’s also has to do with like the reward structure. If you do this, imagining you, you do this in your face work time, right, then maybe there isn’t even time for refactoring. Maybe there isn’t even time to write documentation because your balls is like, shaped the bang. So carving out space for yourself to learn new things can be really challenging. And typically, that takes the form of going to a workshop, going to a conference, ordering a course reading a book, was really saying, Oh, well, I’m going to practice GoToMeeting deliberately. It Yeah, it’s just not something you will get rewarded for. And also, you might know more how to do it, like my group offers a little bit of tips and negotiating club resources have a bit more. But imagine even you would want to do that as well. Okay? Because it gets you type two To Do app in Ruby, find out okay, so what are the techniques that you that you can do? How do you know when you’re done? Like when? Okay, I sort of know what it does. Have you please yourself. So even if you want to do this, which doesn’t really fit in the way of teaching and learning that we all then it will still be quite hard to do?

Jamie

Sure. And I guess if you’re doing it yourself, like you were saying, right, if I go to random GitHub repository, random file, and I think today I will learn how to what this function does. It is in like, he said, maybe it’s in Rust, maybe it’s in Go, maybe it’s in Ruby, Python, whatever. Today, my goal is to learn what this method does. How do you know that you know that the method does what it does?

Felienne

Yeah, right. And also, it was regularity, right? Maybe maybe the methods is called analyse. And you could say, well, it analyses things, maybe the parameter school data, it’s analysed the data. I am done, teacher, give me a sticker because I sold it right. So there’s always this as well. For some context, this might be enough, right? If you’re reading code, because you’re like, oh, I want to figure out how this API works. Because maybe I want to use it to analyse the data, maybe it’s enough for you to notice, the meta discourse analysed. And the parameter is called data. And that’s what you want to put in. So it also really very much depends on the goal. And sometimes your reading, go to decides, do I want to use this library like you’re sampling and more of, I don’t know, creation bar shirt or something like, which of these then the questions you’re going to enter it, you know, What features does it have? If you look at a GitHub repo like is it under active development, that’s also reading. But that’s a different form of reading, where you’re like, Oh, I know there’s a bug because I got a runtime error in this method. And now I have to figure out why I’m reading the code for that goal. And those are really, really different goals that are going to need different techniques.

Jamie

I agree. And then there was there was a, there was a technique that you pointed out in the book. And there’s multiple parts where you talk about this where you say, let’s take some code, let’s print it off. And let’s actually annotate the code. Let’s go through and say this is a variable. This is a full loop. This is this trunk here, I understand because it’s printing to the screen, or maybe it’s doing, it’s talking to an API, or maybe it’s pausing some some data, just I’ll skip over that. And that way, you’re reducing the amount of code you’re having to read. By doing the exercise that we talked about earlier on, you’re looking at some code, there’s a foreach loop. If you know what a foreach loop does, you can almost step over that and ignore it, and focus on the parts that you don’t know. And by maybe circling things, or writing with lichens, I love that you have a set Legend of icons that you use for this is stepping through something this is, this is something I need to learn this is this is a follow up. This is an iteration. I really like that because then whilst I’m not a visual learner, it makes it obvious as soon as you look at the code, if it’s if it’s got these icons on it, or maybe using highlighters in different colours, you can see immediately is no longer black and white. It’s multiple colours. There’s lots of different icons, there’s annotations everywhere, this does this, this this. It’s almost like what commenting is kind of meant to do.

Felienne

Yeah, so that’s an interesting point. And I’m very sorry about that. With myself also, let’s know why doesn’t IDE let me do those things. Why can’t I draw on top of code? I can put an arrow there and then It says that maybe this is a layer I can turn on and off. That doesn’t seem like something that’s spectacularly complex to build. So for the Coltrane Eclipse, we’ve made our own code annotation tool. But then this is not it. This is just your own code in the browser, and that you can draw arrows and you can make cooler and this is all nice. But then this is this is about, so it doesn’t execute your code, it isn’t connected to anything. Why is documentation so limited? Like an EMI isn’t like you have this, like one of my dreams, I’m just gonna put it out there. So someone can build it for me? Why do we use formatting to disable lines of codes, right? So if you’re debugging, you might just want to say I switch this line off. And then we do this in this very, I think ugly and confusing way, by putting a pound sign or two slashes there to make it into but this is not the colon, it is not the format, I want I want to do is turn this off, and then turn it on. And that’s really a different thing than putting a comment there. Because we never think about it that way, or we think is very hard, we sort of fall back to something that really isn’t what is meant for. And then also, I think this is most hearts, Visual Studio people at Microsoft, if you’re listening in the in the gutter, you can just put a check mark. And then if the check mark has told you though, to execute the line, you know, like, you can even secretly just put two slashes there and enter trovi This is so easy. So you’re Why are IDE so I think they let me draw. Although I don’t say let me highlight stuff. It’s really not that big of an ask, I think but yeah, you know, apparently, maybe I’m the only one that wants this. Because if it’s still there, maybe there’s not a market for it.

Jamie

I like the idea that you mentioned something there. And I’m going to infer from it. So I’m taking what you said and applying my own opinions of it. Why is documentation just text? Right? We have UML diagrams, we have all sorts of Visio diagrams and things like that. Why is it just text? Right? Why can’t it be a question? What kind of

Felienne

talk about documentation that is separate from the code like a markdown file, but also in in ENCODE, right? But why can’t I put a little warning? Like, if you read this code warning, you might be tempted to turn this variable to true, go do it.

Jamie

Yeah, right. And I can imagine that, let’s say we fire up whatever ID we’re using. I’m a junior developer, I’m looking at a huge code base. And it’s it’s just a wall of text. And guess what, I’m using a large monitor, I have like 400 pixels to the right of that code. Assuming a left or right culture, I have 400 odd pixels to the right of like, I’ve got loads of space, I can make all sorts of notes there. Or indeed, you talked about being able to disable the line, if I can draw on the code base, perhaps I can scribble over the line that I want to disable. And the ID goes, hey, you’ve scribbled on that line, that in you know, in, in human in a human, if I’m writing something down, and I scribble it out, that means ignore this line, I’ve made a mistake, or I know this word, I’ve made a mistake. Perhaps we could scribble over the statement. And the debugger will go that statement doesn’t exist, I’ll just jump over. Like why not write

Felienne

this fantasising about the future of IDE line of thinking, then? No, why does everyone look at the same code, I am logged into Git. So my Visual Studio knows who I am knows what lines of this code base I have touched in a recent future. So maybe if something is very new to me, maybe i need a different presentation. Maybe if I’m scrolling through a piece, because I haven’t touched in forever, or maybe I’ve never seen, my IDE can know this, it can go to this. And it knows if I’ve ever seen this line in my life. Or maybe like the most boring thing you could do is maybe make it more red. If it’s more unfamiliar to me so that I realise like, oh, this has made me a part of the code base. I’m not so familiar with or inline a few methods to make it easier for me to read this. So you can do so much you can do so much manipulation. And I’m like, this information is right there. I don’t know why I eat are the way they are. They don’t have to be

Jamie

these annotations that we’re talking about maybe we’re drawing on it, maybe we’re writing on it. Even though the code is checked in to get something in the ID something in get, I don’t know, something could say this is this is phellinus annotations for this code. I want to check those in. Because these are for Felina. These are Jamie’s annotations. I won’t check those in because I don’t want to affect the The committed code in the repository, but I will allow them to stay local because they they Felina has notes for how the code works that way, Philippe doesn’t have to keep a separate file with all of these in and keep those up to date. I, as the IDE, can store this as sofern, since Visual Studio Code has a separate directory for all events, stuff, so if you go into a code base that has been manipulated by Visual Studio Code, there’s a.vs code folder. If you use JetBrains, rider, there is a dot IDE folder. If you use any of the JetBrains tools, they do this. And so Visual Studio could also do the same thing dot Visual Studio or something, right, because for those who don’t know, modern operating systems, if you prepend, the name of a folder with a dot, they will be hidden from view. And so you could you could just, and then you add that to your Git ignore, or maybe it just doesn’t automatically. And you don’t have to worry, anything that is in there is local to you. And then your annotations you’re worried about using the word doodle, but your your drawings, your notes that are placed on top of the code for you by the ID app, at display time, I guess, are then stored locally not pushed to the source control. And that way, you don’t have to worry about oh, well, my notes are polluting everyone else’s notes. You don’t have to worry about well, this developer on the team doesn’t like to have those visual styles of notes. So they never have to see them. What I agree with you for later, why doesn’t

Felienne

this easy? Why don’t people build this? Everyone’s busy and everyone has nice idea. Not so easy, as we think it is. But there is some something there, I think where the the things we do we talked about in the book, it is sort of weak, because there’s nothing else. So we say okay, brings out your code, and then circle the variables there. And many people ask us, you know, I would prefer to read it in the IDE. Because I have syntax highlighting, and you can say, like, Yes, I get that. But it does now iterate to me and IDE and then is executable, or it is on paper or on a tablet or in the innovation tool that we use in the browser there. You can do the drawing, but then you lose the execution and you lose your case history.

Jamie

Yeah. I could imagine that it would be useful during a debugging session, right? So you’ve got the code running, you’re debugging. And you’re like, Fred, I need to write this down. Okay, I will turn away from the computer, get my pen and write it down on a piece of paper. But then like you say, I’ve lost the debugging context. If if I could have a separate set of annotations for when I’m debugging this method, show me these annotations, right, okay. Right on the screen. When this integer is seven, the programme seems to break.

Felienne

And then even if you’re the type of person that wants to see other people’s notes, maybe one day you’re in the situation, oh, my God, I have no clue what to do. I’m so stuck. Maybe that’s okay. Let me see all my friends and colleagues, let me see their annotations, because maybe there’s something there.

Jamie

And, and that could end up being a sort of living documentation, almost like a training for, for maybe you bring a junior developer on and you say, Write this method, just just look at all of these annotations, right? It is, it is difficult to read, don’t worry about not being able to understand it. Because everyone has lots of annotations in this. It doesn’t pull your code base that is built by our build server. But it allows you to see that there’s a bubble here that says be careful of this, he put a print statement here if you need to debug it, that kind of thing.

Felienne

And it might serve as a so so when we when we talk about poetry being we’re always talking about, okay, where are we going to read? No, this is one method. But if it’s a big repo or a bigger class are a few files. And so is that what is the start, and sometimes you’re searching for like a main method like an entry points. Because another thing is you can also look at Where’s complexity? Where is a variable that is used in many different places is one of the annotation exercises that we have. But you could also then look at the verbal Enos of the code. So if you have the new code, and you say, Okay, where were there many annotations made, maybe this is an interesting place to start. Or maybe it’s an interesting place to avoid, because maybe that’s too much complexity. This could also be read from that should be.

Jamie

I like that, because then that allows you to do targeted code review and say, Hey, this chunk of code has the most annotations. Perhaps it’s the most cognitively complex. And so maybe this is where technical debt exists.

Felienne

Maybe this needs to refactoring. Yeah, if everyone did the same thing, if everyone says, Well, it took me five tries to figure out figure out that I didn’t know if this is actually a Sikh or something. And maybe we put this in a variable name, and we put it in the documentation.

Jamie

I like it, I like it. Let’s make the code better by doodling all over it. I like it. So with all of that said, How do I. So one of the things that’s in the book is all about writing code, not such that not just learning other people’s code, but writing code such that it is easier for other people to understand, right. And I think that this is this is a, this specifically is an NP hard topic. Because like you were saying earlier on, you’ve got, you may not have the syntax context, you may not have the domain context, you may not have the context of the outer context in which this code is executed, there’s so much knowledge that you have to assume when going into a method or function, an API space, a class or whatever chunk of code, for instance, I’m not an operating system developer, if I go and download the Linux source code, I am going to be lost, I have the C background, but not to the level that Linus and the other Linux developers have. So I don’t have the context of how a kernel of an operating system works. But I have a little bit of context of how C works. And so I can maybe fumble my way through, maybe I’ll look for that main method, maybe I’ll look for that particular API space, I do have somewhere a 4000, word 4000 page book, that is learning the Linux kernel. And I got about four pages into it and put it back into storage. But, but I guess, my, and then, and then on top of all of that, you’re assuming that everyone speaks the same language, right? Programming languages are in like C is in C. JavaScript is in JavaScript, English is in English, French is in French. And so you’re assuming that all of the, the, I guess, cultural context that comes along with that particular language, and perhaps the problem you are solving is coming with it? So I guess, how do I write code that other people can understand? And like I said earlier, and other people could be me five minutes from now?

Felienne

Yes, yeah. I like that. I always say that there’s no such thing as clean code, right? It doesn’t exist, because the only thing that we have is codes is clear to a certain person at a certain point in time, right? If I if I write something very clever, it’s like, oh, look, all my methods are very short. And it’s too much parameters and all the stuff that people like in their normal, smelly goals. And you know, if I forget everything. So there’s a few aspects to this. Firstly, I think you have to understand, like clear for who because it isn’t going to be clear for everyone. And I really liked it when I was reading the writing the book for many that they have this concept of a minimal qualified reader. So they say the person doesn’t read in your book, you may assume that they know this, and this and you could pick this yourself, you write this little profile of well, the person that writes it reads my book, well, they know maybe two or three languages, maybe five years of experience, I think is a really good idea for your code base to also think, okay, what can we expect? What are the people we’re hiring? Are we really only hiring people that know? Well, in your context, maybe C sharp, so that let’s assume that people are familiar with most C sharp things, it’s something we write down, we’re going to assume that people know this if they don’t, and we still onboard them. Because you know, we need developers, then this is something we must make sure that they know, we understood we accept or expect that people know the domain. If they don’t, well, okay, that’s fine. But then this is like the prior knowledge. So I think that’s definitely something that’s in the code base, I worked on a programming language for kids schools heavy. And then I always think, okay, my main minimal qualified reader is undergrads because regularly undergrads, you know, contribute to my project. So I want to write in such a way that it is somewhat reasonable for them to draw. So I think this is a good thing to have. And also, I think that a benefit of reading a lot of codes is that you put yourself in the place of the reader all the time. So I guess that at least has been my personal experience, and that of other people that do a lot of poetry reading isn’t, then once you start writing, you still feel the pain of being confused. And then you’re like, oh, let’s not do the clever thing. Because I’m so often in the shoes of the reader. Let’s make it a little bit more explicit. Let’s give this like if you have i minus one as an index, why is it why is it shifting? One? There’s a reason can you just say system x uses zero basis is the one use one way is so we actually we shift to you. So there’s little things like this, you get more awareness for the little things that trip you up if you do lots of reading. So that will also help you most directly. So like, Oh, now I have a skill I can apply. But that mindset of reading a lot of code, that’s what also definitely helped. But it also just really helps to think of okay, who am I going to expect to understand this because it’s, it’s no no’s. Everyone knows that this far. If you have this C sharp code base, and you think well Java, developer answer’s no domain and maybe for whom English is not their first language. Yeah, okay. Well, they have no chance reading this. And that’s fine. And they first need to learn the domain and see and also improve their English. Explicitly making it clear who you’re optimising for, I mean, really useful.

Jamie

Yeah, I completely agree with that. I think there’s, there’s something that I feel like we’ve both said, and that is to go read code. As part of your being better at writing code, right? There’s a lot of novelists say that, before I write anything, or go and read something, they read other other authors to get maybe ideas or inspiration or, or, you know, if let’s take a step outside of programming and say that you are a novelist, if you are a novelist who writes crime novels, but you want to write a fantasy novel, you can’t just write now I’m a fantasy novelist. Yes, you have to go and read other fantasy novelists to understand the troops and the formatting and how it all works. Before you can write your own. And as a C developer, as a Python developer, you have to go read other C and Python developers to figure out how other people are doing things. So then you can take those ideas, or maybe not take those ideas, right, we’re talking about taking the best ideas, maybe the code you read, that is external to you, is written in a bad way. You can also use that to reinforce your practice to say, Hey, don’t ever do it like this, because this is bad.

Felienne

Yeah, yeah, for sure. Yes. And this is something else that we experienced with both reading clubs, that discussing other people’s clothes, or is also a nice way to discuss design decisions. So what we see often is that many teams, I would say my own team included, we didn’t set explicit design goals for how we would do the code. It’s also hard if you’re starting a project that you don’t really know where it’s going. However, what then happens is that someone makes a pull request, I look at the pull request, and I think, yeah, this is not what I want. This doesn’t fit my design, but then the design isn’t anywhere. It’s just in my brain. So then they give feedback to this specific code. But no, I don’t want this I want to, I don’t know I want to these are more centralised or something. But then this is a tough discussion, because now we are having two discussions. We’re having a discussion, what is the ideal design would like? And also are we accepting this pull request, and there’s always one person who’s more requested it. So there, they have skin in the game. And that’s really hard. So what I’ve also found is that if you do code treating as a team on code that isn’t yours, then you get this really nice space to discuss things like, hey, this message has 70 parameters. Is this something I like? And some people might say, yes, if they all go together, if it’s more more information, I don’t care if it’s 17, I’d rather have it together. Or people might say, No, it’s just five lines of parameters. I don’t like this. discuss that. And there might be differences of opinion, but there’s no code that exhibits that difference. So that is also something I found to be really valuable, that you get these discussions about, how do we want code to look like without talking about your code, and then you come to sort of an understanding? And also you talk about prior knowledge? So people say, oh, yeah, but maybe you didn’t realise this. But I used to be a Java developer for five years. So I always have this little bit of Java to why C sharp even though I know C sharp, that’s also good to know. Because if you know that, that also you play certain things in a certain context. Maybe, maybe they struggle a bit with exceptions, because Java has this weird Texas, Jax exceptions thing. And so I mean, this, this will always be a little bit confusing to them, because they have a Java background. So yeah, those are all reasons that are that are good also to read both independently from you get better at reading.

Jamie

I like the idea of you mentioned that I’m going to use a phrase and I hope that it sort of fits is if you’re reading code as a team and you’re reading code, there’s no use, you were saying there provides almost like a safe space to discuss these things, right? You’re not having to worry about I’m submitting my code for all of my peers to criticise it, because you may not you may not be comfortable with that. It could just be we’ll just pull some code from, you know, maybe we’ll go to maybe if I’m a dotnet developer, we’ll go to the source code for dotnet. Talk about one of these methods. And we’ll say why do we think that the Microsoft engineer who wrote this, wrote it this way, and then we’ll have a discussion.

Felienne

So you get this really nice understanding that there’s always a trade off. And you know, I appreciate many things like I love following Google refactoring and code smells I think is really good and it has influenced my thinking a lot. but it is a little bit like, this is correct. This has a code. And this has a code smell. And you have to do the refactoring. And then it is correct. Whereas there’s always a trade off. It’s always a matter of what are we optimising for. And sometimes you are in a hurry to deploy something, or something, sometimes you have a bit of a weak, brittle understanding of the domain. Yeah, no, do I have the time to go over that? Or do I think well, we’ll be fine. So I think that’s, it’s not easy to have these nuanced discussions, it’s always very easy. It’s easy to say your your message is no more than 10 lines. If it is more than 10 lines, I don’t accept it. This is easy code review, right? This is easy reduction. But then the good reasons. And I think it’s always very hard to have this discussion as exactly as you’re saying, hold someone’s code, and it also can be very ineffective. So if someone adds a feature in a way that I don’t want, like, I’ll give you a concrete example. So we have a programming language for kids and it is you are able to localise it. So you can put keywords there in Dutch or in French, and Spanish, one in Chinese. So the first implementation, someone comes into my codebase says, I made this thing where you can localise the keywords which we didn’t have. I’m like, Yeah, I love that feature. But then in all the files, they copy basis, the French words everywhere. So it’s like, yes, I want to have this feature built in this way, because I want to have it in one place. So that’s easier to translate. I cannot expect the French teacher to go into 12 files to make changes. So then we had to retract this pull request. And then the guy said, Well, yeah, I don’t have time to do a difficult reading. If we would have had a discussion about how do we want to have this architecture together, when we would have written down, this is what we want, then they could have done, right? Whatever I do is more in line with what I wanted in the first place. And then no one Stein would have been wasted. And I think this is true for many breweries, maybe especially in open source, where people are like, I have a problem, I will fix the problem. But I don’t do it in a way to fit and then the project is like, yes, but no, and then no one, no one leaves that interaction happy. Everyone is basically sad.

Jamie

Sure, and I’m also seeing the discussion of someone else’s some external parties code, as a team is a collaborative effort. Whereas I feel like a pull request is usually a one on one, it’s, you were talking there about this engineer who had implemented this, this ability to translate all of the key words, but it was from from what you were saying it was you and this other developer, unless I dive into that pull request and read through the comments and the discretion that you and the other developer had, I have no knowledge of that it sits external to my to my thinking process. Whereas if you if you brought a team of people together, and discuss that first and maybe stolen somewhere, there is that discussion that happens between everyone on the team, and then perhaps you can then take the the the outcome of that meeting, the outcome of that discussion, and roll it into your coding standards for for the code base that you’re working on. So then it becomes almost like a concrete rule, right? You know, we discussed on March 12. This thing, we talked about this code base, here are the annotations that we made as a group, see all comes back. Right? Because yes, because there is a precedent for that, right? If you look at pull request tools, you can make annotations on individual lines of code, and it doesn’t affect the line of code. Alright, it’s in a was a textbox. And there’s a little bit of highlighting, but I’ve looped back to it, because I’ve just realised that there is there is precedent for it in the in the pull request tools that we have.

Felienne

You could just from your IDE, you could grab all of the discussions on the starting line. And I think it would be really good onboarding activity as well. Okay, if you have a new developer, and in their first week, you take random code most from your codebase and you go over together is such a good way for that person to understand everyone’s background and for you all to envision that person’s background also discusses like this method, and then you can well, I don’t want to say like, push your rules on them, but at least they can see oh, this is how people generally think about things and take that into account. If they start writing.

Jamie

Absolutely, they they get a feel for like the community that they’re working in. Right. The I forgotten the word know that. A lot of business types talk about it, when they bring someone in, they need to make sure that that person fits the style. The culture sorry, yes, the culture around them the code, right? You as a junior walking into one of these meetings, it may be a little scary because you’re surrounded by seniors and you worried about your opinion not mattering. But guess what your opinion matters, right? Yeah. But also, you get a feel for the culture of, of how the people around you are writing code. So you know that it’s okay to write a, a method, which I don’t know, instead of, let’s say you’re in dotnet. World, sometimes it’s better to do a full reach over a collection than a full loop and index or, you know, array index things. But for some reason, the culture of the company that you’re joining, maybe we don’t really like for each because of X reason. So please make sure that you write it with a for loop. And it’s, that’s such

Felienne

an that’s such an easy intervention, right? And that saves them from having a first pull request, or whatever you use their first code review, like being bad, because it’s like, Oh, you didn’t do this, and then they couldn’t really know these things.

Jamie

Hmm. I like that. I like that. And it’s a lot better than some of the companies that I’ve worked in what I’ve transitioned to working there and being on boarded, is just literally, here’s a code base, go read it. Now that you’ve done that,

Felienne

bug, here’s a bug, can you fix it? Or, or here’s a feature, okay? Just add this feature. Like, I know, I have no, like, I’m literally I’m raising my hand, but you don’t see this. I’m raising my hand say, I have done this to new contributors. I’m welcome to this codebase. And then people are like, How can I help? I’m like, well, here are five open issues. Let me know when you’re ready, which I understand that was maybe not the best way to feel to make people feel welcome, but also not a good way to imprintable, then the culture that we care about.

Jamie

Yeah, I suppose that then becomes a little difficult if you are a distributed team, right? Let’s, let’s talk about heavy, right? I’m assuming heavy source code is on GitHub or similar? If the entire team is distributed? How do you bring people together to figure out that culture, right? At least in a, in a team situation, be academic or in industry, or whatever? You can, even if you are remote, you can fire up a zoom Google Hangout, so he was or whatever, and get everyone together in a certain time zone and say, look, okay, so today, we’re going to talk about this thing here. Why do we do for each instead of for why do we do forests and forest? Why do we never do while? Why do we do do while? And why do we use revealing module pattern in our JavaScript rather than some other pattern, and then they can it can be discussed. Whereas if you are a globally distributed team working in open source, I guess that’s a little harder.

Felienne

Yes, and our context is specifically complex, because we have people that I paid to work on it, because we got a grant from the government to expand Petey. I work on it, we have open source contributors that fold and tear and work for free. And we have students in the university that have to do a closing project for their undergrads. And then they choose to work on heavy, so there are multiple volunteers, but they’re also not paid. And also their goal is more learning than contributing. And then I am in a sort of power relation, ship with them because I’m also their supervisor, and I’m the owner of the code base. So our team dynamic is pretty complex.

Jamie

Excellent. Okay, so let’s talk about heavy then. You’ve mentioned it a few times. It’s a tool for high schoolers. Is that right?

Felienne

Yes, it says all for high schoolers. Yeah, middle school. So our high school is different. In my country, high school starts at 12. I appreciate the fact that this is different, different than in different parts of the world. So let’s say the age range, so it’s clear to everyone so we aim at the age sort of between 10 and 14, which in my country, his high school, but maybe in yours.

Jamie

Okay, so I guess what is heady? Then we, you’ve talked a few times about is a, you’ve mentioned that you could translate keywords. So I’m guessing it’s a programming language is okay.

Felienne

Yes, so it’s a programming language for kids. And if people have already read the book or parts of the book, then they will see that the book and had a very much lien on the same foundation. The idea is, we talked about this a bunch of times already in this episode, that if you have to do many things at the same time, it’s really hard to remember. So if kids come into programming, specifically sexual programme, kids most common form block based languages like Scratch or Bentyl gold that are very friendly and colourful, or you click stuff together, that’s typically very well for this a 910 year old range that is enjoyable, and again, the first step to programme but after a while, they want to do grownup programming, right? If they are 1112, it’s like, oh, we don’t want to have toys. We want to have authentic programming and this really also fits with what We know from that age group that went once they start to be going in puberty, then they want to be grownups, this one I want to be. So they want to have its actual programming language, but then that transition from something like Scratch to Python is very heavy. Just if you want to print something, you have to do prints, open brackets, quotations, and low everyone quotations closing practice. And then what do you have you have sex and it’s free, right, and it’s graduate have a cat that is dancing with with the same amount of fat. So when I started to teach this age group, I’ve, I’ve found that some kids sort of make it, they figure out how Python works, and they’re happy. But some kids fall in this gap. Because they don’t see where it’s going. They don’t see the value, they want to have this authentic thing. But then still, interest and motivation only lasts for a few hours. If you don’t have any clear goal, then where this is going, then still, you’re like, why am I doing this? So the idea of hairy is that we gradually introducing facts and concepts. This is why we call it a gradual language, and has different language levels. So in the first level, you can bring something and you just print. And then you just say hello, Jamie. And then it prints hello, Jamie. And no quotes and no brackets, nothing, no syntax apart from the word print. And then gradually, we add. So in the second level, we add variables so that you can say name is Jamie, print name is still no quotation marks and no brackets are needed. And when you do run into issues, because now name is defined as Jamie, so if I want to print, Hello, my name is Jamie, this is possible because name already has a name. Because it’s Jamie. So then we say, hey, look, oh, this is sort of inconvenient that is worth that is a variable now is my blocks. So if you would just have a way to distinguish between variables and facts? Well, that’s a quote. So then we introduced the quotes in a way that has meaning if this is this thing, because I have two kids, and then maybe you you did as well or like, Teacher, why does a quote go there? And you have to say, yeah, don’t think about it, just put it there. because I say so which I don’t think is a really great way of teaching. But again, it’s also very hard to explain to this kid, well imagine that we didn’t have close then user who didn’t understand, then you have to explain all this stuff to them, as they don’t know. So that’s the idea of how it is at every level, we gradually add syntax, and we add concepts and then the end of heavy is actually secretly Python also secretly. Then at the end of hairy level 18, you’re programming in a subset of Python was everything. So no functions, not Oh, but you do no ifs and booleans and wire loops, and for loops and looping over a list. So you have an understanding of most of the concepts. And from there, you know, you can merrily go your way to actual Python. And one more thing that’s really cool about Heti, which we didn’t have initially, but we just added quite recently is the ability to indeed localise to different languages. Because we found we did an experiment with Dutch kids, and we thought, this is pretty good English probably will be fine. And we’re like, no, we want to have such words as keywords. So we now allow for Dutch and other languages, well, we have a rabbit, and we have Hindi and we have Spanish. So you’re allowed to use instead of English keywords, also keywords in your own native language, which clearly again, greatly lowers the barrier towards adoption. Because if you if you tell to a gift that’s coming in from another country where they speak and read Arabic, in Scratch, you can have Arabic and everything is right to left, and then the kids like, okay, now I wanted to run a blank, which is like, Yes, this is fine. But it will have to be in English, and also left to right. And it gives like, okay, but where’s the P on my keyboard? Right? I don’t even know how to type these letters or pronounce these letters. So if we want to be more inclusive, and it’s definitely important that we also have this localization.

Jamie

I really like that. There’s a whole bunch of stuff that you’ve said there that are really like, I like the idea of, of graduating to a grownup language. I’m throwing the bungee cords there, just like you did. I love that idea of slowly. Because like, you know, I’ve taught the kids I’ve watched rather I’ve helped the kids to do scratch. And yeah, it’s great. You It’s a brilliant visual tool, you drag and drop. And then like you say, you have a cat that’s dancing, and it’s brilliant. You’ve gone from nothing to something. And it’s in a in a way that you don’t need to know syntax. You don’t need to know what you’re doing. You could slowly introduce Wiles and F’s and things like that. But you’re, how do I put it? I don’t want to be exclusionary, but you’re like, they would say to me, this isn’t real programming, though. Is it? Right? Yes. And I would show them some code and they’re like, Ah, this is bamboozling. I may as well have shown them a novel in mediaeval French, you know?

Felienne

Yes, yeah. And this is X exactly the gap that we aim at, like Scratch is great for this initial learning. And actually, I think in terms of just the contents of scratch, and there’s also snap, which is like Scratch. But for slightly older kids, it’s very powerful that allows you to create your own blocks and higher order functions and everything. So, like didactically, there’s a lot more to be learned from kids but better Gogi they, they push back against these baby blocks, this is a toy, this what my baby brother does. And then of course, you can, and I have tried this, you can tell a 13 year old, no, it’s not a toy, because actual programming, because really, it has the same things because C or JavaScript, it also has an F and also has variable loads really, really the same thing. It just has this core for blocks. They don’t know they also they don’t want to like they don’t want to have a little wooden hammer, they want to have proper hammer and make something real or they want, they don’t want to do little finger knitting, they want to do actual making something with real tools. This is like a part of growing up and battling that as we might experience, it’s just not more successful. If kids don’t enjoy something, if they don’t want to learn that makes it hard. And also, so if a kid wants to learn programming, then maybe Scratch is fine, because it’s clear that there are some programming concepts. But I teach in an inner city school and one of the poorest zip codes in my country, where many of the kids come from lower socio economic backgrounds. They don’t want to do programming this interesting. They want to do programming, because it’s good morning. And what they want is to provide for their families and have a good career. And they know that, oh, I shall become a programmer, and maybe at my company will give me a Tesla, right and 100,000 euros a year. That’s their motivation, and then showing something through them where it’s very clear that it’s not career potential. There are no professional scratch developer, even though maybe with low code and no code, that will be different. But I think that will take a while. So you show them something that doesn’t align with their reasons for programming. And then again, I’m not going to get a toy, I’m here to get employable skills.

Jamie

Sure. And I guess along with that, there’s a quote from Jeff Atwood, I believe, where he said, The user interface is the app. If, you know if you show if you show a student scratch code, and they’re like, it’s great, but I don’t like colourful blocks. I’m more grown up than that. And you say to them, yes. But it’s actually the new programming on the on the other end of it, they’re not seeing the other end, they’re not interested in the other end, they’re they’re interested in what they can see and what they can interact with, you know. And so I totally get the idea of like, okay, let’s step away from that. And I love absolutely love the idea with Edie of gradually introducing things right. The back in slightly earlier in my career, when I was teaching juniors some C sharp and dotnet. It changed this, this last year. So 2021 to 2022, when C sharp became simpler with the minimal API’s and global USING statements and stuff like that. But previously, when I was teaching new C sharp developers, it was like, Okay, open up your IDE, right, we’re going to type in namespace using System namespace, my app, curly brackets, public static, void, main, curly brackets, console dot write line, hello, world, curly brackets, curly brackets run, right? What does all of this do? Well actually ignore everything, those 11 lines on you to ignore everything except for line eight. And even then,

Felienne

there’s so many dimensions there, right? Because it will add to the cognitive load, because their brains will process you can’t say don’t look at it, because it is bad, right? You can tape off their monitors, but then they can scroll so it doesn’t look very practical. So they will look at and also so students and this is specifically through again, for students with lower computer skills. If they come in female students, they might get they might have this prior impression that programming is hard. For me as difficult the programming skills for them. Imagine, the first thing you say is here’s all these hieroglyphs, right? I like your analogy with mediaeval French, like, here’s the stuff that absolutely makes no sense to you. But still, you have to do it. So computer requires you to do it. That’s pretty much enforcing the idea that programming is shit, I know is really hard. That’s that there’s all this magic. And you don’t even understand why it doesn’t matter, right? You the expert teacher can tell them that this isn’t relevant, but why is this relevant? And then they forget one semicolon or whatever and suddenly it is relevant. And then you get an error message in one of the lines that you Teacher said they could ignore. Okay, so it does matter. When

Jamie

and even then, sometimes those error messages are not very clear. Thankfully in the sort of In modern languages, C sharp dotnet, JavaScript, things like that. It is rather clear expected a bracket? Oh, well, you know, as long as you can understand those words, and I’m not saying that people can’t but you know, error messages are usually localised. Or rather sometimes most of the time they are English. Yeah. If you don’t understand this, yeah, right, you’ll jump to that line. And you’ll say, Well, why? Why do I need a bracket there? Why do I need a semicolon there? You know, JavaScript solve this issue years ago, you don’t need semicolons. So what do I need them in C Sharp? Oh, well, because the designers of the language, blah, blah, blah, you have to go into the history of C and C++? Or you could just say put a semicolon there, ignore it. Or you could say, right, okay, instead of doing this, let’s use something that’s a little more beginner friendly, like heavy, or maybe C shops, minimal API’s, global usings, that kind of thing. And will gradually build up maybe Python is better, because you know, Python is better, or that’s just conjecture or something. And you can slowly build up that knowledge. And I love the idea of very slowly introducing things like he said that you start with print and a word and print the word. And then you generate a very,

Felienne

there’s so many technical reasons, also, so many technical reasons. Also, why a small language is very useful. And that’s the benefit of teaching. So you’re talking about error messages. If the error message is semicolon missing, why doesn’t the computer put the semicolon back? Alright. And one of the things we’re working with Headies, something called programme repair, that’s just fixing a programme. So before we throw an error message, saying a semicolon goes there, well, we don’t have semicolon, use a bracket goes there, we can just put the bracket there she is that parses and give a very good high confidence, look at the warning that this is what they should do. This is of course, not very reasonable. If you’re, if you’re doing professional C sharp development, these programmes are very, very expensive. And there are many things that you might try. But if you have a small language with little concepts, it’s also means kids will typically make relatively small programmes. So things like programmer there, they get reasonable. And in our, in our lowest levels, we low level one, we just have five commands. So if you miss type commands, I can actually do just string distance and see if you maybe misspelt something. So there’s all these things because the language is small. And the programmes are small problems that people older scientists have been experimenting with at scale that are really hard to get right, like programmer power, suddenly, and this is baby complex. In this tiny teaching language, it gets possible to do stuff like localised error messages, we have that as well, when error messages are in your native language. We have error messages that are sentences, so they are not semicolon missing, but you missed a semicolon in this location. So the smallest of the language is also interesting from a technical perspective, because it allows us to do certain things that in general are possible, but it’s so slow, and you don’t want your compiler to actually test if the semicolon goes there, you’ll be quicker. And you can see what’s happening. And the programme is too big. So compiling, it will take too long. Whereas for good, this actually really makes sense.

Jamie

I like that friendly error messages. I like that and self self repairing code. I also like that too. Because like he says, it’s it’s reinforcing that lesson. Hey, I think you missed a bracket. I bought one in and he compiled anyway. But this is what I think you meant. I totally like that. I love that idea. And I think I think perhaps we’re heading in that direction very slowly. Anyway, with things like GitHub co pilot, where I’ve tried this myself, it is absolutely magic. I start typing a word and it has the rest of the line for me. Like, yeah, I mean, I know how they’re doing it. I know how they’re doing it. It’s it’s machine learning and Markov chains based on basically everything that’s public on GitHub. But even so, it’s magic to me that there. Is the computer writing the code for me, yes, no, you know, so I think we’re slowly heading in that direction anyway. But I love the idea of using it as a teaching tool to be able to say, hey, you know, you’ve missed this character, this piece of syntax. Let me put that in for you. And let me show you why I had to put that in. You know, I think you missed this, you know, that kind of thing. I love that. Because then the when when you are learning, it reduces that pain of and it is a real pain. It’s not like a physical pain, but it’s more like an emotional pain. Oh, no, I broke it. You were saying earlier on? Did you teach I broke the computer. Let’s all right, let’s reduce that pain, you reduce that embarrassment as well. Because if I if everyone else around me gets it, and I don’t get it, and I’ve missed I don’t know that I missed the bracket. I then feel embarrassment and emotional pain. And the fact that I don’t get it which, if if, excuse me You said earlier on about. Some students may have these preconceived notions that programming is not for them because of some, some background information, some information about maybe their, their, their background, maybe their identity, maybe their socio economic stuff, they may have these preconceived prejudices that they’ve put onto themselves or others have put onto them, which will be contributing towards that. And then when they feel embarrassed and upset, I’ve seen students literally just stop and just, I will sit back from the computer. I can’t do this. It’s not for me, it’s too hard. Yeah. And it takes

Felienne

it’s such a hard thing to battle that if students already come in with with this preconceptions, and then they get five or six error messages. If you can find them. Maybe it will be the next syntax error unexpected elf. Like, what what? The teacher said, Oh, just because this is not even my native language, right? It’s not the native language of the students I teach. And even English gets, I don’t think they know what syntax error means or elf. So if this this self efficacy, what we build in this trust that they can do it is already quite low. And then this is the first thing you see, then you’re like, Yeah, you know, my dad was right, this isn’t for me. And then it’s so hard as teachers, and of course, we teachers, you know, we fight against every like, No, this is for you, and you can do it. But clearly, it’s really hard to fight something like that, if it’s already there. It’s a social circle of kids, which, sadly, is sometimes the case for, for for girls, their social circle tells them it’s built for them. Classmates, tell them it’s my friend, and then these error messages happen. can fix that would be nice ones.

Jamie

Or perhaps and I saw this when I was a child, perhaps the the opposite happens. Because I can do it and other people can’t. I’m the outcast, right? Whereas if you make it possible for everyone to do it, then there’s no everyone’s on a on an even even let playing field, right? There’s no, there’s no not necessarily in that first example of print Felina. If everyone could type print Felina, and it prints Felina. Everyone’s almost equal in the world, everyone is equal in that respect. You don’t have the rock star of the class who’s being picked on because they are better than everyone else, or because they were able to already I’m throwing Bernie quotes around better the or perhaps because they were able to do what teacher said and we can’t, or the opposite. I can’t do it. So then I feel the emotion. Everyone

Felienne

can Yeah, yes, yeah. And I think that one of the best feedbacks we got about it was from a teacher that used to do Python. And he said to me, you know, when we did Python, so kids got it. And they were having a great time. And they were like, like hyping each other up learning from each other, giving each other’s ideas, but that was maybe 1/3 of the group. And the rest was like, we hate this force. And it is mandatory in that school. So they wouldn’t drop out, they had to finish the year. And he said, with heavy, everyone can do it. And everyone gets to this level of excitement. And then some cases is also the benefit of having some kids reach level 10. And they have fun there. And other cases, take a level four, which is also fine, because they can learn Python later. We encourage them later in their career to do other things. But he was like, everyone is building something. Everyone’s having fun. Everyone has this feeling that they can do it. Like, yeah, that’s what I want.

Jamie

Excellent, excellent. Okay, so what I’ll say felida is we’ve talked for ages and I could legitimately I feel like I could talk to you all day. But I know you have lots of things to do. And I’m sure the listeners

Felienne

exactly I have to do actual actual work instead of chatting to people about dream IDE.

Jamie

Well, maybe maybe I mean, I’m not saying the the audience for the show has a huge following but maybe we can kickstart that idea somebody can maybe go oh wait I know how to do this in you know, maybe I could pull in an NPM package into Visual Studio Code and allow you to draw on screen and save it as a I don’t know maybe not as as an actual image but maybe as a plot of points or something because then it’s text and it can be checked to source the truth in either right? Yeah. Excellent. Okay. So where’s the best place for people to go to find out about you maybe about heady and maybe about the the programmers brain if you if you don’t mind sharing those?

Felienne

No, absolutely not. So the best for place to find me is on Twitter. Philippe my handle is failing at Twitter so if you know how to spell my name then I’m easy to find on Twitter. I also have my websites from the noodles calm I used to use it to blog about international trips I took before everything so it’s a bit dead now because I don’t travel that much. But you can go to funny little calm slash book, which is where you can find a link to the book and it is the best link because I get a little bit of affiliate marketing through that link as well. So if you want to do me a favour and give me a few extra bucks then goes into the details of how to use open source and on GitHub. And also free to use. So even if you’re if your parents and you’re not interested in helping because you’re interested or teacher in teaching with heavy, you can simply go to WWE out of helicopters calm, it is free, it’s available in 18 different natural languages, including Hindi, Bengali, Arabic, so we also support right to left languages, Dutch, of course, French, Spanish, German, Portuguese, so whatever language you have, I would say there’s a big chance that it’s actually also available in the language that you speak. So we love to have more users, we love to have more open source contributors for free to check it out, see if it works for you.

Jamie

Excellent, excellent. And what I’ll do is I’ll get, I’ll do some Googling and get all of those links, put those in the show notes. So if you’re listening, don’t worry about diving across your car and getting a notepad to write those down. Don’t do that carry on driving. And you can look at the show notes later. And then I will also make a point of putting a link to the code reading club as well in there, so that people can check that out too. Because you know that that seems like a very important thing to me, to be able to actually do that in a structured way with a group of people. I feel like that’s a great idea. Maybe people can start doing these things in their companies, you know, maybe one week it’s a lunch and learn. Maybe another week is a code reading club. And then maybe like I say, someone could invent the Visual Studio Code plugin to allow you to draw on your code and annotated with squares and shapes and boxes and stuff. Because the the support is in there for Visual Studio Code to do it. It’s just how do you store it?

Felienne

Yeah, yeah, maybe one other link to add to the show notes is the cod reading clubs. This is codereading.club have monthly go treating clubs that are open online and free for people to join every first Tuesday of the month, at 7pm, Central European time. So this will be morning, probably if you’re in US, just you can join. And we also have a new code snippet just for you to figure out, hey, is this interesting? How does that work to see if you want to do it within your company. And if people are doing it in their companies I am quite interested to sit in. I’ve done that with some companies. So if people want to have me as a facilitator, or just me in the audience to see, well, do they do it proper, then also feel free to reach out because this is a thing I’ve done in the past? And I learned a lot from it. So I very much enjoy doing that.

Jamie

Excellent. Okay, well, I guess the only thing left to say Felienne is thank you ever so much for being on the show. And thank you so much for sharing all of this knowledge with me today. I’ve got loads of points that I’m going to go in and actually roll into my own development practice. And as a as an actual book, I do genuinely recommend that developers get your book because it is it has helped me. For instance, after I bought the book, I started learning go. And I feel like I mean, this may be confirmation bias. I’m not sure. But I feel like I’ve picked it up quicker than I would have done otherwise. So you know, I want to thank you for that.

Felienne

Cool.

Jamie

So yeah, thank you very much Felienne and I hope you have a wonderful rest of your day.

Felienne

Yeah, thanks for having me. It was really nice to chat with you.

Jamie

Thank you very much.

The above is a machine transcription, as such there may be subtle errors. If you would like to help to fix this transcription, please see this GitHub repository

Wrapping Up

That was my interview with Felienne Hermans. Be sure to check out the show notes for a bunch of links to some of the stuff that we covered, and full transcription of the interview. The show notes, as always, can be found at dotnetcore.show, and there will be a link directly to them in your podcatcher.

And don’t forget to spread the word, leave a rating or review on your podcatcher of choice - head over to dotnetcore.show/subscribe for ways to do that - reach out via out contact page, and to come back next time for more .NET goodness.

I will see you again real soon. See you later folks.

Follow the show

You can find the show on any of these places