Skip to content
Melo Podcasts Home
CategoriesLanguagesFollowing

Episode notes

Patrick and Jason survey the landscape of desktop user-interface development and compare common toolkit choices. They cover Qt, wxWidgets, Electron, notebooks, Streamlit, and game engines while discussing the architectural choices that make desktop applications easier to build and maintain.

Chapters

Tap a chapter to play from there.

Transcript

Read the transcript · about 15,700 words, follows along as you listen

A:Programming Throwdown Episode 167: Desktop User Interfaces. Take it away, Patrick!

B:As a true nerd, I figured out a way to make even the things I never thought I would do nerdy. Uh, so no, I guess I should have this sounds like a brag, like 'true nerd.' I don't know what that means. I'm not gatekeeping; everyone could be a nerd. Um, if you're listening to the show, you're a nerd. Um yeah, that's right. You're all honorary nerds, even if you just started. I did some amount of physical fitness stuff, uh, you know, in high school—be on some sports teams, that—and then it sort of just languished when I became an adult. I know a lot of people like play pickup basketball and stuff, which is great. What sport did you play? I played basketball, but I was never very good at it too.

A:Be honest? Yeah, same here. I played basketball, and despite being very tall, I was also absolutely terrible at basketball, like.

B:It's the—was that the hundred thousand hour, ten thousand hour thing? I just wasn't willing to put in. Like, I would go to practices, but I never played on the weekends or it wasn't a passion. Yeah, I mean.

A:My thing was—uh, I was and I realize this now watching my kids play sports, like I just don't want to touch anybody else physically touch anybody else. And so I would see, like how could I play, you know, the sport whether it's basketball or soccer or whatever in a way where like I don't have to even inadvertently like touch anybody ever? And—and of course, you just can't really play most sports that way. I ended up finding my niche in volleyball, but every

B:Other okay all.

A:Right, pretty much can't work that way.

B:So I—this all started, I guess, for a variety of reasons. A family member, member of mine started jogging/running a while ago, like years and years ago. And I was like, 'Man, okay, that's good.' Um so I was visiting with them recently, and then it was like kind of feeling bad they were getting up to go for their morning run, and I was like, 'Enjoy. I'm gonna just sit here on my phone.' Um and then—then I was, uh, you don't have, you know, you get these smartwatches. I have, you have an Apple Watch or whatever. Um but I think other ones do the same thing, and so it gives you this estimate of your body's like aerobic capacity, so-called VO2 max. I don't know that much about it. You actually get it measured; you go to a, you know, gym, and they give you like a face mask that you have to wear, and it measures like oxygen in and carbon dioxide—I don't know something like that while running on a treadmill, and it has to do with your body's like ability to process and, you know, handle high amounts of physical activity or whatever. So so they estimate it on a variety of other factors that are correlated with it, and they give you the score, and it says your cardio fitness is below average. Now I'm not like the healthiest person; I'm not gonna lie, but like in general, uh, you know, I—I like to consider myself healthy-ish. I mean, it hurts when you

A:See that? You know, yes, it hurts so.

B:So I have a scale that tells me my body fat is not what it should be and a watch that tells me my cardio fitness. So all this piled up to say, 'Okay, I'm gonna do something about this.' I'm—I'm getting up in age. You know, it's not gonna get any better, right? So I was like, 'I'm gonna start running.' But of course, it's not you can't just run like oh, I have tennis shoes; I'm gonna no, no, no, no, like that was not how I approached it. So I gotta like figure out—I'm gonna do a program. Oh, there's an app. Oh, there's an app is gonna tell me exactly what I have to run each day and like go up by a set amount, you know, each week. So this amount of run followed by walk/run/walk, and then each week it's gonna get better, and then you'll be able to run a 5K, which is sort of like the shortest distance that has common races. You can run like a mile or a hundred-yard dash or whatever, but like as an adult, I don't know how you go find a place where you run a hundred-yard dash or hundred-meter dash. Um yeah, but 5Ks are pretty common. You can just Google it; there's probably one in your city every week certain times of the year, probably. Um so—so I was gonna like okay, I'm gonna run a 5K. Then I realized, oh, my watch can give me all these running metrics, and then not only like per run can you find stuff like how many times your feet are moving per minute, and there's an optimal range that you should be in for that, and cues to make sure your like body is biomechanically efficient, and studies to back that up. But then aggregating them across days—how what is your training load like? Are you getting enough rest? What is the math behind it? Like oh, there's, you know, this set of people has a study; this other set of people has a study. They have different ways of calculating. You can bounce back and forth, and then you get into the traditional tech stuff everyone tries to lock your data up. So then you have all these ways of like exporting it to like more open-source platforms or cross-platform stuff or just more free platforms. And there's like, 'Oh, are you in the Apple ecosystem or the Garmin ecosystem or the Polar ecosystem or the Coros ecosystem?' And there's like all this lock-in, and it's just endlessly fascinating that people have so—I was talking to this family member of mine and sort of saying, 'Oh, you know, I'm doing this, so I run on my Apple Watch,' but I instantly grab all the data and push it up to this other platform. It's called Runalyze.

B:Runalyze just runs this like free agnostic input source, you know, running all these algorithms on whatever it comes from. Um maybe they'll eventually charge; they're not really open-source, but it's sort of at least free for now. And so I just grab all my data and put up there, and he's like, 'Yeah, but I've been using—and he's using Garmin or whatever. I've been using Garmin for like 11 years, so all my data's there,' and I'm just like locked in because of all this history of Runalyze.

A:Yeah? What's the effect like? Did you—is the data helping you?

B:along, so it's keeping me engaged. I will say like it's like the base level metrics that are improving. So like resting heart rate is trending down—that's good. This VO2 max estimate is ticking up. I'm still below average, but I've been doing it sort of eight weeks, and you know, it's just, I guess so the thing that is encouraging—well, discouraging, but encouraging—is some of them will give you like how ready you are to run a marathon, and then it tells me three percent. And so I'm like, okay, well clearly there's, you know, headroom here. And so I find it very encouraging to be able to look at a sort of description of all this stuff. People say you got to write it down, you know, like write down your metrics tracking because you're more likely to stick with it. Writing it down sounds very tedious, so instead you just shove it all up in the cloud and you get a bunch of graphs that show you just how slow you actually are. And then you, you know, so this once you sort of get into it, you start seeing times of like professional elite racers, like people who do it as a career in the Olympics or whatever, and you see their time compared to your time. And the interesting thing is, like if you were to play basketball and say like you know a professional basketball player was going to play basketball, you're not really playing the same game. Like the strategies, dunking, the kinds of three-pointers they do—like you're it's clear you're not doing the same thing. Running is not like that. When Iliad Kipchoge runs a marathon at world record pace and you run a marathon at abysmal pace, you roughly look like you're doing the same thing. Like the body mechanics look similar. Like if you don't have a context, the speed could even look the same. It's not but you know it's sort of you're just they're doing the same thing as you, just like faster. And so there's almost this like motivation—you don't have to learn a new skill; you just have to do more of it. Like, oh, I just have to get a little faster, a little faster. And of course, there's some power law distribution.

B:Like eventually moving down a minute is incredibly hard versus for me moving down a minute and pace is trivial, but you know it doesn't—you get diminishing returns there. But there's this the pros and me do the same thing. We just go and run. And so it's sort of been interesting and motivating and the metrics seeing, you know, just direct one-to-one comparison. I run a mile and X minutes; they run a mile and Y minutes versus you can't compare yourself to, you know, a football player or soccer player or basketball player like they do what and you do why in a number-to-number comparison. I don't know of a number.

A:To do that? Yeah, that makes sense. Um yeah, because there's basically an arms race, you know, like there's a whole bunch of strategies that might work at the high school level, but then by college everyone's learned those strategies, you know, in basketball or something, and so you have to—you have to do something different. But yeah, that's awesome. I mean, the most I've ever done in that is I do have a Fitbit that keeps track of my heart rate, and I try to keep my heart rate in a certain zone. So like if it's not in that zone, then I'll slow down or even walk, and I'll just try and keep it at that number. But yeah, I mean, that's just scratching the surface.

B:Yeah, it's interesting if you really dive in, and then we'll leave this alone, but that even the various why does that zone training work? What are the ways of picking the range? How do you tell? And then there's, you know, the sort of how you feel way of tracking it. There's like a mathematical formula to track it, and then there's the actual like getting at—I go run on a treadmill and prick my finger and measure like how much of various hormones and lactate are in my blood, and it tells you like, you know, your various thresholds. So it's kind of an interesting range of, you know, philosophies for ultimately what just amounts to like going and running, which you've been doing for however old you are minus, you know, three or four years, I guess. We've all been running for years and years and years, but to kind of try to hone it is a kind of another endeavor.

