Michael Kennedy: A lot of people building software today never took the traditional computer science path.
Michael Kennedy: They arrived through curiosity, or a job that needed automating, or a late-night itch that
Michael Kennedy: made something work. This week, David Kopech joins me to talk about computer science for
Michael Kennedy: exactly these folks, the ones who learned to program first and are now ready to understand
Michael Kennedy: the deeper ideas that power the tools they use every day. This is Talk Python To Me,
Michael Kennedy: episode 529, recorded October 26, 2025.
Michael Kennedy: Welcome to Talk Python To Me, the number one Python podcast for developers and data scientists.
Michael Kennedy: This is your host, Michael Kennedy. I'm a PSF fellow who's been coding for over 25 years.
Michael Kennedy: Let's connect on social media.
Michael Kennedy: You'll find me and Talk Python on Mastodon, Bluesky, and X.
Michael Kennedy: The social links are all in your show notes.
Michael Kennedy: You can find over 10 years of past episodes at talkpython.fm.
Michael Kennedy: And if you want to be part of the show, you can join our recording live streams.
Michael Kennedy: That's right.
Michael Kennedy: We live stream the raw uncut version of each episode on YouTube.
Michael Kennedy: Just visit talkpython.fm/youtube to see the schedule of upcoming events.
Michael Kennedy: Be sure to subscribe there and press the bell so you'll get notified anytime we're recording.
Michael Kennedy: This episode is brought to you by Sentry.
Michael Kennedy: Don't let those errors go unnoticed.
Michael Kennedy: Use Sentry like we do here at Talk Python.
Michael Kennedy: Sign up at talkpython.fm/sentry.
Michael Kennedy: And it's brought to you by NordStellar.
Michael Kennedy: NordStellar is a threat exposure management platform
Michael Kennedy: from the Nord security family,
Michael Kennedy: the folks behind NordVPN,
Michael Kennedy: that combines dark web intelligence,
Michael Kennedy: session hijacking prevention,
Michael Kennedy: brand and domain abuse detection,
Michael Kennedy: and external attack surface management.
Michael Kennedy: Learn more and get started keeping your team safe
Michael Kennedy: at talkpython.fm/Nordstellar.
Michael Kennedy: David, welcome back to Talk Bythonomy.
David Kopec: Thank you so much for having me back, Michael.
David Kopec: It's really an honor.
Michael Kennedy: Got some really fun stuff to talk about,
Michael Kennedy: computer science from scratch.
Michael Kennedy: What does that even mean?
Michael Kennedy: We're going to find out
Michael Kennedy: because you wrote the book on it.
David Kopec: Yeah, I'm excited.
David Kopec: And this book just came out,
David Kopec: so it's kind of fresh off the press.
David Kopec: And I want to thank you
David Kopec: for being the technical reviewer
David Kopec: on the book, actually.
Michael Kennedy: Yeah, it was really fun.
Michael Kennedy: You reached out and asked me,
Michael Kennedy: and I don't normally do things like that,
Michael Kennedy: but I'm like, you know,
Michael Kennedy: that'd be kind of fun. It would be a good experience. And I do think it was. It taught
Michael Kennedy: me some about creating books and I guess that pays off as well. And congratulations, by the way,
David Kopec: on Talk Python in production coming out. Yeah, thanks. I started that last December and it came
Michael Kennedy: out, I think the beginning of this month, maybe end of September, something like that, but pretty
Michael Kennedy: recently. So yeah, I really appreciate it. It's going really well. We're in kind of the same phase
David Kopec: because computer science from scratch officially came out end of September also. So we're just in
David Kopec: this kind of, you know, one month out from these books coming out. And so it's both, I think it's
David Kopec: an exciting time for both of us. And I've started reading Talk Python in production, and I'm really
Michael Kennedy: loving it. So congrats on it. Awesome. Thank you. And I really enjoyed your book. And I had to read
Michael Kennedy: it with a little more detail than just appreciate it, right? I had to like take notes and help you
Michael Kennedy: with some feedback. So that was a really cool experience. And thanks. You know, it's been six,
Michael Kennedy: almost a little, it's over five years, let's put it that way. It's been over five years since you've
Michael Kennedy: on the show, we talked about classic computer science programs in Python, I believe it was.
Michael Kennedy: And yeah, that was really a fun and popular episode. But let's do a quick refresher,
Michael Kennedy: a quick introduction for you to everyone who's new to the show in the last five years.
David Kopec: Okay. So I'm a computer. My name is David Kopech. I'm a computer science professor
David Kopec: at Albright College in Redding, Pennsylvania. Actually just moved over here from Champlain
David Kopec: College, where I was for the past nine years in a similar role. And I'm also the program director
David Kopec: of Computer Science and Information Technology. We're launching three new majors, a little plug
David Kopec: for Albright, a revamped computer science major, an artificial intelligence major, and cybersecurity.
David Kopec: And so I'm managing the launch of those for fall 2026. My background is for the past decade,
David Kopec: obviously, as a computer science educator. I've written five books on computer science and
David Kopec: programming, the most successful of which was Classic Computer Science, Problems in Python,
David Kopec: which of course I was on the show five years ago about. And this book, Computer Science from Scratch,
David Kopec: is kind of for a similar audience. Both books are for Python programmers, folks who are intermediate
David Kopec: or advanced Python programmers, but maybe who want to fill in the kind of computer science topics
David Kopec: that they don't know, maybe because they're self-educated. Maybe they learned Python on
David Kopec: their own. They didn't have a formal CS degree, or maybe they did have a formal CS degree,
David Kopec: but now they're preparing for interviews or transitioning to a more CS in-depth role.
David Kopec: And they want to refresh on some of these topics.
David Kopec: So both books are for folks who know Python, but want to go deeper on CS.
Michael Kennedy: Right. They're not, here's how you do a loop in Python, or here's what InterTools is.
Michael Kennedy: It's true computer science topics, right?
David Kopec: Right. And I think somebody at that stage will be very frustrated by the books.
David Kopec: They really are. And so we have to put that preface in.
David Kopec: And they really are for intermediate or advanced Python programmers.
David Kopec: So, you know, so I'm trying to reach the same audience, but they're totally different books
David Kopec: in terms of the type of topics they cover.
David Kopec: So classic computer science problems in Python was more of a data structures and algorithms
David Kopec: type of book, did some AI type topics as well, but very much on the algorithm side.
David Kopec: Computer science from scratch is more, let's build up the layers of the software stack from
David Kopec: the bottom up that Python kind of runs on top of. So you understand what's actually happening under
David Kopec: the hood. So how does an interpreter work? What's the hardware software interface like? We get that
David Kopec: with emulators. And then there is still some algorithmic stuff as well, different topics than
David Kopec: in the prior book, but stuff like a little computer art stuff, a little bit of machine learning. So
David Kopec: we try, it's still a survey book. It's still pretty broad, but it's more about the layers of
David Kopec: the software stack than classic computer science problems in Python was. Yeah. And there's some
Michael Kennedy: pretty low-level stuff and it's interesting you're doing in python you know a lot of i think a lot of
Michael Kennedy: times that would be taught in um at least a pointer based language you know like c or even c c being
Michael Kennedy: taught in assembly like you're talking to the machine like literally absolutely and you know
David Kopec: if you took these classes like if you took an um architecture class which i'm going to be teaching
David Kopec: next semester at albright it's going to be an assembly language right and if you took a compilers
David Kopec: course, it's usually in something like C or today it might be in a Rust, a low level language where
David Kopec: you do have that direct access to memory. But I wanted to make the book accessible. And Python is
David Kopec: the most accessible language in the world. It's the most popular language in the world. And it's
David Kopec: the language that we're increasingly using in computer science education anyway. So it is
David Kopec: actually a little unusual to cover some of these topics in Python, but it makes the topics accessible
David Kopec: to a much wider audience.
Michael Kennedy: It definitely makes it accessible to a wider audience.
Michael Kennedy: Let's take a step back and talk about this role you have
Michael Kennedy: in this new college, university you're at.
Michael Kennedy: You said that you're revamping the CS program.
Michael Kennedy: You're adding AI and cybersecurity.
Michael Kennedy: That's a big shift.
Michael Kennedy: Do you want to just talk to people about how that's changing,
Michael Kennedy: why you decided to change?
Michael Kennedy: I look at a lot of CS programs,
Michael Kennedy: and I don't know how connected they are to the real world.
Michael Kennedy: So imagine some of these changes are to sort of realign it with what's happened recently.
David Kopec: Absolutely.
David Kopec: Yeah.
David Kopec: So I'm coming from a college, the Champlain College in Vermont, where I was at for nine
David Kopec: years, which was a professionally focused college.
David Kopec: So it was a college where we were preparing students for their careers.
David Kopec: I moved now to Albright, which is a liberal arts college.
David Kopec: So it's a college that's more teaching people how to think, creating great citizens.
David Kopec: And hopefully we prepare them for their careers very well, too.
David Kopec: but there's that liberal arts foundation underneath everything.
David Kopec: So one of the challenges in developing these three new majors
David Kopec: was how do you fit them into a liberal arts curriculum?
David Kopec: And how do you make them relevant to careers
David Kopec: while still being true to the liberal arts?
David Kopec: And so what I found the best way to do it
David Kopec: is to still focus on how to help people think computationally.
David Kopec: And so there's a firm foundation of computer science
David Kopec: and mathematics throughout all three majors.
David Kopec: So whether you're doing cybersecurity,
David Kopec: artificial intelligence, or computer science,
David Kopec: you're going to have a lot of classes in common with one another. And we also need to infuse some
David Kopec: of the issues we see in the workforce today. Like all of them will have a computer ethics course
David Kopec: that's incorporated. And all of them will have an internship course that's incorporated. So
David Kopec: students are getting real world experience as they're going through these majors.
David Kopec: I think that's a great idea. It's really important to have done software engineering
Michael Kennedy: hands-on with other companies, real products, and real product managers,
Michael Kennedy: in addition to just knowing the algorithms and foundations.
David Kopec: Absolutely. I couldn't agree more. And so we're trying to blend the two. And that's been one of
David Kopec: the exciting things. And you asked why I changed. I was excited about this opportunity to build these
David Kopec: new majors from the ground up. We'll be one of the first teaching colleges, small teaching colleges,
David Kopec: to offer an artificial intelligence major. It's just been in the last five years that we've seen
David Kopec: colleges start to offer an undergraduate major in artificial intelligence. And it's mostly been
David Kopec: big name brand colleges like CMU that are offering these first artificial intelligence bachelor's
David Kopec: degrees. But we get to be at the forefront of how do you fit that into a small liberal arts college
David Kopec: and still make it career relevant and still have that firm liberal arts foundation.
Michael Kennedy: Are you concerned about letting all these hackers in on your network if you're teaching a cybersecurity?
David Kopec: Well, I won't be teaching the cybersecurity courses. So I'm firmly just in the computer
David Kopec: science education course, and we're hiring additional faculty in cybersecurity and in
David Kopec: artificial intelligence. I'm more on the management side of those two programs. But, you know, look,
David Kopec: it's more relevant than ever. When you look at actually the number of students going to college
David Kopec: for cybersecurity, it's been exploding over the last decade. You know, I just talked about how
David Kopec: artificial intelligence has just come about as a bachelor's degree. Cybersecurity was kind of there
David Kopec: 15 years ago. So cybersecurity started out as maybe you took a computer security course at the
David Kopec: end of your computer science degree. Then it became a concentration you could do within some
David Kopec: computer science degrees. And then in the 2010s, it broke out and became its own bachelor's degree.
David Kopec: And so we're seeing the same thing right now with AI. It started out, you know, when you did
David Kopec: undergrad computer science, maybe in the 90s, or like me and the OOs, you might have one course,
David Kopec: like an intro to AI course that you have at the end of your bachelor's degree. Then it started to
David Kopec: be something where you do a concentration at Champlain. I developed a concentration in
David Kopec: artificial intelligence. Now, just in the last five years, we're seeing it break out from being
David Kopec: just a part of a CS degree to being its whole own, you know, adjacent degree. So I think it's an
David Kopec: exciting time for that. Of course, there's a hype cycle right now about AI. So a lot of colleges
David Kopec: are jumping in and I think some of them are doing it the right way. And, you know, having that firm
David Kopec: foundation in computer science and mathematics, so it's durable. And some of them are doing it in
Michael Kennedy: kind of a shallow way. We're trying to do it the right way. Yeah, that sounds great. And obviously
Michael Kennedy: cybersecurity is one of those things that's highly valuable. Nobody wants to be in the news
Michael Kennedy: for that reason, right? So companies are certainly looking for people with those skills.
Michael Kennedy: Let's talk one more thing about the university and not the AI focus, but just AI. One of the
Michael Kennedy: things I think is of all the places that's getting the most scrambled, changed, under pressure,
Michael Kennedy: whatever you call it, from AI, I think it's education in general. And I'm not talking just
Michael Kennedy: college. I'm talking, I don't know, like third grade. As soon as the kids can start using AI,
Michael Kennedy: they're like, this is like the calculator with a rocket booster on it. You know what I mean? Like
Michael Kennedy: this will solve the problems. And I think there's a really big challenge for you as universities to
Michael Kennedy: connect with students, keep academic integrity as well. But there's also a huge problem, I think,
Michael Kennedy: for the students to not let it undercut their education and end up going, well, all I know
David Kopec: to do is to do ChatGPT. You're absolutely right. I mean, it's a huge challenge in computer science
David Kopec: education. And I don't think the computer science education community has yet completely figured it
David Kopec: out. Well, basically what it breaks down to is exactly what you said. Students are just using
David Kopec: ChatGPT or GitHub Copilot to do their homework. And if you're in a first year or second year class,
David Kopec: I've been mostly teaching upper level CS for the past like six plus years. And I'm teaching an
David Kopec: intro class for the first time in a long time this semester. And it's been eye-opening for me
David Kopec: to see how many students are trying to just do every assignment with ChatGPT. And we still have
David Kopec: to give them basic assignments. When you're first learning how to do a for loop or what a function
David Kopec: is or what an if statement is even, right? You got to write some of those things.
Michael Kennedy: You can't say implement a database and get back to me next week. You got to start somewhere.
David Kopec: So we still have to teach these fundamentals, but we have this opponent to us in some sense
David Kopec: of this ease of access to something that can just do all the work for you. And so I'm sure that,
David Kopec: you know, like you mentioned, mathematics educators had similar challenges in the 1970s,
David Kopec: 1980s as calculators became prominent. So what I've done and I've been adjusting as since chat
David Kopec: GPT came out in fall 2022, I've been constantly adjusting and reevaluating, but I have had to go
David Kopec: back to the future a little bit and people might find this a little anachronistic, but I've heard
David Kopec: about it from other CS educators as well, going back to doing some paper exams. I know that sounds
David Kopec: crazy and I know that sounds like bizarre, but at some point you need to evaluate if students
David Kopec: actually know how to write a for loop because, you know, while we think, some people think LLMs are
David Kopec: going to replace software engineers in the next two years, you still need to understand what it's
David Kopec: outputting. And I don't think it's, I don't know about you, Michael, but I don't think they're
Michael Kennedy: completely replacing software engineers in the next couple of years. And that's coming, I don't
Michael Kennedy: know how many people maybe don't necessarily. I'm a huge fan of agentic coding and what it can do
Michael Kennedy: for productivity. And it's incredibly powerful, but it's one of those things that it needs someone to
Michael Kennedy: guide it who knows how to do that. And then it becomes a superpower. If you don't, you end up
Michael Kennedy: with like, how do we end up on React? I thought this was a Rust project. You're like, what happened
David Kopec: here? Yeah. And you need to understand when it makes mistakes, you need to know how to correct
David Kopec: those mistakes. And of course, you need to be understanding everything that it's outputting,
Michael Kennedy: so you're auditing it. This portion of Talk Python To Me is brought to you by Sentry's Seer.
Michael Kennedy: I'm excited to share a new tool from Sentry, Seer. Seer is your AI-driven pair programmer that finds,
Michael Kennedy: diagnoses, and fixes code issues in your Python app faster than ever. If you're already using
Michael Kennedy: Sentry, you are already using Sentry, right? Then using Seer is as simple as enabling a feature on
Michael Kennedy: your already existing project. Seer taps into all the rich context Sentry has about an error.
Michael Kennedy: Stack traces, logs, commit history, performance data, essentially everything. Then it employs its
Michael Kennedy: agentic AI code capabilities to figure out what is wrong. It's like having a senior developer
Michael Kennedy: pair programming with you on bug fixes. Seer then proposes a solution, generating a patch for your
Michael Kennedy: code and even opening a GitHub pull request. This leaves the developers in charge because it's up to
Michael Kennedy: them to actually approve the PR. But it can reduce the time from error detection to fix dramatically.
Michael Kennedy: Developers who've tried it found it can fix errors in one shot that would have taken them
Michael Kennedy: hours to debug. SEER boasts a 94.5% accuracy in identifying root causes. SEER also prioritizes
Michael Kennedy: actionable issues with an actionability score, so you know what to fix first. This transforms
Michael Kennedy: Sentry errors into actionable fixes, turning a pile of error reports into an ordered to-do list.
Michael Kennedy: If you could use an always-on-call AI agent to help track down errors and propose fixes before
Michael Kennedy: you even have time to read the notification, check out Sentry's Seer. Just visit talkpython.fm
Michael Kennedy: slash Seer, S-E-E-R. The link is in your podcast player's show notes.
Michael Kennedy: be sure to use our code talkpython one word all caps thank you dysentery for supporting talk
David Kopec: pythonomy so we are having a real challenge especially in those intro classes of how do you
David Kopec: kind of force students to not use these tools essentially because you're not learning anything
David Kopec: if the tool writes the for loop for you when you're first learning how to do a for loop and so you have
David Kopec: to find ways to to encourage it to to win hearts and minds i think of course that's a big part of it
David Kopec: is convincing students and being dynamic and enthusiastic about how good it feels to really
David Kopec: understand how this actually works. But then there has to be enforcement too. And sometimes that feels
David Kopec: a little anachronistic being forceful about it or going back to doing tests on paper. But we have to
David Kopec: have ways of ensuring the knowledge is actually there. I feel like this is not just a college
Michael Kennedy: student issue, but I think it's especially relevant in that part of your career that the struggle is
Michael Kennedy: not in the way. The struggle is often part of what unlocks your thinking. It's part of what
Michael Kennedy: cements the knowledge and makes you feel a true sense of accomplishment. When you're like,
Michael Kennedy: I tried this and I couldn't get it to work. But three hours later, I finally figured it out. And
Michael Kennedy: I now understand iterators. Finally. You know what I mean? And it's just so easy to push the easy
Michael Kennedy: button and just say, chat, why? Yeah. You know? And that's what feels good about being a teacher
David Kopec: is being there for those aha moments with students.
David Kopec: I had some moments like that last week
David Kopec: and they reminded me,
David Kopec: this is why you're in this career.
David Kopec: It's really something that can become addictive
David Kopec: to students actually.
David Kopec: When they start having those aha moments,
David Kopec: they want more of them and it spurs on.
Michael Kennedy: That's how you end up at like 3 a.m.
Michael Kennedy: really hungry,
Michael Kennedy: wondering why you haven't gone to sleep
Michael Kennedy: but still programming.
Michael Kennedy: You're like, this is amazing, I can't stop.
David Kopec: Right, right, right.
David Kopec: And it takes a certain mindset to be able to appreciate those moments.
David Kopec: And, you know, this is like a sidebar, but one thing we're also seeing in computer science education is we see a lot of folks who go into it sometimes for the wrong reasons.
David Kopec: Folks sometimes go into computer science just because they hear, this is a great way to get a good job.
David Kopec: And if that's your only motivation going into it, you're probably not going to be successful in it, unfortunately.
Michael Kennedy: It's going to be tough. Yeah, it's going to be tough.
Michael Kennedy: But a lot of people are there for the right reasons. So I think that that's good.
David Kopec: Absolutely. And I hope with a book like this, folks who came in from the other side,
David Kopec: folks who came in because they had that interest, but they didn't have the chance to either go to
David Kopec: university, maybe they couldn't afford it, maybe they studied something else and they're later in
David Kopec: their career. This will hopefully give them a bunch of those aha moments and about topics that
David Kopec: are deeper than just how to write a for loop. Yeah, absolutely. Well, good. I mean, I feel like
Michael Kennedy: there's probably some middle ground you might be able to accomplish if you're like, all right,
Michael Kennedy: we're going to give you a laptop, a testing laptop that has no internet. Like we've gone in there and
Michael Kennedy: crushed the network card. Yeah. Here, take the test. And here's your thumb drive to submit your
Michael Kennedy: work and potentially, you know, potentially. Yeah. Yeah. And when we do stuff like that,
David Kopec: like I just did a test on, you know, an online test for my students and I'm just monitoring to
David Kopec: make sure nobody's using the tools. You know, but there is something said still for paper exams.
David Kopec: I'll tell you why. Sometimes even today on today's tools for giving exams, sometimes you want students
David Kopec: to draw something, especially if it's a data structures and algorithms class, you might want
David Kopec: them to draw a tree and it's just actually easier for them to do that on paper. So when people hear
David Kopec: paper, they might be like, oh my goodness, what are you doing that for? No, there's real reasons.
David Kopec: Yeah, of course. But yeah, we have monitoring tools too. Yeah, very good. All right. Let's maybe
Michael Kennedy: take a couple of different examples or different chapters in the book and talk through them.
Michael Kennedy: The first one, the first main topic is the smallest possible programming language, right?
David Kopec: Yes, yes.
Michael Kennedy: Tell us about this.
David Kopec: Yeah, the premise of the chapter is what's the minimum that we need to have a programming language?
David Kopec: And there's a famous programming language.
David Kopec: I'm actually not going to use the name of the language on the show, I think, just because it has the F word in it.
David Kopec: And I didn't make up the name of the language.
David Kopec: It was developed 30 years ago, but we'll just call it BF, okay?
David Kopec: Yeah.
David Kopec: Brain F star.
David Kopec: Yeah, sure.
David Kopec: or in AppStar. This language, it only has eight symbols in it. I mean, it literally only has eight
David Kopec: symbols in it, yet it's what we call Turing complete. And I'm not going to, I won't go into
David Kopec: the full details of what it means for something to be Turing complete, but let me put it this way.
David Kopec: A language that is Turing complete can theoretically solve any of the same algorithmic
David Kopec: problems as any other language that's Turing complete. And every programming language that
David Kopec: you use is Turing complete, whether it's Java, Python, C, whatever, of course, they're all
David Kopec: Turing complete. This language with only eight symbols in it is also Turing complete. So while
David Kopec: you could code something like Quicksort in Python, you could also code it in BF with just eight
David Kopec: symbols. While you could code a JSON parser in Python, you could also code a JSON parser in BF.
David Kopec: So by learning this really, really basic language and actually implementing it,
David Kopec: so implementing an interpreter for it, something that can actually run programs written in it,
David Kopec: you really get to understand just how little we need to solve computational problems.
David Kopec: We don't need much.
David Kopec: We need very minimum amount of computing machinery and very minimum amount of syntax to be able to solve most problems.
David Kopec: Now, would you want to solve most problems in PF?
David Kopec: Of course not.
David Kopec: We just use it as an illustrative example to show this is how simple a programming language can really be
David Kopec: and still have all the same capabilities as a more advanced programming language.
David Kopec: And you might wonder then why do we have such much more advanced programming languages?
David Kopec: Because they give us a lot more developer productivity.
David Kopec: They have more abstractions that let us think as human beings instead of thinking like machines.
David Kopec: The expressiveness, absolutely.
David Kopec: And so that's great that we have all of that.
David Kopec: But if you really want to understand essentially what the language is doing at the lowest levels, you only need these few bits.
Michael Kennedy: So what's the key message here?
Michael Kennedy: Obviously, you're not trying to get people to become BF experts, right?
Michael Kennedy: I mean, maybe learn Cobalt over BF these days.
David Kopec: It could work for the Social Security Administration.
David Kopec: Yes, exactly.
Michael Kennedy: There's going to be some high-paying Cobalt jobs out there.
Michael Kennedy: But this is more about writing an actual interpreter, very much like CPython itself, in a sense, conceptually.
David Kopec: Conceptually.
David Kopec: I mean, much, much, much simpler.
David Kopec: And actually, in the next chapter, we get to writing a basic interpreter, which is just one step up from BF.
David Kopec: And we can talk about that in a minute.
David Kopec: But yeah, it's about understanding how it works at a low level.
David Kopec: Like what's it actually doing?
David Kopec: And, you know, it feels good to make something that can run programs.
David Kopec: A lot of people, when they get into computer science, are actually excited about like making their own language.
David Kopec: So by doing these first couple of chapters of the book, you're actually on the path to that.
David Kopec: I think after reading these first two chapters, you could go implement your own simple language and really make that kind of dream that a lot of us have come true.
David Kopec: So it's about understanding how it works at a low level.
David Kopec: I have to say the book is not a practical book.
David Kopec: It's not like talk Python in production
David Kopec: where you're going to learn,
David Kopec: you know, here's some useful tools
David Kopec: and tips and strategies.
Michael Kennedy: Install this thing and set up that config
Michael Kennedy: and then run it this way.
David Kopec: To do something right now.
David Kopec: Right.
David Kopec: Computer Science from Scratch
David Kopec: is not going to help you build your next app
David Kopec: like that you're building.
David Kopec: Not directly.
David Kopec: Not directly,
David Kopec: but it is going to help you understand
David Kopec: a lot more about what's happening
David Kopec: under the covers,
David Kopec: which is ultimately going to make you think
David Kopec: more broadly as a software developer
David Kopec: and understand different strategies that you might be able to use.
David Kopec: I'll give you an example with this interpreter stuff.
David Kopec: You might be writing a program that needs to have some kind of configuration files,
David Kopec: and you want to maybe be able to parse those configuration files.
David Kopec: Well, part of writing an interpreter is writing a parser,
David Kopec: something that understands the syntax of the programming languages
David Kopec: and starts to get towards the semantics.
David Kopec: And you might want to be able to write a parser later on
David Kopec: for some very specific configuration type format that you've come up with
David Kopec: for some, or maybe even just a file format for more of like an office type program.
David Kopec: And you're going to need some way of understanding the techniques of how to parse that. Learning how
David Kopec: an interpreter works will help you write that program later on. So it's about learning computational
David Kopec: techniques, learning problem solving techniques more than it is about like something that's going to
David Kopec: necessarily be, this is exactly how you do this for the next app you're going to build.
Michael Kennedy: It's not something that you would just stumble across most of the time, I think, right? You'll
Michael Kennedy: across, you know, oh, here's an ML library or something, but you don't typically stumble across
Michael Kennedy: and here's how you build a parser from scratch. Right. And so, you know, there has to be that
David Kopec: curiosity there. So I will admit that, you know, if you have no interest and you're not the type
David Kopec: of person who wants to understand how things work, you won't like this book. And you know,
David Kopec: that is some folks and that's okay. There's folks who go into programming because they're only
David Kopec: interested in what they can build and they're not so interested in how things work. And if that's
David Kopec: you, this is probably not the book for you. But if you're the type of person who has that curiosity
David Kopec: and you really want to understand how everything's actually working under the covers, then this is a
Michael Kennedy: great book. Yeah, absolutely. And it's a simple enough thing that you can grasp the ideas pretty
Michael Kennedy: quickly with this BF language, right? It's not so complicated that you, you know, a day later,
David Kopec: still trying to make the thing parse. Absolutely. I mean, what's crazy is to interpret BF,
David Kopec: you only need about 30 lines of code, 30 lines of Python.
David Kopec: And then you actually have something that can run any program written in this language.
Michael Kennedy: And to be clear, you have like something.bf files that you can put the language into,
Michael Kennedy: and then you say Python, this module, that file,
Michael Kennedy: and it'll run it as if it were an interpreter for that thing, right?
David Kopec: Exactly. Yeah.
David Kopec: You're literally implementing the whole programming language in like 30 lines of Python.
David Kopec: And I think what's great about this too,
David Kopec: is it takes away the feeling that everything is magic.
David Kopec: That's another thing I love when people read
David Kopec: also class computer science problems in Python
David Kopec: is sometimes when you think about how these things work,
David Kopec: like in that book, we cover the A-star algorithm,
David Kopec: which is something that Google Maps work uses.
David Kopec: When you think about Google Maps,
David Kopec: it feels like magic when you use it.
David Kopec: But actually there's really understandable,
David Kopec: logical algorithms that are underneath the surface.
David Kopec: It's the same thing here.
David Kopec: Python itself might feel like magic to a lot of folks.
David Kopec: But by the time you get through these first couple chapters, especially through the basic interpreter chapter, you'll start to be on the road to think, oh, you know what?
David Kopec: I bet I could dive into the CPython source code with enough additional training and really understand it.
David Kopec: It gives you that confidence that this is not just magic.
Michael Kennedy: You just got to look at the byte codes and look at it go.
David Kopec: Yeah.
David Kopec: Not to say there's not a lot more there, but it just gets you on that journey and makes you see it's not magic.
Michael Kennedy: Right.
Michael Kennedy: Well, it's that zero to one sort of gap that's the hardest to cross.
Michael Kennedy: Yeah.
Michael Kennedy: You know, like the second language, second programming language you learn or the third
Michael Kennedy: or the fourth, they only get easier to learn, not harder to learn.
Michael Kennedy: Whereas, you know, maybe when you're first starting out and you're trying to get something
Michael Kennedy: to compile and it won't even run, you're like, oh my God, how am I going to do?
Michael Kennedy: I can't even learn this one.
Michael Kennedy: There's all these things I'm going to have to know.
Michael Kennedy: And it's really kind of upside down.
David Kopec: Yeah, absolutely.
David Kopec: And so, you know, when we think about understanding how Python itself works, I think the second
David Kopec: chapter of the book about basic gets us, you know, a lot further along on that journey.
David Kopec: because here this isn't just a made up.
David Kopec: BF is, it's a language that's been around
David Kopec: in computer science education for like 30 years,
David Kopec: but it's not a real language that people actually used.
Michael Kennedy: And the second factor-
Michael Kennedy: Very few people ever said that they were BF programmers
Michael Kennedy: at a dinner party, right?
David Kopec: Absolutely.
David Kopec: But plenty of people said they were basic programmers.
David Kopec: And it was the first programming language
David Kopec: of a lot of people who grew up in the 70s, 80s,
David Kopec: or even the 90s.
David Kopec: It was my first programming language.
David Kopec: And there was a dialect of basic called tiny basic
David Kopec: that came out in the late 1970s.
David Kopec: it was actually one of the first free software projects. And it would run on machines that just
David Kopec: had two or four kilobytes of RAM. So that's why it was called Tiny Basic. I mean, it truly was
David Kopec: tiny. And so we re-implement a dialect of Tiny Basic in chapter two. So this is re-implementing
David Kopec: a real programming language that people actually used for real work in the late 1970s and up to the
David Kopec: early 1980s. And it can run real programs from that period. So you could go download a program
David Kopec: from the late 70s, we were missing like one or two features from the real language.
David Kopec: But if you have a pro, not all programs use all those features, you could actually run
David Kopec: it in this interpreter.
David Kopec: So we go from the first language where it's really esoteric, educational, you know, weird
David Kopec: language to the second chapter.
David Kopec: This was a real thing.
Michael Kennedy: Yeah, absolutely.
Michael Kennedy: It was, you know, I'm just going to give a little shout out to Visual Basic.
David Kopec: Yeah.
Michael Kennedy: I don't know.
Michael Kennedy: Did you ever do Visual Basic?
David Kopec: I did.
David Kopec: And I did a version on the Mac called Real Basic.
David Kopec: So this is really esoteric.
David Kopec: But anyone who used real basic, late 90s, I'm in your camp.
Michael Kennedy: There you go.
Michael Kennedy: I don't know if we even today still have something as approachable and productive as Visual Basic was.
Michael Kennedy: For people who haven't used it, you're like, there's just no way.
Michael Kennedy: There's no way that it's basic.
Michael Kennedy: But you would just get a visual thing.
Michael Kennedy: You would drag it together to build your, you know, here, I want to have, literally, you would drag over.
Michael Kennedy: Here's a web browser.
Michael Kennedy: Here's the address bar.
Michael Kennedy: Here's a go button.
Michael Kennedy: And then you would double click the go button and would create an event handler.
Michael Kennedy: and then you would go webbrowser.gototext.value or whatever.
Michael Kennedy: I mean, that was literally, you could do it in five minutes.
Michael Kennedy: You could like create something
Michael Kennedy: that is a functional web browser without much.
Michael Kennedy: It was incredible.
Michael Kennedy: And so, yeah, I'm just thinking back
Michael Kennedy: to a few things I've built with it.
Michael Kennedy: It was amazing.
David Kopec: You know, Michael, a lot of people agree with you.
David Kopec: There's a lot of articles that I've seen on blogs and stuff
David Kopec: where people reminisce about Visual Basic.
David Kopec: And I agree.
David Kopec: I mean, for desktop app development,
David Kopec: it was incredibly productive.
David Kopec: I mean, I think it still rivals some of the tools we have for building web apps today.
David Kopec: When you think about how easy it was to lay out a user interface.
David Kopec: And for designers, it was great too, because designers didn't need to know how to code.
David Kopec: And they could lay out the interface in the same way that it would really appear in the program,
David Kopec: which is different from how designers work today, where they'll often do mock-ups.
David Kopec: And the developer will have to take the mock-up and turn it into code.
David Kopec: And so you kind of lose something there with the designer being able to have the final product
David Kopec: in front of them as they're changing around how things look.
David Kopec: So there were elements of it
David Kopec: that were still missing today, I think.
Michael Kennedy: - Yeah, I think it really hasn't been matched.
Michael Kennedy: Windows forms from.NET kind of approached that,
Michael Kennedy: but it was still, itself was also
Michael Kennedy: a little bit more complicated.
Michael Kennedy: There was something special about that.
Michael Kennedy: And now, don't get me wrong,
Michael Kennedy: it's not like I'm saying we should just go back to it
Michael Kennedy: because the software we build is way more advanced,
Michael Kennedy: does a lot of other things,
Michael Kennedy: but there's just that lower area is just kind of missing.
Michael Kennedy: This portion of Talk Python To Me is brought to you by NordStellar.
Michael Kennedy: NordStellar is a threat exposure management platform from the Nord security family,
Michael Kennedy: the folks behind NordVPN that combines dark web intelligence,
Michael Kennedy: session hijacking prevention, brand abuse detection,
Michael Kennedy: and external attack service management.
Michael Kennedy: Keeping your team and your company secure is a daunting challenge.
Michael Kennedy: That's why you need NordStellar on your side.
Michael Kennedy: It's a comprehensive set of services, monitoring, and alerts
Michael Kennedy: to limit your exposure to breaches and attacks
Michael Kennedy: and act instantly if something does happen.
Michael Kennedy: Here's how it works.
Michael Kennedy: Nordstellar detects compromised employee
Michael Kennedy: and consumer credentials.
Michael Kennedy: It detects stolen authentication cookies
Michael Kennedy: found in InfoStealer logs and dark web sources
Michael Kennedy: and flags compromised devices,
Michael Kennedy: reducing MFA bypass ATOs without extra code in your app.
Michael Kennedy: Nordstellar scans the dark web
Michael Kennedy: for cyber threats targeting your company.
Michael Kennedy: It monitors forums, markets, ransomware blogs, and over 25,000 cybercrime telegram channels
Michael Kennedy: with alerting and searchable contexts you can route to Slack or your IRR tool.
Michael Kennedy: Nordstellar adds brand and domain protection.
Michael Kennedy: It detects cyber squats and lookalikes via visual, content similarity, and search transparency logs,
Michael Kennedy: plus broader brand abuse takedowns across the web, social, and app stores to cut the phishing risk for your users.
Michael Kennedy: They don't just alert you about impersonation.
Michael Kennedy: they file and manage the removals.
Michael Kennedy: Finally, NordStellar is developer-friendly.
Michael Kennedy: It's available as a platform and an API.
Michael Kennedy: No agents to install.
Michael Kennedy: If security is important to you and your organization,
Michael Kennedy: check out NordStellar.
Michael Kennedy: Visit talkpython.fm/nordstellar.
Michael Kennedy: The link is in your podcast player's show notes
Michael Kennedy: and on the episode page.
Michael Kennedy: Please use our link, talkpython.fm/nordstellar,
Michael Kennedy: so that they know that you heard about their service from us.
Michael Kennedy: And you know what time of year it is.
Michael Kennedy: It's late fall.
Michael Kennedy: That means Black Friday is in play as well.
Michael Kennedy: So the folks at Nord Stellar gave us a coupon, BlackFriday20.
Michael Kennedy: That's Black Friday, all one word, all caps, 20, two, zero.
Michael Kennedy: That grants you 20% off.
Michael Kennedy: So if you're going to sign up for them soon,
Michael Kennedy: go ahead and use BlackFriday20 as a code,
Michael Kennedy: and you might as well save 20%.
Michael Kennedy: It's good until December 10th, 2025.
Michael Kennedy: Thank you to the whole Nord security team
Michael Kennedy: for supporting Talk Python To Me.
Michael Kennedy: And I want to talk,
Michael Kennedy: sort of transition from that to something else really.
Michael Kennedy: We're looking at these two examples of the BF language interpreter and the basic interpreter.
Michael Kennedy: I hear that to really understand computer science, really to work on these things, I have to.
Michael Kennedy: I don't, it's not preferable.
Michael Kennedy: I have to do a language with pointers, malloc, free.
Michael Kennedy: I've got to.
Michael Kennedy: I've got to work at that level.
Michael Kennedy: I just won't understand anything.
Michael Kennedy: And Python, we don't really have those concepts.
Michael Kennedy: And the irony, I think, is Python has more pointers than C++ because there's like no stack at all.
Michael Kennedy: Not at all.
Michael Kennedy: Really?
Michael Kennedy: I mean, in the interpreter there is, but not in your writing. Even a number one is just a pointer.
Michael Kennedy: So Python's full of pointers, but not in the way that computer science thinks about it.
Michael Kennedy: What are your thoughts about that sort of tension? On one hand, you have this really
Michael Kennedy: understandable language talking about these ideas, but the computer is calling malloc on a page of
Michael Kennedy: memory and that's what's happening and they're not seeing it. Okay. So let me talk about it from a
David Kopec: pedagogy standpoint. So at my last institution, Champlain College, we had a big debate over my
David Kopec: nine years there. Should we do our first three classes in Python or in C++? And when I came in,
David Kopec: the first three classes were in C++. And we actually decided over the years to keep it there
David Kopec: for exactly what you mentioned. We wanted to give students both that high level experience with
David Kopec: object-oriented programming, but we also wanted them to have experience with pointers, with memory
David Kopec: management, and understand how things work at a low level. But in that same period of time, many
David Kopec: schools have moved to Python because of the other thing we talked about, which is accessibility.
David Kopec: I think Python simply is an easier language to learn than C++. I don't think that most people
David Kopec: who know both languages would really debate that. And so if we're trying to make those first ramp
David Kopec: up classes where you're first learning CS as easy as possible, I think Python is the way to go if
David Kopec: we want to encourage more people into the discipline. That doesn't mean there shouldn't
David Kopec: Maybe a C or C++ course later on where folks, maybe when they take operating systems or even as part of an architecture class to see how the assembly language matches to a C program, that kind of thing.
David Kopec: You know, it doesn't mean there shouldn't be C or C++ in the curriculum or Rust or whatever.
David Kopec: But if we're thinking about what's best for a student who's just coming into the field, I think we need to think about accessibility.
David Kopec: But at the same time, my advice to all students is learn one language well before you learn any other language.
David Kopec: So whether you're starting with Python or you're starting with C++, spend a year or two on it and become really decent at it before you go and learn another language.
David Kopec: And that's the biggest mistake I see folks who are self-taught make.
David Kopec: The biggest mistake I see folks who are self-taught make is constantly switch around from language to language.
David Kopec: I need to know this.
Michael Kennedy: Okay, I got it.
Michael Kennedy: Now it's time to learn this.
Michael Kennedy: And they're trying to fill all these gaps, right?
David Kopec: Right, right.
David Kopec: Because once you learn Python well, a lot of the stuff in C or C++ will make sense to you.
David Kopec: The pointers might not, but a lot of the other stuff, like how does a function work?
David Kopec: How does a loop work?
David Kopec: What are variables?
David Kopec: What's a global versus local?
David Kopec: All that kind of stuff.
David Kopec: That's going to make sense to you.
David Kopec: And that's going to be transferable skills once you've really learned it in any one language
David Kopec: across any other language.
David Kopec: And then pointers, you can learn later on.
David Kopec: You don't need to learn that at the beginning of your CS education.
David Kopec: People make it sound like it's a totally mystical topic.
David Kopec: If you are able to do calculus, which basically every CS degree requires calculus one, you can learn pointers.
David Kopec: You'll be okay.
David Kopec: You can learn pointers.
Michael Kennedy: Yeah, exactly.
Michael Kennedy: Like double integrals and all that kind of stuff is way worse.
Michael Kennedy: I feel like you could also cycle, right?
Michael Kennedy: So you could start with Python for a couple of classes, then go deeper, closer to the machine with C.
Michael Kennedy: But then you could come back and say, let's look at Python again with new eyes and try to understand interpreted dynamic languages better.
Michael Kennedy: because now you can take the red pill
Michael Kennedy: and you can see the arenas
Michael Kennedy: and the blocks of the memory allocator
Michael Kennedy: and the GC and all that kind of stuff, right?
Michael Kennedy: You could go, actually,
Michael Kennedy: you didn't know any of this stuff.
Michael Kennedy: You didn't, nobody probably even thought
Michael Kennedy: to think is this here
Michael Kennedy: and yet look at what's underneath
Michael Kennedy: that you're taking,
Michael Kennedy: you're building on top of, right?
David Kopec: Yeah, and also remember how long
David Kopec: an academic semester is.
David Kopec: It's 15 weeks.
David Kopec: So if you're taking a class in college,
David Kopec: you're forced to be doing that same language
David Kopec: for 15 weeks. That's really the challenge for self-taught folks is they could just spend two
David Kopec: days on one, two days on another, right? But absolutely, you're right. Once you've had enough
David Kopec: time in one, you can cycle to the others back and forth. Yeah, fun. I personally am a fan of
Michael Kennedy: it being in Python because I feel like one of the biggest challenges to keeping people in computer
Michael Kennedy: science and programming is that they don't get enough early wins and early like, yes, aha, right?
Michael Kennedy: It's like, okay, in week 12, we'll let you write a program, but we're going to talk pointers for a while.
Michael Kennedy: And then you'll finally get to make some, you know what I mean?
Michael Kennedy: Like it's just so delayed and that's fine for certain people, but there's a lot of people are like, oh, forget this.
Michael Kennedy: This is not what I thought.
Michael Kennedy: I'm out.
David Kopec: And a huge part of that is the Python library ecosystem.
David Kopec: How easy it is to drop Pygame into an intro class and get somebody building a really simple game.
David Kopec: You know, it's much harder in C or C++ to start integrating libraries and start having students understand how to use those libraries.
David Kopec: And it usually requires a lot more knowledge buildup to be able to use pointers and stuff with those libraries.
David Kopec: So Python just makes everything more accessible.
David Kopec: Awesome.
Michael Kennedy: Cool.
Michael Kennedy: All right.
Michael Kennedy: The next area that was pretty interesting and a little bit, maybe a little artsy.
Michael Kennedy: Yeah.
Michael Kennedy: Is the computational art.
Michael Kennedy: Tell us about that.
David Kopec: Yeah. So there's two chapters in the book on computational art. The first one is really
David Kopec: starting to understand what a pixel is on the screen. And the way we do that is we take modern
David Kopec: photos and then we want to display them on like an ancient Mac, a Mac from the 1980s,
David Kopec: like the Mac Plus. And so we're going to take that modern photo and use what's called a dithering
David Kopec: algorithm to break it down into patterns of black and white pixels because those early Macs were
David Kopec: only black and white, that will then still kind of look like the photo in black and white with
David Kopec: these specialized patterns. So you're learning a bunch of things by doing this. One thing you're
David Kopec: learning is you're learning really what is a pixel. And a pixel is really pretty simple at its base.
David Kopec: I mean, it's just a color and a location. And so understanding how those pixels are organized
David Kopec: and really they're just organized usually as an array or, you know, as a list in Python or a
David Kopec: numpy array or whatever. And then we're understanding some algorithmic stuff. So
David Kopec: is giving us some algorithmic practice.
David Kopec: And then a cool thing we do at the end
David Kopec: is we actually convert it into a file format
David Kopec: called Mac Paint for displaying on an ancient Mac.
David Kopec: And that Mac Paint format uses
David Kopec: a very simple compression scheme
David Kopec: called run length encoding.
David Kopec: So we're getting some other kind of algorithmic practice
David Kopec: in there as well,
David Kopec: understanding a simple compression algorithm.
David Kopec: And we're understanding something about file formats too,
David Kopec: which is really kind of an interesting CS topic as well.
David Kopec: Yeah, it sure is, yeah.
David Kopec: to properly format the file so the Mac Paint program on the ancient Mac will open it correctly.
Michael Kennedy: So yeah, that was something actually when I first got into programming, I feel like I just stuck
Michael Kennedy: with text oriented files pretty much as long as I could. Because, you know, looking at a binary file,
Michael Kennedy: like, okay, it has a header and we read the first few bytes and then the value of that byte tells
Michael Kennedy: you how long the rest of the header is and then like what this means. And then you skip. And I
Michael Kennedy: don't know. That was just, it was a bridge too far for me in my early programming days. And I was
Michael Kennedy: like, wow, this is intense. And I was in awe of people like, yeah, we just read the header and we
David Kopec: do this. I'm like, okay, if you say so. You know, it's a classic CS trade-off between time and space.
David Kopec: Anything that we do in a binary file, we could do in a text file. But binary files can be more
David Kopec: efficient because they can be more compact and they can be faster to read from for certain kinds
David Kopec: of data. So, you know, it's not that we have to use binary files, but understanding what a binary
David Kopec: file format is like can be eye-opening to some readers. And if you think about like modern file
David Kopec: formats, of course, text formats are much more explainable, right? That's why we have the rise
David Kopec: of things like XML in the late nineties up to today, or even JSON as a data interchange format.
David Kopec: There's alternatives to JSON, of course, that are much more efficient for coding your web app in
David Kopec: for distributing the data back and forth. But JSON is human readable. Yeah, yeah, yeah. But JSON is
David Kopec: human readable. So we can right away understand what it's supposed to represent and debug it really
David Kopec: well. And so it's, you know, it's one of those classic trade-offs. We can have something more
David Kopec: efficient or we can have something that might take up a little bit more time, but actually,
David Kopec: you know, is better for us as human beings. Yeah. It's just, I think it's a good skill.
Michael Kennedy: And also something that was prevalent throughout the book is juggling bits, bits and bytes, not just juggling bytes, but bits and bit flipping and shifting.
Michael Kennedy: And there's a lot of that going on, especially in the emulator layers and stuff like that.
David Kopec: Yeah. And even in the Mac paint chapter, because the way Mac paint stores pixels is as individual bits.
David Kopec: So you have like a one or a zero representing a black or a white pixel on the screen.
David Kopec: And so you have to find a way to take those bits and compact them into bytes and then run the right run length encoding algorithm compress it. It's yeah, but there's a lot of that. And, you know, when you do really low level work in computing, you need to understand bits and bytes.
David Kopec: If you're going to work on device drivers or operating systems or file formats, you really need to understand this stuff at an intimate level.
David Kopec: So we try to make fun projects in the book that you get something that's interesting as a way of making this a little of sugar to help the medicine go down kind of thing.
David Kopec: And we were talking about the computer graphics chapters.
David Kopec: I also wanted to mention chapter four because I love the program in that called Impressionist.
David Kopec: It makes images that look like an impressionist painter painted a photograph.
David Kopec: So you give it a photograph and then it builds kind of abstract art out of that photograph.
David Kopec: And people usually think you need a neural network for that or you need some kind of really advanced machine learning algorithm for that.
David Kopec: But actually, we show in the chapter that you can do it using a pretty simple algorithm.
David Kopec: All the algorithm does is it puts a vector shape on the screen and it tries to position the vector shape so that it overlaps a region of color on the original photo that is close to the color in the vector shape.
David Kopec: And if you keep doing that and you put enough vector shapes on the screen, you start to have like abstract shapes that look like the original photo.
David Kopec: And so I think that's that chapter is kind of powerful because it shows you how a simple technique, a simple computational technique can really have some pretty powerful output.
Michael Kennedy: it. Yeah, it's a really interesting idea and it comes out looking great. It's sort of,
Michael Kennedy: it's approaching the problem from a different perspective, which I suspect is probably a pretty
Michael Kennedy: interesting CS lesson. You know, there's these problems that are incredibly expensive and
Michael Kennedy: difficult to compute the one true answer, but then there's amazingly fast ways to get a,
Michael Kennedy: that's pretty much it, answer. I'm thinking like Monte Carlo simulations and stuff like that.
Michael Kennedy: You're like, this could take two weeks or three milliseconds, which would you prefer? You're
David Kopec: And, you know, that that's we talked about, like, why is the book in Python?
David Kopec: And, you know, that is one of the challenges of writing the book in Python is simply Python doesn't have great performance when you write in pure Python.
David Kopec: And so, you know, we've all seen the benchmarks where Python's like 50 or 70 times slower than C on certain benchmarks.
David Kopec: Right. And yeah, honestly, for some of the programs in this book, you really see that performance deficit you have with Python, like the abstract art chapter,
David Kopec: where if I wrote that same program in C using some C graphics library instead of in Python
David Kopec: with Pillow, even though Pillow, I think, is mostly implemented in C anyway, but still just
David Kopec: with the overhead of having our algorithmic part of it in Python, that program is probably 30,
David Kopec: 50 times slower than it would be in C. So you have to wait like 20 minutes to see that abstract art
Michael Kennedy: that would have been like less than a minute in a C program. Not that it's relevant to the book or
Michael Kennedy: of the courses, but you probably could bring in some optimizations like Cython or Numba,
Michael Kennedy: a couple of the things that'll take just the inner two loops and just make them go different,
David Kopec: but it's not the point of the book. That's true. And so I put that as an exercise for the reader
David Kopec: in the NES emulator chapter, because the NES emulator chapter where we actually build up
David Kopec: a real NES emulator. So I didn't write in the book for legal reasons, but it can actually play
David Kopec: Donkey Kong. So it can play Donkey Kong from the original Nintendo Entertainment System.
Michael Kennedy: Let's talk about the NES, the Nintendo Entertainment System.
David Kopec: Yeah. So, I mean, the NES, a lot of us remember growing up with, and if you're of a younger
David Kopec: generation, this was like the main video game system of the 1980s to early 1990s that everyone
David Kopec: had. It's where the original Super Mario came out, the original Legend of Zelda. And, you know,
David Kopec: it's actually, of course, like all video game systems, it's a computer. And being a video game
David Kopec: system for the 1980s. It's a pretty simple computer, actually. It has a 6502 microprocessor,
David Kopec: which is the same microprocessor that was in the Apple II or the Commodore 64 or the TRS,
David Kopec: I think the TRS-80 also. And that microprocessor, it only has 56 instructions, the NES version of it.
David Kopec: And so you can write an interpreter for that microprocessor pretty compactly,
David Kopec: not quite as compact as the BF interpreter in chapter one, but compactly enough that it's only
David Kopec: lines of Python to be able to really write a simulator of that CPU. And so the NES is just
David Kopec: that CPU plus a graphics processor called the picture processing unit plus an audio processor.
David Kopec: So in the chapter, we implement the full CPU. We implement a simplified version of the PPU,
David Kopec: not advanced enough to run Super Mario Brothers, but it is advanced enough to run Donkey Kong.
David Kopec: And we don't implement the APU. So the audio processing unit is a little more complicated
David Kopec: We don't do the audio.
David Kopec: But we do all of this in the chapter
David Kopec: so you can run real NES games.
David Kopec: And what you're getting is you're getting to understand
David Kopec: that software hardware interface.
David Kopec: You're starting to understand how does our software
David Kopec: actually get run on hardware
David Kopec: by re-implementing what a CPU actually does.
David Kopec: And you're re-implementing the memory map too.
David Kopec: So how does a CPU connect to memory?
David Kopec: How does a CPU connect to the graphics processor?
David Kopec: You're doing all of that in that chapter.
David Kopec: And so it's kind of like-
Michael Kennedy: Sure. You talked about like writing an interpreter for the BF in basic languages. Here you're
Michael Kennedy: completely emulating the hardware of the NES and you're giving it the potentially given it
Michael Kennedy: open source NES games and it can run them, right?
David Kopec: Correct. Yeah. It runs several NES open source games. Like I said, I didn't put it for legal
David Kopec: reasons, but it can run real commercial games as well for the NES. And so you're doing the whole
David Kopec: soup to nuts like entire system except the audio. But it is Python and it's pure Python, except for,
David Kopec: of course, the library we're using. We're using Pygame for displaying the window, which is written
David Kopec: a lot of in C. But because it's pure Python, the emulator doesn't run at full speed. So it runs on
David Kopec: my Mac. It runs at about 15 frames per second. The real NES ran at 60 frames per second. So we leave
David Kopec: as an exercise to the reader. Yeah, go use Cython or something like that. And I'm sure you can get
David Kopec: up with several different techniques,
David Kopec: not just with, definitely with Cython,
David Kopec: but with several different techniques,
David Kopec: you could get this up to 60 frames per second,
David Kopec: but you're going to have to incorporate
David Kopec: something that is, you know, using,
David Kopec: that gets outside of just pure Python.
Michael Kennedy: Sure.
Michael Kennedy: You know, one, there's a bunch of ways
Michael Kennedy: that you already mentioned,
Michael Kennedy: but one new way that's kind of officially new,
Michael Kennedy: just this month is free-threaded Python.
Michael Kennedy: And I've been doing,
Michael Kennedy: I went back to my async programming course
Michael Kennedy: where there's a lot of examples of like,
Michael Kennedy: let's do this synchronously.
Michael Kennedy: Now let's do it with threads.
Michael Kennedy: Let's do it with multiprocessing.
Michael Kennedy: Now let's do it with asyncio, right?
Michael Kennedy: And see like how those all compare.
Michael Kennedy: And the threads one, anything was computational.
Michael Kennedy: It's like, yeah, it's the same speed
Michael Kennedy: or maybe even slower, right?
Michael Kennedy: But then I ran it with, I did uv run --Python
Michael Kennedy: 3.14 T and it went 10 times faster
Michael Kennedy: or eight times faster on my 10 core machine.
Michael Kennedy: And it's literally just running on the,
Michael Kennedy: I didn't change the codes from pre-threaded Python
Michael Kennedy: and it just took off.
Michael Kennedy: So I'm thinking here there's graphics amongst many things is primed for this like embarrassingly parallel processing.
Michael Kennedy: Yeah.
Michael Kennedy: You could break up the screen into like little chunks and go, well, we got 10 chunks and 10 cores.
Michael Kennedy: Let's go at it.
Michael Kennedy: What do you think about it as a plausibility?
David Kopec: Unfortunately, for a lot of emulators, especially emulators that are for more modern systems, threading would be a huge advantage.
David Kopec: For the NES, it's not because of the way that everything was timed.
David Kopec: So every time that the CPU does one cycle, the PPU, the picture processing unit, has to be timed to do exactly three cycles.
David Kopec: So you can't just go ahead and, you know, and you don't just give it work.
David Kopec: It's not like a modern GPU where you just give it a bunch of chunks of work.
David Kopec: It works on its own and then provides that to the screen.
David Kopec: It's completely synchronized to the CPU.
David Kopec: And so is the audio processing unit, too.
David Kopec: So it all has to kind of be synchronized within a single thread.
Michael Kennedy: And all the games assume that that's how it works, right?
Michael Kennedy: That's how they have it all set.
Michael Kennedy: Yeah.
David Kopec: Yeah.
David Kopec: And what they had, what was called a V blank period, which was a period where it had already
David Kopec: drawn the screen and then it actually tells the CPU, hey, I'm done drawing the screen.
David Kopec: Now you can do all kinds of work and be ready for the next time that you draw the next frame
David Kopec: again.
David Kopec: So they had really tight synchronization between the graphics and the CPU.
David Kopec: Interesting.
Michael Kennedy: Still cool.
Michael Kennedy: Still pretty cool.
Michael Kennedy: There's a lot going on there.
Michael Kennedy: If you want to understand hardware, that's a pretty low level look at it, right?
David Kopec: I think it's kind of the crown jewel of the book.
David Kopec: You know, there's a lot of people who are interested in emulators.
David Kopec: And what I found before writing the book is there's not a single book out there that talks
David Kopec: about writing an NES emulator, which is the most common emulator that people want to write.
David Kopec: So I think this is the first book that has a chapter on writing an NES emulator.
David Kopec: I will admit I was a little scared of like if Nintendo's legal team is going to like
David Kopec: be upset about the book or something like that.
David Kopec: but we did research on it.
David Kopec: I mean, everything we're doing is perfectly legal
David Kopec: in the book in the United States, at least.
David Kopec: So, you know, but anyway.
David Kopec: Scary, right?
David Kopec: Yeah, absolutely.
David Kopec: And we put a big disclaimer at the top of the chapter
David Kopec: as you remember reading.
Michael Kennedy: I have a legal, I have a Nintendo story for you.
Michael Kennedy: Great.
Michael Kennedy: From when I was young.
Michael Kennedy: And this was, I think this is very late 80s,
Michael Kennedy: early 90s, last century.
Michael Kennedy: Now, this was not me, someone I knew,
Michael Kennedy: someone I was friends with had a,
Michael Kennedy: I think it was a super NES.
Michael Kennedy: Okay.
Michael Kennedy: And people may not remember,
Michael Kennedy: but they had these big honking cartridges go chonk.
Michael Kennedy: And you would chunk them down in there.
Michael Kennedy: You would turn on,
Michael Kennedy: you would basically reboot the NES and it would boot up from the,
Michael Kennedy: the big cartridge game cartridge you put in there.
Michael Kennedy: And there was this guy that they've,
Michael Kennedy: they found somehow I don't,
Michael Kennedy: cause there's no internet.
Michael Kennedy: Maybe it's through a BBS.
Michael Kennedy: I don't know how this was found,
Michael Kennedy: but they found this guy who built a thing that the,
Michael Kennedy: bottom half of it looked like a game cartridge. The top was this whole computer that at the top of it,
Michael Kennedy: it had a 3.5 inch floppy drive. Wow. So you would go to your BBS, you would find a game,
Michael Kennedy: you would put it on a floppy, and then you would slot this huge extra computer down into the NES
Michael Kennedy: and you would turn it on and it would like delegate the file IO through the little fake cartridge
Michael Kennedy: back to it. And it worked like crazy. It was perfect. That guy was not in business for very
Michael Kennedy: long the guy who sold them not my not my friend but the person he got it from wasn't available
David Kopec: after a while so this is so super nes comes out in like 91 um so this might have been a regular
Michael Kennedy: no i wasn't i think i might have been in college so yeah it would be it would be 91 onward yeah
David Kopec: okay i mean that is 93 that is very advanced like for that time when you think about the type of
David Kopec: stuff people like were modding at that time that guy was a genius yeah he was he should have been
Michael Kennedy: hired if he wasn't you know what i mean yeah yeah absolutely yeah he was building himself out of his
Michael Kennedy: dorm room or something i don't know it was i think it was in uh manhattan in uh kansas state
Michael Kennedy: university i'm not sure where the guy was but wow anyway yeah that guy was playing with fire
David Kopec: yeah absolutely and you know what um sometimes like understanding how the rom cartridge works
David Kopec: right like we think again that it's like all magic right but actually what those big cartridges that
David Kopec: we had, that we like inserted in the NES were is they were mostly plastic, like that did nothing.
David Kopec: And there was a little ROM chip, like inside the big hunk of plastic and the ROM chip,
David Kopec: ROM just stands for read only memory. So most of them were just like a big chunk of memory
David Kopec: with a very tiny bit of logic chips that were called mappers on the NES that said like,
David Kopec: read this memory at this time. But again, it wasn't really magic. And those cartridges look
Michael Kennedy: so intimidating, but they were really just a big piece of memory. Yeah. Think about how much you've
Michael Kennedy: got to make that work right before you ship it. Yeah. There's no patches. There's no download and
Michael Kennedy: update. Once it's shipped, it's shipped and it's burned into the ROM and that's it.
David Kopec: I have some friends who work in game development and like before they even ship the 1.0,
David Kopec: nowadays they're working on the first patch, like, and they just know they're not going to ship like
David Kopec: the perfect program in 1.0. Now, to be fair, games were much simpler in the 1980s, right?
David Kopec: than they are today, but they had to be perfect, like literally had to be perfect. and so
David Kopec: there was a certain, I think different attitude around, game development then, than there is
David Kopec: today. And remember they were also working in assembly language. so it was easy language
David Kopec: to work. I don't know if people like this word, but I would call it kind of hardcore, writing
Michael Kennedy: NES games in the 1980s. It was, you know, that kind of programming it's, it's just, it was just
Michael Kennedy: different. It was just different. You had to be so detail oriented and you had to be so thorough.
Michael Kennedy: It's almost like writing spaceship control software type of thing. Not quite, but almost.
David Kopec: And the machines were so slow. The NES, which we emulate in chapter six, ran on a 1.8 megahertz
David Kopec: CPU, 6502, 1.8 megahertz. So Super Mario was like an incredible accomplishment on a 1.8 megahertz.
David Kopec: So people had to worry about all these computer science topics in a way that they don't today as programmers, because you had to squeeze every last bit of algorithmic performance out of the machine.
David Kopec: And so today, I think we have sloppier software today because we have an embarrassment of riches.
David Kopec: We got such powerful computers with so much memory that people don't worry about writing things as efficiently as possible.
David Kopec: And so we end up with inefficient software sometimes because people don't bother to do the algorithms right.
Michael Kennedy: Yes, but I'm going to put a little double dagger, like see the footnote by your comment.
Michael Kennedy: Absolutely true for software, not necessarily true for software developers.
Michael Kennedy: Agreed.
Michael Kennedy: The efficiency of writing a 99.9% correct Python program, how quickly that gets done versus
Michael Kennedy: like something in assembly language straight on a ROM.
Michael Kennedy: Yep.
Michael Kennedy: You know what I mean?
Michael Kennedy: These are the, I think this is an interesting arc and maybe you could speak to it a little
Michael Kennedy: bit from your academic perspective, but I think it's a really interesting arc of, it used to be
Michael Kennedy: really hard to program and we'd solve small problems with lots of effort and it's getting
Michael Kennedy: easier. And a lot of times it gets easier. People say, well, there it goes, job's over. There's not
Michael Kennedy: going to be programmers anymore because everyone can do it. And we just solve bigger, more complex
Michael Kennedy: problems. And that just keeps building, you know, like the, a web app, a basic e-commerce app from
Michael Kennedy: today was a keynote presentation of how like a fortune 500 company pulled it off in 1990 you
Michael Kennedy: know what i mean like yeah yeah here's how we got the ssl termination special machines to handle the
Michael Kennedy: ssl decryption so that we could do this under two seconds of request i mean like crazy stuff yeah
Michael Kennedy: what do you think about this well it's not an either or i mean we want developers to be productive
David Kopec: and we also want efficient software so i mean the good news is that means that after we have make it
David Kopec: it easier and easier to build software, we still need folks who are going to work on optimizing that
David Kopec: software after it's built. So there's still jobs for software developers who are interested in that.
David Kopec: I think you actually touched on this in talk Python in production to some degree, because you
David Kopec: talk about in the book, the appropriate level of complexity for the type of app that you're
David Kopec: building. And so you talk about like, you know, maybe you don't need a Kubernetes cluster if
David Kopec: you're just building, you know, something for 10 million requests a month and not something for a
Michael Kennedy: million requests a month. And it's going to be run by one person or one person part-time versus a
Michael Kennedy: team or somebody who's a DevOps expert, right? Right, right, right. So if I'm working on a run
David Kopec: of the mill e-commerce thing, maybe I don't worry about squeezing out every last bit of performance
David Kopec: because I want to productively make something that, like you said, is 99.9% of the way there
David Kopec: as quickly as possible. But if I'm building a 3D game, they still build most 3D games in C++
David Kopec: because they need to squeeze out every last bit of performance,
David Kopec: even if it's a little less efficient for the programmers.
David Kopec: The programmers could write the games faster,
David Kopec: maybe in another language or another framework
David Kopec: than they're using, whatever.
David Kopec: But they use something that squeezes out
David Kopec: every last bit of performance.
David Kopec: So I think you have to think about
David Kopec: what is the app that we're building?
David Kopec: What is the domain that we're in?
David Kopec: And it's also just not an either or.
David Kopec: Like, you know, we want to have software
David Kopec: that's both developer productive to build,
David Kopec: but also that's efficient to run.
David Kopec: And it's an ongoing process.
David Kopec: We might need to make that trade-off more in the way when we're first building it in developer
David Kopec: productivity. And then as we're maintaining it, maybe we go more towards the efficiency side.
David Kopec: But if you don't think about some of the efficiency things up front, you can end up in a bad spot
David Kopec: because you can get some technical debt. You could end up in a situation where it's hard to undo
David Kopec: some of the algorithmic mistakes that you made early on and the system starts to depend on.
David Kopec: So you should think about it at least a little bit.
Michael Kennedy: Yeah, absolutely. And I think you're talking about they've got to squeeze out that little
Michael Kennedy: extra bit of performance because they want high frame rates they might have to squeeze out that
Michael Kennedy: little bit extra performance because it's either possible or not possible you know you look at some
Michael Kennedy: of the stuff in the unreal engine these days you're like that's real time that's the game
Michael Kennedy: that looks like a rendered cgi movie not a game yeah yeah yeah yeah yeah and i mean so a lot of it
David Kopec: is being done for us today by library authors right so library authors are thinking about a
David Kopec: lot of the low-level stuff. So us as like run-of-the-mill developers don't need to, which is
David Kopec: great. But if you're doing something really de novo, something, you know, with an innovative
David Kopec: algorithm, you still need to consider efficiency at least. Right. And the other thing is it,
Michael Kennedy: you can write really slow code in C and you can write really fast code in Python or vice versa.
Michael Kennedy: It's easier to make it slow in Python, to be fair. But algorithms and data structures are
Michael Kennedy: tremendous influences, right? If you're using, you should have been using a set or a dictionary and
Michael Kennedy: you're using a list. Yeah. You're probably having a real bad time performance. And you caught me
David Kopec: multiple times on the technical review in places where I should have used a set and I used a list.
David Kopec: So thank you for that. But, but that's absolutely, that's a great example. I mean,
David Kopec: just knowing that, that basic fact that, you know, in this situation, just swapping out,
David Kopec: which is a simple switch, by the way, you know, one data structure for another can totally change
David Kopec: performance characteristics. That's the type of things you do learn in the CS degree that you
David Kopec: don't necessarily learn when you're a self-taught programmer kind of hacking everything out on your
David Kopec: own, which is why a book like classic computer science problems in Python, or maybe computer
Michael Kennedy: science from scratch is good for that. Yeah. It exposes you to this. Here's a data structure you
Michael Kennedy: haven't thought about, but here's why we're using it and the advantages and stuff. Yeah, absolutely.
Michael Kennedy: Well, we've covered a lot. We've covered pretty much solved computer science in 2025. That's good.
Michael Kennedy: And then the book is bringing computer science to so many people who are self-taught, you know, like me.
Michael Kennedy: I went to college, but I studied many, many years of math and found my way into programming.
Michael Kennedy: So I took a few CS programs, but not so many.
Michael Kennedy: So, you know, it certainly showed me many things that I hadn't seen.
Michael Kennedy: Like I've never emulated hardware before, for example.
Michael Kennedy: That was wild.
David Kopec: And, you know, Michael, I was reading in Talk Python in production that you actually worked on Windows desktop apps.
David Kopec: Is that right?
Michael Kennedy: I did.
Michael Kennedy: Yeah, for 10 years, more than 10 years.
Michael Kennedy: I'm almost 15 years, yeah.
David Kopec: Wow, so I'm curious,
David Kopec: how did you feel about that experience
David Kopec: versus the kind of Python GUI frameworks
David Kopec: that exist today?
Michael Kennedy: You heard my rant about Visual Basic.
Michael Kennedy: Yeah, and I was thinking of that.
Michael Kennedy: I started actually in C++,
Michael Kennedy: starting the hard way, doing MFC.
Michael Kennedy: I don't know if you ever played with that or heard of that.
Michael Kennedy: Yeah, Microsoft Foundation classes.
Michael Kennedy: Yeah, yeah, and that was actually pretty decent
Michael Kennedy: for a C++ framework.
Michael Kennedy: And then as soon as I found Visual Basic and C#, I'm like, this is so much better.
Michael Kennedy: It goes from weeks to days of UI work, you know, and stuff like that.
Michael Kennedy: And it took me a while to really appreciate building for the web.
Michael Kennedy: You know, I think I probably made that switch around the year 2000.
Michael Kennedy: There's a little bit after that, but I really like the web these days.
Michael Kennedy: I think the web is special.
Michael Kennedy: I just wish it was easier to take apps from the web and get them to people.
Michael Kennedy: For example, Firefox canceled progressive web apps.
Michael Kennedy: iOS has them, but they're kind of, let's not talk about those.
Michael Kennedy: And if you know the secret, you can probably install one, but you probably shouldn't.
Michael Kennedy: And we're going to, you know, like if it's just, it's like right on the verge of one more
Michael Kennedy: step and the web would be really, a really good replacement for those.
Michael Kennedy: And now we have things like Electron and so on, which I'm not a huge fan of, but it's,
Michael Kennedy: it's kind of what we need to make that happen, but we don't necessarily need Electron, right?
Michael Kennedy: It would be really great.
Michael Kennedy: I'm also really excited.
Michael Kennedy: I don't know how you feel about, I'm really excited about PyScript.
Michael Kennedy: and the possibility of running Python
Michael Kennedy: for your front-end stuff?
David Kopec: Well, I guess what I was getting at is
David Kopec: why do you think Python has not taken off more
David Kopec: for desktop GUI development?
David Kopec: So like we've seen things like KIVI,
David Kopec: of course we have PyQT and several other frameworks
David Kopec: that wrap into older C++ GUI frameworks.
David Kopec: But like Python now is so mature,
David Kopec: it's the most popular language in the world.
David Kopec: There's nothing preventing it.
Michael Kennedy: Yeah, there's nothing preventing it
Michael Kennedy: from making a really nice platform
Michael Kennedy: for native app development, right?
Michael Kennedy: Fundamentally, you could wrap,
Michael Kennedy: you could come up with a framework
Michael Kennedy: that abstracts talking to Objective-C,
Michael Kennedy: the APIs there, or the Win32 API.
Michael Kennedy: You know, one of the things I'm starting to realize
Michael Kennedy: that makes desktop development really different
Michael Kennedy: from back in the day, if you will,
Michael Kennedy: is there are so many gatekeepers and barriers
Michael Kennedy: to getting your app onto a machine, right?
Michael Kennedy: If I built a cool desktop app and I gave it to you,
Michael Kennedy: your Mac would go, no,
Michael Kennedy: we're not running that. We moved it to the trash for you because it wasn't notarized.
Michael Kennedy: Right. And something similar happens on Windows. And so there's these steps you got to jump through.
Michael Kennedy: And I think there's just been too many gotchas and steps for anybody to push a framework or a way of
Michael Kennedy: doing this all the way through. I mean, in a sense, the web is kind of like good enough that we don't
Michael Kennedy: have to figure out a way to build this. I think honestly, if I were to be more concerned, I'd be
Michael Kennedy: more concerned that we can't create truly straightforward mobile apps with Python than
David Kopec: desktop apps. Yeah. What do you think? That's where I was going to go to next. Yeah. And I mean,
David Kopec: Kivy has been an attempt at that. But, you know, I don't really think it's gotten a ton of track
David Kopec: from what I see. It doesn't look like it's gotten a ton of traction in the way people in the Python
Michael Kennedy: community hoped it would. So, you know, I don't have to do good work, but it's also not there yet.
David Kopec: I don't think. I wonder if some of the performance issues, you know, are part of this. So, you know,
David Kopec: people expect one of the reasons we like desktop apps and native mobile apps over web apps is
David Kopec: because we get instantaneous feedback and, you know, really high performance in our user interfaces.
David Kopec: And, you know, I still find even a PyQT app sometimes a little bit slower than, you know,
David Kopec: a regular QT app. And, you know, it's unfortunate. For me, like the big want for the whole Python
David Kopec: ecosystem is what started to be the focus, I think, of the core developers, which is performance
David Kopec: improvements. Like, I think that performance improvements would make everyone's lives in the
David Kopec: ecosystem so much better, you know. And so I think rightly that this has become like one of the central
Michael Kennedy: focuses of, you know, of the core developers. Yeah. Guido, Mark Shannon, Grant Booker,
Michael Kennedy: a bunch of people whose names I'm not including, they've all done really good work over the last
Michael Kennedy: three or four years. I was a little bit sad to see Microsoft cancel that project or cancel the
Michael Kennedy: funding for that project. I mean, the project continues, but still, you know, what has happened
Michael Kennedy: is so, so much better. That is really a big deal. Yeah. Yeah. And, you know, I even saw it in the
David Kopec: course of writing the book. I started writing the book in 2021 and that NES emulator on the same
David Kopec: was something like 12 frames per second in 2021.
David Kopec: And by 2025, it was like 17 frames
David Kopec: or 15 or 17 frames per second.
David Kopec: Yeah, nice.
David Kopec: I really saw it in these computationally intensive
David Kopec: programs in the book.
Michael Kennedy: I'm pretty positive for it.
Michael Kennedy: I mean, there's a lot of things that could be better,
Michael Kennedy: but I think one of the real superpowers is
Michael Kennedy: it's approachable, but it's ceiling of Python.
Michael Kennedy: That is, it's ceiling of what you can accomplish
Michael Kennedy: is not that low, right?
Michael Kennedy: You can go pretty far if you have CS skills and ideas.
Michael Kennedy: And then, you know, pip install, uv install.
Michael Kennedy: The options of what is out there to just build and click together are incredible.
David Kopec: What do you think about, and I know you talked about it on the show before.
David Kopec: I heard about a while ago on the show about Mojo and about, you know, a total attempt
David Kopec: that, you know, let's just redo it and we'll get to keep the language syntax, but not the
Michael Kennedy: runtime.
David Kopec: Right, right, right.
David Kopec: And I mean, PyPy is also, of course, kind of an attempt at that as well.
David Kopec: But and some people call for it, right?
David Kopec: I see sometimes people are like, why don't they replace CPython with PyPy?
David Kopec: What do you think about kind of just like the whole is too big a topic for the end?
David Kopec: No, no, it's interesting.
Michael Kennedy: I think all of those are interesting.
Michael Kennedy: I think the Mojo performance story is very powerful.
Michael Kennedy: It's also really hard to bring over to CPython because there's so many different ways that it's used.
Michael Kennedy: There's so many, you know, it runs on this piece of hardware doing this thing that we just could never optimize for, you know?
Michael Kennedy: So, and then, like I said, with 600,000 or whatever there are packages, you know, how much of that are you willing to carve away to get a faster language?
Michael Kennedy: And what I think also is a really interesting aspect that people might not think about or take into account that often is you'll see a lot of these benchmarks.
Michael Kennedy: Like here's the three body, solving the three body problem in Python, and here's solving it in Mojo.
Michael Kennedy: Here's solving the three-body problem in Rust.
Michael Kennedy: And look at that huge difference.
Michael Kennedy: But what often happens in Python
Michael Kennedy: is you find yourself orchestrating native code anyway.
Michael Kennedy: Like, okay, we're going to use Polars
Michael Kennedy: and we're going to do this thing.
Michael Kennedy: But when I call the Polars functions,
Michael Kennedy: I'm no longer running Python.
Michael Kennedy: I'm running like a drop of Python and a bunch of Rust.
Michael Kennedy: And then you write back in the same,
Michael Kennedy: or I'm talking to a database layer,
Michael Kennedy: or my web app is running on a Rust-based server.
Michael Kennedy: There's just all these little parts
Michael Kennedy: where a lot of times your code speed
Michael Kennedy: is more about how you're putting the pieces together.
Michael Kennedy: Yeah.
Michael Kennedy: Not always.
Michael Kennedy: If you're doing computational stuff,
Michael Kennedy: that's out the window potentially.
Michael Kennedy: But when you're kind of, you know,
Michael Kennedy: you do machine learning, you're doing web apps,
Michael Kennedy: you're doing database calls.
Michael Kennedy: A lot of these are like just a layer
Michael Kennedy: and then off it goes.
David Kopec: Yeah, that's totally makes sense.
David Kopec: But then I think it is holding Python back
David Kopec: from some of those, you know,
David Kopec: some of these real interesting domains
David Kopec: that people want to get into,
David Kopec: especially when they're first learning programming,
David Kopec: like 3D games.
David Kopec: Let's stick with that
David Kopec: because I'm thinking of ones for people
David Kopec: in computer science education.
David Kopec: A lot of people who study computer science
David Kopec: is because they want to make a game, right?
David Kopec: Sure.
David Kopec: And when they want to make a game-
Michael Kennedy: And I can see a world,
Michael Kennedy: like look at one of the biggest game companies
Michael Kennedy: in the world, it's Unity.
Michael Kennedy: Yeah.
Michael Kennedy: Right?
Michael Kennedy: As a foundational,
Michael Kennedy: like building your game with not creator of games.
Michael Kennedy: They're built, I believe in C-sharp and.net,
Michael Kennedy: if I remember correctly.
Michael Kennedy: And that's a faster language, but it's not raging fast.
Michael Kennedy: You know, it's a lot faster, but it's still a decent way from a C,
Michael Kennedy: like a pure C language, right?
Michael Kennedy: Yeah.
Michael Kennedy: A pure C implementation.
Michael Kennedy: And they're really, really successful.
Michael Kennedy: They got close enough.
Michael Kennedy: I could easily see some company go, we're going to build a game engine.
Michael Kennedy: We're going to use Python as the language to get as many people
Michael Kennedy: who have been left out in the cold, in a sense, to do it.
Michael Kennedy: but we're going to do a mojo-like thing.
Michael Kennedy: Or we're going to do something where
Michael Kennedy: you don't get to use every library,
Michael Kennedy: but do you really need Flask in your game?
Michael Kennedy: Not in your game.
Michael Kennedy: You know what I mean?
David Kopec: Yeah, yeah, yeah.
Michael Kennedy: We're going to build like a smaller focused,
Michael Kennedy: high performance version
Michael Kennedy: that looks as close as it could be.
Michael Kennedy: And we're going to sell you a game engine
Michael Kennedy: in a way to ship those games on Steam,
Michael Kennedy: a way to ship those games on Metal to macOS, et cetera.
Michael Kennedy: Right?
Michael Kennedy: Like I could see that world happen.
David Kopec: Yeah, yeah.
Michael Kennedy: I don't see me making that world,
Michael Kennedy: but I could see that happen.
Michael Kennedy: And then actually, I think it would be okay.
Michael Kennedy: How do you feel?
Michael Kennedy: Like, do you see that as possible?
David Kopec: No, that makes total sense.
David Kopec: I think another thing we think about is like,
David Kopec: how much are skills becoming more transferable
David Kopec: because of LLMs?
David Kopec: So can somebody who already learned Python well
David Kopec: now quickly pick up C# in Unity
David Kopec: because the LLM is doing a lot of the detailed syntax for them
David Kopec: and they just have to understand the programmatic ideas.
David Kopec: So is like, you know, maybe Python will continue
David Kopec: to always be this great first language for everybody.
David Kopec: And it'll be easier for people to now transition
David Kopec: to other languages for specific domains.
David Kopec: And so it matters less that we have everything
David Kopec: in the original language.
Michael Kennedy: Okay, out in the chat,
Michael Kennedy: there's the recommendation for, that's GoDot.
Michael Kennedy: If you want to go, I'm not super familiar with it.
David Kopec: I think it's an open source game engine.
David Kopec: Yes, that much I know,
Michael Kennedy: but that's where my knowledge stops.
David Kopec: Right, and I think it has like,
David Kopec: it's like a Godot script or something or G script or something is it's it's language which I think
David Kopec: has more of a Python like syntax somebody in the chat can correct me yeah interesting okay but I
Michael Kennedy: I think if you took an end-to-end thing you know it's not just a matter of like you can run the
Michael Kennedy: game engine with this you've got to take it all the way to here's how you ship your games because
Michael Kennedy: soon what is the very first thing you want to do once you get your game working and fun you want
Michael Kennedy: to show your friends you know what I mean and you've got to find a way to send it out so this
David Kopec: goes back to what you were talking about earlier is all the hurdles around you know getting something
David Kopec: on the mac app store steam or you know or whatever um and how and that goes also to another big thing
David Kopec: that we're trying to solve in the python ecosystem which is the packaging story right um which there
David Kopec: are many solutions for but just not one decided on let's make this the standard like you know as
Michael Kennedy: easy as possible thing yeah it's getting better things are definitely getting better but it's still
Michael Kennedy: there is no Python build --format equals EXE.
Michael Kennedy: Right.
Michael Kennedy: You know, where, where, what comes out and then some sort of tooling that automatically
Michael Kennedy: signs that stuff with your certificate you've got as a windows developer.
Michael Kennedy: So it doesn't get flags as malware.
Michael Kennedy: There's just, even if you get the thing to build, there's like these three or four other
Michael Kennedy: steps, you know, I'm thinking about an iOS.
Michael Kennedy: It's like, okay, we got it to run Python, but, but really what we needed to do is like
Michael Kennedy: integrate with Swift UI and have storyboards where I can like, I can weave it. And you're like,
Michael Kennedy: well, that's no, that's a long ways away. Like I know, but that's, you got to go through those
Michael Kennedy: stages to get it. I don't know. It's just, there's, there's a little bit, a little bit further to go,
Michael Kennedy: I guess, but I would love to see it. And I'm, I think it'll happen probably.
David Kopec: It's not that you can't do it. It's just, there's too much friction right now.
Michael Kennedy: Yeah. Yeah. Yeah. Well, hopefully you've given some people some ideas. Somebody's going to go
Michael Kennedy: start the unity the pie unity company or whatever and let's let's let's make it happen
Michael Kennedy: yeah yeah oh and also just um real-time follow-up out there godo is apparently the pronunciation
Michael Kennedy: it's french sorry okay no no i didn't know it either um i think honestly just shout out to
Michael Kennedy: everyone if you have a weird name for your project on github put an mp3 and say this is how you say
David Kopec: it just get it let's let's help us out and not that french is weird but just you know we should
David Kopec: actually do that with english projects too right um yeah yeah absolutely to make them accessible to
Michael Kennedy: the yeah as simple yeah it has nothing to do with french i'm thinking even as something simple as
Michael Kennedy: g unicorn is often said gunicorn and half the people out there are probably thinking michael
Michael Kennedy: you're wrong it's gunicorn not unicorn but their logo is a green unicorn yeah i'm like well it's
Michael Kennedy: probably the g stand just g and then certainly the unicorn part is probably unicorn because
Michael Kennedy: unicorn is you know what i mean but like it's totally reasonable to look at it and go unicorn
Michael Kennedy: you know what i mean but if they just put a little mp3 like it's or even just where it's pronounced
Michael Kennedy: g ee dash unicorn you know what i mean yeah yeah i think we all need to do that yeah yeah all right
Michael Kennedy: well the chat is getting lively but we're gonna have to call it because we might be just a tiny
David Kopec: bit over time and it's getting late and you're part of the world so well thank you so much for
David Kopec: having me on again, Michael. It was really a pleasure. Congratulations again on Talk Python
Michael Kennedy: in production. Thank you. And Computer Science from Scratch as well.
David Kopec: Yeah. And if folks want to check out the book, there's a website that
David Kopec: I'm sure you'll put in the show notes, computersciencefromscratch.com.
David Kopec: And you can just learn more about the different projects we do and some of the
Michael Kennedy: ideas in the book. Yeah. Awesome. People want to get in touch with you
David Kopec: otherwise? How do they do that? Sure. You can find me on X, I guess,
David Kopec: at Dave Kopech, D-A-V-E-K-O-P-E-C.
David Kopec: And if you go to my website, DaveKopech.com,
David Kopec: there's a bunch, there's email
David Kopec: and a bunch of other ways to contact me.
David Kopec: So D-A-V-E-K-O-P-E-C.com.
David Kopec: Yeah, I'll put it in the show notes.
David Kopec: Thanks, Michael.
Michael Kennedy: Yeah, you bet, you bet.
Michael Kennedy: So David, thanks for being back on the show.
Michael Kennedy: It's been really fun.
Michael Kennedy: Yeah, we'll talk to you later.
David Kopec: Awesome, thanks, Michael.
David Kopec: See ya.
Michael Kennedy: This has been another episode of Talk Python To Me.
Michael Kennedy: Thank you to our sponsors.
Michael Kennedy: Be sure to check out what they're offering.
Michael Kennedy: It really helps support the show.
Michael Kennedy: This episode is brought to you by Sentry.
Michael Kennedy: Don't let those errors go unnoticed.
Michael Kennedy: Use Sentry like we do here at Talk Python.
Michael Kennedy: Sign up at talkpython.fm/sentry.
Michael Kennedy: And it's brought to you by NordStellar.
Michael Kennedy: NordStellar is a threat exposure management platform
Michael Kennedy: from the Nord security family,
Michael Kennedy: the folks behind NordVPN,
Michael Kennedy: that combines dark web intelligence,
Michael Kennedy: session hijacking prevention,
Michael Kennedy: brand and domain abuse detection,
Michael Kennedy: and external attack surface management.
Michael Kennedy: Learn more and get started keeping your team safe
Michael Kennedy: at talkpython.fm/nordstellar.
Michael Kennedy: If you or your team needs to learn Python,
Michael Kennedy: we have over 270 hours of beginner and advanced courses
Michael Kennedy: on topics ranging from complete beginners
Michael Kennedy: to async code, Flask, Django, HTML, and even LLMs.
Michael Kennedy: Best of all, there's no subscription in sight.
Michael Kennedy: Browse the catalog at talkpython.fm.
Michael Kennedy: And if you're not already subscribed to the show
Michael Kennedy: on your favorite podcast player,
Michael Kennedy: what are you waiting for?
Michael Kennedy: Just search for Python in your podcast player.
Michael Kennedy: We should be right at the top.
Michael Kennedy: If you enjoyed that geeky rap song, you can download the full track.
Michael Kennedy: The link is actually in your podcast blog or share notes.
Michael Kennedy: This is your host, Michael Kennedy.
Michael Kennedy: Thank you so much for listening.
Michael Kennedy: I really appreciate it.
Michael Kennedy: I'll see you next time.
And we ready to roll
Upgrading the code
No fear of getting old
We tapped into that modern vibe
Overcame each storm
Talk Python To Me
I sync is the norm