New course: Agentic AI for Python Devs

Computer Science from Scratch

Episode #529, published Wed, Dec 3, 2025, recorded Sun, Oct 26, 2025
A lot of people building software today never took the traditional CS path. They arrived through curiosity, a job that needed automating, or a late-night itch to make something work. This week, David Kopec joins me to talk about rebuilding computer science for exactly those folks, the ones who learned to program first and are now ready to understand the deeper ideas that power the tools they use every day.

Watch this episode on YouTube
Play on YouTube
Watch the live stream version

Episode Deep Dive

Guest Introduction and Background

David Kopec is a computer science professor at Albright College in Reading, Pennsylvania, where he serves as Program Director of Computer Science and Information Technology. He recently moved from Champlain College in Vermont, where he spent nine years in a similar role. At Albright, David is launching three new majors for Fall 2026: a revamped computer science major, an artificial intelligence major, and a cybersecurity major. These programs aim to blend liberal arts education with career-relevant technical skills, incorporating computer ethics courses and required internships.

David is the author of five books on computer science and programming. His most successful work, "Classic Computer Science Problems in Python," was featured on Talk Python in 2019. His latest book, "Computer Science from Scratch," was released in September 2024 and targets the same audience: intermediate or advanced Python programmers who want to deepen their understanding of computer science fundamentals, whether they're self-taught developers, bootcamp graduates, or professionals preparing for technical interviews.

What to Know If You're New to Python

  • Intermediate Python skills required: This episode discusses advanced computer science concepts like interpreters, emulators, and bit manipulation. You'll get more value if you're already comfortable with Python fundamentals like loops, functions, and data structures.
  • Focus is on CS concepts, not Python syntax: The conversation explores how computer systems work under the hood - from programming language interpreters to hardware emulation - using Python as the teaching tool rather than teaching Python itself.
  • Understanding of basic programming concepts helps: Familiarity with concepts like variables, control flow, memory, and how programs execute will help you appreciate the deeper explorations of topics like Turing completeness and CPU instruction sets.
  • CS education vs. practical coding: The discussion highlights the difference between learning to code (syntax and libraries) and understanding computer science (algorithms, data structures, and how computers fundamentally work).

Key Points and Takeaways

Building Programming Language Interpreters from Scratch

David's book starts by teaching readers to build interpreters for simple programming languages, beginning with a language called BF (Brain F***) that has only eight symbols yet is Turing complete - meaning it can theoretically solve any computational problem that more complex languages can solve. This minimal language can be implemented in just 30 lines of Python code, yet it demonstrates the fundamental principles of how all programming languages work. The book then progresses to implementing a Basic interpreter, specifically a dialect of Tiny Basic from the late 1970s that could run on machines with just 2-4 kilobytes of RAM. By building these interpreters, readers gain deep insights into what happens under the hood when they run Python code, demystifying the "magic" of programming languages and building confidence that they could eventually understand CPython's source code itself.

The Educational Challenge of AI Tools in Computer Science

Computer science education faces unprecedented challenges with the rise of AI coding assistants like ChatGPT and GitHub Copilot. David reports that in his introductory classes, many students attempt to use ChatGPT to complete every assignment, even basic exercises teaching for loops and if statements. This creates a fundamental problem: students who rely on AI to write code never develop the foundational skills needed to understand or debug that code. The solution isn't simple - it requires winning "hearts and minds" by making students understand how satisfying it feels to truly comprehend how code works, combined with enforcement mechanisms. Some CS educators, including David, have returned to paper exams to ensure students can actually write basic code without AI assistance. The challenge mirrors what mathematics educators faced in the 1970s-80s with calculators, but the stakes are higher because understanding the output is critical.

Computer Graphics and Computational Art with Python

The book dedicates two chapters to computational art, starting with understanding pixels at the most fundamental level. One project involves taking modern color photographs and converting them to black-and-white patterns suitable for display on 1980s Macintosh computers using dithering algorithms. This teaches not only what a pixel is (just a color and a location, organized as arrays) but also introduces compression algorithms like run-length encoding used in the MacPaint file format. A second chapter features "Impressionist," a program that creates abstract art from photographs without neural networks or machine learning - just a simple algorithm that places vector shapes on screen, positioning them over regions of similar color. Through enough iterations, the result looks like an impressionist painting of the original photo, demonstrating how powerful simple computational techniques can be.

Building a Complete NES Emulator in Python

One of the crown jewels of the book is a chapter that walks through building a functional Nintendo Entertainment System emulator capable of running real commercial games like Donkey Kong. The NES used a 6502 microprocessor running at just 1.8 megahertz with only 56 instructions, making it feasible to write an interpreter for that CPU in compact Python code. The chapter implements the full CPU and a simplified version of the Picture Processing Unit (PPU) graphics processor, though not the Audio Processing Unit. This project teaches the critical software-hardware interface - how software actually executes on hardware, how CPUs connect to memory, and how graphics processors synchronize with CPUs. While the pure Python implementation runs at only 15 frames per second versus the original 60 fps, it demonstrates all the fundamental concepts, with optimization using Cython or Numba left as an exercise for motivated readers.

Python vs. C/C++ for Teaching Computer Science

There's an ongoing debate in CS education about whether to teach introductory courses in Python or lower-level languages like C++. At Champlain College, David's department kept their first three classes in C++ specifically to give students experience with pointers and direct memory management. However, many schools have moved to Python because of accessibility - it's simply easier to learn than C++. This means more students can succeed in introductory courses and continue in the field. The trade-off is that students don't immediately see low-level memory operations, but David argues this is acceptable. Once students deeply understand one language, concepts like variables, functions, loops, and scope transfer to other languages. Pointers and memory management can be learned later in specialized courses on operating systems or computer architecture. The key mistake self-taught programmers make is constantly switching languages instead of mastering one deeply first.

The Evolution of CS Majors: AI and Cybersecurity

Computer science education is rapidly evolving to meet industry demands. Cybersecurity started as a single course within CS degrees, evolved into a concentration in the 2010s, and is now a standalone bachelor's degree at many institutions. Artificial intelligence is following the same trajectory - from one intro course in the 1990s-2000s, to concentrations in the 2010s, to dedicated AI bachelor's degrees emerging in just the last five years. Albright College is among the first small teaching colleges to offer an undergraduate AI major, following pioneers like Carnegie Mellon University. The challenge is doing this "the right way" with a firm foundation in computer science and mathematics to ensure durability, rather than capitalizing on the hype cycle with shallow programs. All three of Albright's majors share core CS and math foundations, plus computer ethics and internship requirements to provide real-world experience.

  • cmu.edu
  • Albright College Computer Science programs
  • Champlain College (Vermont)

Developer Productivity vs. Software Efficiency

Modern software development exists in tension between developer productivity and software efficiency. David points out that we build much sloppier software today than in the 1980s because we have powerful computers with abundant memory - developers don't need to optimize every bit of performance. Writing Super Mario Bros. for the NES at 1.8 megahertz in assembly language required hardcore attention to algorithmic efficiency. Today's developers can afford to prioritize rapid development over performance optimization. However, this isn't an either-or choice - it depends on the domain. Run-of-the-mill e-commerce sites can prioritize developer productivity and use frameworks that are "good enough." But 3D game developers still use C++ specifically to squeeze out every last bit of performance. The key is choosing the right trade-offs for your specific application, and library authors increasingly handle low-level optimizations so application developers don't have to.

  • Modern web frameworks and development tools
  • Game engines like Unity and Unreal Engine
  • Assembly language programming

Understanding Binary File Formats and Bit Manipulation

Working with binary file formats and bit-level operations is a recurring theme throughout the book. The MacPaint chapter requires storing pixels as individual bits (1 or 0 for black or white), compacting them into bytes, and applying run-length encoding compression. While anything possible in binary files could also be done with text files, binary formats offer crucial trade-offs: they're more compact and faster to read for certain data types. This represents a classic CS trade-off between time and space efficiency. Modern formats like JSON and XML have risen in popularity because they're human-readable and debuggable, but binary formats still matter for performance-critical applications. Understanding how to manipulate individual bits is essential for low-level work like device drivers, operating systems, and file format implementations.

  • Binary file formats and manipulation
  • JSON and XML text formats
  • Bit shifting and masking operations
  • Run-length encoding compression

The Performance Gap: Python vs. Compiled Languages

Pure Python suffers from significant performance deficits compared to compiled languages - benchmarks often show it running 50-70 times slower than C. This reality becomes painfully obvious in the book's computationally intensive programs. The abstract art generator might take 20-30 minutes to complete in Python versus less than a minute in C. The NES emulator runs at 15 fps instead of the required 60 fps. However, Python's performance story is more nuanced than raw benchmarks suggest. In many real-world applications, Python code orchestrates native libraries (Polars, NumPy, TensorFlow) where the actual computation happens in Rust or C. Web applications spend most time waiting on databases or network I/O. The Python core team's focus on performance improvements over the past 3-4 years has yielded real gains - David saw the NES emulator improve from 12 fps in 2021 to 17 fps in 2025 on the same hardware, just from Python version improvements.

The Accessibility vs. Capability Paradox

Python's greatest strength is being simultaneously approachable for beginners and powerful enough for professional work. Unlike some beginner-friendly languages with low capability ceilings, Python allows developers to go surprisingly far with just the language and its ecosystem. The "pip install" (or "uv install") experience makes hundreds of thousands of packages instantly available. This combination - easy to start, hard to outgrow - explains Python's dominance in education and industry. However, there are domains where Python still struggles: native desktop GUI development never took off despite frameworks like PyQt and Kivy; mobile app development remains challenging; and high-performance 3D game development requires C++ or similar languages. The web has become "good enough" that the pressure to solve native desktop development has decreased, though mobile remains a gap.

Interesting Quotes and Stories

"The struggle is not in the way. The struggle is often part of what unlocks your thinking. It's part of what cements the knowledge and makes you feel a true sense of accomplishment. When you're like, I tried this and I couldn't get it to work. But three hours later, I finally figured it out. And I now understand iterators." - Michael Kennedy

"When they start having those aha moments, they want more of them and it spurs on." - David Kopec

"Python itself might feel like magic to a lot of folks. 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? I bet I could dive into the CPython source code with enough additional training and really understand it. It gives you that confidence that this is not just magic." - David Kopec

"Writing NES games in the 1980s was hardcore. You had to be so detail oriented and you had to be so thorough. It's almost like writing spaceship control software type of thing. Not quite, but almost." - Michael Kennedy

"Super Mario was like an incredible accomplishment on a 1.8 megahertz CPU. 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

"We end up with inefficient software sometimes because people don't bother to do the algorithms right. We have such powerful computers with so much memory that people don't worry about writing things as efficiently as possible." - David Kopec

"The biggest mistake I see folks who are self-taught make is constantly switch around from language to language. I need to know this. Okay, I got it. Now it's time to learn this. And they're trying to fill all these gaps." - David Kopec

"If you are able to do calculus, which basically every CS degree requires calculus one, you can learn pointers. You'll be okay. You can learn pointers." - David Kopec

"It feels good to make something that can run programs. A lot of people, when they get into computer science, are actually excited about like making their own language." - David Kopec

Key Definitions and Terms

Turing Complete: A programming language or computational system is Turing complete if it can theoretically solve any algorithmic problem that any other Turing complete language can solve. Even a language with only eight symbols like BF is Turing complete, meaning it has the same fundamental computational power as Python, Java, or C++.