A:Yeah, I had a buddy who would run on the treadmill, and he was extremely athletic, and he'd run on a treadmill at high velocity, and and then also play Final Fantasy VII and try to like optimize it at the same time. Like while he's running, and I remember one time thinking, yeah, this is probably what like a human—like this is probably what The Matrix looks like, you know, like your brain power and your physical power are just being kind of like maximally exerted on this station.

B:All right. Well, with that we'll go to news of the.

A:show news of the show so uh yeah both of my news are foul and you know obviously folks know we don't swear on the show we've never sworn on the show uh at least i don't think we've literally never sworn on the show but you know sometimes guests do we bleep it out um but i just happened to just coincidentally i have two somewhat foul news articles i'll do my first one um now i'll give a bit of backstory to this so um yeah i'm always trying to create different experiences games and toys and stuff like that and so i wanted to make and it sounds kind of silly but but hear me out i wanted to make a uh engineering manager simulator or maybe just more generic like a manager simulator and so you would mediate conflicts with people and you'd have to kind of place bets on different areas and and just the parts that are kind of strategically fun about being a manager i wanted to just distill that down and make manager simulator and so i wanted chat gbt to be you know kind of a big part of this where you know there would be discussions among different chat gbt agents who have been given different different goals and you know you would you would you know see all this information and all sort of like inter intra office diplomacy and chat gbt is extremely strict on negativity so you know if you i even tried

A:something like write a mean letter to you know this person about some project that they messed up and chat gbt is like i'm sorry you know i can't write you know mean things or i will not disparage anyone it was just like i i literally couldn't finagle you know even like a you know polite but you know direct uh negative message um and and i don't know like uh you know maybe it's like a situation that's in flux but when i went to chat gbt a few weeks ago or maybe a week ago like i literally couldn't

B:get it to do it as moms three laws of robotics here saying that's right

A:human and so when when i'm and this is uh speaks a little bit to my psyche when someone tells me or some system tells me i can't do something i immediately think there's a business opportunity here like like if you can't do something then uh maybe there's some value there and the only way you're going to extract it is by somehow subverting the system and and so that might take an idea from being like uh uh the pet rock idea where literally anyone could do it it's an idea where like maybe only you could do it and so there's a chance to be like a real innovator so i started poking around and i found something called the unholy llm on hugging face and so this is a llama 2 model so llama 2 is a large language model that comes from facebook so it started out as that but then it's been fine-tuned it's been trained on i actually don't even know what it's been trained on but whatever it is it's it's completely uncensored i don't think it's been trained on like purposely the worst parts of the internet or anything um and the reason i i don't think that is because you know i started off you know just saying like uh you know tell me a joke about about this this company or tell me a joke about elon musk or you know tell me 10 books i should read and i got all like very normal answers um but if you tell it to write a nasty letter it will write a nasty letter and it will drop f-bombs and it will do everything and it is actually hilarious um i've been showing off to uh um we had some family friends in town uh and i was showing them um you know and then we were all getting a really big kick out of it um and i guess like kind of two takeaways one um you know

A:yeah it is actually really hard to say kind of anything negative on any of these or you know generative ai things uh but two um you can almost trivially download these i was running it on my laptop cpu uh the laptop has it's a macbook but it's too old and so i couldn't use the metal accelerator uh whatever that is so so it's literally running on on the cpu and it was still able to generate like several tokens per second and so you ask a question and you get an answer in 10 15 seconds um um and this is with a 13 billion parameter model so um overall i was just incredibly impressed with how far the open source has gotten um there's a hugging face has a leaderboard which is how i found this unholy model i basically i was going down the leaderboard it's like you know chat gbt met does llama i know both of those are extremely strict um you know and then there was a few others i think you have to pay for or i just didn't know much about and then this one came up i was like all right let's do it um so so yeah it was a really fun experience uh you know again you know you shouldn't spend a whole bunch of time doing rude things but but uh um but now if i want to have this sort of intra-office conflict among these ai agents uh i could do it without uh um any any worry of of you know the system like just like the game just becoming unplayable

B:Yeah, I guess like the one level more morality problem is you could end up with an AI or LM that goes from just, like, you know, sort of hilariously in-context dropping F-bombs, is something that's actually traumatic sounding or describing a really bad scene or something that uncensored. It's not like a binary thing; like you're either censored or uncensored. I guess it can be, but there's like it's like a gradient, and you could go really, really far down, like somehow it actually learned something about you, and then it's saying stuff about you personally, and like it sort of jumps the boundary, breaks the third wall, whatever, and like you run into people just really, really turned off or upset, or even, like, you know, someone damaged or, you know, really, you know, messed up by this thing. So I hear you, but like I also could see why, you know, businesses don't want that. Was—that's always what happens, you know, these get unleashed, and then someone convinces it to say something really bad or, you know, something that's socially considered a very bad faux pas to talk about, and, you know, write an article, 'Oh, this is the worst thing ever!' But

A:Yeah, I mean there was one that I skipped over, which was—I can't remember the name. I was trying to look it up just now, but it said it was literally trained on this forum called 4chan. Oh no, no, no! And I was like, 'Okay, I know enough. I know what that word means that I'm gonna skip this one.' So, yeah, I think you're right. I think that there's a spectrum here. There's, you know, I literally wanted to write a professional letter where one employee felt like another one should get fired in my game, and I couldn't do that. And then there's, you know, as you said, there's many, many layers to that onion. And yeah, I would also recommend people just, you know, for your own—it's gonna be just, yeah, don't go down that rabbit hole. But but, you know, if you want something, if you even for my, you know, if folks remember, I released this generativefiction.com. I released this text adventure with ChatGPT where, you know, as you meet different NPCs, you ask them questions, and ChatGPT generates answers. I was—I was just looking at some of the stats that I was collecting on that, and a significant percentage of people's questions were blocked. And, you know, almost none of those questions were foul. Like somebody asked one of these in-game characters, 'Um, you know, like have you ever been on a cruise ship that sank?' So the premise of the story is you're on a cruise ship, and, you know, it's—there's a there's like a murder on the cruise ship, and it's a murder mystery. And so someone asked, 'Have you ever been on a cruise ship that sank?' to one of the NPCs, and ChatGPT blocked that question. Um, so so it is very strict, but but yeah.

A:Also don't go down that rabbit hole too far; don't look into The Black Mirror or whatever. Look into the abyss.

B:Yeah, I think I said 'break the third wall,' but I was thinking 'break the fourth wall.' I don't know. I don't understand the indexing—Steam zero versus one indexing. We'll call it. You don't know what LM thought about that metaphor. No, no, no. I don't—I don't really don't. All right. So my next article is from a blog from a person who was dealing with an incident. This is on the Blameless Blog. I've never read it before; we'll have a link in the show notes. But this concept was pretty interesting. The story itself was—I feel like you know full of a few mistakes in dealing with this incident, but this reverse red herring was kind of interesting. So most folks know what a red herring is, and if you're, you know, debugging something or a problem goes and someone just gets really fixated on, you know, this thing that just feels very, very obvious, but it turns out to be a red herring—it's just, you know, it's not worth considering. You should just move on; you're really wasting your time. And so the reverse red herring is opposite something that actually probably should be standing out, but you kind of skip it or ignore it, or for some reason you discount it, and you don't spend enough time looking at it. You proceed through your processing of information, your incidents, trying to do an analysis of what's going on, and then someone has the idea, 'Wait a minute, what about that thing we stopped considering?' And all of a sudden, it just bubbles right back up to the top again. And so I thought that was a sort of interesting phenomenon to name something—reverse red herring—sort of an interesting, I guess almost a double negative. It just means interesting, but it's been discounted for some reason. Yeah, the one.

A:I could think of that came up recently was we had some code where there had accidentally been a new line inserted, but it didn't—it the code still ran. And so it just like the second part of that line was, if you just look at it in isolation, it basically does nothing. It's kind of like saying, 'You know, like zero,' or something, right? So it's like you could put a zero semicolon in C++. It just won't do anything, right? I think so. But but yeah, this is one of those but actually ended up being a really serious issue because that second part of that first line was meant to do something really.

