Matt Godbolt: Hey, Ben.
Ben Rady: Hey, Matt.
Matt Godbolt: I mucked up the intro, didn't I? So this is going to be a ah pain to edit. Nevermind. Hello. How are you doing? I'm just making notes for myself in the actual audio recording that everyone's going to hear about how badly I mucked it up.
Ben Rady: I'm doing just fine.
Ben Rady: Well, you know, that's fine. This is this is a high production value podcast.
Matt Godbolt: it is Well, it is.
Ben Rady: So we have.
Matt Godbolt: I made you get an electronics project box out just to make your microphone a bit higher up.
Ben Rady: Uh-huh, yeah, because I had to build a better microphone.
Matt Godbolt: so
Ben Rady: So you start with the electronic project box, and then no.
Matt Godbolt: You had to.
Matt Godbolt: No, we didn't quite. I dread to think how complicated and how deep that rabbit hole goes. If you if you can actually say, no, I want to make my own microphone because I.
Ben Rady: I'm going to make my own USB microphone, right?
Matt Godbolt: Oh my gosh, what technology would, that's, that's a really interesting, I know this is not what we were going to talk about, but what a fascinating set of technologies you need to understand, both analog electronics, digital electronics protocols, isochronous, whatever it's called, isochronous.
Ben Rady: Yes.
Ben Rady: Yeah.
Ben Rady: Uh-huh.
Matt Godbolt: I just feel like it should be isochronous really, but, um, yeah. All right. Well, we're not doing that right now. We both have commercially bought microphones, I should add.
Ben Rady: Yes, made by professionals who are not us.
Matt Godbolt: and And hopefully, yeah we yeah, I'm a professional.
Ben Rady: A professional USB microphone maker.
Matt Godbolt: No, but I am a professional. You just said professionals.
Ben Rady: Mm-hmm.
Matt Godbolt: You didn't qualify.
Ben Rady: I'm a professional boxer. Here's my USB microphone that I made.
Matt Godbolt: That's right. what That works.
Ben Rady: Yes.
Matt Godbolt: Anyway, that's not what we were going to talk about today. What are we going to talk about today?
Ben Rady: ah I was kind of thinking about talking about I don't really have a better title than The Joy of Programming.
Matt Godbolt: The joy of programming.
Ben Rady: It's right.
Matt Godbolt: I love that name. That's great.
Ben Rady: It's, yeah, it's sort of like, um you know, possible references to possible things from the 70s that might be not appropriate for children but um the
Matt Godbolt: Didn't Madonna make a book that was something like that as well? I think that was ah the joy of something else that, yeah, again, not.
Ben Rady: maybe I don't know that that the book I'm thinking of is not that isn't was not written by Madonna, but in any case, ah the the phenomena of ah doing things that cause dopamine to be released into your brain.
Matt Godbolt: OK.
Matt Godbolt: Right.
Ben Rady: which in some instances you might call addiction, in other instances you might call ah the thing that we do professionally and get paid for, which is programming.
Matt Godbolt: Well, that's an interesting.
Ben Rady: And there are many other things, but there's just sort of this amazing phenomena of if you love to so program, ah there are aspects of it that are deeply rewarding to you. And I have definitely had this sort of like, you know, um moments in my life where I had opportunities to maybe step away from that and then ultimately decided that I did not want to do that because programming brings me a lot of joy. And it seems like it would be a shame to give up on it. So I was maybe gonna talk through and think about, okay, what specifically about programming
Ben Rady: brings us joy as programmers who love to do these things.
Matt Godbolt: What an amazing, what an amazing topic. And as all of these, uh, therapy sessions, I mean, sorry, podcast recordings go, it couldn't be more timely in so many ways, which I'd like to think that you had the foresight to think about that and go, Hey, I'm going to propose a topic which is going to make Matt feel better.
Matt Godbolt: but um you know ah But one thing I would say is that your comment about addiction um is rings somewhat true, but my understanding is that the addiction part has the negative connotation, a negative part of the definition, which is that you will seek out that dopamine rush to the detriment of other aspects of a normal life, or something
Ben Rady: And we don't do that with programming because.
Matt Godbolt: Some phrase, and well, I mean, so there's a difference. There is a difference. Like if you leave your child at school and forget to pick them up because you're programming, that might be considered an addiction.
Ben Rady: Yeah.
Matt Godbolt: And I'm sure we've but all but skirted the edge of things like that.
Ben Rady: Yeah.
Matt Godbolt: But I said, it's a very different thing from, you know, and so right. Personal example, many times while I'm in the flow state,
Ben Rady: Yeah.
Matt Godbolt: pun intended for coming up.
Ben Rady: huh
Matt Godbolt: I'm in the flow state and I'm programming and time has no meaning whatsoever.
Ben Rady: yeah
Matt Godbolt: By the time I finish I realize that it's actually excruciatingly painful because I've needed to go to the bathroom for probably half an hour and I've zoned it out so badly that now I need to get into a very different flow state um quite urgently and
Ben Rady: Yeah. Yeah.
Matt Godbolt: that you could say it has the hallmarks of like being so sort of somewhat destructive of a sort, right, or self destructive, right.
Ben Rady: Yeah. Yeah. Yeah.
Matt Godbolt: So I get that as ah I get it's on the scale, but I get the I just want to make sure that like, we don't, first of all, we don't um minimalize folks who are on the addiction side of things, whatever those things are, right, there's not trivialize it, right, because this is a little bit of a, this is a light hearted conversation about things we love, not like oh ah anything other than that.
Ben Rady: Yeah. Yeah.
Ben Rady: Mm hmm.
Matt Godbolt: But um yeah, I think maybe the the The part where at programming the the joy of programming is detrimental to my life is that I don't know when to stop doing it for money, and when doing it for fun. That that changeover is. you know like And that can be abused, for example, a hundred million years ago when I was in the games industry.
Matt Godbolt: the fact that they barely paid anyone to do anything, but expected us to do 14, 15 hour days for you know seven days a week, for weeks and weeks and weeks upon end.
Ben Rady: Right.
Matt Godbolt: um There, I think that the fact that I loved it so much and I got so much out of it carried me through in a very different way than I would do nowadays, even though I do love doing it. I will go, actually, you know what?
Ben Rady: Mhm.
Matt Godbolt: I've got a family to go home to.
Ben Rady: Yeah.
Matt Godbolt: Anyway, so getting those caveats aside, what makes programming that most that much more fun than most other activities, other than maybe, I don't know, I mean, between consenting adults, golf.
Ben Rady: ah Well, or video games.
Matt Godbolt: Or video games, yeah.
Ben Rady: i mean so i mean and And this is one of the things that was on my mind thinking about this. And again, not trying to trivialize addiction and people who struggle with addiction.
Matt Godbolt: Sure.
Ben Rady: But there is an argument to be made um And, you know, I was talking to a friend about this earlier today and he was kind of making this argument. It's like, you know, there are sort of older models of addiction and there are new newer models of addiction and one of the more new, although I am not a psychologist or a psychiatrist and I am not trained in any of these things. I'm a very, very much a layman. But I'm just saying from my perspective, the way that I think about this stuff is that you can have functional and dysfunctional behaviors.
Matt Godbolt: Mm hmm.
Ben Rady: You maybe heard the term functional alcoholic before, and that is a person who struggles with alcohol addiction, but does so in a way that it's not really affecting their life in any sort of like significant enough way.
Ben Rady: to be dysfunctional, right? To be in those situations, like you say, where you you know you don't pick your kids up from school or you lose your job or something like that. And video games certainly have this this the same property or can have the same property of you know playing video games
Matt Godbolt: Hmm hmm.
Ben Rady: Maybe you are you are a functional video game addict and you just play a lot of video games and you enjoy it and you you know just spend a lot of your time on that and that's fine. And maybe you're a dysfunctional video game addict where you're like ducking out of ah work in the middle of the day to play EVE Online.
Matt Godbolt: Right.
Matt Godbolt: maybe Maybe, maybe it's five in the morning and you're still playing your level 70 cleric and you know, you've got to get up in 35 minutes time and you're, I hear.
Ben Rady: Yes, right.
Ben Rady: Exactly, exactly, exactly. And I am guilty of of that for sure, especially in my younger days where it's like, you know, I would play video games until two zero in the morning. And then, ah you know, like when I was in in school, I would play video games super late and then have to wake up early for class and then fall asleep in class. And I'm like, this is a problem. I need to not do this anymore. And so like, why are these like, why why do we do these things? We do these things because dopamine. and Programming has this, ah and you know you're talking about the flow state earlier, programming has this amazing ability to put us into this state where we're just like getting the dopamine rewards over and over and over again.
Ben Rady: And you're like, oh my God, this is amazing. And then five hours fly by just like with the with the video games, right? um But of course, no one's going to like, you know, say, Ben, you're addicted to programming and you need to stop, right?
Ben Rady: Like, like that's,
Matt Godbolt: No, they say, thank you very much, Ben. Here's another paycheck. Keep doing it.
Ben Rady: Exactly. and And as you were saying, like ironically, in maybe not ironically, in the video games industry, that it's like, yeah, they'll be very happy to just have you work 12 hour days. And not only will they not have an intervention for you and tell you that you have a problem, but they will reward you and say great work and you know put your name on the on the side of the of the case.
Matt Godbolt: That's not exclusive to video games.
Ben Rady: so True.
Matt Godbolt: You know, I think, you know, there are many places that will be happy to take on extra, extra work for no extra money.
Ben Rady: Of course. Of course.
Ben Rady: Of course. So so like I kind of wanted to to think about this in the context of like how do you harness this this property, this reality, for good? and how do you And what are the things that you do that sort of bring you this joy and and let you do these things um and let you turn it into a career? And you know the sort of dimension that I was talking about before of like not giving up on it, right? Because it's like,
Ben Rady: You could, for certain other behaviors that are like this, see this property as a curse. Like when you do this thing, your brain releases a bunch of dopamine and that means you're just going to want to do it all the time, right? And you apply that property to a bunch of different things and you get a bunch of different results. You apply it to programming and we call that a career, right?
Ben Rady: So like, what is it that that does that? And is that something that you should give up? Is that something that you should try to stop? I argue no. I argue lean into it. I argue embrace it and maybe even be thankful for it. um As I was saying, you know, 10 minutes ago, I've had different opportunities in my career to sort of move into roles where I'm not coding anymore.
Ben Rady: And I've tried that, I've done it, and I didn't enjoy it. and um I think we've talked about this on the pod before.
Matt Godbolt: Mm hmm.
Ben Rady: um And one of the reasons why I decided not to do that is because I really view this joy of programming as a gift. It is a very fortunate thing that the thing that I, one of the things I absolutely love to do also pays really well.
Matt Godbolt: the Yes.
Ben Rady: And I would be sick if I ever gave that up and put myself in a position where I was like, ah, I hate my job now. Right?
Matt Godbolt: It's yeah, I mean, this has been a 30 plus year career for me too, where everyone I've ever spoken to who has a quote, normal job, because I don't know how common it is that you and I, the situation that you and I are in.
Ben Rady: Yeah.
Matt Godbolt: But other people would introduce me and say, you know, like, you know, he does his hobby for a living. And I think, yes, I do. And, you know, it was 10 years into my career that my mum stopped asking me, when are you going to get a real job?
Matt Godbolt: Because to her, I didn't have I mean, part of that was games, right?
Ben Rady: yeah
Matt Godbolt: But but also like, you know, if you if you
Ben Rady: right
Matt Godbolt: you know that was the quote you know about work-life balance whatever like if you love your job then there is no balance to be had you know there is no work and life that are separate things your your work is part of your life which i mean inevitably it is and the dysfunction then comes when you do it too much and you can't stop and your but let personal relationships suffer in a way that you you know
Ben Rady: Yeah.
Matt Godbolt: But just suffer, full stop.
Ben Rady: Right.
Matt Godbolt: But yes, to your point, if I can get on a train at 7:30 in the morning, get to work, spend eight, nine hours a day in a flow state or close to enjoying what I'm doing, provide enormous value, we hope, to a company and they remunerate me for doing that.
Ben Rady: Mm hmm. Mm hmm.
Matt Godbolt: and I high-five everyone on the way out, get on a train, go home, maybe even have some energy to do some hobby programming in the evening still somehow, then why would you stop doing that? What what possible reason is there to do that?
Ben Rady: Why would you stop?
Ben Rady: Yes, yes.
Matt Godbolt: you know you So, one counter there, obviously, is that you do have, unlike, again, many other careers or things that you might ah um What's the word I'm looking for here? ah Let me just explain it like one thing that we have is our job is accessible to us remotely as in when I get home I can carry on my job but I can also do the things most of the things that I could do in my day job I can do as an individual person I can write the I can write code for my hobby projects I can nowadays fire up cloud providers worth of GPUs if I want to play around with GPU related stuff and it's you know it's not
Matt Godbolt: free, but it's also not super expensive. and There's not like too many things. Now, the very, very crazy low latency stuff that I also love doing gives me the probably the most dopamine is not something I can do because I do need some magical stuff to be able to play with ah in the evenings.
Ben Rady: Mm hmm.
Matt Godbolt: But by and large, I could say to myself, all right, for some other trade off in my life, I will spend my time at work not doing the thing that I love for some other benefit to be determined.
Matt Godbolt: But I still at least can go home and do it ah on my own time and do my own projects, which is, again, harder to do for some folks, or at least maybe they have a different thing that is just, you know, I knit when I get home.
Matt Godbolt: Sure. Right.
Ben Rady: Mm hmm.
Matt Godbolt: Fine. um So that that would be my only counter ah to you, um is that like, well, you know, if you loved programming, you can do it on your own time.
Ben Rady: True, but like you don't you can't make a career in knitting, at least not in the modern age, right?
Matt Godbolt: I'm, yeah, I'm i'm sure that so somebody somewhere is listening to this going like, wait, what? But that's what my grandma did.
Ben Rady: Yeah, I mean, it's very difficult.
Matt Godbolt: Sorry, I'm gendering that.
Ben Rady: Let me rephrase.
Matt Godbolt: ah It's difficult. All right.
Ben Rady: It is extremely difficult to make a career in knitting that um
Matt Godbolt: Well.
Ben Rady: it's ah there's a there's a I'm gonna bring back the golf reference. There's a golf joke. The the Korn-Ferry tour is like the the you know the the minor leagues of golf.
Matt Godbolt: Okay.
Ben Rady: And there's a joke that's like, what's the difference between a Korn-Ferry tour player and two large pizzas? Two large pizzas can feed a family of four, right?
Matt Godbolt: Yep.
Ben Rady: Like the problem with those sort of hobby professions in most cases when you're sort of doing the thing that you love is that it doesn't pay particularly well.
Matt Godbolt: Right. You may be the world's best musician, but like only one in a million people will make it to somewhere where they can support themselves.
Ben Rady: Right.
Matt Godbolt: So you're probably working three jobs and then busking in the evenings if you want to try and make that a career. Whereas programming, at least the programming that you and I do, someone is more than happy.
Ben Rady: Yeah.
Matt Godbolt: They will fall over themselves to say, can you please come and program for me?
Ben Rady: Right.
Matt Godbolt: And here's some money for you. That's like very, very reasonable. Thank you very much. Right. So that's a difference.
Ben Rady: Yes.
Matt Godbolt: I get you that. But what if that same company says you are We value your wisdom. You've been doing this for 30 years, Ben. You have a great way with people. we People follow your lead. People will align themselves with your goals. You will carefully and patiently explain things to junior folks, and they will be better because of what the time that they spent with you telling them or teaching and coaching them. Could you do that for us instead?
Matt Godbolt: because It's so much more valuable to my company that I have you making the shot, calling the shots and mentoring and coaching than it is to have your hands on the keyboard because I only get one Ben and he's amazing, but your hands on the keyboard make one Ben go fast.
Matt Godbolt: Whereas you talking to 15 people in a, you know, for an hour gets 15 people going 20% faster. Now, unfortunately beats you. What would you say to that?
Ben Rady: Uh-huh. Well, so in that particular case, I also love mentoring people. So like that's that's maybe a special situation of like, oh, I don't mind doing that at all.
Matt Godbolt: Okay. All right.
Ben Rady: That's fun, too. um But for maybe the more ah you know a different aspect of that, which is, Ben, you're really good at organizing and planning and coordinating.
Ben Rady: Can you please sit in meetings all day and make sure that the you know software engineers who work in this company are working on the right thing? I would say, yes, I am capable of that. And I'm going to choose not to.
Matt Godbolt: Right.
Ben Rady: because that will not bring me joy.
Matt Godbolt: Right. and And again, the fact that you could go home and bring joy to yourself, which sounds now very dodgy now I say that out loud. Not like that. ah Not in a lusty way.
Matt Godbolt: um um You could come home and and program.
Ben Rady: Yes, I could come home and I could do any number of things and I do, you know, I i love golf and I play golf on the weekends, right?
Matt Godbolt: Yeah.
Ben Rady: No one's gonna, you know, again, feeding the family of four, no one's gonna pay me for golf and I'm not on the Korn Ferry tour anytime soon.
Matt Godbolt: Yeah.
Ben Rady: um I do those things and those are fun. That's part of having a, you know, heterogeneous, rich life full of lots of, you know, different aspects and not just being single, you know, yes.
Matt Godbolt: Right, right. So you're saying like. as as part of the tapestry of life, programming is a really big part of that, of joy for you, sir but that it's not the only thing, but of the things that bring you joy, it is the only one that you could make ah your career out of, and therefore the spare time that you have when you get home could be used for more programming, but it could also be used for time with loved ones, ah time play on on the golf field or in your backyard, in your golf simulator with your crazy, all those video games, yes, yeah.
Ben Rady: yeah Yeah. Yes.
Ben Rady: Great. Yeah, or playing those video games that I love to be addicted to. a Yes, exactly.
Matt Godbolt: Yeah, I think that's a really level. I mean, I don't know. I'm not surprised, ah but it's a very thoughtful level headed response to what I thought was going to be a difficult and challenging question for you.
Matt Godbolt: So evidently.
Ben Rady: Well, I mean, I do think about these things. um But yeah, so one thing I wanted to get into in this episode is you know we talked about flow state earlier, right?
Matt Godbolt: Yeah.
Ben Rady: We should probably talk about that for people who may not be familiar with it. I would hope that most programmers will at least recognize it when they when they when they hear it explained, right?
Matt Godbolt: Or even if it exactly, yeah, yeah, I think you've got Oh, well, even not without it. I think the name is sort of quite a motive of what the the concept feels like.
Ben Rady: Yes.
Matt Godbolt: But yeah, we should definitely I will I will I mean, we sort of touched on it already.
Ben Rady: Yeah, yeah. You want to take a crack at a definition of flow state?
Matt Godbolt: You know, like we said that flow state where you look up and five hours have gone and you're busting for a wee, right? You know, that's that's what flows. I'm pretty sure there are textbooks that describe it like that. um No, but it it is the point of which you have become um so
Ben Rady: here
Matt Godbolt: deeply ingrained in what you're doing, that you don't notice what's going on around you, you completely zone out anything that's around you. um And you're able to make essentially what feel like, um ah I always think when I was talking to my kids about this in their music, which is a complete non sequitur, but like, I talk about it in terms of of Star Wars references, it's like it's when the force is flowing through you.
Ben Rady: Mm hmm.
Ben Rady: Yeah, yeah, yeah.
Matt Godbolt: Right? You know, you you everything comes instinctively, you're all tabbing between things, you're pressing buttons, and you're not even aware that you're doing them.
Ben Rady: Mm hmm.
Matt Godbolt: It feels all automatic. Everything's going. Maybe you've got music going in your ears that tends to help me.
Ben Rady: Mm hmm.
Matt Godbolt: Maybe you haven't. Maybe you don't need it. Maybe you're just in that. But like, essentially, your attention is focused and directed and everything is just feels so natural. And then you get a tap on the shoulder and the whole thing falls over.
Matt Godbolt: It feels like you've tripped over a tree root, you know, in those kind of weird dreams where you suddenly your whole body twitches and everyone Oh, what, what and you're jarred out of it.
Ben Rady: Right, right.
Matt Godbolt: And then you're like, Oh shit. And then you're trying to get back into it and it's gone, but you can be so productive and it's so, so, uh, uh, enjoyable.
Ben Rady: Mm hmm.
Matt Godbolt: I mean, to, to coin, you know, to go back to your endorphin, uh, rush or your dopamine rush.
Ben Rady: Mm hmm.
Matt Godbolt: Um, it is so enjoyable when you're in that you're making progress.
Ben Rady: Mm hmm.
Matt Godbolt: Everything just feels great. So yeah, I made it sound very druggy now.
Ben Rady: No, I mean, it's, so i I read, I tried to read a book on this. so I'm gonna go see if I can figure out the name of this book.
Matt Godbolt: Oh, good luck finding that.
Ben Rady: um But I, yeah, no, there's, um what is the name of this book again?
Matt Godbolt: This is where, because we're not going to do much editing of this, I can talk while you Google if you like. So but we're going for listener.
Ben Rady: It is Flow, The Psychology of Something, The Psychology of Optimal,
Matt Godbolt: We are. Oh yeah, we got it.
Matt Godbolt: Oh, he's trying to.
Ben Rady: the psychology of optimal experience. So this book, I didn't really like this book, because I was looking for like a deeper, more thorough explanation of this phenomena. And this book kind of seemed like...
Matt Godbolt: Sorry, you said Phenomena and I have to go... but Phenomena.
Ben Rady: Yep, phenomena. do doo do do
Matt Godbolt: Well, there's our cold open.
Ben Rady: Yep.
Matt Godbolt: well Anyway, you didn't like the book. You didn't like the book.
Ben Rady: Uh, yeah, I didn't like the book because it it got a little culty. It got a little like, uh, woo woo. You know what I mean?
Matt Godbolt: as As these self-help books are want to do,
Ben Rady: yeah Yeah, but but therere i um my memory of this is that he did have a pretty clear definition of flow state, which is sort of the intersection of focus and proficiency, right?
Matt Godbolt: Oh.
Ben Rady: You're very focused on something that you know how to do well. And and again, getting back to video games, if you've been like a moderately good player in like a first-person shooter, you have definitely experienced flow state where you are just moving around, reacting to your environment, shooting at targets, you know you know going through the a level maybe that you've done a couple of times. like That is 100% flow state. And it is the same thing that you feel when you are working on a task where you are proficient and are able to focus.
Ben Rady: and you're making sort of good progress. Now, there's definitely a state of programming where you're not in flow state where you're just staring at a stack trace and you're very confused and you're not feeling very proficient and maybe not very focused and you're just like, I don't understand what's going on here.
Matt Godbolt: Mm hmm.
Matt Godbolt: Or, or more on brand for us, you're waiting for a long build, or, you know, you've been knocked off of like your, your, your, your flow, because you're waiting for something you've all tabbed to, because you've been distracted, right?
Ben Rady: Yeah.
Matt Godbolt: You've had ah and ah some kind of external stimulus has applied to you.
Ben Rady: Mm hmm. Mm hmm. But but I view that flow state as being like the core of the joy of programming. Right. Is is and there are other interesting things.
Matt Godbolt: That's.
Ben Rady: There are other interesting things about programming that are fun and I enjoy. But it's like that's like the main loop of of the joy of programming.
Matt Godbolt: That is your, right, the nugget, the center of it that you build everything.
Ben Rady: Yes.
Matt Godbolt: is I was going to say, like, you know, again, away from the keyboard and having just come out of a few meetings today where this has happened to me, we've had some great discussions with people with, the you know, the moral equivalent of whiteboarding ideas where that can also be very rewarding.
Ben Rady: Mm hmm.
Ben Rady: Yeah, yeah.
Matt Godbolt: And, and, and essentially when when people ask me, what do I like about programming? I do, I do like the flow state and I think it is a very big part of, of certainly the, you know why we why you are and I are so aligned on things like, you know hey, if we had the build be this much faster, then you know you would just build it and test and build and test.
Ben Rady: Right.
Matt Godbolt: And then you're like banging away at the code and everything's just going.
Ben Rady: Mm hmm.
Matt Godbolt: And you're like, this is great. Nothing here has to stop me. um But also, what I tend to say to people is it's problem solving. And it's deep digging. It's like you know always picking up another rock and going, like but why is this broken?
Ben Rady: Mm hmm.
Matt Godbolt: Hmm, well, that doesn't make any sense.
Ben Rady: Mm hmm.
Matt Godbolt: And like almost like this. Yeah, that that's what I think. I, I, I, that's what I tell people that I like about programming, but the flow state is a core part of it for me as well.
Ben Rady: Yeah.
Ben Rady: Yep, yep. And sometimes those things go together, right?
Matt Godbolt: Right.
Ben Rady: Like you can be in a flow while solving a problem. And like, again, video game analogy, it's like, OK, how do I solve? How do I figure out this um this dungeon?
Matt Godbolt: This dungeon. How do I get this thing up to this?
Ben Rady: Yes, exactly.
Matt Godbolt: How on earth do I get the fight flame down from up there if without?
Ben Rady: Right.
Matt Godbolt: Yeah, yeah, yeah.
Ben Rady: You know, it's like play Portal for an hour and you will experience this for sure.
Matt Godbolt: Oh my gosh.
Ben Rady: Right.
Matt Godbolt: That's true.
Ben Rady: um So like you can you can be doing both of those things at the same time. You can also be solving a problems and not be in the flow state and still find that very rewarding. And I certainly do.
Ben Rady: Like it's almost more of like a jigsaw puzzle thing where you're just kind of like, you know, like I don't understand how these things are going to fit together.
Matt Godbolt: Right.
Ben Rady: What am I going to do here? um Although that's maybe not exactly a jigsaw puzzle, but but it's like it's like kind of the same thing, right?
Matt Godbolt: No, no, I'm with you. I see it. Yeah.
Ben Rady: Yeah. um But yeah, I mean, and those those things, can know the sort of puzzle aspect, maybe more like a Rubik's Cube, like when you don't know all the algorithm to do the Rubik's Cube and you're doing it in 3.4 seconds, right?
Matt Godbolt: So.
Matt Godbolt: Right. Which is yet not me.
Ben Rady: um Yeah. um But like that kind of problem solving and that sort of puzzle solving is also very rewarding, but it's maybe not flow state, right?
Matt Godbolt: Yeah. Yeah. Yeah. So do you, I mean, flow state obviously is not a programming concept. It's not unique to programming. We've already just said that, you know, video games also, you can be in a flow state.
Ben Rady: Mm-hmm.
Matt Godbolt: um Obviously only a very few people get paid a living wage to play video games all day.
Ben Rady: Right.
Matt Godbolt: I'm something I need to keep informing my teenage children. ah Um, but
Ben Rady: Yeah.
Matt Godbolt: What else do you think, what other things can be flow state? And what is it about programming, do you think? Is it just ah an accident that we found a job that flow state is good for? Do you think, maybe I mean, maybe ah maybe this is where we could actually invite listeners to send us messages on the emails or hack a term or whatever the communications is and say like, what what other things are there out there?
Ben Rady: Mm hmm.
Matt Godbolt: Because, you you know, I'm skewed by my knowledge of what um uh what are my experiences and the only other things i can think of that are close to that that uh that you could maybe call a career of people who are like scientists and um you know ah mathematicians who are trying to solve difficult problems of a sort.
Matt Godbolt: And, you know, sitting down with a piece of paper working out stuff, and I can only imagine that must be something like a flow state, if you're going to be staring at something for, four you know, three or four hours while you manipulate symbols around and look for that, that glimmer of inspiration that goes, ah, this will cancel with that or so again, I'm so bad at maths, but like, um or similarly, you know, I have, ah there's ah acquaintance of mine that is a theoretical physicist.
Matt Godbolt: And I can only imagine that what goes on when he's at his ah desk at work with his feet up on his desk, just with his head hands hands behind his head, just thinking about physics, which is presumably what a theoretical physicist does, right?
Ben Rady: Mm hmm.
Matt Godbolt: There's got to be something going on in there that's like, you know, akin to what I must be feeling when you know, you're trying to go, well, what if that happens over there?
Ben Rady: Right.
Matt Godbolt: i can Yeah, but yeah, it's and maybe other knowledge work in general. Do you think other knowledge work?
Ben Rady: There's probably I mean, my I don't really know. Like I said, I've tried very hard to spend most of my career doing programming, but um I would imagine that there's a lot of knowledge work that has this property, right?
Matt Godbolt: Yeah.
Matt Godbolt: Right, but we've just, this happens to be the one that we did as kids, and turned out to be a decent career and gives us this joy, as as well.
Ben Rady: Yeah.
Ben Rady: Yeah, yeah.
Matt Godbolt: I wonder what it was so yeah I mean if we just so There's this problem solving. There's and something like you've ah like to say the problem solving sometimes are the problems of your own making, you know, the whole what is it that detect?
Ben Rady: hu Oh yeah, programming is a murder mystery where you are both the detective and the murderer.
Matt Godbolt: Tell me you did.
Matt Godbolt: Right. And so in a sense that that you're you're doing both of those things, right?
Ben Rady: Yes.
Matt Godbolt: You're both committing murders and also solving them at the same time.
Ben Rady: Yes. Yes.
Matt Godbolt: you know There's definitely always something to to to be looking into. i yeah ah I'm really interested in what it is about programming specifically. um I've always thought, again, you know it's like there's you're building these edifices, these complicated interlocking systems, and yet they don't exist anywhere but your own mind, really, and a bit of crappy ASCII in a way in a text file somewhere.
Ben Rady: Mm hmm.
Ben Rady: Right.
Ben Rady: Yeah, no, I mean, there's 100% there's a big creative aspect of programming, which I think most lay people wouldn't really expect, right?
Matt Godbolt: i I remember vividly talking to my game producer in like the late 90s, early aughts, and we were talking about some aspects of programming. and it was I can't remember what the the discussion was about, but halfway through I realised that he thought the thing that was blocking us from getting more work done was our inability to type faster.
Ben Rady: Right.
Matt Godbolt: And you're like, oh, my God, no, it's not like I just know what to do and I have to tell the computer what to do. And if only I could type faster, it would get done quicker.
Ben Rady: Yeah.
Matt Godbolt: It's that I don't know how to tell the computer what to do, because none of us really understand whether it is we want the computer to do in the first place. And that's the half.
Ben Rady: Right.
Matt Godbolt: And you're like, that was a mind blowing thing, because it's yeah, as you say, lay folks may not necessarily realize that it is a very creative process. And that's just also mea culpa on my own front front here. Obviously, I sort of said at the beginning of this, you know, this is a therapy session, but I have just managed to put to one side my management responsibilities in order to get back to doing more programming. So this couldn't be more on target for me. um One thing I realized was, um yeah, I've been trying to do a bit of programming in between, but I've been so mentally exhausted by everything that I don't think I realized how much
Matt Godbolt: space and time and relaxation and the creative process needs. You need to be able to like pace around the room and not feel under the time pressure to to to have these creative things pop into your head and go like and you know like I think we've probably said some at some point on this show before now.
Ben Rady: Yeah, yeah.
Matt Godbolt: often times you go home with a terrible problem and by the time you've got on the train or by the time you you know that next morning on the shower you kind of like put your head in your hands and go well of course I forgot that this thing is unsigned or signed or whatever whatever it was or of course that will never work because of blah or you have some new leap of thing in the first thing in the morning because ah because something is going on in your head and that is again another example of the creativity part of this where where it's not like you can just
Ben Rady: Right, right. Yep. Uh-huh. Uh huh.
Matt Godbolt: squeeze harder against something and keep banging the keyboard for longer which I guess actually does dovetail back into the beginning part of this where if you're in flow state it is both um obviously very productive and very rewarding but it's exhausting too or it can be you can get to the end of it and cofi the go to the loo and then go oh my god I just I'm done now I'm done for the rest of the day and you can't keep on doing it which maybe is different from some other things that fall under addiction
Ben Rady: Yeah. Yeah, yeah, yeah.
Ben Rady: Right. I mean, it's almost like going for a long run and then stopping, right? Like it's, it's.
Matt Godbolt: Which is the only reason to go for a- Sorry, excuse the dog. Alright, we're gonna hope that I remember to edit this. Or else everyone gets to hear Monty barking.
Ben Rady: Yeah.
Matt Godbolt: um But that's the only reason to go for a run, is to stop. As far as I'm concerned, there's no other benefit other than the blessed relief when it's over.
Ben Rady: Yeah. Yeah. Yeah.
Ben Rady: Right. Right. And then it's like, I don't know if you've ever been in this situation where it's like you go for a run and you stop and you like realize that you need to actually run more. That is terrible.
Matt Godbolt: That is that sounds nightmarish to me.
Ben Rady: Like, like you, you stop for like two minutes and then you're like, Oh, I was supposed to do like seven miles and I only did five. Uh, okay.
Matt Godbolt: Oh, no, yeah, that that's that's like.
Ben Rady: I guess I need to, it's like, it's, it's awful.
Matt Godbolt: I can only imagine that that again, sorry to get all toiletty on you here, but it's like if you have to if you.
Ben Rady: It's awful.
Matt Godbolt: If you're going to the bathroom and for whatever reason, you suddenly have to stop. And then that's the worst, is it? Oh, no. Hang on. Someone's just opened the door. I didn't. Oh, yeah.
Ben Rady: Yes, uh-huh.
Matt Godbolt: Nobody needs that. Um, but this will this be our first R rated.
Ben Rady: Nobody needs that.
Matt Godbolt: Um, I don't think, Oh my gosh.
Ben Rady: No, we're just gonna edit all kinds of stuff out of this podcast. It's gonna be great.
Matt Godbolt: I don't know that we are. I think you've, uh, you think too much of my editing skills. Um, but.
Ben Rady: Uh, yeah, no, I mean, yeah, it's, and I've a hundred percent had that too, where it's like, you know, you're cranking away on something and then you like commit push and you let it build and just all of the adrenaline and on the and all the chemicals just drain out of you.
Ben Rady: And your brain just goes, and then you're like, all right, now I need to go to bed. Cause, uh, I've been at this for 10 hours and that's enough.
Matt Godbolt: I'm spent now.
Ben Rady: Yes.
Matt Godbolt: Although actually just just thinking about that and in that terms, I know you know both you and I are pretty fair proponents of TDD and other sort of aspects, which is broadly falls under the umbrella to me of gamifying something to capitalize on the human love of a little hit of endorphins or dopamine or whatever the chemicals are.
Ben Rady: Yeah. Mm hmm. Mm hmm.
Ben Rady: Right. Every time the bar turns green, you just get a little ding.
Matt Godbolt: I love it.
Ben Rady: Yeah. Uh huh.
Matt Godbolt: because and ah but ah but But again, we you and I have spoken about this before.
Ben Rady: Yeah.
Matt Godbolt: You and I are ah aligned on this because of bias and and that's why we're that's well we have a podcast together, right? you know Because we found how aligned we are.
Ben Rady: Right.
Matt Godbolt: But I've worked with people, and and and I'm sure you have, who are much more I just sit and I write code, and I write code, and I write code, and I write code. And three days later, I build it for the first time, and it works, and we're done.
Matt Godbolt: And you're like, I don't know how you could have be satisfied at any point throughout that whole thing. Because the entire time I'm sat in my hands, kind of rocking backwards and forwards, saying, just build it, build it, build it, there's a typo, build it, there's a typo, build it, there's a typo.
Matt Godbolt: ah And then the quicker I find it and I even that is a reward like I will often comment out large gobs of code that doesn't compile While I'm sort of doing refactoring just to kind of get the warm Gentle pat on the back that hey at least the bit you've done the bit you've converted over still builds and I'm like, okay That's good enough for now and then carry on So people can be different about this right, you know, it can be a
Ben Rady: Yeah.
Ben Rady: here
Ben Rady: yeah Yeah. Yeah. Yeah. Yeah. No. Yeah. And you're right. Like. for sure. Those those habits that we that we both have really do kind of gamify the process. right And it's like it's it's playing into the way that we think about it and what is effective for us. And it and you know i as much of a TDD guy as I am, like you have to recognize that this is not for everybody. right It might not even be for most people.
Ben Rady: I think it's a skill that everyone should learn how to do, but whether you use it or not, that's just depends on you and your team also um because you kind of can't do it by yourself. You need a team.
Matt Godbolt: So finishing up on the sort of themes that we normally touch on on this. Another thing that you and I have liked to do and I haven't done for a little while is pair programming.
Ben Rady: Mm hmm. Mm hmm.
Matt Godbolt: Can you get into a flow when there's another human being in the mix, do you think?
Ben Rady: Yeah. Have you ever had a conversation in a restaurant?
Matt Godbolt: ah Oh, what an interesting analogy.
Ben Rady: You're eating your food, you're talking.
Matt Godbolt: And you don't, you know, unaware about everyone else in the restaurant who's having their own conversations.
Ben Rady: That's, that's pair programming flow.
Ben Rady: Right.
Matt Godbolt: Yeah.
Ben Rady: Until, until, and this is a feature, not a bug. The person behind you talks, starts talking about how they murdered their wife and you're just like, what, what?
Matt Godbolt: I was going to say this.
Ben Rady: And your brain just like clues into that.
Matt Godbolt: There are neurons in my head that will will respond to, you know, your own name being mentioned somewhere.
Ben Rady: And it's like, yes.
Matt Godbolt: That's immediately jumps you out of it. Or if someone says something, you know, factually incorrect about 1980s gaming hardware, then of immediately.
Ben Rady: Yes.
Ben Rady: Right, right. And it's boop, right. And then it's like, you know, when the, when the people who are, you know, two seats down from you start talking about how they're going to delete the module that you're working on. You're like, wait, what, what are you guys, what are you doing?
Matt Godbolt: But yeah, get up immediately. Yeah, right.
Ben Rady: Right. Um, so yeah, it's, it's humans are wired for this, right? Like they're absolutely wired for this.
Matt Godbolt: ha
Ben Rady: Now, not all humans are wired for this and not all humans, um, can do this sustainably every day and work this way all the time, you know, and, and some people who can just don't like to.
Matt Godbolt: Good point, you know.
Ben Rady: So there's all kinds of caveats here, but like humans are, are, are.
Matt Godbolt: Right.
Ben Rady: Can be social creatures, even programmers and If you've ever had a conversation in a restaurant where you're eating a meal and talking to somebody, then I think that you can pair program and get into a flow state.
Matt Godbolt: It's funny, I mean, I do believe you and I'm sure that things that I have done in that world could count as being in the flow state, but I just don't think of it because I think of it as so ah such a solitude and whatever that word is, ah solitary there, there's the word such a solitary activity and it's very personal to me that state where I've got
Ben Rady: and
Ben Rady: Mm hmm.
Matt Godbolt: music blasting in my ears and I'm like ah on the keyboard. Um, that doesn't come out on the radio very well.
Ben Rady: Right.
Matt Godbolt: That's it. I'm just miming keep like infinite monkeys banging on the keyboard.
Ben Rady: Mm hmm.
Matt Godbolt: Um, but, but I, I'm sure you're right actually. And I'm thinking of, you know, you know, probably the same person that you're thinking of who's very fast on computers that we've both paired with over in our careers. Um, those episodes pairing with him have probably been the most that I could imagine as being flow-ish, even if I wanted to strangle him from time to time.
Matt Godbolt: And I'm sure likewise he, he to me.
Ben Rady: Yeah.
Matt Godbolt: But.
Ben Rady: Yeah. Now I will, I will caveat this a few ways by saying it's rare. It's kind of a skill and it's sort of hard to do. And it's not like I'm not, and it's not like that much or productive.
Ben Rady: Right. Like it's, it's good. It's a nice thing to be able to do, but it's not going to turn you into like some superstar programmer. So it's like, you know, it's kind of an interesting thing, but it's my point. My only point in saying this is that it is definitely possible.
Ben Rady: Like ah many times in my career have I been doing that. Uh, another thing is kind of like his tennis or like ping pong, where you're just sort of like, you know back and forth you know, you're just watching the ball and moving around and hit the thing.
Matt Godbolt: Oh, right, yeah.
Ben Rady: And then, you know, 17 back and forths and then someone hits the line and you're just like, all right, that's the end of that point. And it's like that's a mutual flow state.
Matt Godbolt: Right.
Matt Godbolt: No, I guess so. Yeah, that's a very, ah yeah, even in, that's a sort of competitive flow state, right? You've, there's two of you there for a short, depending on obviously you could play doubles and tennis or whatever, but no, that's interesting.
Ben Rady: Right. And I think it's no accident that sort of like the basic intro to ah pair programming exercise is called ping pong because it's it's very much like that.
Matt Godbolt: Yeah, you you'd like the the whole I'm writing a test that will fail or you know, yeah, that kind of thing.
Ben Rady: Mm hmm.
Matt Godbolt: Yeah, that's interesting.
Ben Rady: Yeah.
Matt Godbolt: Well, friend, we're, we're basically at recording time, I realized because we've been in a flow state.
Ben Rady: and Well, the time just flew by.
Matt Godbolt: it did didn i Come on. I mean, dog, dog interruptions notwithstanding, which will again, if people go what dog, I've done a very good job, but likely is not, you'll know exactly which dog I'm talking about.
Ben Rady: Yeah, right.
Ben Rady: Yeah.
Matt Godbolt: Um, yeah, this has been really interesting, very, very, um, very cathartic for me as I move back into hopefully times where I can have a lot more flow in my life and less talking to people in rooms.
Ben Rady: Mm hmm.
Matt Godbolt: so Um, but, um, but yeah, and I can take you for your, your, your answer to the question of like, why don't you just become a manager? ah
Ben Rady: Right. Yeah. Yeah. Well, sometimes you just got to like take advantage of the gifts you've been given.
Matt Godbolt: Very true.
Ben Rady: And and in my mind, this is definitely one of them. I i don't want to give it up anytime soon.
Matt Godbolt: Cool, well I guess that's a great place to end then, so until next time my friend.
Ben Rady: Until next time.