Interpreter: A program that directly executes code written in a programming language without first compiling it to machine code. CPython is an interpreter for Python. The book teaches building interpreters for simpler languages to understand this fundamental concept.

Dithering Algorithm: A technique for displaying images with limited color palettes by creating patterns of available colors that visually approximate unavailable colors. Used to display color photos on black-and-white screens.

6502 Microprocessor: An 8-bit CPU from the 1970s-80s used in the Apple II, Commodore 64, and Nintendo Entertainment System. With only 56 instructions, it's simple enough to emulate in Python for educational purposes.

Picture Processing Unit (PPU): The graphics processor in the NES that synchronized with the CPU at a 3:1 cycle ratio. Every CPU cycle required exactly three PPU cycles, representing tight hardware synchronization typical of 1980s game systems.

V-blank Period: The time when a graphics processor has finished drawing the screen and signals the CPU that it can perform updates before the next frame. Critical for game timing in retro systems.

Run-length Encoding: A simple compression algorithm that stores sequences of repeated values as a single value and count. Used in the MacPaint file format to compress black-and-white images.

BF (Brain F***): An esoteric programming language with only eight single-character commands, designed to be minimalist yet Turing complete. Used for teaching fundamental interpreter concepts.

Free-threaded Python: A version of Python 3.14+ that removes the Global Interpreter Lock (GIL), allowing true parallel execution on multiple CPU cores. Can dramatically improve performance for CPU-bound multi-threaded code.

Notarization: Apple's process requiring developers to register their applications before macOS will run them. One of many "gatekeeper" barriers that make native desktop app distribution more challenging than web apps.

Learning Resources

If you want to dive deeper into the topics covered in this episode, here are carefully selected resources from Talk Python Training and beyond that will help you build on what you learned:

  • Python for Absolute Beginners: If you're new to Python and want to understand the fundamentals before diving into computer science topics, this course starts from the very beginning with concepts like variables, loops, and functions that form the foundation.

  • Write Pythonic Code Like a Seasoned Developer: Learn idiomatic Python patterns and best practices, including smart use of dictionaries, generators, comprehensions, and slices - the kind of efficient Python coding that makes implementing interpreters and emulators more elegant.

  • Async Techniques and Examples in Python: Explores Python's parallel programming capabilities including threads, multiprocessing, asyncio, and async/await - relevant for understanding how to optimize performance-critical Python applications.

  • Python Memory Management and Tips: Understand how Python manages memory under the hood, including reference counting, garbage collection, and optimization techniques for writing more efficient Python code.

  • manning.com/books/classic-computer-science-problems-in-python: David Kopec's previous book focusing on data structures, algorithms, and AI topics - a perfect companion to Computer Science from Scratch.

Overall Takeaway

This episode beautifully illustrates that computer science education isn't about memorizing syntax or learning the latest framework - it's about understanding how computers fundamentally work. David Kopec's journey from teaching assembly language and C++ to embracing Python as an educational tool demonstrates that accessibility and depth aren't mutually exclusive. By building interpreters that run real programs, emulators that play actual NES games, and algorithms that create art, learners gain something far more valuable than practical skills: they develop confidence that technology isn't magic.

The conversation also highlights a critical inflection point in CS education as AI coding assistants threaten to short-circuit the learning process. The solution isn't to fight technology but to remember that the struggle is the point - those "aha moments" at 3 AM when something finally clicks are what transform someone from a code-copier into a computer scientist. Whether you're self-taught, a bootcamp graduate, or transitioning from another field, understanding what happens under the hood when you type "python app.py" opens doors that no amount of framework knowledge can.

Perhaps most inspiring is David's work building AI and cybersecurity majors at a liberal arts college, demonstrating that the future of CS education lies in combining technical depth with ethical foundations and real-world experience. As Python continues dominating education and data science while compiled languages hold territory in systems programming and game development, the message is clear: master one language deeply, stay curious about how things work, and never stop building.

David Kopec: davekopec.com
Classic Computer Science Book: amazon.com
Computer Science from Scratch Book: computersciencefromscratch.com
Computer Science from Scratch at NoStartch (CSFS30 for 30% off): nostarch.com

Watch this episode on YouTube: youtube.com
Episode #529 deep-dive: talkpython.fm/529
Episode transcripts: talkpython.fm

Theme Song: Developer Rap
🥁 Served in a Flask 🎸: talkpython.fm/flasksong

---== Don't be a stranger ==---
YouTube: youtube.com/@talkpython

Bluesky: @talkpython.fm
Mastodon: @talkpython@fosstodon.org
X.com: @talkpython

Michael on Bluesky: @mkennedy.codes
Michael on Mastodon: @mkennedy@fosstodon.org
Michael on X.com: @mkennedy

Episode Transcript

Collapse transcript

00:00 A lot of people building software today never took the traditional computer science path.

00:04 They arrived through curiosity, or a job that needed automating, or a late-night itch that

00:09 made something work. This week, David Kopech joins me to talk about computer science for

00:14 exactly these folks, the ones who learned to program first and are now ready to understand

00:18 the deeper ideas that power the tools they use every day. This is Talk Python To Me,

00:23 episode 529, recorded October 26, 2025.

00:44 Welcome to Talk Python To Me, the number one Python podcast for developers and data scientists.

00:49 This is your host, Michael Kennedy. I'm a PSF fellow who's been coding for over 25 years.

00:55 Let's connect on social media.

00:57 You'll find me and Talk Python on Mastodon, Bluesky, and X.

01:00 The social links are all in your show notes.

01:03 You can find over 10 years of past episodes at talkpython.fm.

01:06 And if you want to be part of the show, you can join our recording live streams.

01:10 That's right.

01:11 We live stream the raw uncut version of each episode on YouTube.

01:14 Just visit talkpython.fm/youtube to see the schedule of upcoming events.

01:19 Be sure to subscribe there and press the bell so you'll get notified anytime we're recording.

01:23 This episode is brought to you by Sentry.

01:26 Don't let those errors go unnoticed.

01:27 Use Sentry like we do here at Talk Python.

01:29 Sign up at talkpython.fm/sentry.

01:33 And it's brought to you by NordStellar.

01:35 NordStellar is a threat exposure management platform from the Nord security family,

01:40 the folks behind NordVPN, that combines dark web intelligence,

01:44 session hijacking prevention, brand and domain abuse detection,

01:48 and external attack surface management.

01:50 Learn more and get started keeping your team safe at talkpython.fm/Nordstellar.

01:56 David, welcome back to Talk Bythonomy.

01:58 Thank you so much for having me back, Michael.

02:00 It's really an honor.

02:01 Got some really fun stuff to talk about, computer science from scratch.

02:06 What does that even mean?

02:07 We're going to find out because you wrote the book on it.

02:10 Yeah, I'm excited.

02:11 And this book just came out, so it's kind of fresh off the press.

02:14 And I want to thank you for being the technical reviewer

02:17 on the book, actually.

02:18 Yeah, it was really fun.

02:19 You reached out and asked me, and I don't normally do things like that,

02:21 but I'm like, you know, that'd be kind of fun. It would be a good experience. And I do think it was. It taught

02:26 me some about creating books and I guess that pays off as well. And congratulations, by the way,

02:31 on Talk Python in production coming out. Yeah, thanks. I started that last December and it came

02:36 out, I think the beginning of this month, maybe end of September, something like that, but pretty

02:41 recently. So yeah, I really appreciate it. It's going really well. We're in kind of the same phase

02:45 because computer science from scratch officially came out end of September also. So we're just in

02:50 this kind of, you know, one month out from these books coming out. And so it's both, I think it's

02:55 an exciting time for both of us. And I've started reading Talk Python in production, and I'm really

02:59 loving it. So congrats on it. Awesome. Thank you. And I really enjoyed your book. And I had to read

03:03 it with a little more detail than just appreciate it, right? I had to like take notes and help you

03:08 with some feedback. So that was a really cool experience. And thanks. You know, it's been six,

03:12 almost a little, it's over five years, let's put it that way. It's been over five years since you've

03:16 on the show, we talked about classic computer science programs in Python, I believe it was.

03:22 And yeah, that was really a fun and popular episode. But let's do a quick refresher,

03:26 a quick introduction for you to everyone who's new to the show in the last five years.

03:30 Okay. So I'm a computer. My name is David Kopech. I'm a computer science professor

03:35 at Albright College in Redding, Pennsylvania. Actually just moved over here from Champlain

03:40 College, where I was for the past nine years in a similar role. And I'm also the program director

03:45 of Computer Science and Information Technology. We're launching three new majors, a little plug

03:49 for Albright, a revamped computer science major, an artificial intelligence major, and cybersecurity.

03:55 And so I'm managing the launch of those for fall 2026. My background is for the past decade,

04:02 obviously, as a computer science educator. I've written five books on computer science and

04:06 programming, the most successful of which was Classic Computer Science, Problems in Python,

04:11 which of course I was on the show five years ago about. And this book, Computer Science from Scratch,

04:17 is kind of for a similar audience. Both books are for Python programmers, folks who are intermediate

04:22 or advanced Python programmers, but maybe who want to fill in the kind of computer science topics

04:28 that they don't know, maybe because they're self-educated. Maybe they learned Python on

04:31 their own. They didn't have a formal CS degree, or maybe they did have a formal CS degree,

04:36 but now they're preparing for interviews or transitioning to a more CS in-depth role.

04:41 And they want to refresh on some of these topics.

04:43 So both books are for folks who know Python, but want to go deeper on CS.

04:48 Right. They're not, here's how you do a loop in Python, or here's what InterTools is.

04:53 It's true computer science topics, right?

04:56 Right. And I think somebody at that stage will be very frustrated by the books.

05:00 They really are. And so we have to put that preface in.

05:03 And they really are for intermediate or advanced Python programmers.

05:07 So, you know, so I'm trying to reach the same audience, but they're totally different books

05:12 in terms of the type of topics they cover.

05:14 So classic computer science problems in Python was more of a data structures and algorithms

05:18 type of book, did some AI type topics as well, but very much on the algorithm side.

05:24 Computer science from scratch is more, let's build up the layers of the software stack from

05:29 the bottom up that Python kind of runs on top of. So you understand what's actually happening under

05:33 the hood. So how does an interpreter work? What's the hardware software interface like? We get that

05:39 with emulators. And then there is still some algorithmic stuff as well, different topics than

05:44 in the prior book, but stuff like a little computer art stuff, a little bit of machine learning. So

05:49 we try, it's still a survey book. It's still pretty broad, but it's more about the layers of

05:54 the software stack than classic computer science problems in Python was. Yeah. And there's some

05:58 pretty low-level stuff and it's interesting you're doing in python you know a lot of i think a lot of

06:02 times that would be taught in um at least a pointer based language you know like c or even c c being

06:09 taught in assembly like you're talking to the machine like literally absolutely and you know

06:13 if you took these classes like if you took an um architecture class which i'm going to be teaching

06:19 next semester at albright it's going to be an assembly language right and if you took a compilers

06:23 course, it's usually in something like C or today it might be in a Rust, a low level language where

06:29 you do have that direct access to memory. But I wanted to make the book accessible. And Python is

06:34 the most accessible language in the world. It's the most popular language in the world. And it's

06:38 the language that we're increasingly using in computer science education anyway. So it is

06:42 actually a little unusual to cover some of these topics in Python, but it makes the topics accessible