B:Important. Yeah, yeah, and it would be in this case just to finish off the story, I guess they had rolled out a new binary to their endpoint, and the sort of circumstances were that the effect was it looked like everybody else was had gotten a sort of like bad configuration was DDOSing their service. And in actuality, it was that their new deployment had a bug in it that was giving a bad response, which was—and then the clients were said, 'If you get a bad response, like basically turn around and ask again,' because, you know, something as bad as happening. So they were DDOSing themselves. And originally, they were like, 'Oh no, it can't be this new deployment; like it's not how it would manifest itself.' In actuality, it was, and it feels like, you know, a bad deployment—like you just rolled something out, and then everything bad happens. That feels like it should probably be the first thing you consider, but they tossed it out as a red herring because they thought they had done due diligence, but they hadn't. And it could it could have been coincidental. In this case, it wasn't very cool.

A:My second article is, and again it has a cuss word in it, so I'm going to rephrase this: It's the boopification of TikTok. But the important thing is actually the subtitle, which says 'How Exactly Platforms Die.' This is an amazing article. It really, you know, it's one of these things that I've always kind of felt, but I haven't really seen anyone put it in writing. And this person puts it in writing extremely eloquently. Basically, the thesis here is—and they use Amazon, I think, these Instagram and these TikTok as examples. I'm not actually on Instagram or TikTok. Are you on Instagram, Patrick? Or TikTok? I think I

B:have an account. I think a lot of these—I have an account, and that's about the extent of my being on.

A:Okay. Um so what they talk about here, which I've definitely seen, is you know in the beginning you're trying to spin up this platform, so you have this cold start problem, you know, like how do you get good content on TikTok? How does—how do you get the first hundred people on TikTok, right? And so what they do is they set up a bunch of really friendly deals and they really focus on content creation. They give great tools. Um they do rev share with content creators. They get famous content creators on, and they give them money upfront, etc., etc. And so it becomes a great place for content creators. So they go there. A lot of these platforms—I mean Amazon is notable for this—you know, if you're exclusive on Amazon, you know, they would they would actually subsidize your your content. So you could actually sell, you know, a beach ball on Amazon for $14 because for every beach ball you sell, Amazon will literally give you an extra dollar. So they were running this—this is in the 90s. Amazon was running everything at a huge loss, and all of it was in service of creators. So a bunch of creators flock to the platform, sign all sorts of exclusivity deals. Um and then the platform kind of gets the creators, and they say, 'Look, like we kind of have these people now.' So now, you know, we could just kind of exploit them, and let's focus on um um users, right?

A:And so so Amazon now says, 'Okay, you know, forget about creators. We have all the creators; let's focus on basically, you know, getting as many people to buy as many things as possible.' Or in the case of TikTok, get as many people to watch as many videos as possible, etc., etc. Um and so they go down that rabbit hole, and at some point they get kind of a lion's share of the people, and that becomes saturated. There's actually a third element, which is the advertising. So Amazon if you look at it now, they'll actually—a lot of the search results are sponsored, which is really weird if you think about it. It's like someone's paying for the opportunity to sell you a beach ball, right? It's kind of weird. And whether you buy it or not, that person's out that money. This is really the opposite of what it was when it started where sort of Amazon paying the beach ball company and subsidizing their products. Now the beach ball company has to subsidize Amazon, like, you know, to make their beach ball show up at the top. And the thing about advertising, especially like in the case of Amazon where there's not an advertiser—it's just Amazon—is you're you end up basically squeezing both of those people, and and you can just squeeze them as much as you are willing to tolerate them sort of leaving your platform. And so invariably, you know, because of short-term thinking, platforms squeeze too hard; people leave. And then the platform becomes like desolate. I mean it hasn't happened in the case of Amazon, but you know with Instagram and TikTok, all the metrics are trending downward. Um I thought it was amazing the way that this person really laid it out. I think there's a ton of truth.

B:To it is it written by Cory Doctorow. That's what it looks like.

A:Yeah, is that a famous person? I have no idea who that is. Yes, it's okay. Who is that? Like, what are they doing?

B:Oh, they—I mean, they've written a lot of things. They've written, I think, fiction books as well, but they do a lot of like writing and you know introspection of the tech.

A:Industry? Oh, interesting. Okay. Yeah, you know, I'm not very good at, you know, I probably should be better at when I read a really good article noting the author, um, but I haven't really. It's always been kind of a blind spot.

B:I guess he was the one who ran Boing Boing for a long time. If you ever ended up on that side, yeah. So very— Yeah, I try not to attack social media because I don't participate. So I feel like it's an easy target for me to cast stones, but I do—I think this cycle is very hard, right? You want to build something up. How do you maintain it? It goes by a lot of names and a lot of cycles, but yeah, this is very difficult trade-off. Like long-term metrics is what you want, right? How do you keep users engaged for one, two, three, four years? But by definition, those are very hard to actually like know what users are going to do two years from now when you're, you know, 90 days into a project. And so it you end up optimizing for results, but whose results is—I think that was an accurate arc of choosing who you're going to optimize for. Yeah, totally. I— Guess in a similar vein, there's been and I'm not going to, you know, sort of fully go into it, but there's been some controversy with Unity, which we've talked about on the show before, a game engine, um, and changing some of their pricing practices. And there's another game engine, Godot, and Godot is open source. So of course, it doesn't have any costs associated with it or at least any monetary costs you have to pay out initially. And so a lot of people have been talking about, 'Oh, now it's the time you really should move to Godot.' Godot's gotten a lot better. You see a little bit the same thing with Blender. Blender's really come into its own despite being actually a very old project, but like you see a lot of new stuff getting poured in into Blender recently, or at least I have—it's become part of the zeitgeist and just really a mature product. And so people were talking about, and then there was a couple famous, you know, kind of like live streams of independent game developers porting their games from, you know, Unity to Godot. And this, you know, started everyone got really excited. Um, and so someone wrote an article that was sort of like, 'You know, basically that this is not true that there are some functions in Godot around ray tracing; they're just really, really bad, and you should not move to Godot.' Godot it's not ready. It's not mature. It's not whatever. Um, and the I guess Benevolent Dictator For Life (BDFL)—this is like a common term anyways—who runs the Sam Prudente, I guess. I don't know that much about the Godot project, so if I'm messing this up, I like but I guess he's the benevolent dictator for life of Godot. So he's sort of like the person in charge. And um so he wrote a response to this person's article about, you know, 'Godot is not a replacement for Unity.' And um actually as weird as it sounds, the reason I bring it up here is for two reasons. It has almost nothing to do with any of the stuff I've talked about so far. Uh and so the two reasons I think that this article is worth a link—you should you should check it out—is one, the way the diplomatic diplomacy that Sam handles.

B:this response is incredible so someone has basically penned an article pointed out like some some flaws in a project he's worked on and put enormous amounts of time in and he gives them every benefit of the doubt over and over again now i don't know the person who wrote the first article i don't know anything about godot uh but you know some analysis says like or even just a simple reading um and and sort of looking at sam's responses it's very likely that they cherry picked some some sort of like worst case numbers and then some other worst case stuff and then got like you know basically something that made godot look very bad performance wise but the diplomacy is sam responding in a public manner but being just very restrained and saying look maybe maybe they just you know happened to pick a an idiomatic case here where like it's not actually the normal case most of our stuff doesn't fall to this problem but they are right this one thing for legacy reasons hasn't been refactored and does suffer performance problems so they give credit where credit is due that yes this is bad yes we should fix this give benefit of the doubt just so i guess like refreshing to read someone handle something without like saying it's my job to just like flame out and like you know scream at everyone and just tell them these people are stupid and our project is better and instead just handle it very gracefully that's that's that's sort of like thing one it's gonna be really dense thing two uh is actually goes into a pretty awesome like description of how if you want to write you know a core game engine as an example but you want hooks for a scripting language so godot has a scripting language but also has hooks for other languages you know c++ or you know python or whatever and you want these hooks you have to think a lot about how other bindings are going to call into your core core library and the languages it's developed in and so there's a discussion about this uh i called it a bi application binary interface which is how actual you know parameters get pushed into a set of contiguous memory to be passed from one

B:program one part of the program to another right so in python you got to kind of set some specific bytes in a certain way so that you can pass it into godot and then godot knows what to do and this is normally accomplished by some sort of api right which is like the sort of human readable description of the function like this is a function that takes in an integer as a parameter um but of course like once you sort of compile it you you don't actually need that anymore as long as if your assembly language puts an integer in the right spot jumps to some other correct location of the program and knows how to go grab that you know data that you put there you don't need to know what the parameter names are they're not used intrinsically by the program and so there's a description that goes through that which i just thought was actually really well done pointing out something that you don't normally think about which is they have some primitive types and then what they try to do except in some edge cases is make sure that all of their functions adhere to the same few types so if you're writing a wrapper you don't have to make arbitrary data structures instead your data structures are composed of all of these primitive types and then you by composition get a full featured api uh and and sort of facilitate this wrapper thing um and then in trans internally they make sure that they sort of use those primitives as much as they can so you don't have to do this unpacking repacking conversion uh and the code just is sort of compiled away right it just becomes a no-op that the data just flows and it doesn't have to be parsed or you know or mangled in some way or unmangled and so i just thought actually that was a very interesting read from a technical aspect of what someone building in this case it's a game engine but any application where you're expecting people to interact with it from other languages um just a really fascinating uh sort of read there and i would encourage people it's not super long despite i probably spent more time talking about it but uh definitely check it out very interesting

A:yeah so i think you know there's there's the sam prudent article and then there's a response from the godot lead dev which is linked to from that article and i think oh did i get a binding stuff well no i think i think you know it's just one click away so you want to check read what sam wrote and then check out the response and the response there's code samples and they dive in really deep on this

B:you're right i'm sorry i yeah so i messed that up so it's not sam is a person who wrote the original article that that will have well both linked um and then yeah but i have the names mixed up protecting the innocent jason it was on

A:purpose well actually this gentleman who wrote the response to sam he also had a really insightful tweet that i happen to stumble upon where he said you know regardless of what you think of godot the fact that godot exists is the reason or at least one of the chief reasons why unity walked back that pricing plan so it's sort of like uh you know the idea is the open source is ultimately a moat that protects you from uh you know the potential of like a monopoly or or you know commercial monopoly um Very cool. Yeah, um kind of a little bit of foreshadowing here, but we'll talk about Godot a little bit later on in the show and in our tool to show, but

B:Now we have—oh, go ahead. Oh, I'm sorry. So just make it clear, it's yeah, so it should have been one. One is the benevolent dictator for life of Godot, so one is the one I was—I was talking about responding to Sam, so I apologize there for the name mix-ups. Hopefully didn't confuse anyone. Yeah, I

A:told him so. Now it's time for Book of the Show. What's your Book of the Show, Patrick?

B:Book of the Show? You have to listen carefully: Is Math Games with Bad Drawings by Ben Orlin. So last duo episode I had Math with Bad Drawings by Ben Orlin, and this is Math Games, and so this is a pretty interesting read. Takes a lot of games you probably know about—Tic-Tac-Toe, the boxes game where you draw dots everywhere and you draw one line at a time and you take turns—and just kind of goes in depth about like what kind of mathematical areas do these touch on? What are some variations of these games? Like are the games themselves interesting or not interesting at the start, and then how do you sort of like propel them forward? So in the example of—is it called Dots and Boxes? I don't remember anyways. We have the dots. Yeah, that's right. You draw lines and you make a square, and then you don't get to go bonus turn. And so he goes through some of the strategies which most people probably stumble upon, but then he gives some other games that sound really similar, and some are sort of a duel like they're equivalent, and so it's just the same game in a different disguise. But then some are actually sort of fundamentally different. So as an example, you may not think it's a major change, but it actually becomes a fundamentally different problem, which is instead of drawing between two dots up, down, left, right, what happens if you can draw an arbitrary length line up, down, or left, right? How does the game change? And so it feels like this very subtle difference, but in practice, if you can draw start and then draw to the right, you know, sort of arbitrary length, the entire dynamics of the game shift around.

A:Wow, really cool. I bought Math with Bad Drawings after Patrick mentioned it on that episode, and it's been very entertaining. You know, it has great—it does have great, well, entertaining bad drawings. And yeah, I've been really entertained. I think it's—it's been good. Definitely not an audiobook, I think. Oh yeah, it wouldn't be a good audiobook. Well, yeah, I think I'll grab this one too, probably. Anything. with games that I'm kind of a sucker. I have to open the wallet. Amazon's had me figured.

B:Out. They subsidize this. Yeah.

A:That's right. All right, my book is The Invisible Hook: The Hidden Economics of Pirates. So I always wondered this like, you know, if you're a pirate, you know, let's say you take over and this is like literally not a software pirate or whatever, but literally, you know, buccaneer pirate, you know, in the 1600s or whatever, you know, if you're a pirate and you take over a ship, like what really happens after that? I mean, could you just sell that ship at a port? I mean, wouldn't they know that you stole the ship? I mean, it just—I mean, like imagine in the real world. I guess the equivalent would be like a car thief or something, but those people, they have like chop shops that chop the car up, and I thought.

B:You were gonna say NFT?

A:Oh, um yeah. Oh my gosh, there's still people in my social network really pushing NFT hard, and I'm like, 'Dude, it's over! Come on! I mean, just throw in the towel.' But yeah. Like, you know, what happens with this giant ship? I mean, you steal this ship. It has like tons and tons of spices in it, you know. Like how do you really get away with that? How is this profitable? How does that actually work? It's really, really interesting. You know the way that you can fence an entire ship—fence means to, you know, sell something, you know, kind of that doesn't belong to you. Um the way you can fence an entire ship or the way that pirates ultimately got spices that they stole and sold them to like, you know, individual towns and stuff? Really really interesting stuff. One thing I didn't know about was the extent of these—they call them Letters of Marque. So basically, the difference between a buccaneer and a pirate is a buccaneer has the authority of at least one country. So, you know, like you might go to the English governor or king or I don't know who, but it goes some English authority, and he will give you a Letter of Marque which basically says, you know, for example, if England's at war with France or Spain or what have you, you can sink as many or capture as many French boats as you want. And the English will in fact they'll reward you for it. And so a lot of pirates were actually buccaneers, so they would fly like a British flag. They would take Spanish ships hostage and then they could go to any British—English—town and sell the ship and sell the stuff, right? Because they have that authority. And so that's how it worked for a lot of people. But then you know some of the most notorious pirates, they basically had their own, you know, kind of totally unstructured nations. There would be pirate islands where you could, you know, sell a boat and they would figure out what to do with it. Of course, they'd like charge you, you know, premium for that, but they would—they would figure out a way to make money off that.

A:The whole thing was really interesting. I mean, I know it's kind of a weird rabbit hole to go down, but I heard—I read a lot of things that really surprised me.

B:Awesome! That actually sounds really interesting. Now that you got me. Now I'm curious because I feel like it's one of those everyone knows what a pirate is, but then if you think like you said, one level deeper—wait a minute, you know, hang on. What do you actually do with an entire boat that needs a crew? Like how do you put people on it and sail it to where you want it to go, and you need to damage it to take it over, but not damage it so much that like you...

A:Can't sell it? Yeah, exactly. Exactly. And yeah, the whole thing is really, is really interesting. Another thing that really shocked me was just how much physical gold was transported from South America to Europe. Like it's an unbelievable amount. Just it had this thing called the Treasure Fleet. It was literally like a huge fleet of giant ships, and these were pretty much like no pirate would—at least I haven't read of any pirate that would ever challenge this. It's just like an enormous juggernaut of a fleet of like privateers and all these boats, but they would just transport an unbelievable amount of gold across the Atlantic Ocean. So yeah, the whole thing is really interesting, and yeah, it's definitely worth the...

B:Read? Oh, very good. This is time for tool of the show. All right, what's your tool of the show? So mine is a game sticking with my classic, but this is one I we don't spend a ton of time on. It think everyone knows what this game is, or if they haven't, they're about to lose hours and hours and hours of their life, and I apologize in advance. But this game is Factorio. So Factorio—I think it really almost kicked off a genre. I think there was like games that preceded it, of course, but now there's a lot of follow-on: Satisfactory, Dyson Sphere Program. I'm sure there's a dozen others. But Factorio, the reason why I recently got into—I wasn't sure I would like it. The graphics were kind of meh. So I played a demo and then I realized I spent more time playing the demo than I probably have played most video games that I own. And so I realized that I probably should just buy it and play it. But the reason why I started getting into it is they recently did a bunch of work to support controllers. I was able to play it on my Steam Deck, so they have it on Steam Deck. I think they have it on Switch now. Was sort of why they added controller support, but this is the reason why I sort of picked it. I always knew you need mouse and keyboard, and just time with in front of a mouse and keyboard after a long day of doing it for work didn't really appeal to me, but we talked on the show before I got a Steam Deck now. So I've been playing Factorio. I have no idea—to be clear—I know the rabbit hole. I know how like people—I don't know what happens in later levels, I'm sure, or later stages, I'm sure your Steam Deck will bog down, but for just picking up and playing, I've played a lot already, and I've never really sort of said, 'Oh man, this is running. This is unbearable.'