06:48 to a much wider audience.

06:50 It definitely makes it accessible to a wider audience.

06:53 Let's take a step back and talk about this role you have

06:56 in this new college, university you're at.

06:59 You said that you're revamping the CS program.

07:02 You're adding AI and cybersecurity.

07:04 That's a big shift.

07:05 Do you want to just talk to people about how that's changing,

07:08 why you decided to change?

07:10 I look at a lot of CS programs, and I don't know how connected they are to the real world.

07:15 So imagine some of these changes are to sort of realign it with what's happened recently.

07:21 Absolutely.

07:21 Yeah.

07:22 So I'm coming from a college, the Champlain College in Vermont, where I was at for nine

07:27 years, which was a professionally focused college.

07:29 So it was a college where we were preparing students for their careers.

07:33 I moved now to Albright, which is a liberal arts college.

07:36 So it's a college that's more teaching people how to think, creating great citizens.

07:40 And hopefully we prepare them for their careers very well, too.

07:43 but there's that liberal arts foundation underneath everything.

07:46 So one of the challenges in developing these three new majors

07:50 was how do you fit them into a liberal arts curriculum?

07:52 And how do you make them relevant to careers while still being true to the liberal arts?

07:56 And so what I found the best way to do it is to still focus on how to help people think computationally.

08:03 And so there's a firm foundation of computer science and mathematics throughout all three majors.

08:08 So whether you're doing cybersecurity, artificial intelligence, or computer science,

08:12 you're going to have a lot of classes in common with one another. And we also need to infuse some

08:16 of the issues we see in the workforce today. Like all of them will have a computer ethics course

08:21 that's incorporated. And all of them will have an internship course that's incorporated. So

08:26 students are getting real world experience as they're going through these majors.

08:29 I think that's a great idea. It's really important to have done software engineering

08:35 hands-on with other companies, real products, and real product managers,

08:39 in addition to just knowing the algorithms and foundations.

08:42 Absolutely. I couldn't agree more. And so we're trying to blend the two. And that's been one of

08:48 the exciting things. And you asked why I changed. I was excited about this opportunity to build these

08:52 new majors from the ground up. We'll be one of the first teaching colleges, small teaching colleges,

08:57 to offer an artificial intelligence major. It's just been in the last five years that we've seen

09:02 colleges start to offer an undergraduate major in artificial intelligence. And it's mostly been

09:06 big name brand colleges like CMU that are offering these first artificial intelligence bachelor's

09:14 degrees. But we get to be at the forefront of how do you fit that into a small liberal arts college

09:19 and still make it career relevant and still have that firm liberal arts foundation.

09:23 Are you concerned about letting all these hackers in on your network if you're teaching a cybersecurity?

09:28 Well, I won't be teaching the cybersecurity courses. So I'm firmly just in the computer

09:32 science education course, and we're hiring additional faculty in cybersecurity and in

09:36 artificial intelligence. I'm more on the management side of those two programs. But, you know, look,

09:41 it's more relevant than ever. When you look at actually the number of students going to college

09:46 for cybersecurity, it's been exploding over the last decade. You know, I just talked about how

09:52 artificial intelligence has just come about as a bachelor's degree. Cybersecurity was kind of there

09:56 15 years ago. So cybersecurity started out as maybe you took a computer security course at the

10:01 end of your computer science degree. Then it became a concentration you could do within some

10:05 computer science degrees. And then in the 2010s, it broke out and became its own bachelor's degree.

10:10 And so we're seeing the same thing right now with AI. It started out, you know, when you did

10:14 undergrad computer science, maybe in the 90s, or like me and the OOs, you might have one course,

10:19 like an intro to AI course that you have at the end of your bachelor's degree. Then it started to

10:23 be something where you do a concentration at Champlain. I developed a concentration in

10:27 artificial intelligence. Now, just in the last five years, we're seeing it break out from being

10:31 just a part of a CS degree to being its whole own, you know, adjacent degree. So I think it's an

10:38 exciting time for that. Of course, there's a hype cycle right now about AI. So a lot of colleges

10:42 are jumping in and I think some of them are doing it the right way. And, you know, having that firm

10:47 foundation in computer science and mathematics, so it's durable. And some of them are doing it in

10:52 kind of a shallow way. We're trying to do it the right way. Yeah, that sounds great. And obviously

10:56 cybersecurity is one of those things that's highly valuable. Nobody wants to be in the news

11:01 for that reason, right? So companies are certainly looking for people with those skills.

11:06 Let's talk one more thing about the university and not the AI focus, but just AI. One of the

11:12 things I think is of all the places that's getting the most scrambled, changed, under pressure,

11:19 whatever you call it, from AI, I think it's education in general. And I'm not talking just

11:24 college. I'm talking, I don't know, like third grade. As soon as the kids can start using AI,

11:28 they're like, this is like the calculator with a rocket booster on it. You know what I mean? Like

11:32 this will solve the problems. And I think there's a really big challenge for you as universities to

11:38 connect with students, keep academic integrity as well. But there's also a huge problem, I think,

11:43 for the students to not let it undercut their education and end up going, well, all I know

11:49 to do is to do ChatGPT. You're absolutely right. I mean, it's a huge challenge in computer science

11:54 education. And I don't think the computer science education community has yet completely figured it

12:00 out. Well, basically what it breaks down to is exactly what you said. Students are just using

12:05 ChatGPT or GitHub Copilot to do their homework. And if you're in a first year or second year class,

12:12 I've been mostly teaching upper level CS for the past like six plus years. And I'm teaching an

12:17 intro class for the first time in a long time this semester. And it's been eye-opening for me

12:22 to see how many students are trying to just do every assignment with ChatGPT. And we still have

12:28 to give them basic assignments. When you're first learning how to do a for loop or what a function

12:33 is or what an if statement is even, right? You got to write some of those things.

12:36 You can't say implement a database and get back to me next week. You got to start somewhere.

12:40 So we still have to teach these fundamentals, but we have this opponent to us in some sense

12:45 of this ease of access to something that can just do all the work for you. And so I'm sure that,

12:51 you know, like you mentioned, mathematics educators had similar challenges in the 1970s,

12:55 1980s as calculators became prominent. So what I've done and I've been adjusting as since chat

13:02 GPT came out in fall 2022, I've been constantly adjusting and reevaluating, but I have had to go

13:08 back to the future a little bit and people might find this a little anachronistic, but I've heard

13:12 about it from other CS educators as well, going back to doing some paper exams. I know that sounds

13:18 crazy and I know that sounds like bizarre, but at some point you need to evaluate if students

13:24 actually know how to write a for loop because, you know, while we think, some people think LLMs are

13:29 going to replace software engineers in the next two years, you still need to understand what it's

13:33 outputting. And I don't think it's, I don't know about you, Michael, but I don't think they're

13:36 completely replacing software engineers in the next couple of years. And that's coming, I don't

13:41 know how many people maybe don't necessarily. I'm a huge fan of agentic coding and what it can do

13:47 for productivity. And it's incredibly powerful, but it's one of those things that it needs someone to

13:53 guide it who knows how to do that. And then it becomes a superpower. If you don't, you end up

13:58 with like, how do we end up on React? I thought this was a Rust project. You're like, what happened

14:02 here? Yeah. And you need to understand when it makes mistakes, you need to know how to correct

14:06 those mistakes. And of course, you need to be understanding everything that it's outputting,

14:11 so you're auditing it. This portion of Talk Python To Me is brought to you by Sentry's Seer.

14:18 I'm excited to share a new tool from Sentry, Seer. Seer is your AI-driven pair programmer that finds,

14:25 diagnoses, and fixes code issues in your Python app faster than ever. If you're already using

14:31 Sentry, you are already using Sentry, right? Then using Seer is as simple as enabling a feature on

14:37 your already existing project. Seer taps into all the rich context Sentry has about an error.

14:43 Stack traces, logs, commit history, performance data, essentially everything. Then it employs its

14:48 agentic AI code capabilities to figure out what is wrong. It's like having a senior developer

14:54 pair programming with you on bug fixes. Seer then proposes a solution, generating a patch for your

15:00 code and even opening a GitHub pull request. This leaves the developers in charge because it's up to

15:05 them to actually approve the PR. But it can reduce the time from error detection to fix dramatically.

15:12 Developers who've tried it found it can fix errors in one shot that would have taken them

15:17 hours to debug. SEER boasts a 94.5% accuracy in identifying root causes. SEER also prioritizes

15:25 actionable issues with an actionability score, so you know what to fix first. This transforms

15:32 Sentry errors into actionable fixes, turning a pile of error reports into an ordered to-do list.

15:38 If you could use an always-on-call AI agent to help track down errors and propose fixes before

15:43 you even have time to read the notification, check out Sentry's Seer. Just visit talkpython.fm

15:50 slash Seer, S-E-E-R. The link is in your podcast player's show notes.

15:55 be sure to use our code talkpython one word all caps thank you dysentery for supporting talk

16:01 pythonomy so we are having a real challenge especially in those intro classes of how do you

16:08 kind of force students to not use these tools essentially because you're not learning anything

16:13 if the tool writes the for loop for you when you're first learning how to do a for loop and so you have

16:18 to find ways to to encourage it to to win hearts and minds i think of course that's a big part of it

16:24 is convincing students and being dynamic and enthusiastic about how good it feels to really

16:31 understand how this actually works. But then there has to be enforcement too. And sometimes that feels

16:36 a little anachronistic being forceful about it or going back to doing tests on paper. But we have to

16:41 have ways of ensuring the knowledge is actually there. I feel like this is not just a college

16:47 student issue, but I think it's especially relevant in that part of your career that the struggle is

16:52 not in the way. The struggle is often part of what unlocks your thinking. It's part of what

16:59 cements the knowledge and makes you feel a true sense of accomplishment. When you're like,

17:03 I tried this and I couldn't get it to work. But three hours later, I finally figured it out. And

17:09 I now understand iterators. Finally. You know what I mean? And it's just so easy to push the easy

17:15 button and just say, chat, why? Yeah. You know? And that's what feels good about being a teacher

17:21 is being there for those aha moments with students.

17:24 I had some moments like that last week and they reminded me,

17:27 this is why you're in this career.

17:31 It's really something that can become addictive to students actually.

17:35 When they start having those aha moments, they want more of them and it spurs on.

17:40 That's how you end up at like 3 a.m.

17:42 really hungry, wondering why you haven't gone to sleep

17:45 but still programming.

17:45 You're like, this is amazing, I can't stop.

17:48 Right, right, right.

17:48 And it takes a certain mindset to be able to appreciate those moments.

17:54 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.

18:03 Folks sometimes go into computer science just because they hear, this is a great way to get a good job.

18:08 And if that's your only motivation going into it, you're probably not going to be successful in it, unfortunately.

18:15 It's going to be tough. Yeah, it's going to be tough.

18:17 But a lot of people are there for the right reasons. So I think that that's good.

18:21 Absolutely. And I hope with a book like this, folks who came in from the other side,

18:25 folks who came in because they had that interest, but they didn't have the chance to either go to

18:31 university, maybe they couldn't afford it, maybe they studied something else and they're later in

18:35 their career. This will hopefully give them a bunch of those aha moments and about topics that

18:41 are deeper than just how to write a for loop. Yeah, absolutely. Well, good. I mean, I feel like

18:46 there's probably some middle ground you might be able to accomplish if you're like, all right,