A:Slow. Yeah, you know the thing that Factorio and its descendants have done really well is put you in control of the pace of the game. So if you look at something like Civilization, you know, you move your units and then you click and turn, and then you have to kind of wait for everybody else. And so you know maybe in the beginning of the game when there's a lot, or maybe the end of the game in Civilization where there's a lot of things going on—there's units all over the map—then the pace like really slows down. And at the beginning of the game it just feels like the game is taking forever.

A:Right. You know Factorio has this beautiful dynamic where you know as soon as you get the factory, like the beginning factory, you're kind of then limited by your own creativity. You know, you can—you can end up with, you know, even with just the initial factory, you can end up with a massive sprawling base, or you could have just three factories and you build everything by hand. And so the pace like you—your aptitude is kind of controlling the pace of the game, and it never feels like the game kind of gets away from you or is boring. Yeah, we didn't...

B:Actually say what the game is. So I guess for the few people who don't know, this is a—I guess a factory simulator. So the rough idea is there are resources out in the world of various types, and then there's ways of building things to extract resources, and then a chain to sort of finished goods. And so you need to process iron ore into iron plates, and iron plates into steel beams or into gears or sprockets, and so you sort of have these chains of dependency, and you want to build better and better factories that are faster and conveyor belts. But to do that, you need sort of more high-tier products which have levels below them. So you know eight stages of inputs to get to the item you need to construct your—you know whatever you're building at the end. And so you build up these longer, longer chains like Jason said, I guess a lot of analogy for code. You can—you have to debug it when something's going into the wrong input. You gotta like, you can have spaghetti code. You can have a very modularized and everyone sort of takes their own bent to it, and it sounds horrible. It—I know it really does, but it's just one of those things to like Jason said kind of zone out and you just monkey around, and there's no real exact winning and losing. You're just trying to get better and better.

A:Yep, yeah, it's really satisfying. Cool. All right, my tool of the show is AI Hero, which is a game that I made. I've been working on this game for years and years, just a tiny bit of time here and there. And basically I set a goal for myself many years ago that I wanted to teach AI, but I wanted to teach in a way that had no words. And I felt like that was a succinct way of kind of explaining—you know, you know that I wanted to demonstrate AI but without having to tell people like, 'You know, turn to page 569 of this conference proceedings,' right? So it's pretty ambitious goal, and it took me a really long time to kind of find the fun, so to speak. So...

A:The premise of the game, and you can get it on iOS and Android. It's totally free. There's no ads, there's no in-app purchases or none of that stuff. Yeah, the premise of it is you have to set these control points in a way that creates certain curves or certain circles or other shapes, and those shapes have to kind of separate clusters of labels. So you're on this graph grid, and there's sort of a cluster of green points and a cluster of red points, and you have to by—you know, using your finger and moving these control points, you know, find that curve that separates those points. And then as it gets harder, you end up with four, five, six, seven different categories, and so you have to have these sort of intersecting shapes that can allow you to separate all these different classes. So it turns out, you know, with maybe two shapes you can actually separate, you know, four or five, six different classes if you like bend one shape around another and stuff. So—so you know it did kind of accomplish that thing I set out to do. You know, originally the plan was for it to be an educational game. What I found is it really appealed to people of all ages. You know, my kids played it; that was pretty fun. But a lot of adults are finding it fun, and so I just ended up releasing it as kind of an AI-themed puzzle game for all ages. But it's written in Godot, so kind of a throwback to 10 or 15 minutes ago. I don't have to worry about Unity coming after me for my free game or anything like that. But I did find Godot to be very pleasant to work with. It is a 2D game, so you know it's not—you know it's not a huge technical achievement, and so I wouldn't say I stressed Godot in any big way, but I found the feedback loop to be really nice. One of the things that Unity and Godot do, which I think is really interesting...

A:Is they let you basically play, you know, like a module of the game. Like for example, in Godot they're called Scenes. I don't know what they're called in Unity, but you know like you could have a Scene which is Mario, right? And you could have another Scene which is, you know, Level Three or something, and you can actually just play the Mario Scene just by itself as a game, and you could just be Mario and just jump around in an empty world. And so that way you can test like certain pieces of the game without having to test the whole thing. I found that really useful as I was developing. But yeah, check it out. It's totally free. Hopefully y'all find it pretty fun.

B:Awesome! All right, I think it's time to talk about desktop user interfaces.

A:Yeah, so Patrick, what is a User Interface?

B:It's an interface a user uses. All right. That's the end.

A:of the show Patreon subscribers.

B:No, I mean, I think this is something everyone bumps into or starts out into, which is you know have some cool functions, some application Jason was talking about his game. But ultimately we need a way of displaying that to the user. So, of course, currently a lot of that could be web. You could build a website with JavaScript or another language that gives you that ability. It could be a Command Line Interface. It could be—hey, I'm prompting the user and sort of a text adventure game could be a User Interface there. But I still want to have options for displaying inventory and stuff. But the one I think we're going to talk about today is when you're on a, you know, desktop, so Windows or Mac OS or Linux or—I'm not going to try to list them all because someone's going to write us in that we left theirs off, and you want to have a way for a user to interact with a running program, and you need to write code to do.

A:That. Yeah, that's right. And so, um, you know, I don't know if we've ever done an episode on Command Line Interfaces. Maybe that needs to be the next episode. But, you know, there's a lot around, you know, making a good Command Line Interface and, you know, terminal. You can—there's a whole bunch of really interesting programs there. But by and large, you know, when most people think of a User Interface for the desktop, they're thinking about something that opens some kind of window and has a point-and-click interface and all of that.

A:You know, it's worth calling out that this is a lot more complicated than web and mobile. You know, I mean, mobile—the UI is really front and center to the whole experience. You know, a lot of mobile apps are just veneer around business logic that runs somewhere else. Like imagine, you know, like your banking app for example. When you go to pay somebody in your banking app or pay a bill, your phone doesn't literally pay the bill; your phone just sends a request to some server that does all of that. Similarly, on the website, your browser isn't literally calling some API to move money around. All of those are going to the server. So using let's say Chase Bank for example, so your browser goes to the Chase server and then Chase server does server-to-server communication. So all the business logic lives there. Conversely, the desktop is sort of the opposite where if you want to do business logic—if you need a good debugger, if you want to build an analysis tool and things like that, that's great. But for Graphical User Interfaces, the desktop is challenging, and often it could be hard to know even where to get started there.

B:I feel like yeah, go ahead. Yeah, like a few years ago, I think the story was much more around like per operating system, you know, building it. So you would, you know, if you were building on Windows, you would go into Visual Studio and you would kind of do the very Windows-specific way. If you're doing Linux, maybe you would do something else, and everybody sort of had their own sort of way of developing these so-called native native looking apps. And I think as you were kind of mentioning, I think that's where the phones have an expected feel. Like how things work on Android is actually different than how things are expected to work on iOS. So if you have an iOS app, people expect certain functionalities and behaviors around like swipes or around dragging up or down or like certain things—it's like very pre-canned. Whereas I feel there was more differences historically between like how something would work in Linux versus Windows versus Mac OS, how buttons would look and how interactions with which said. But there's also more diversity just within a platform. So like you mentioned in Windows or whatever, like—there could be, you know, a UI popping up that has I guess what you would call like a normal desktop app, but to be clear, you could also pop open a game and have a UI and a window as well and have a HUD and, you know, have like buttons that are graphical and they look very different. And so there's all these, you know, different ones, but I think today the number of like platforms have come to go so allow people to develop across multiple, you know, sort of targeted desktop OS environments and sort of really capture this. I really sort of come into their own around, hey, this is like a good way of doing this development strategy. Yeah, that makes.

A:A ton of sense. Another thing too is, you know, in the case of mobile, in the case of web, the web is extremely uniform. People have done an amazing job of setting up things so that you can have a relatively common experience. It doesn't matter whether you're on the phone or the desktop, and there's all sorts of ways to do like these reactive websites where, you know, if the column width is shorter, then it doesn't do a sidebar, and all that is really easy to do. I mean, even programmingthrowdown.com. If you look at it on a phone or if you shrink the browser window on your desktop to be really thin, you know things will start collapsing, and things that were just always visible become little hamburger menus, and I didn't code any of that myself. I mean, all of that is just built into the web tools that I was using. On mobile, you know, there's really only two big players right there: iOS and Android. And because mobile is so important, most companies or even most developers will create two copies of their code. So you'll have an iOS app, you know, an Android app, and they'll, you know, you can use Flutter and some of these things, but most people—I would say the vast majority are right are building two separate apps, and you never have to worry then about like, oh, like what if I need to do something that is, you know, not supported by Flutter or I need to use this iOS plugin and interop and all of that. Conversely, on desktop, you know, I don't know what the market share numbers are like, but I always feel like I need to support at least Mac and Windows, um, but—if not also Linux, but.

A:If not also Linux, but um I'm usually in much more of a hurry when I'm building a desktop app, right? Because usually it's an app for developers. It's an internal tool or it's something like that, and so I don't want to have three different versions. Like I don't want to spend that time, and so you're kind of caught with the situation where you have to be really quick, but you're using a—you know, you're not in a place that isn't very well traveled. So it's a difficult position to be in.

A:So I have a few different options here. I'll kind of list them in no particular order. I've actually really enjoyed Qt. Have you ever used Qt, Patrick, like as a

B:developer? I only a little bit. I think Qt does one of those hint like predating a lot of the sort of modern, more portable coding practices. So in C++, I feel like you know Qt was a big influence there. So we have like Qt and Boost, but then the standard library coming along and getting a lot better, but they had to introduce a lot of the more high-level modules really early to make UI programming work. And so I feel like yeah, I did interact with it and sort of—we'll talk about later—but like asynchronous or you know threading and these kinds of things which had very poor sort of out-of-the-box support. And then Qt sort of stepped up and did that. So not only has it got the UI stuff, but it has a lot of C++ modules that you know came along later in other forms, but they were pretty early to the game and helping like level up the sophistication of C++ developers.

A:Oh, very cool. Yeah, I've actually only used PyQt or I think now it's called Qt for Python, which is like a you know a wrapper around the C++ code. And so you could definitely—I could definitely see the C++ influence when I look at Qt for Python, just the way that you know objects are kind of passed into other objects; like it doesn't feel really that Pythonic. But the things that really stood out, so Qt, the idea with Qt is that you know it's not a native-looking app. So if you were to build an app in Qt on your Windows machine and you were to build an app using the Visual Studio—you know, a designer—they're gonna look totally different. So Qt has their own kind of buttons, their own text boxes that they have designed themselves. And so you know at some point like way down in the Qt code, like they're rendering like raw pixels. So they've like you know they have total control over the canvas and the window. You know, you're obviously abstracted from all of that. But you know it has this nice like side effect where you know if you have a Qt app on Mac or on Windows or on Linux, you know it should look more or less the same. I couldn't say it would be exactly pixel for pixel, but you know it's going to be very

A:consistent. Conversely, if you were to use wxWidgets, which is another option that's a very interesting. tool, the way it works is you write your wxWidgets code and then it kind of on the fly—I guess it's like a transpiler although it's not really compiling—but like on the fly it's mapping your function calls to the low-level thing. So for example, you tell wxWidgets, 'You know, draw a text box.' And you know if it's all, it has some check. It says, 'Oh, am I on Windows? Oh, I am. Okay, call this native Windows function to draw a text box.' 'Oh, I'm on Linux? Okay, call this native Linux function.' And so you get a native UI. At the time, this was like wxWidgets is very—is very dated or it's not data, it's very modern, kept up to date, but it started a long time ago, you know, and at the time, you know people were much more in tune with what a desktop app should look like on Windows. And so wxWidgets, you know targeting, you know resolving down to these native desktop widgets, you know was kind of a nice look and feel. It has the downside that you know if for example a text box is taller in Linux than it is in Windows, well then it's going to look taller. And so if you run the same app and you expected the text box to be, you know, 60 pixels high now on Linux it's 70 pixels high. Now like maybe part of your app, you know fell off the bottom of the page and you can't get to it. And there's just a bunch of visual inconsistencies like this. So you really have to, you know, run your app on all these different OSs all the time and make sure that it looks good in all of them. So that's kind of the trade-off there. I feel like Qt is probably a better bet now. I mean people—Qt has taken like such a large market share that people kind of have a spot in their brain for the Qt UI, you know. So I

A:don't think you're shocking people anymore and you know you have the—you don't have the other downsides.

B:You brought up an interesting point there. If you go back—I don't know exactly when wxWidgets, I guess we're looking up—but if you go back 10, 15 years ago, 15 years ago people probably—I mean that's some folks listening are like, 'Uh, what? No, I'm not going back that right. I don't remember what's going on.' But when I was a newborn, when you go back 15 years though, like most folks didn't know how to use a if they said, 'I know how to use a computer,' they meant like I know how to use Windows and I know how to use like these apps in Windows. They probably didn't really bump into other operating systems or—or if they were on, you know, OSX at the time, I guess, like you know they knew or Linux, they knew one thing. But now, in our guess and a little bit in our modern lines, I think it's much more common for people, like most of the folks I know and work with, you know they'll have a phone that runs some operating system—Android or iOS. They probably have an operating system with apps on their TV that's different. They have one on, you know, their desktop is something, but they might have a gaming desktop and a laptop for work, and their laptop may be a, you know, MacBook, but their desktop is a Windows gaming machine. So I feel like people are much more likely to have encountered and be proficient at various operating systems. Yeah, that makes

A:a ton of sense. And on the—you know coming at it from the other direction, the operating systems have largely standardized on, you know, an ideal user interface, and you can read all about Material UI and all these different kinds of philosophies around UI. And I think a lot of that has collapsed to where you know you have a pretty good expectation when you do something on your TV what it's going to do. Like most people know, you know if you press on a text box on your TV or your phone or whatever, a keyboard is going to pop up. All right? So these are just assumptions that you couldn't make. Here's—here's a random piece of trivia, Patrick: how old is wxWidgets?

B:A guess? Oh, it's pretty—I mean I know—I feel pretty good about saying it's at least when I started working, which I'm gonna say how many, but I'm greater than 15. So I'm

A:gonna guess 20. It is 31 years old. No way! That is wild. Um way older. I thought—so yeah, Qt and wxWidgets occupy the same space more or less. One thing that's really important that I highly recommend is there's something called Qt Creator and in wxWidgets it's called wxFormDesigner, and there's probably a new one now. That's that's a program that I used a long time ago, but these things will do code generation. So you know, you kind of set up the layout the way you want. You say, 'Oh, I want text box here. I want a label here.' You know, reserve this spot for some custom widget which you don't know about, but I'm telling you it's a certain size. But a combo box here. And then you press a button and it generates code. It can generate C++ code. It can generate Python code. And so that Python code that it generates, you can actually run that, and you will get a form or you know a total desktop app. It's just none of the buttons will do anything right. Um and all of the spin boxes will go to infinity. There's no guardrails on them, right? Um And so then you know you have to go and implement all that business logic. But but yeah, those tools are incredibly powerful. Like you could end up spending a lot of time just kind of aligning things, you know doing a whole bunch of visual work. And if you're sitting there looking at code saying like, 'Okay, line 67, you know this object needs to be like a little bit further down.' It's kind of hard sort of like a—what is it? Rubbing your belly and patting your head at the same time or whatever. It was like it's kind of hard to like write code but then be thinking solely about how this is going to look. It's much, much easier to use a graphical designer, and it has this another—this other nice side effect where it kind of keeps your UI and your business logic separate because if you put

A:business logic in those files and you rerun the designer, well guess what? It just deleted all of your business logic. So it kind of forces you to like separate those two things, which is—you might look at that and say that's really frustrating, but you'll be better off for it.

B:I think the next one that we're going to talk about was sort of—I guess it was surprising. Like when I first heard about it, I sort of laughed and was like, 'What? No, it's not going to be a good idea.' And it still gets ridicule from the sort of optimization people, like, 'Oh wow, this is such an inefficient way of doing things. It's so slow.' And that was when Chrome released one of the things they did separate from just the browser: they released a sort of high-efficiency C++ JavaScript execution engine so you could run JavaScript sort of on your desktop and use it for things outside of Chrome if you wanted. I think V8, I think is what it was called. And so this combination, and having an open source component to Chromium but also to this V8 engine enabled this next one, which is Electron, which really sort of—it was the first time I at least encountered people truly going for this hybrid thing on desktop where like you're writing almost a web page, but it's also a desktop [app].