18:51 we're going to give you a laptop, a testing laptop that has no internet. Like we've gone in there and

18:56 crushed the network card. Yeah. Here, take the test. And here's your thumb drive to submit your

19:01 work and potentially, you know, potentially. Yeah. Yeah. And when we do stuff like that,

19:04 like I just did a test on, you know, an online test for my students and I'm just monitoring to

19:10 make sure nobody's using the tools. You know, but there is something said still for paper exams.

19:15 I'll tell you why. Sometimes even today on today's tools for giving exams, sometimes you want students

19:19 to draw something, especially if it's a data structures and algorithms class, you might want

19:23 them to draw a tree and it's just actually easier for them to do that on paper. So when people hear

19:27 paper, they might be like, oh my goodness, what are you doing that for? No, there's real reasons.

19:32 Yeah, of course. But yeah, we have monitoring tools too. Yeah, very good. All right. Let's maybe

19:37 take a couple of different examples or different chapters in the book and talk through them.

19:41 The first one, the first main topic is the smallest possible programming language, right?

19:48 Yes, yes.

19:49 Tell us about this.

19:50 Yeah, the premise of the chapter is what's the minimum that we need to have a programming language?

19:56 And there's a famous programming language.

19:57 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.

20:02 And I didn't make up the name of the language.

20:04 It was developed 30 years ago, but we'll just call it BF, okay?

20:07 Yeah.

20:09 Brain F star.

20:10 Yeah, sure.

20:11 or in AppStar. This language, it only has eight symbols in it. I mean, it literally only has eight

20:17 symbols in it, yet it's what we call Turing complete. And I'm not going to, I won't go into

20:22 the full details of what it means for something to be Turing complete, but let me put it this way.

20:25 A language that is Turing complete can theoretically solve any of the same algorithmic

20:31 problems as any other language that's Turing complete. And every programming language that

20:35 you use is Turing complete, whether it's Java, Python, C, whatever, of course, they're all

20:39 Turing complete. This language with only eight symbols in it is also Turing complete. So while

20:44 you could code something like Quicksort in Python, you could also code it in BF with just eight

20:50 symbols. While you could code a JSON parser in Python, you could also code a JSON parser in BF.

20:56 So by learning this really, really basic language and actually implementing it,

21:00 so implementing an interpreter for it, something that can actually run programs written in it,

21:04 you really get to understand just how little we need to solve computational problems.

21:09 We don't need much.

21:10 We need very minimum amount of computing machinery and very minimum amount of syntax to be able to solve most problems.

21:20 Now, would you want to solve most problems in PF?

21:22 Of course not.

21:23 We just use it as an illustrative example to show this is how simple a programming language can really be

21:29 and still have all the same capabilities as a more advanced programming language.

21:33 And you might wonder then why do we have such much more advanced programming languages?

21:37 Because they give us a lot more developer productivity.

21:39 They have more abstractions that let us think as human beings instead of thinking like machines.

21:43 The expressiveness, absolutely.

21:45 And so that's great that we have all of that.

21:48 But if you really want to understand essentially what the language is doing at the lowest levels, you only need these few bits.

21:55 So what's the key message here?

21:57 Obviously, you're not trying to get people to become BF experts, right?

22:00 I mean, maybe learn Cobalt over BF these days.

22:05 It could work for the Social Security Administration.

22:07 Yes, exactly.

22:08 There's going to be some high-paying Cobalt jobs out there.

22:11 But this is more about writing an actual interpreter, very much like CPython itself, in a sense, conceptually.

22:19 Conceptually.

22:20 I mean, much, much, much simpler.

22:22 And actually, in the next chapter, we get to writing a basic interpreter, which is just one step up from BF.

22:28 And we can talk about that in a minute.

22:29 But yeah, it's about understanding how it works at a low level.

22:34 Like what's it actually doing?

22:35 And, you know, it feels good to make something that can run programs.

22:39 A lot of people, when they get into computer science, are actually excited about like making their own language.

22:45 So by doing these first couple of chapters of the book, you're actually on the path to that.

22:48 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.

22:57 So it's about understanding how it works at a low level.

22:59 I have to say the book is not a practical book.

23:02 It's not like talk Python in production where you're going to learn,

23:06 you know, here's some useful tools and tips and strategies.

23:09 Install this thing and set up that config and then run it this way.

23:12 To do something right now.

23:13 Right.

23:13 Computer Science from Scratch is not going to help you build your next app

23:16 like that you're building.

23:18 Not directly.

23:19 Not directly, but it is going to help you understand

23:22 a lot more about what's happening under the covers,

23:25 which is ultimately going to make you think more broadly as a software developer

23:29 and understand different strategies that you might be able to use.

23:32 I'll give you an example with this interpreter stuff.

23:35 You might be writing a program that needs to have some kind of configuration files,

23:39 and you want to maybe be able to parse those configuration files.

23:43 Well, part of writing an interpreter is writing a parser,

23:46 something that understands the syntax of the programming languages

23:50 and starts to get towards the semantics.

23:52 And you might want to be able to write a parser later on for some very specific configuration type format that you've come up with

23:58 for some, or maybe even just a file format for more of like an office type program.

24:03 And you're going to need some way of understanding the techniques of how to parse that. Learning how

24:08 an interpreter works will help you write that program later on. So it's about learning computational

24:12 techniques, learning problem solving techniques more than it is about like something that's going to

24:17 necessarily be, this is exactly how you do this for the next app you're going to build.

24:20 It's not something that you would just stumble across most of the time, I think, right? You'll

24:28 across, you know, oh, here's an ML library or something, but you don't typically stumble across

24:33 and here's how you build a parser from scratch. Right. And so, you know, there has to be that

24:38 curiosity there. So I will admit that, you know, if you have no interest and you're not the type

24:43 of person who wants to understand how things work, you won't like this book. And you know,

24:46 that is some folks and that's okay. There's folks who go into programming because they're only

24:50 interested in what they can build and they're not so interested in how things work. And if that's

24:55 you, this is probably not the book for you. But if you're the type of person who has that curiosity

24:59 and you really want to understand how everything's actually working under the covers, then this is a

25:04 great book. Yeah, absolutely. And it's a simple enough thing that you can grasp the ideas pretty

25:10 quickly with this BF language, right? It's not so complicated that you, you know, a day later,

25:15 still trying to make the thing parse. Absolutely. I mean, what's crazy is to interpret BF,

25:22 you only need about 30 lines of code, 30 lines of Python.

25:26 And then you actually have something that can run any program written in this language.

25:31 And to be clear, you have like something.bf files that you can put the language into,

25:36 and then you say Python, this module, that file, and it'll run it as if it were an interpreter for that thing, right?

25:43 Exactly. Yeah.

25:44 You're literally implementing the whole programming language in like 30 lines of Python.

25:48 And I think what's great about this too, is it takes away the feeling that everything is magic.

25:54 That's another thing I love when people read also class computer science problems in Python

25:58 is sometimes when you think about how these things work, like in that book, we cover the A-star algorithm,

26:04 which is something that Google Maps work uses.

26:06 When you think about Google Maps, it feels like magic when you use it.

26:10 But actually there's really understandable, logical algorithms that are underneath the surface.

26:16 It's the same thing here.

26:17 Python itself might feel like magic to a lot of folks.

26:19 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?

26:26 I bet I could dive into the CPython source code with enough additional training and really understand it.

26:32 It gives you that confidence that this is not just magic.

26:35 You just got to look at the byte codes and look at it go.

26:40 Yeah.

26:40 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.

26:44 Right.

26:45 Well, it's that zero to one sort of gap that's the hardest to cross.

26:49 Yeah.

26:49 Yeah.

26:50 You know, like the second language, second programming language you learn or the third

26:55 or the fourth, they only get easier to learn, not harder to learn.

26:58 Whereas, you know, maybe when you're first starting out and you're trying to get something

27:01 to compile and it won't even run, you're like, oh my God, how am I going to do?

27:04 I can't even learn this one.

27:06 There's all these things I'm going to have to know.

27:07 And it's really kind of upside down.

27:09 Yeah, absolutely.

27:10 And so, you know, when we think about understanding how Python itself works, I think the second

27:15 chapter of the book about basic gets us, you know, a lot further along on that journey.

27:19 because here this isn't just a made up.

27:22 BF is, it's a language that's been around in computer science education for like 30 years,

27:26 but it's not a real language that people actually used.

27:29 And the second factor-

27:30 Very few people ever said that they were BF programmers

27:33 at a dinner party, right?

27:35 Absolutely.

27:35 But plenty of people said they were basic programmers.

27:38 And it was the first programming language of a lot of people who grew up in the 70s, 80s,

27:42 or even the 90s.

27:42 It was my first programming language.

27:44 And there was a dialect of basic called tiny basic that came out in the late 1970s.

27:49 it was actually one of the first free software projects. And it would run on machines that just

27:55 had two or four kilobytes of RAM. So that's why it was called Tiny Basic. I mean, it truly was

28:01 tiny. And so we re-implement a dialect of Tiny Basic in chapter two. So this is re-implementing

28:06 a real programming language that people actually used for real work in the late 1970s and up to the

28:12 early 1980s. And it can run real programs from that period. So you could go download a program

28:17 from the late 70s, we were missing like one or two features from the real language.

28:22 But if you have a pro, not all programs use all those features, you could actually run

28:25 it in this interpreter.

28:26 So we go from the first language where it's really esoteric, educational, you know, weird

28:31 language to the second chapter.

28:32 This was a real thing.

28:33 Yeah, absolutely.

28:34 It was, you know, I'm just going to give a little shout out to Visual Basic.

28:38 Yeah.

28:38 I don't know.

28:39 Did you ever do Visual Basic?

28:40 I did.

28:41 And I did a version on the Mac called Real Basic.

28:43 So this is really esoteric.

28:45 But anyone who used real basic, late 90s, I'm in your camp.

28:48 There you go.

28:50 I don't know if we even today still have something as approachable and productive as Visual Basic was.

28:57 For people who haven't used it, you're like, there's just no way.

28:59 There's no way that it's basic.

29:01 But you would just get a visual thing.

29:02 You would drag it together to build your, you know, here, I want to have, literally, you would drag over.

29:07 Here's a web browser.

29:08 Here's the address bar.

29:09 Here's a go button.

29:11 And then you would double click the go button and would create an event handler.

29:14 and then you would go webbrowser.gototext.value or whatever.

29:19 I mean, that was literally, you could do it in five minutes.

29:21 You could like create something that is a functional web browser without much.

29:25 It was incredible.

29:26 And so, yeah, I'm just thinking back to a few things I've built with it.

29:29 It was amazing.

29:30 You know, Michael, a lot of people agree with you.

29:32 There's a lot of articles that I've seen on blogs and stuff

29:35 where people reminisce about Visual Basic.

29:37 And I agree.

29:38 I mean, for desktop app development, it was incredibly productive.

29:42 I mean, I think it still rivals some of the tools we have for building web apps today.

29:47 When you think about how easy it was to lay out a user interface.

29:51 And for designers, it was great too, because designers didn't need to know how to code.

29:55 And they could lay out the interface in the same way that it would really appear in the program,

29:59 which is different from how designers work today, where they'll often do mock-ups.

30:03 And the developer will have to take the mock-up and turn it into code.

30:06 And so you kind of lose something there with the designer being able to have the final product

30:12 in front of them as they're changing around how things look.