A:App. Yeah, and so you know if you use Visual Studio Code or if you use Discord's desktop app, these are either done in Electron or they're done in a derivative. So I think nowadays there's Neutrino, there's a whole bunch of alternatives, but without any loss of generality, we're going to talk about the first one, which is Electron. But a ton of really popular apps are actually written in Electron. So the way Electron works basically: if you've ever built a website, you've probably started by testing the website out on your own computer. So you know, you spin up a very simple web server on your own computer and you go to, you know, localhost colon 8088 or something like that, and you get to see your website and you can interact with it and make changes and reload and all that. And then when you're happy, you deploy it to some server that other people can look at. And so the idea with Electron is, you know, you just—you just live in that first part, right? So when an Electron app starts, you know, it starts a local web server that your local machine can get to. It's locked down. And then separately, you have a program that visits that web server. And so in the case of let's say Visual Studio Code, you know, it starts with a web server and then it—and then it has its own internal browser. This is getting to Patrick's comment, you know, you're deploying like a literal browser with every

A:app. Um, and so it launches its own browser which knows to talk to its own web server, and so you get this desktop app, but you have all of the advantages of the web frameworks. So you know we talked about how the website knows what size it is, and people have written zillions of lines of code to make it look beautiful in all these different situations, and you get all of that in a desktop app. So Electron is extremely powerful. Like if you—for example, if you need something that draws a bunch of graphs, well like Qt has some basic graphing structure if you want to plot some time series and things like that, but if you start getting complicated graphs, you know, if you need certain like scatter plots, you know, if you need some kind of clustering and you need to visualize that, you know the web just has so many resources, such a long tail of different resources that like you can be confident you'll find just about anything.

A:And—and so you don't have to worry about that. You can bring it in. It has this other benefit where, you know, if you do want—I mean Discord's a good example of this. If you want to have a website and a desktop app, well now you only have to write it once. You know the same UI code that if you go to discord.com is literally the same UI code you're running in the desktop app, and so that saves them a lot of work.

B:Not being a web developer, it's still—it's kind of like confusing to me. Like it boggles my mind that it sort of works. And it does. Like you said I used Adam for a long time. I think it's now deprecated in favor of VS Code. But it's just kind of weird to me that it just works. Like you are—like you said you're running a like custom browser, but you don't know? It just feels normal. It just feels like a

A:regular app. Yeah, I mean, you have this other issue which is most of these like Electron/Neutrino—they're running a JavaScript web server, so even the server is JavaScript. And so that means if your business logic is in C++, now you actually need a third process. You know, you need the browser, you need the web server that's hosting the UI, and now you need your business logic in a third program, and you have to do inter-process communication to pass, you know. So for example, in Discord, right? You click a button, let's say. Now Discord might all be written in JavaScript, but let's pretend like—let's pretend like the business logic is written in C++ just to explain. So you know, in Discord, you click a button. So that's, you know, the browser makes an HTTP POST to the web server saying, 'You know, Patrick clicked the join channel button.' And then that thing, you know, makes an inter-process communication call to the C++ code to say, 'Hey, Patrick, you know, click the join channel game.' That C++ code probably makes another HTTP request to some Discord server where, you know, it actually happens. And so you have a lot of these hops. You know, don't let that scare you though. I mean, that sounds scary. It's like, 'Oh, I have to set up this, you know, code contract, this, you know, three-layer code contract' to do anything. But in exchange what you get is really powerful, and you can often—you

A:know your API often doesn't have to be that large. You know, if you parameterize the things you're doing, you might not actually need that many function calls to get a lot done. Like for example, you know you might have 30 different channels. If you leave any of them, it's the same function call, right? So you don't have to implement that a bunch of times.

B:Off of the—off of the sort of like single app stuff, I think we had a couple good other things that sort of fall in the same category as Jason kind of mentioned. I would—you know, I've never seen the numbers, but I would bet it's a shockingly high percentage of applications written are written for internal use, for tests for with only in your, you know, just to support like use cases, or maybe they're even just throwaway. And so I would not be surprised if actually we don't see that the sort of long-lived examples you've been giving so far because, you know, about them are actually a relatively rare even by amount of time spent, which would be weird. So of course they're more rare by count, but I think I would even go to say like a lot of the developer time is spent on developing apps that no more than a handful of people or anyone outside the company has ever seen. And so if that's the case, you have a little bit more latitude to consider things for the same purposes—doing and doing sort of UI and interfaces and really helping like Jason was already showing like graphs and data. Sometimes you're just trying to provide visualization, and so your app really doesn't need a lot of business logic. Maybe you've already processed it all down, and it really just needs to do analysis or monitoring or, you know, something at the tail end, and you can avoid a lot of the inter-process communication. And so if that's true, I would say your sort of field of view can open up pretty wide, and you can start to consider other ways of developing user interfaces or even applications for internal use.

A:Yeah, totally. Have you ever used Jupyter? I think it used to be called IPython Notebook.

B:I have, but I famously am not a great Python person, so I always find it a little the environment setup, making everything sure is installed. But yes, I think you know bump into them fairly often now, and actually it's pretty convenient to have like code listed and then a result, and then code listed and then a you know result. It's a very intuitive way of sharing somebody's analysis. Yeah, totally.

A:I think you know Google Colab I think is really going to—it's one of these things. It's like it's going to take a generation, but but you know Google. So for people who don't know Google Colab, it's a you know computing environment where Google will give you GPU time for free. So if you need a GPU to train like some image processing model or something, you could use Google Colab. And there are some limitations, I think—if your program takes more than 24 hours to run, they shut it down, things like that. Now you can get around all those limitations by getting the Pro version, which is only $10 bucks a month, which is I think very reasonable, but...

A:especially because you know GPU probably costs like a hundred dollars a month if you were to run it—hundreds of dollars a month if you were to run it 24/7. But you know Google Colab I think will really popularize Jupyter and IPython even more than they have. As Patrick said, it's that environment broken up into cells, and you can—the way it works is that the last line of each code block, of each code cell, is rendered right afterwards. I mean, you could also do prints and stuff like that, and they'll show up. But you know, you can do a bunch of math and then at the end say, you know, table as just its own line in the last line of the cell, and that tells you know Jupyter Notebook that oh okay, when I'm done with computing this, I want to print the table, and it'll actually convert you know this like raw Python data into like this beautiful HTML table or you know plot or other stuff. So it's really neat. Um you know, the downside is it's very hard to actually show that to somebody else. So you can give someone a Google Colab notebook and they can run it themselves, but for example, if you wanted to just show the results to somebody, there isn't really an easy way to do that. You kind of have to just copy it and paste it to someone, or I think you can export as PDF or something, but at that point it's not really a interactive user interface. Um so there is...

A:kind of a middle ground there called Streamlit. Um so Streamlit is you know also kind of much more geared to internal analysis. So you know if you can plot time series and you can plot different graphs and do analysis, but you couldn't for example make a video game with Streamlit at least not easily, um but you know... it's another kind of good avenue to go down. Um and I guess maybe we'll just—we'll cap it off by also putting Unity and Godot in these game engines, you know. I think um you know...

A:I think that uh um you know in something like Godot or Unity, you know, you have much more control over the user interface. Um you could be almost guaranteed it's going to look pixel for pixel exactly the same in every OS. It's got these advantages and the clear disadvantages are you know you're working kind of at the pixel level. So like even a button, like you literally have to draw the button. Um you know, and so some of these will have UI toolkits, but um even then it's very primitive. Like you know they won't have a pressed you know button image. So um that's pretty low level, but uh for people who are doing a lot of like graphic intensive stuff, that could be a good option.