30:15 So there were elements of it that were still missing today, I think.

30:18 - Yeah, I think it really hasn't been matched.

30:21 Windows forms from.NET kind of approached that, but it was still, itself was also

30:25 a little bit more complicated.

30:27 There was something special about that.

30:29 And now, don't get me wrong, it's not like I'm saying we should just go back to it

30:33 because the software we build is way more advanced, does a lot of other things,

30:36 but there's just that lower area is just kind of missing.

30:41 This portion of Talk Python To Me is brought to you by NordStellar.

30:44 NordStellar is a threat exposure management platform from the Nord security family,

30:48 the folks behind NordVPN that combines dark web intelligence,

30:53 session hijacking prevention, brand abuse detection, and external attack service management.

30:58 Keeping your team and your company secure is a daunting challenge.

31:02 That's why you need NordStellar on your side.

31:04 It's a comprehensive set of services, monitoring, and alerts

31:08 to limit your exposure to breaches and attacks and act instantly if something does happen.

31:14 Here's how it works.

31:15 Nordstellar detects compromised employee and consumer credentials.

31:19 It detects stolen authentication cookies found in InfoStealer logs and dark web sources

31:25 and flags compromised devices, reducing MFA bypass ATOs without extra code in your app.

31:31 Nordstellar scans the dark web for cyber threats targeting your company.

31:36 It monitors forums, markets, ransomware blogs, and over 25,000 cybercrime telegram channels

31:42 with alerting and searchable contexts you can route to Slack or your IRR tool.

31:47 Nordstellar adds brand and domain protection.

31:50 It detects cyber squats and lookalikes via visual, content similarity, and search transparency logs,

31:56 plus broader brand abuse takedowns across the web, social, and app stores to cut the phishing risk for your users.

32:03 They don't just alert you about impersonation.

32:05 they file and manage the removals.

32:08 Finally, NordStellar is developer-friendly.

32:10 It's available as a platform and an API.

32:14 No agents to install.

32:15 If security is important to you and your organization,

32:17 check out NordStellar.

32:19 Visit talkpython.fm/nordstellar.

32:21 The link is in your podcast player's show notes and on the episode page.

32:24 Please use our link, talkpython.fm/nordstellar, so that they know that you heard about their service from us.

32:31 And you know what time of year it is.

32:32 It's late fall.

32:34 That means Black Friday is in play as well.

32:36 So the folks at Nord Stellar gave us a coupon, BlackFriday20.

32:41 That's Black Friday, all one word, all caps, 20, two, zero.

32:44 That grants you 20% off.

32:45 So if you're going to sign up for them soon, go ahead and use BlackFriday20 as a code,

32:50 and you might as well save 20%.

32:52 It's good until December 10th, 2025.

32:55 Thank you to the whole Nord security team for supporting Talk Python To Me.

33:00 And I want to talk, sort of transition from that to something else really.

33:03 We're looking at these two examples of the BF language interpreter and the basic interpreter.

33:08 I hear that to really understand computer science, really to work on these things, I have to.

33:14 I don't, it's not preferable.

33:15 I have to do a language with pointers, malloc, free.

33:20 I've got to.

33:21 I've got to work at that level.

33:22 I just won't understand anything.

33:23 And Python, we don't really have those concepts.

33:26 And the irony, I think, is Python has more pointers than C++ because there's like no stack at all.

33:31 Not at all.

33:32 Really?

33:32 I mean, in the interpreter there is, but not in your writing. Even a number one is just a pointer.

33:37 So Python's full of pointers, but not in the way that computer science thinks about it.

33:41 What are your thoughts about that sort of tension? On one hand, you have this really

33:46 understandable language talking about these ideas, but the computer is calling malloc on a page of

33:52 memory and that's what's happening and they're not seeing it. Okay. So let me talk about it from a

33:57 pedagogy standpoint. So at my last institution, Champlain College, we had a big debate over my

34:02 nine years there. Should we do our first three classes in Python or in C++? And when I came in,

34:08 the first three classes were in C++. And we actually decided over the years to keep it there

34:13 for exactly what you mentioned. We wanted to give students both that high level experience with

34:17 object-oriented programming, but we also wanted them to have experience with pointers, with memory

34:21 management, and understand how things work at a low level. But in that same period of time, many

34:26 schools have moved to Python because of the other thing we talked about, which is accessibility.

34:31 I think Python simply is an easier language to learn than C++. I don't think that most people

34:37 who know both languages would really debate that. And so if we're trying to make those first ramp

34:42 up classes where you're first learning CS as easy as possible, I think Python is the way to go if

34:48 we want to encourage more people into the discipline. That doesn't mean there shouldn't

34:51 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.

35:03 You know, it doesn't mean there shouldn't be C or C++ in the curriculum or Rust or whatever.

35:07 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.

35:15 But at the same time, my advice to all students is learn one language well before you learn any other language.

35:21 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.

35:31 And that's the biggest mistake I see folks who are self-taught make.

35:35 The biggest mistake I see folks who are self-taught make is constantly switch around from language to language.

35:39 I need to know this.

35:41 Okay, I got it.

35:41 Now it's time to learn this.

35:43 And they're trying to fill all these gaps, right?

35:45 Right, right.

35:46 Because once you learn Python well, a lot of the stuff in C or C++ will make sense to you.

35:51 The pointers might not, but a lot of the other stuff, like how does a function work?

35:55 How does a loop work?

35:56 What are variables?

35:57 What's a global versus local?

35:58 All that kind of stuff.

36:00 That's going to make sense to you.

36:01 And that's going to be transferable skills once you've really learned it in any one language

36:05 across any other language.

36:06 And then pointers, you can learn later on.

36:08 You don't need to learn that at the beginning of your CS education.

36:12 People make it sound like it's a totally mystical topic.

36:16 If you are able to do calculus, which basically every CS degree requires calculus one, you can learn pointers.

36:23 You'll be okay.

36:24 You can learn pointers.

36:26 Yeah, exactly.

36:27 Like double integrals and all that kind of stuff is way worse.

36:30 I feel like you could also cycle, right?

36:32 So you could start with Python for a couple of classes, then go deeper, closer to the machine with C.

36:38 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.

36:45 because now you can take the red pill and you can see the arenas

36:51 and the blocks of the memory allocator and the GC and all that kind of stuff, right?

36:56 You could go, actually, you didn't know any of this stuff.

36:59 You didn't, nobody probably even thought to think is this here

37:02 and yet look at what's underneath that you're taking,

37:05 you're building on top of, right?

37:07 Yeah, and also remember how long an academic semester is.

37:10 It's 15 weeks.

37:11 So if you're taking a class in college, you're forced to be doing that same language

37:15 for 15 weeks. That's really the challenge for self-taught folks is they could just spend two

37:19 days on one, two days on another, right? But absolutely, you're right. Once you've had enough

37:23 time in one, you can cycle to the others back and forth. Yeah, fun. I personally am a fan of

37:27 it being in Python because I feel like one of the biggest challenges to keeping people in computer

37:33 science and programming is that they don't get enough early wins and early like, yes, aha, right?

37:40 It's like, okay, in week 12, we'll let you write a program, but we're going to talk pointers for a while.

37:46 And then you'll finally get to make some, you know what I mean?

37:48 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.

37:54 This is not what I thought.

37:55 I'm out.

37:55 And a huge part of that is the Python library ecosystem.

37:59 How easy it is to drop Pygame into an intro class and get somebody building a really simple game.

38:06 You know, it's much harder in C or C++ to start integrating libraries and start having students understand how to use those libraries.

38:14 And it usually requires a lot more knowledge buildup to be able to use pointers and stuff with those libraries.

38:20 So Python just makes everything more accessible.

38:22 Awesome.

38:23 Cool.

38:23 All right.

38:24 The next area that was pretty interesting and a little bit, maybe a little artsy.

38:31 Yeah.

38:31 Is the computational art.

38:33 Tell us about that.

38:33 Yeah. So there's two chapters in the book on computational art. The first one is really

38:39 starting to understand what a pixel is on the screen. And the way we do that is we take modern

38:44 photos and then we want to display them on like an ancient Mac, a Mac from the 1980s,

38:51 like the Mac Plus. And so we're going to take that modern photo and use what's called a dithering

38:56 algorithm to break it down into patterns of black and white pixels because those early Macs were

39:02 only black and white, that will then still kind of look like the photo in black and white with

39:06 these specialized patterns. So you're learning a bunch of things by doing this. One thing you're

39:11 learning is you're learning really what is a pixel. And a pixel is really pretty simple at its base.

39:15 I mean, it's just a color and a location. And so understanding how those pixels are organized

39:20 and really they're just organized usually as an array or, you know, as a list in Python or a

39:26 numpy array or whatever. And then we're understanding some algorithmic stuff. So

39:32 is giving us some algorithmic practice.

39:35 And then a cool thing we do at the end is we actually convert it into a file format

39:38 called Mac Paint for displaying on an ancient Mac.

39:42 And that Mac Paint format uses a very simple compression scheme

39:47 called run length encoding.

39:49 So we're getting some other kind of algorithmic practice in there as well,

39:52 understanding a simple compression algorithm.

39:55 And we're understanding something about file formats too,

39:57 which is really kind of an interesting CS topic as well.

40:00 Yeah, it sure is, yeah.

40:01 to properly format the file so the Mac Paint program on the ancient Mac will open it correctly.

40:06 So yeah, that was something actually when I first got into programming, I feel like I just stuck

40:11 with text oriented files pretty much as long as I could. Because, you know, looking at a binary file,

40:17 like, okay, it has a header and we read the first few bytes and then the value of that byte tells

40:22 you how long the rest of the header is and then like what this means. And then you skip. And I

40:26 don't know. That was just, it was a bridge too far for me in my early programming days. And I was

40:31 like, wow, this is intense. And I was in awe of people like, yeah, we just read the header and we

40:35 do this. I'm like, okay, if you say so. You know, it's a classic CS trade-off between time and space.

40:43 Anything that we do in a binary file, we could do in a text file. But binary files can be more

40:48 efficient because they can be more compact and they can be faster to read from for certain kinds

40:53 of data. So, you know, it's not that we have to use binary files, but understanding what a binary

41:00 file format is like can be eye-opening to some readers. And if you think about like modern file

41:05 formats, of course, text formats are much more explainable, right? That's why we have the rise

41:09 of things like XML in the late nineties up to today, or even JSON as a data interchange format.

41:15 There's alternatives to JSON, of course, that are much more efficient for coding your web app in

41:20 for distributing the data back and forth. But JSON is human readable. Yeah, yeah, yeah. But JSON is

41:25 human readable. So we can right away understand what it's supposed to represent and debug it really

41:31 well. And so it's, you know, it's one of those classic trade-offs. We can have something more

41:34 efficient or we can have something that might take up a little bit more time, but actually,

41:40 you know, is better for us as human beings. Yeah. It's just, I think it's a good skill.

41:45 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.

41:54 And there's a lot of that going on, especially in the emulator layers and stuff like that.

41:59 Yeah. And even in the Mac paint chapter, because the way Mac paint stores pixels is as individual bits.

42:05 So you have like a one or a zero representing a black or a white pixel on the screen.

42:09 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.

42:23 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.

42:31 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.

42:43 And we were talking about the computer graphics chapters.

42:45 I also wanted to mention chapter four because I love the program in that called Impressionist.

42:50 It makes images that look like an impressionist painter painted a photograph.

42:56 So you give it a photograph and then it builds kind of abstract art out of that photograph.

43:01 And people usually think you need a neural network for that or you need some kind of really advanced machine learning algorithm for that.

43:07 But actually, we show in the chapter that you can do it using a pretty simple algorithm.

43:11 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.

43:23 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.

43:30 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.

43:38 it. Yeah, it's a really interesting idea and it comes out looking great. It's sort of,

43:42 it's approaching the problem from a different perspective, which I suspect is probably a pretty

43:46 interesting CS lesson. You know, there's these problems that are incredibly expensive and

43:52 difficult to compute the one true answer, but then there's amazingly fast ways to get a,

43:58 that's pretty much it, answer. I'm thinking like Monte Carlo simulations and stuff like that.

44:02 You're like, this could take two weeks or three milliseconds, which would you prefer? You're

44:08 And, you know, that that's we talked about, like, why is the book in Python?

44:12 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.

44:21 And so, you know, we've all seen the benchmarks where Python's like 50 or 70 times slower than C on certain benchmarks.

44:28 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,

44:38 where if I wrote that same program in C using some C graphics library instead of in Python

44:43 with Pillow, even though Pillow, I think, is mostly implemented in C anyway, but still just

44:47 with the overhead of having our algorithmic part of it in Python, that program is probably 30,

44:54 50 times slower than it would be in C. So you have to wait like 20 minutes to see that abstract art

44:59 that would have been like less than a minute in a C program. Not that it's relevant to the book or

45:03 of the courses, but you probably could bring in some optimizations like Cython or Numba,

45:12 a couple of the things that'll take just the inner two loops and just make them go different,

45:18 but it's not the point of the book. That's true. And so I put that as an exercise for the reader

45:23 in the NES emulator chapter, because the NES emulator chapter where we actually build up

45:28 a real NES emulator. So I didn't write in the book for legal reasons, but it can actually play

45:32 Donkey Kong. So it can play Donkey Kong from the original Nintendo Entertainment System.

45:36 Let's talk about the NES, the Nintendo Entertainment System.

45:40 Yeah. So, I mean, the NES, a lot of us remember growing up with, and if you're of a younger

45:45 generation, this was like the main video game system of the 1980s to early 1990s that everyone

45:51 had. It's where the original Super Mario came out, the original Legend of Zelda. And, you know,

45:57 it's actually, of course, like all video game systems, it's a computer. And being a video game

46:01 system for the 1980s. It's a pretty simple computer, actually. It has a 6502 microprocessor,

46:07 which is the same microprocessor that was in the Apple II or the Commodore 64 or the TRS,

46:12 I think the TRS-80 also. And that microprocessor, it only has 56 instructions, the NES version of it.

46:21 And so you can write an interpreter for that microprocessor pretty compactly,

46:26 not quite as compact as the BF interpreter in chapter one, but compactly enough that it's only

46:31 lines of Python to be able to really write a simulator of that CPU. And so the NES is just

46:37 that CPU plus a graphics processor called the picture processing unit plus an audio processor.

46:43 So in the chapter, we implement the full CPU. We implement a simplified version of the PPU,

46:49 not advanced enough to run Super Mario Brothers, but it is advanced enough to run Donkey Kong.

46:54 And we don't implement the APU. So the audio processing unit is a little more complicated

46:59 We don't do the audio.

47:00 But we do all of this in the chapter so you can run real NES games.

47:04 And what you're getting is you're getting to understand that software hardware interface.

47:08 You're starting to understand how does our software actually get run on hardware

47:14 by re-implementing what a CPU actually does.

47:18 And you're re-implementing the memory map too.

47:19 So how does a CPU connect to memory?

47:21 How does a CPU connect to the graphics processor?

47:24 You're doing all of that in that chapter.

47:26 And so it's kind of like-

47:27 Sure. You talked about like writing an interpreter for the BF in basic languages. Here you're

47:34 completely emulating the hardware of the NES and you're giving it the potentially given it

47:42 open source NES games and it can run them, right?

47:45 Correct. Yeah. It runs several NES open source games. Like I said, I didn't put it for legal

47:50 reasons, but it can run real commercial games as well for the NES. And so you're doing the whole

47:54 soup to nuts like entire system except the audio. But it is Python and it's pure Python, except for,

48:00 of course, the library we're using. We're using Pygame for displaying the window, which is written

48:05 a lot of in C. But because it's pure Python, the emulator doesn't run at full speed. So it runs on

48:12 my Mac. It runs at about 15 frames per second. The real NES ran at 60 frames per second. So we leave

48:18 as an exercise to the reader. Yeah, go use Cython or something like that. And I'm sure you can get

48:24 up with several different techniques, not just with, definitely with Cython,

48:27 but with several different techniques, you could get this up to 60 frames per second,

48:29 but you're going to have to incorporate something that is, you know, using,

48:35 that gets outside of just pure Python.

48:37 Sure.

48:38 You know, one, there's a bunch of ways that you already mentioned,

48:40 but one new way that's kind of officially new, just this month is free-threaded Python.

48:46 And I've been doing, I went back to my async programming course

48:50 where there's a lot of examples of like, let's do this synchronously.

48:53 Now let's do it with threads.

48:54 Let's do it with multiprocessing.

48:55 Now let's do it with asyncio, right?

48:57 And see like how those all compare.

48:58 And the threads one, anything was computational.

49:01 It's like, yeah, it's the same speed or maybe even slower, right?

49:03 But then I ran it with, I did uv run --Python 3.14 T and it went 10 times faster

49:12 or eight times faster on my 10 core machine.

49:14 And it's literally just running on the, I didn't change the codes from pre-threaded Python

49:19 and it just took off.

49:20 So I'm thinking here there's graphics amongst many things is primed for this like embarrassingly parallel processing.

49:29 Yeah.

49:30 You could break up the screen into like little chunks and go, well, we got 10 chunks and 10 cores.

49:35 Let's go at it.

49:36 What do you think about it as a plausibility?

49:39 Unfortunately, for a lot of emulators, especially emulators that are for more modern systems, threading would be a huge advantage.

49:46 For the NES, it's not because of the way that everything was timed.

49:51 So every time that the CPU does one cycle, the PPU, the picture processing unit, has to be timed to do exactly three cycles.

50:00 So you can't just go ahead and, you know, and you don't just give it work.

50:04 It's not like a modern GPU where you just give it a bunch of chunks of work.

50:07 It works on its own and then provides that to the screen.

50:10 It's completely synchronized to the CPU.

50:13 And so is the audio processing unit, too.

50:15 So it all has to kind of be synchronized within a single thread.

50:18 And all the games assume that that's how it works, right?

50:20 That's how they have it all set.

50:22 Yeah.

50:22 Yeah.

50:22 Yeah.

50:23 And what they had, what was called a V blank period, which was a period where it had already

50:28 drawn the screen and then it actually tells the CPU, hey, I'm done drawing the screen.

50:32 Now you can do all kinds of work and be ready for the next time that you draw the next frame

50:35 again.

50:36 So they had really tight synchronization between the graphics and the CPU.

50:40 Interesting.

50:41 Still cool.

50:42 Still pretty cool.

50:43 There's a lot going on there.

50:44 If you want to understand hardware, that's a pretty low level look at it, right?

50:48 I think it's kind of the crown jewel of the book.

50:50 You know, there's a lot of people who are interested in emulators.

50:54 And what I found before writing the book is there's not a single book out there that talks

51:00 about writing an NES emulator, which is the most common emulator that people want to write.

51:04 So I think this is the first book that has a chapter on writing an NES emulator.

51:08 I will admit I was a little scared of like if Nintendo's legal team is going to like

51:12 be upset about the book or something like that.

51:14 but we did research on it.

51:15 I mean, everything we're doing is perfectly legal in the book in the United States, at least.

51:20 So, you know, but anyway.

51:22 Scary, right?

51:23 Yeah, absolutely.

51:24 And we put a big disclaimer at the top of the chapter as you remember reading.

51:28 I have a legal, I have a Nintendo story for you.

51:32 Great.

51:32 From when I was young.

51:34 And this was, I think this is very late 80s, early 90s, last century.

51:40 Now, this was not me, someone I knew, someone I was friends with had a,

51:45 I think it was a super NES.

51:47 Okay.

51:47 And people may not remember, but they had these big honking cartridges go chonk.

51:51 And you would chunk them down in there.

51:53 You would turn on, you would basically reboot the NES and it would boot up from the,

51:58 the big cartridge game cartridge you put in there.

52:00 And there was this guy that they've, they found somehow I don't,

52:05 cause there's no internet.

52:06 Maybe it's through a BBS.

52:08 I don't know how this was found, but they found this guy who built a thing that the,

52:12 bottom half of it looked like a game cartridge. The top was this whole computer that at the top of it,

52:19 it had a 3.5 inch floppy drive. Wow. So you would go to your BBS, you would find a game,

52:25 you would put it on a floppy, and then you would slot this huge extra computer down into the NES

52:31 and you would turn it on and it would like delegate the file IO through the little fake cartridge

52:37 back to it. And it worked like crazy. It was perfect. That guy was not in business for very

52:41 long the guy who sold them not my not my friend but the person he got it from wasn't available

52:46 after a while so this is so super nes comes out in like 91 um so this might have been a regular

52:53 no i wasn't i think i might have been in college so yeah it would be it would be 91 onward yeah

52:58 okay i mean that is 93 that is very advanced like for that time when you think about the type of

53:03 stuff people like were modding at that time that guy was a genius yeah he was he should have been

53:08 hired if he wasn't you know what i mean yeah yeah absolutely yeah he was building himself out of his

53:14 dorm room or something i don't know it was i think it was in uh manhattan in uh kansas state

53:18 university i'm not sure where the guy was but wow anyway yeah that guy was playing with fire

53:24 yeah absolutely and you know what um sometimes like understanding how the rom cartridge works

53:31 right like we think again that it's like all magic right but actually what those big cartridges that

53:36 we had, that we like inserted in the NES were is they were mostly plastic, like that did nothing.

53:41 And there was a little ROM chip, like inside the big hunk of plastic and the ROM chip,

53:46 ROM just stands for read only memory. So most of them were just like a big chunk of memory

53:51 with a very tiny bit of logic chips that were called mappers on the NES that said like,

53:55 read this memory at this time. But again, it wasn't really magic. And those cartridges look

53:59 so intimidating, but they were really just a big piece of memory. Yeah. Think about how much you've

54:04 got to make that work right before you ship it. Yeah. There's no patches. There's no download and

54:10 update. Once it's shipped, it's shipped and it's burned into the ROM and that's it.

54:14 I have some friends who work in game development and like before they even ship the 1.0,

54:20 nowadays they're working on the first patch, like, and they just know they're not going to ship like

54:24 the perfect program in 1.0. Now, to be fair, games were much simpler in the 1980s, right?

54:30 than they are today, but they had to be perfect, like literally had to be perfect. and so

54:35 there was a certain, I think different attitude around, game development then, than there is

54:41 today. And remember they were also working in assembly language. so it was easy language

54:46 to work. I don't know if people like this word, but I would call it kind of hardcore, writing

54:51 NES games in the 1980s. It was, you know, that kind of programming it's, it's just, it was just

54:57 different. It was just different. You had to be so detail oriented and you had to be so thorough.

55:03 It's almost like writing spaceship control software type of thing. Not quite, but almost.