B:At a high level, I think UIs are one of the—I think I alluded to it earlier, but just I couldn't cap it off are one of these things where um you run into it. It's it's actually good to know how to do it. It's one of those like perpetual 'I should be better at doing this,' and being able to you know pop one open, pop something open, you know quickly, and sort of use for internal purposes. But there are some also again I think like next-level understanding that people have to do, especially at least if you're coming from sort of—I'll say like Python or C++ or C or even Java, which is uh you know we're mentioning before, is multi-threading because like all this different stuff going on, you might have like a you want to render a spinning box, right? Like a little spinner to indicate your program is doing something. But code needs to be running the spinner for the spinner to look smooth. And so if you're going to be doing that, you need to be doing your execution on something else. And then the sort of like first thing is you go into one of these creators and you draw a button. When you click the button, you run your computation. But of course, then the button that's like stuck depressed, and you're like 'Oh my gosh, it's frozen.' Right? Like this is everybody sort of like bumps into early on. Is that yeah? And I think the UI development tools themselves have gotten better about helping coach people into you know having a wizard where you already start off with, you know, hey, when a button is clicked, it's going to dispatch a message, and you need to wait that message over here and sort of put the boilerplate code for you there to like hint you that like 'Hey, this is what you ought to be doing.' Um but I think like this is one of the first time people can run into race conditions where hey, my code is processing, but someone clicked another button. So you know, you see that basic primitive like start computation, right? And then it's showing some progress. Cancel? Well, wait a minute. Most of the programs I've ever written didn't have an option to cancel what they were doing. I mean, you could kill the app, right? They didn't have this notion of like stopping halfway through. You start them and they either you...

B:know air out or they finish. Like they don't have a mechanism for listening for 'Oh, actually I want you to stop what you're doing.' And so I think this is one of the places where people start to bump into needing some thoughtful architecture. Yeah, that's...

A:a really, really good point. I mean on mobile and web, to a lesser extent, they really hold your hand. Like I know iOS and Android. If you do something on the main thread that takes more than a few milliseconds, you'll it'll pop up this big error in your log saying 'Hey, you know, don't do this; like go put this on another thread,' or something. And I think both of them if you try to do an HTTP request on the main thread, they will just crash your app. And so it's their really aggressive way of saying like 'Look, you need to figure out threading and all that otherwise you can't even run this app.' But on the desktop, you know, there's—it's just not that opinionated, and so you have to learn a lot of those along the way. Um but yeah, I think another really important thing, and this is kind of true across the board, is to really separate your UI and your business logic. Like for example, let's say you have an Electron app.

A:You know, if you if you architect the app in a certain way, you know, you could start up the UI and the UI is getting kind of its state from your C++ program. And if you have a bug in your business logic, which is where the vast majority of your bugs are going to be, you know, you can fix that bug without having to shut down the app and bring it back up. Um so you... Know this is one thing a lot of people don't realize: starting an app takes a long time. On mobile, on desktop—like you're talking multiple seconds to start an app just to get 'Hello World.' iOS is doing all sorts of crazy stuff under the hood. There's usually like a visual, like the app kind of window pops up out of nowhere. All of that takes time, and while it doesn't sound like a lot of time, it really, really adds up.

A:So you know, you can get around a lot of that. And even if it's not just a time thing—it is frustrating as a developer, like, 'Oh, I forgot a colon. Now I have to click the X on the UI and start it up again.' And so you know, you could easily—it's some clever architecture. You could easily get into a position where those two are running independently, and one of them knows, like you can send a message from your business logic process to your UI logic, to your UI process saying, 'Hey, I'm back, like I died and I came back, and this is new me.' And then your UI knows to clear everything and start over without having to actually tear down all of the graphical elements. So, I've definitely been guilty of this where I didn't architect things this way, and then I just found myself taking 30, 40, 50 seconds to do every single iteration, and you can easily kind of get yourself frustrated.

B:All right, all right. Well, thank you to all our Patrons continuing to help support us, and just everyone listening. And I think we say it every episode, but it's been crazy how long it's been going. But thank you all for sticking with it. Or if you're new, welcome. We don't have that pitch, but you can check out the website. You do have some links there to follow, but also if you want to learn more or hear more. But just in general, thanks for all the support and love we get from the

A:community. Yeah, totally. I've been getting a lot of positive feedback in my personal email and the Programming Throwdown email, which is just shameless plug: programmingthrowdown@gmail.com, about how people like the duo episodes, they like how we're bringing those back, which is great. You know, it is a real pleasure to be able to share our experiences with everybody. Yeah, and I—you know, this is kind of an aside, but so many podcasts perished around 2019, 2020. I was actually there was a game development podcast that I wanted to get back to, and they stopped making episodes, and I just happened to be connected on LinkedIn to the host, so I messaged him on LinkedIn. I said, 'Hey, you know what happened?' And he said, 'Well,' you know, I think that there's just enough out there or something like that, and people want to move on to other things. But I think it's really proud that the two of us have been able to keep this going for so long, and we have no intention of stopping making good content. So that was a—that

B:was a bit of a cliffhanger there, like you're leading up to something. But yeah.

A:This is actually just clickbait. Yeah, we're not going anywhere. We should make the—we should make the thumbnail. Like we're leaving if we were really optimizing for SEO thumbnail, we're leaving our

B:house to go get dinner.

A:That's right. But yeah, thanks again for all the folks we have—people who've been Patrons for years and years. We really appreciate it. All of your support, and we will catch y'all in a couple weeks.

B:Music by Eric Barndoller Programming

A:Throwdown is distributed under a Creative Commons Attribution-ShareAlike 2.0 license. You're free to share, copy, distribute, transmit the work, to remix, adapt the work, but you must provide attribution to Patrick and I, and ShareAlike in kind.

Transcript supplied by the publisher with the episode.

Programming Throwdown

by Patrick Wheeler and Jason Gauci · English · Tech & Science

Programming Throwdown educates Computer Scientists and Software Engineers on a cavalcade of programming and tech topics. Every show will cover a new programming language, so listeners will be able to speak intelligently about any programming language.

More from Programming Throwdown

  1. E170 · 24 Dec 2023 · 1 hr 39 min

    170: 2023 Holiday Special Live

    Predictions: Jason VR for Work Lowering AI training cost/ improved efficiency RISC-V takeoff Patrick Ai claim of AGI Ai peer reviewer Ai Video Generator More space vehicles reaching orbit Early career, finding role at FAANG, liaising vs shipping code. Upcoming in tech What are essential programmer knowledge items?

  2. E169 · 27 Nov 2023 · 1 hr 30 min

    169: HyperLogLog

    Patrick and Jason explain HyperLogLog and the broader problem of estimating cardinality efficiently at scale. They walk through the ideas behind Linear Counting, LogLog, and HyperLogLog, including how these probabilistic techniques make distributed counting practical.

  3. E168 · 20 Nov 2023 · 1 hr 29 min

    168: Godot

    Patrick and Jason discuss the Godot game engine and what a game engine actually provides to developers. They cover graphics, physics, scripting, portability, rapid prototyping, and why Godot has become an appealing open-source option for game development.

  4. E166 · 16 Oct 2023 · 1 hr 12 min

    166: Speedy Database Queries with Lukas Fittl

    pganalyze: - Weekly series "5mins of Postgres": - How Postgres chooses which index to use: - CMU databases courses: - Postgres community: As well as social links: - Mastodon: - Twitter/X: @pganalyze, @LukasFittl - GitHub: @pganalyze, @lfittl - LinkedIn.

  5. E165 · 25 Sep 2023 · 1 hr 17 min

    165: Differential Equations

    Patrick and Jason explain differential equations and why programmers should care about them. They cover rates of change, ordinary versus partial differential equations, numerical solvers, and practical examples ranging from simulations to PageRank and game physics.

  6. E164 · 11 Sep 2023 · 1 hr 31 min

    164: Choosing a Database For Your Project With Kris Zyp

    Things to consider when choosing a database Speed & Latency Consistency, ACID Compliance Scalability Language support & Developer Experience Relational vs. NoSQL) Data types Security Database environment Client vs Server access Info on Kris & Harper: Website: harperdb.io Twitter: @harperdbio, @kriszyp Github: @HarperDB, @kriszyp.

  7. E189 · 24 Aug 2026 · 1 hr 23 min

    189: Agentic Loops

  8. E188 · 9 Jul 2026 · 1 hr 36 min

    188: World Models

  9. E187 · 2 May 2026 · 1 hr 38 min

    187: Agentic Coding

  10. E186 · 3 Feb 2026 · 1 hr 28 min

    186: Becoming a Manager

    Patrick and Jason discuss what it means to become a manager and how the role differs from individual engineering work. They cover hiring, coaching, performance management, team goals, and when moving into management is or is not the right choice.

Every episode of Programming Throwdown →

Take it with you

The Melo app keeps playing with the screen off, works in the car and on your watch, wakes you to your station, and browses the whole catalogue offline. Free, no ads, no account.

Get it on Google Play