55:08 And the machines were so slow. The NES, which we emulate in chapter six, ran on a 1.8 megahertz

55:16 CPU, 6502, 1.8 megahertz. So Super Mario was like an incredible accomplishment on a 1.8 megahertz.

55:25 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.

55:36 And so today, I think we have sloppier software today because we have an embarrassment of riches.

55:42 We got such powerful computers with so much memory that people don't worry about writing things as efficiently as possible.

55:48 And so we end up with inefficient software sometimes because people don't bother to do the algorithms right.

55:55 Yes, but I'm going to put a little double dagger, like see the footnote by your comment.

56:00 Absolutely true for software, not necessarily true for software developers.

56:05 Agreed.

56:05 The efficiency of writing a 99.9% correct Python program, how quickly that gets done versus

56:13 like something in assembly language straight on a ROM.

56:16 Yep.

56:17 You know what I mean?

56:17 These are the, I think this is an interesting arc and maybe you could speak to it a little

56:22 bit from your academic perspective, but I think it's a really interesting arc of, it used to be

56:27 really hard to program and we'd solve small problems with lots of effort and it's getting

56:32 easier. And a lot of times it gets easier. People say, well, there it goes, job's over. There's not

56:37 going to be programmers anymore because everyone can do it. And we just solve bigger, more complex

56:41 problems. And that just keeps building, you know, like the, a web app, a basic e-commerce app from

56:47 today was a keynote presentation of how like a fortune 500 company pulled it off in 1990 you

56:55 know what i mean like yeah yeah here's how we got the ssl termination special machines to handle the

57:00 ssl decryption so that we could do this under two seconds of request i mean like crazy stuff yeah

57:06 what do you think about this well it's not an either or i mean we want developers to be productive

57:10 and we also want efficient software so i mean the good news is that means that after we have make it

57:15 it easier and easier to build software, we still need folks who are going to work on optimizing that

57:19 software after it's built. So there's still jobs for software developers who are interested in that.

57:24 I think you actually touched on this in talk Python in production to some degree, because you

57:28 talk about in the book, the appropriate level of complexity for the type of app that you're

57:33 building. And so you talk about like, you know, maybe you don't need a Kubernetes cluster if

57:38 you're just building, you know, something for 10 million requests a month and not something for a

57:43 million requests a month. And it's going to be run by one person or one person part-time versus a

57:48 team or somebody who's a DevOps expert, right? Right, right, right. So if I'm working on a run

57:55 of the mill e-commerce thing, maybe I don't worry about squeezing out every last bit of performance

58:00 because I want to productively make something that, like you said, is 99.9% of the way there

58:04 as quickly as possible. But if I'm building a 3D game, they still build most 3D games in C++

58:10 because they need to squeeze out every last bit of performance,

58:14 even if it's a little less efficient for the programmers.

58:17 The programmers could write the games faster, maybe in another language or another framework

58:21 than they're using, whatever.

58:22 But they use something that squeezes out every last bit of performance.

58:25 So I think you have to think about what is the app that we're building?

58:28 What is the domain that we're in?

58:30 And it's also just not an either or.

58:32 Like, you know, we want to have software that's both developer productive to build,

58:37 but also that's efficient to run.

58:39 And it's an ongoing process.

58:40 We might need to make that trade-off more in the way when we're first building it in developer

58:44 productivity. And then as we're maintaining it, maybe we go more towards the efficiency side.

58:48 But if you don't think about some of the efficiency things up front, you can end up in a bad spot

58:53 because you can get some technical debt. You could end up in a situation where it's hard to undo

58:59 some of the algorithmic mistakes that you made early on and the system starts to depend on.

59:03 So you should think about it at least a little bit.

59:05 Yeah, absolutely. And I think you're talking about they've got to squeeze out that little

59:09 extra bit of performance because they want high frame rates they might have to squeeze out that

59:12 little bit extra performance because it's either possible or not possible you know you look at some

59:17 of the stuff in the unreal engine these days you're like that's real time that's the game

59:23 that looks like a rendered cgi movie not a game yeah yeah yeah yeah yeah and i mean so a lot of it

59:30 is being done for us today by library authors right so library authors are thinking about a

59:34 lot of the low-level stuff. So us as like run-of-the-mill developers don't need to, which is

59:39 great. But if you're doing something really de novo, something, you know, with an innovative

59:44 algorithm, you still need to consider efficiency at least. Right. And the other thing is it,

59:50 you can write really slow code in C and you can write really fast code in Python or vice versa.

59:55 It's easier to make it slow in Python, to be fair. But algorithms and data structures are

01:00:01 tremendous influences, right? If you're using, you should have been using a set or a dictionary and

01:00:05 you're using a list. Yeah. You're probably having a real bad time performance. And you caught me

01:00:10 multiple times on the technical review in places where I should have used a set and I used a list.

01:00:15 So thank you for that. But, but that's absolutely, that's a great example. I mean,

01:00:19 just knowing that, that basic fact that, you know, in this situation, just swapping out,

01:00:25 which is a simple switch, by the way, you know, one data structure for another can totally change

01:00:29 performance characteristics. That's the type of things you do learn in the CS degree that you

01:00:34 don't necessarily learn when you're a self-taught programmer kind of hacking everything out on your

01:00:38 own, which is why a book like classic computer science problems in Python, or maybe computer

01:00:42 science from scratch is good for that. Yeah. It exposes you to this. Here's a data structure you

01:00:47 haven't thought about, but here's why we're using it and the advantages and stuff. Yeah, absolutely.

01:00:51 Well, we've covered a lot. We've covered pretty much solved computer science in 2025. That's good.

01:00:57 And then the book is bringing computer science to so many people who are self-taught, you know, like me.

01:01:04 I went to college, but I studied many, many years of math and found my way into programming.

01:01:09 So I took a few CS programs, but not so many.

01:01:12 So, you know, it certainly showed me many things that I hadn't seen.

01:01:15 Like I've never emulated hardware before, for example.

01:01:18 That was wild.

01:01:19 And, you know, Michael, I was reading in Talk Python in production that you actually worked on Windows desktop apps.

01:01:26 Is that right?

01:01:26 I did.

01:01:27 Yeah, for 10 years, more than 10 years.

01:01:29 I'm almost 15 years, yeah.

01:01:31 Wow, so I'm curious, how did you feel about that experience

01:01:36 versus the kind of Python GUI frameworks that exist today?

01:01:40 You heard my rant about Visual Basic.

01:01:42 Yeah, and I was thinking of that.

01:01:44 I started actually in C++, starting the hard way, doing MFC.

01:01:49 I don't know if you ever played with that or heard of that.

01:01:51 Yeah, Microsoft Foundation classes.

01:01:52 Yeah, yeah, and that was actually pretty decent for a C++ framework.

01:01:55 And then as soon as I found Visual Basic and C#, I'm like, this is so much better.

01:01:59 It goes from weeks to days of UI work, you know, and stuff like that.

01:02:03 And it took me a while to really appreciate building for the web.

01:02:08 You know, I think I probably made that switch around the year 2000.

01:02:11 There's a little bit after that, but I really like the web these days.

01:02:14 I think the web is special.

01:02:15 I just wish it was easier to take apps from the web and get them to people.

01:02:20 For example, Firefox canceled progressive web apps.

01:02:24 iOS has them, but they're kind of, let's not talk about those.

01:02:27 And if you know the secret, you can probably install one, but you probably shouldn't.

01:02:30 And we're going to, you know, like if it's just, it's like right on the verge of one more

01:02:35 step and the web would be really, a really good replacement for those.

01:02:39 And now we have things like Electron and so on, which I'm not a huge fan of, but it's,

01:02:44 it's kind of what we need to make that happen, but we don't necessarily need Electron, right?

01:02:48 It would be really great.

01:02:49 I'm also really excited.

01:02:50 I don't know how you feel about, I'm really excited about PyScript.

01:02:54 and the possibility of running Python for your front-end stuff?

01:02:57 Well, I guess what I was getting at is why do you think Python has not taken off more

01:03:03 for desktop GUI development?

01:03:04 So like we've seen things like KIVI, of course we have PyQT and several other frameworks

01:03:10 that wrap into older C++ GUI frameworks.

01:03:13 But like Python now is so mature, it's the most popular language in the world.

01:03:18 There's nothing preventing it.

01:03:19 Yeah, there's nothing preventing it from making a really nice platform

01:03:22 for native app development, right?

01:03:26 Fundamentally, you could wrap, you could come up with a framework

01:03:29 that abstracts talking to Objective-C, the APIs there, or the Win32 API.

01:03:34 You know, one of the things I'm starting to realize that makes desktop development really different

01:03:39 from back in the day, if you will, is there are so many gatekeepers and barriers

01:03:44 to getting your app onto a machine, right?

01:03:47 If I built a cool desktop app and I gave it to you, your Mac would go, no,

01:03:52 we're not running that. We moved it to the trash for you because it wasn't notarized.

01:03:56 Right. And something similar happens on Windows. And so there's these steps you got to jump through.

01:04:03 And I think there's just been too many gotchas and steps for anybody to push a framework or a way of

01:04:10 doing this all the way through. I mean, in a sense, the web is kind of like good enough that we don't

01:04:16 have to figure out a way to build this. I think honestly, if I were to be more concerned, I'd be

01:04:21 more concerned that we can't create truly straightforward mobile apps with Python than

01:04:26 desktop apps. Yeah. What do you think? That's where I was going to go to next. Yeah. And I mean,

01:04:30 Kivy has been an attempt at that. But, you know, I don't really think it's gotten a ton of track

01:04:36 from what I see. It doesn't look like it's gotten a ton of traction in the way people in the Python

01:04:41 community hoped it would. So, you know, I don't have to do good work, but it's also not there yet.

01:04:47 I don't think. I wonder if some of the performance issues, you know, are part of this. So, you know,

01:04:54 people expect one of the reasons we like desktop apps and native mobile apps over web apps is

01:04:59 because we get instantaneous feedback and, you know, really high performance in our user interfaces.

01:05:05 And, you know, I still find even a PyQT app sometimes a little bit slower than, you know,

01:05:12 a regular QT app. And, you know, it's unfortunate. For me, like the big want for the whole Python

01:05:19 ecosystem is what started to be the focus, I think, of the core developers, which is performance

01:05:24 improvements. Like, I think that performance improvements would make everyone's lives in the

01:05:28 ecosystem so much better, you know. And so I think rightly that this has become like one of the central

01:05:35 focuses of, you know, of the core developers. Yeah. Guido, Mark Shannon, Grant Booker,

01:05:42 a bunch of people whose names I'm not including, they've all done really good work over the last

01:05:45 three or four years. I was a little bit sad to see Microsoft cancel that project or cancel the

01:05:50 funding for that project. I mean, the project continues, but still, you know, what has happened

01:05:55 is so, so much better. That is really a big deal. Yeah. Yeah. And, you know, I even saw it in the

01:05:59 course of writing the book. I started writing the book in 2021 and that NES emulator on the same

01:06:05 was something like 12 frames per second in 2021.

01:06:10 And by 2025, it was like 17 frames or 15 or 17 frames per second.

01:06:13 Yeah, nice.

01:06:15 I really saw it in these computationally intensive programs in the book.

01:06:19 I'm pretty positive for it.

01:06:20 I mean, there's a lot of things that could be better,

01:06:24 but I think one of the real superpowers is it's approachable, but it's ceiling of Python.

01:06:29 That is, it's ceiling of what you can accomplish is not that low, right?

01:06:33 You can go pretty far if you have CS skills and ideas.

01:06:37 And then, you know, pip install, uv install.

01:06:40 The options of what is out there to just build and click together are incredible.

01:06:44 What do you think about, and I know you talked about it on the show before.

01:06:47 I heard about a while ago on the show about Mojo and about, you know, a total attempt

01:06:53 that, you know, let's just redo it and we'll get to keep the language syntax, but not the

01:07:00 runtime.

01:07:01 Right, right, right.

01:07:01 And I mean, PyPy is also, of course, kind of an attempt at that as well.

01:07:05 But and some people call for it, right?

01:07:07 I see sometimes people are like, why don't they replace CPython with PyPy?

01:07:10 What do you think about kind of just like the whole is too big a topic for the end?

01:07:14 No, no, it's interesting.

01:07:16 I think all of those are interesting.

01:07:18 I think the Mojo performance story is very powerful.

01:07:22 It's also really hard to bring over to CPython because there's so many different ways that it's used.

01:07:28 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?

01:07:34 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?

01:07:43 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.

01:07:51 Like here's the three body, solving the three body problem in Python, and here's solving it in Mojo.

01:07:56 Here's solving the three-body problem in Rust.

01:07:58 And look at that huge difference.

01:08:00 But what often happens in Python is you find yourself orchestrating native code anyway.

01:08:05 Like, okay, we're going to use Polars and we're going to do this thing.

01:08:08 But when I call the Polars functions, I'm no longer running Python.

01:08:12 I'm running like a drop of Python and a bunch of Rust.

01:08:15 And then you write back in the same, or I'm talking to a database layer,

01:08:20 or my web app is running on a Rust-based server.

01:08:23 There's just all these little parts where a lot of times your code speed

01:08:29 is more about how you're putting the pieces together.

01:08:31 Yeah.

01:08:31 Not always.

01:08:32 If you're doing computational stuff, that's out the window potentially.

01:08:35 But when you're kind of, you know, you do machine learning, you're doing web apps,

01:08:39 you're doing database calls.

01:08:40 A lot of these are like just a layer and then off it goes.

01:08:44 Yeah, that's totally makes sense.

01:08:45 But then I think it is holding Python back from some of those, you know,

01:08:50 some of these real interesting domains that people want to get into,

01:08:54 especially when they're first learning programming, like 3D games.

01:09:02 Let's stick with that because I'm thinking of ones for people

01:09:04 in computer science education.

01:09:06 A lot of people who study computer science is because they want to make a game, right?

01:09:10 Sure.

01:09:10 And when they want to make a game-

01:09:12 And I can see a world, like look at one of the biggest game companies

01:09:14 in the world, it's Unity.

01:09:16 Yeah.

01:09:16 Right?

01:09:17 As a foundational, like building your game with not creator of games.

01:09:21 They're built, I believe in C-sharp and.net, if I remember correctly.

01:09:24 And that's a faster language, but it's not raging fast.

01:09:28 You know, it's a lot faster, but it's still a decent way from a C,

01:09:33 like a pure C language, right?

01:09:35 Yeah.

01:09:35 A pure C implementation.

01:09:37 And they're really, really successful.

01:09:39 They got close enough.

01:09:41 I could easily see some company go, we're going to build a game engine.

01:09:45 We're going to use Python as the language to get as many people

01:09:48 who have been left out in the cold, in a sense, to do it.

01:09:52 but we're going to do a mojo-like thing.

01:09:54 Or we're going to do something where you don't get to use every library,

01:09:57 but do you really need Flask in your game?

01:10:00 Not in your game.

01:10:01 You know what I mean?

01:10:01 Yeah, yeah, yeah.

01:10:02 We're going to build like a smaller focused, high performance version

01:10:06 that looks as close as it could be.

01:10:09 And we're going to sell you a game engine in a way to ship those games on Steam,

01:10:13 a way to ship those games on Metal to macOS, et cetera.

01:10:16 Right?

01:10:16 Like I could see that world happen.

01:10:18 Yeah, yeah.

01:10:19 I don't see me making that world, but I could see that happen.

01:10:21 And then actually, I think it would be okay.

01:10:23 How do you feel?

01:10:24 Like, do you see that as possible?

01:10:25 No, that makes total sense.

01:10:26 I think another thing we think about is like, how much are skills becoming more transferable

01:10:32 because of LLMs?

01:10:33 So can somebody who already learned Python well now quickly pick up C# in Unity

01:10:39 because the LLM is doing a lot of the detailed syntax for them

01:10:43 and they just have to understand the programmatic ideas.

01:10:46 So is like, you know, maybe Python will continue to always be this great first language for everybody.

01:10:52 And it'll be easier for people to now transition to other languages for specific domains.

01:10:57 And so it matters less that we have everything in the original language.

01:11:01 Okay, out in the chat, there's the recommendation for, that's GoDot.

01:11:07 If you want to go, I'm not super familiar with it.

01:11:09 I think it's an open source game engine.

01:11:12 Yes, that much I know, but that's where my knowledge stops.

01:11:15 Right, and I think it has like, it's like a Godot script or something or G script or something is it's it's language which I think

01:11:21 has more of a Python like syntax somebody in the chat can correct me yeah interesting okay but I

01:11:26 I think if you took an end-to-end thing you know it's not just a matter of like you can run the

01:11:31 game engine with this you've got to take it all the way to here's how you ship your games because

01:11:37 soon what is the very first thing you want to do once you get your game working and fun you want

01:11:40 to show your friends you know what I mean and you've got to find a way to send it out so this

01:11:45 goes back to what you were talking about earlier is all the hurdles around you know getting something

01:11:50 on the mac app store steam or you know or whatever um and how and that goes also to another big thing

01:11:56 that we're trying to solve in the python ecosystem which is the packaging story right um which there

01:12:01 are many solutions for but just not one decided on let's make this the standard like you know as

01:12:06 easy as possible thing yeah it's getting better things are definitely getting better but it's still

01:12:11 there is no Python build --format equals EXE.

01:12:16 Right.

01:12:16 You know, where, where, what comes out and then some sort of tooling that automatically

01:12:21 signs that stuff with your certificate you've got as a windows developer.

01:12:25 So it doesn't get flags as malware.

01:12:27 There's just, even if you get the thing to build, there's like these three or four other

01:12:31 steps, you know, I'm thinking about an iOS.

01:12:33 It's like, okay, we got it to run Python, but, but really what we needed to do is like

01:12:37 integrate with Swift UI and have storyboards where I can like, I can weave it. And you're like,

01:12:43 well, that's no, that's a long ways away. Like I know, but that's, you got to go through those

01:12:48 stages to get it. I don't know. It's just, there's, there's a little bit, a little bit further to go,

01:12:52 I guess, but I would love to see it. And I'm, I think it'll happen probably.

01:12:55 It's not that you can't do it. It's just, there's too much friction right now.

01:12:58 Yeah. Yeah. Yeah. Well, hopefully you've given some people some ideas. Somebody's going to go

01:13:02 start the unity the pie unity company or whatever and let's let's let's make it happen

01:13:09 yeah yeah oh and also just um real-time follow-up out there godo is apparently the pronunciation

01:13:16 it's french sorry okay no no i didn't know it either um i think honestly just shout out to

01:13:20 everyone if you have a weird name for your project on github put an mp3 and say this is how you say

01:13:25 it just get it let's let's help us out and not that french is weird but just you know we should

01:13:31 actually do that with english projects too right um yeah yeah absolutely to make them accessible to

01:13:36 the yeah as simple yeah it has nothing to do with french i'm thinking even as something simple as

01:13:41 g unicorn is often said gunicorn and half the people out there are probably thinking michael

01:13:47 you're wrong it's gunicorn not unicorn but their logo is a green unicorn yeah i'm like well it's

01:13:53 probably the g stand just g and then certainly the unicorn part is probably unicorn because

01:13:57 unicorn is you know what i mean but like it's totally reasonable to look at it and go unicorn

01:14:03 you know what i mean but if they just put a little mp3 like it's or even just where it's pronounced

01:14:08 g ee dash unicorn you know what i mean yeah yeah i think we all need to do that yeah yeah all right

01:14:14 well the chat is getting lively but we're gonna have to call it because we might be just a tiny

01:14:19 bit over time and it's getting late and you're part of the world so well thank you so much for

01:14:23 having me on again, Michael. It was really a pleasure. Congratulations again on Talk Python

01:14:28 in production. Thank you. And Computer Science from Scratch as well.

01:14:32 Yeah. And if folks want to check out the book, there's a website that

01:14:36 I'm sure you'll put in the show notes, computersciencefromscratch.com.

01:14:40 And you can just learn more about the different projects we do and some of the

01:14:45 ideas in the book. Yeah. Awesome. People want to get in touch with you

01:14:48 otherwise? How do they do that? Sure. You can find me on X, I guess,

01:14:52 at Dave Kopech, D-A-V-E-K-O-P-E-C.

01:14:55 And if you go to my website, DaveKopech.com, there's a bunch, there's email

01:14:59 and a bunch of other ways to contact me.

01:15:01 So D-A-V-E-K-O-P-E-C.com.

01:15:03 Yeah, I'll put it in the show notes.

01:15:04 Thanks, Michael.

01:15:05 Yeah, you bet, you bet.

01:15:06 So David, thanks for being back on the show.

01:15:09 It's been really fun.

01:15:09 Yeah, we'll talk to you later.

01:15:10 Awesome, thanks, Michael.

01:15:11 See ya.

01:15:13 This has been another episode of Talk Python To Me.

01:15:15 Thank you to our sponsors.

01:15:16 Be sure to check out what they're offering.

01:15:18 It really helps support the show.

01:15:20 This episode is brought to you by Sentry.

01:15:22 Don't let those errors go unnoticed.

01:15:23 Use Sentry like we do here at Talk Python.

01:15:25 Sign up at talkpython.fm/sentry.

01:15:29 And it's brought to you by NordStellar.

01:15:32 NordStellar is a threat exposure management platform from the Nord security family,

01:15:36 the folks behind NordVPN, that combines dark web intelligence,

01:15:40 session hijacking prevention, brand and domain abuse detection,

01:15:45 and external attack surface management.

01:15:47 Learn more and get started keeping your team safe at talkpython.fm/nordstellar.

01:15:53 If you or your team needs to learn Python, we have over 270 hours of beginner and advanced courses

01:15:58 on topics ranging from complete beginners to async code, Flask, Django, HTML, and even LLMs.

01:16:05 Best of all, there's no subscription in sight.

01:16:08 Browse the catalog at talkpython.fm.

01:16:10 And if you're not already subscribed to the show on your favorite podcast player,

01:16:14 what are you waiting for?

01:16:16 Just search for Python in your podcast player.

01:16:18 We should be right at the top.

01:16:19 If you enjoyed that geeky rap song, you can download the full track.

01:16:22 The link is actually in your podcast blog or share notes.

01:16:25 This is your host, Michael Kennedy.

01:16:26 Thank you so much for listening.

01:16:28 I really appreciate it.

01:16:29 I'll see you next time.

01:16:42 And we ready to roll Upgrading the code No fear of getting old We tapped into that modern vibe

01:16:53 Overcame each storm Talk Python To Me I sync is the norm

Talk Python's Mastodon Michael Kennedy's Mastodon