WEBVTT
00:00:00.001 --> 00:00:05.040
The Nobel Prize in Economics recently went to Paul Romer, a convert from proprietary software
00:00:05.040 --> 00:00:10.380
like MATLAB, over to Python and the SciPy stack. Paul said, the more I learn about proprietary
00:00:10.380 --> 00:00:15.740
software, the more I worry that objective truth might perish from the earth. That's quite a
00:00:15.740 --> 00:00:20.680
statement, but what if your organization is deeply committed to proprietary software such as MATLAB?
00:00:20.680 --> 00:00:25.220
Well, don't despair, because Peter Karzarnoff, a professor at Portland Community College,
00:00:25.220 --> 00:00:29.460
is here to share his experience converting his courses over to Python and JupyterHub.
00:00:29.940 --> 00:00:34.800
This is Talk Python To Me, episode 201, recorded January 23rd, 2019.
00:00:34.800 --> 00:00:52.680
Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the
00:00:52.680 --> 00:00:57.260
ecosystem, and the personalities. This is your host, Michael Kennedy. Follow me on Twitter,
00:00:57.260 --> 00:01:01.960
where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm,
00:01:01.960 --> 00:01:07.360
and follow the show on Twitter via at Talk Python. This episode is brought to you by Linode and
00:01:07.360 --> 00:01:11.120
Stellar S. Please check out what they're offering during their segments. It really helps support the
00:01:11.120 --> 00:01:13.120
show. Peter, welcome to Talk Python.
00:01:13.120 --> 00:01:15.400
Thanks, Michael. I'm so excited to be here.
00:01:15.400 --> 00:01:19.600
Yeah, it's really excellent to have you on the show. You and I have spoken throughout the years
00:01:19.600 --> 00:01:25.040
over Twitter and other mediums, and it's great to finally get to talk to you in more depth.
00:01:25.040 --> 00:01:29.140
Yeah, it's great to connect. I can't wait to tell my story about choosing Python over MATLAB
00:01:29.140 --> 00:01:31.380
and using JupyterHub in my classroom.
00:01:31.380 --> 00:01:35.900
Yeah, absolutely. I think that is such a good choice, and it's happening more and more. There's
00:01:35.900 --> 00:01:43.140
some really interesting quotes from the guy who won the Nobel Prize in economics.
00:01:43.900 --> 00:01:52.500
I think that was Mathematica, Python over Mathematica. But basically, the knowledge of the free world was
00:01:52.500 --> 00:01:59.160
in danger because of these proprietary systems, and Python and open source was the thing that would
00:01:59.160 --> 00:02:05.520
keep it free and keep sharing the knowledge, which is pretty interesting. So definitely a trend you're
00:02:05.520 --> 00:02:10.940
seeing around a lot of data science teams I worked with and stuff as well. All right, so we'll get to
00:02:10.940 --> 00:02:14.580
that, and we'll dig into that, and it'll be fun. But let's start with your story. How did you get into
00:02:14.580 --> 00:02:15.260
programming in Python?
00:02:15.260 --> 00:02:21.040
I got involved in programming kind of late. I'm an adult, and I didn't get started until about three
00:02:21.040 --> 00:02:27.640
years ago. Growing up, I wasn't a gamer, and at age eight, I wasn't like pounding away at like a
00:02:27.640 --> 00:02:33.960
Commodore 64 in order to like write new programs. My dad, he was a biochemist. He wasn't a programmer,
00:02:33.960 --> 00:02:38.480
and my mom, she did art stuff for the school district, and she wasn't a programmer either.
00:02:38.480 --> 00:02:44.760
And like there were some kids in high school who like programmed their calculators to play games,
00:02:44.760 --> 00:02:48.520
but I wasn't that kid. I played soccer, and I went camping and stuff like that.
00:02:48.520 --> 00:02:51.140
That's cool. You know, that's probably a good way to grow up, honestly.
00:02:51.140 --> 00:02:51.540
Yeah.
00:02:51.540 --> 00:02:56.320
I was always kind of blown away with those people that would program like their HP calculators and
00:02:56.320 --> 00:03:00.840
stuff because they didn't have a proper keyboard. It was like texting. Like remember when you'd have to
00:03:00.840 --> 00:03:06.840
hit like one or two, maybe it was two, three times to get a C to come out. Like who could program that
00:03:06.840 --> 00:03:07.880
way? But they did, right?
00:03:07.880 --> 00:03:16.380
Yeah, but they like did it. But that wasn't me. So I did my graduate work at UW, and I worked on making
00:03:16.380 --> 00:03:21.600
plastic transistors and plastic solar cells. It was really cool research, and that was kind of the
00:03:21.600 --> 00:03:26.760
first time that I did some programming, and I used LabVIEW. Have you heard of LabVIEW before?
00:03:26.760 --> 00:03:31.600
I've heard of LabVIEW. It's like this graphical programming interface, but it's...
00:03:31.600 --> 00:03:31.600
Yeah.
00:03:31.600 --> 00:03:33.100
Is it hardware focused?
00:03:33.100 --> 00:03:38.960
Yeah, it's really just focused on hardware, and you kind of drag these wires like around the screen
00:03:38.960 --> 00:03:45.140
in order to connect components. So I was just using that to interface with hardware and like measure
00:03:45.140 --> 00:03:47.220
devices and collect data and stuff.
00:03:47.220 --> 00:03:51.340
Cool. Tell me about this plastic hardware stuff that you were doing. Like,
00:03:51.560 --> 00:03:57.320
did you find a way to make plastic that was conductive, or was it like wrapping chips, or what
00:03:57.320 --> 00:03:57.680
was it?
00:03:57.680 --> 00:04:04.500
We were in graduate school making N-type semiconductor plastic. So regular chips that are in your computer
00:04:04.500 --> 00:04:09.600
or your phone, they have both P-type and N-type silicon in there, and that's what helps the
00:04:09.600 --> 00:04:15.320
transistors shuttle electrons across. And we were making these specialty plastics that would shuttle
00:04:15.320 --> 00:04:20.740
electrons when you applied what was called a gate voltage. So we were basically making like
00:04:20.740 --> 00:04:24.780
these little transistors just out of plastic. It was really, really neat.
00:04:24.780 --> 00:04:26.920
Wow, that's crazy. Could you 3D print those these days?
00:04:26.920 --> 00:04:31.200
Probably. And we were thinking about maybe you could roll-to-roll print them, like you print a
00:04:31.200 --> 00:04:36.720
newspaper. Maybe you could inkjet print them, like you're printing out a regular piece of paper.
00:04:36.720 --> 00:04:42.380
But the research was just very fundamental, like trying to measure core electrical properties of
00:04:42.380 --> 00:04:42.960
these plastics.
00:04:42.960 --> 00:04:43.920
That's pretty excellent.
00:04:43.920 --> 00:04:44.620
Yeah.
00:04:44.620 --> 00:04:50.380
Okay, cool. So you had to learn this LabVIEW draggy-droppy programming language so that you could work on this
00:04:50.380 --> 00:04:54.400
hardware, right? And I find a lot of people actually get into programming along these lines. They're like,
00:04:54.400 --> 00:04:59.600
well, I didn't really think I'd be a programmer, but this thing I thought was really cool required this
00:04:59.600 --> 00:05:04.600
step to like basically make it go. And maybe it's pretty small, but you know, there it was, right?
00:05:04.600 --> 00:05:08.840
Right. Then I started working at Portland Community College, where I work now.
00:05:08.840 --> 00:05:13.960
And I was digging through these things. They're called course content outline guides. They're kind
00:05:13.960 --> 00:05:20.340
of like course descriptions that are up on the web. And I noticed that this course content outline guide,
00:05:20.340 --> 00:05:27.120
this course description had the word his in it. And the phrase was, the student may work at his desk.
00:05:27.120 --> 00:05:32.600
And I was like, this is not good. Like I've got two daughters. Like I want them to go into engineering.
00:05:32.600 --> 00:05:39.220
I really like it. We shouldn't have like his in this description. So I started looking through all of the
00:05:39.220 --> 00:05:44.960
other course pages that were up. And I quickly realized that there are way, way too many to do
00:05:44.960 --> 00:05:50.800
by hand, right? Like we have over 1300 classes and I can't click on every single one and read through
00:05:50.800 --> 00:05:56.680
every single one. So I was telling one of my colleagues about this and he was like, oh, you should,
00:05:56.680 --> 00:06:00.980
you know, learn Python, like try this Python thing. And you could like write a little program that could
00:06:00.980 --> 00:06:04.380
do it. And I was like, okay, I'll give it a try.
00:06:04.380 --> 00:06:06.340
It sounds really hard, but okay.
00:06:06.340 --> 00:06:11.800
It sounds hard, but I'll try. And so like, I found this package, beautiful soup. And like, I wrote this
00:06:11.800 --> 00:06:17.640
little script and, it was probably about a week. And I got this thing where I scraped every single
00:06:17.640 --> 00:06:24.220
one of these content guides, about 1300 classes and found like any time that there was a his,
00:06:24.220 --> 00:06:29.700
he, or like him in them. And it was just like amazing that this thing that I was clicking through
00:06:29.700 --> 00:06:35.480
individual links and like reading all the texts. Like I could just like type Python and then my
00:06:35.480 --> 00:06:40.360
script.py. And then like, it all just came out into one CSV. It was like amazing.
00:06:40.360 --> 00:06:46.260
Wow. That's pretty interesting. A couple of thoughts. One, I think that's definitely a noble effort
00:06:46.260 --> 00:06:53.100
because we already have enough barriers to folks who are underrepresented getting to,
00:06:53.100 --> 00:06:57.800
into STEM fields, into programming and stuff. Like we don't need to, to make it less comfortable.
00:06:57.800 --> 00:07:02.220
Right. Right. So I think that's good. Is this thing open source? Like if somebody worked at
00:07:02.220 --> 00:07:07.240
Johnson County community college or whatever, right? Like, like, could they borrow your thing
00:07:07.240 --> 00:07:12.220
and turn it loose on theirs? Yeah. I mean, the code is up on GitHub. If somebody wants to try,
00:07:12.220 --> 00:07:18.080
like this is my first Python project. So I hard coded in a lot of the URLs and stuff like that.
00:07:18.080 --> 00:07:25.020
So it's not totally transferable right now, but all of those like GUI kicks that the Python
00:07:25.020 --> 00:07:29.940
ecosystem has been talking about. Maybe I could turn it into one of those GUIes and somebody
00:07:29.940 --> 00:07:34.040
in another community college could just like click it and make it work for them. That would be pretty
00:07:34.040 --> 00:07:38.960
cool. Yeah. That'd be totally cool. Like you put some GUI on a little CLI on it or like if somebody
00:07:38.960 --> 00:07:43.920
wants, they could create a web app and then you just give it like the base URL of your college and
00:07:43.920 --> 00:07:47.940
it'll go through and it'll do it. Right. Right. Give it, give it a little CSV download. That'd be sweet.
00:07:48.460 --> 00:07:53.680
So my other non-technical question here though, it's like, I definitely agree that this is a good
00:07:53.680 --> 00:08:00.020
thing to be aware of and to try to eliminate, but how do you eliminate it? I mean, like replacing every
00:08:00.020 --> 00:08:07.620
him with a her seems like a step that is in like, it's the idea of it is, is right, but it also doesn't
00:08:07.620 --> 00:08:12.080
seem right. Like, so to me, I don't know, this is an English question. Like this just bothers me in
00:08:12.080 --> 00:08:17.800
English. There's not a way to speak about a person in a non-gendered way really. So I don't know. I
00:08:17.800 --> 00:08:23.400
try to use they, them, their, but like obviously they're singular, but you know, like what would
00:08:23.400 --> 00:08:29.400
you propose here? Like as part of this? For those, you could say at the student's desk or at their desk
00:08:29.400 --> 00:08:35.660
or at a person's desk. You don't at all need to use any of those like gendered pronouns. Right. As long
00:08:35.660 --> 00:08:38.880
as there's more than one student and there always will be, it'll be fine. Right. It's just like,
00:08:38.880 --> 00:08:42.940
it's when it's singular. I'm like, man, I'm going to say they, and I know it's singular and
00:08:42.940 --> 00:08:48.280
it's probably wrong, but to me it feels better than he, when it's a her or her, when it's a he.
00:08:48.280 --> 00:08:52.040
And you know, it's just like, I don't know. It's just weird. We need a better bit of English here.
00:08:52.040 --> 00:08:57.780
All right. So great. So that's how you got into programming. As you saw in the Python is how you
00:08:57.780 --> 00:09:01.000
saw this problem. You're like, your friends, like, you know what? Like a little bit of requests,
00:09:01.000 --> 00:09:05.760
a few for-in loops and some beautiful soup. And you got this problem solved. Actually,
00:09:06.560 --> 00:09:10.840
you said you teach at Portland Community College here in lovely Portland, Oregon.
00:09:10.840 --> 00:09:14.080
What do you do day to day? Like what kind of classes do you teach? Things like that.
00:09:14.080 --> 00:09:19.720
I teach engineering at Portland Community College and we're a community college. So we teach the
00:09:19.720 --> 00:09:26.920
first two years of a four-year engineering program. And we also teach two years of a two-year degree
00:09:26.920 --> 00:09:32.360
in engineering. So some of the students go on to jobs and some of the students go on to four-year
00:09:32.360 --> 00:09:39.360
universities. So I teach some of the intro classes. We call that ENGR 101. And I also teach the engineering
00:09:39.360 --> 00:09:45.220
programming class. And then in the second year for engineering students, I teach some of the mechanical
00:09:45.220 --> 00:09:49.540
classes like material science, manufacturing, and machine design.
00:09:49.540 --> 00:09:54.740
Cool. Those sound interesting. First of all, maybe we should just define what a community college
00:09:54.740 --> 00:09:59.660
is for folks who are not in the United States. I feel like this is kind of a U.S. type of thing.
00:09:59.660 --> 00:10:03.360
Like in the U.S. we have four-year colleges and we have super expensive four-year colleges.
00:10:03.360 --> 00:10:09.580
And then we have high school. And high school is especially bad in the U.S. in terms of preparing
00:10:09.580 --> 00:10:15.900
people for a job. Like in Europe, I feel like maybe what they learn is not necessarily better. But
00:10:15.900 --> 00:10:21.360
in the end, they either have a vocational track that they can sort of follow on, especially in Germany,
00:10:21.360 --> 00:10:27.600
or like they go a little bit farther in high school so that they actually have a little more skills
00:10:27.600 --> 00:10:32.980
when they come out. So in the U.S., like having a high school degree almost is like not having a
00:10:32.980 --> 00:10:38.220
degree at all, right? So maybe just talk about that so people who are not familiar with this idea know
00:10:38.220 --> 00:10:44.160
what it is. Yeah. So in the U.S., after high school, you could go to a regular four-year school,
00:10:44.160 --> 00:10:48.860
you know, like the University of Michigan or Stanford or something. But they're also these community
00:10:48.860 --> 00:10:55.100
colleges. And they're usually two-year programs. And they kind of have two separate aims.
00:10:55.480 --> 00:11:00.820
So one of them is as a vocational school. So you could go after high school and we have,
00:11:00.820 --> 00:11:05.800
say, an automotive department. You learn how to be an auto mechanic. Or we have a welding program.
00:11:05.800 --> 00:11:11.480
You learn how to be a welder. Or we have like a pre-nursing program. So you learn how to be a
00:11:11.480 --> 00:11:17.040
medical assistant. And then the other function that the community college is served here in the U.S.
00:11:17.040 --> 00:11:23.040
is to prepare students and get them doing their first two years of college. And then they'll finish
00:11:23.040 --> 00:11:28.120
their third and fourth year of college at a regular school. So it's both that kind of vocational school
00:11:28.120 --> 00:11:32.920
as well as kind of like the first two years of what you consider regular college.
00:11:32.920 --> 00:11:39.200
Yeah. Okay. Great. And it's also typically much, much cheaper than a four-year school.
00:11:39.200 --> 00:11:43.600
Even a state four-year school. But like especially the other ones. So folks who go here,
00:11:43.600 --> 00:11:48.920
maybe they're not academically ready for a four-year school. Maybe they're not entirely sure that that's
00:11:48.920 --> 00:11:54.540
for them. So they're going to take a less intensive route to like find their way. The reason I'm bringing
00:11:54.540 --> 00:12:00.620
this up is it's sort of relevant to the conversation later around like expensive proprietor software and
00:12:00.620 --> 00:12:08.260
so on. Yeah. Yeah, exactly. So at PCC right now, I think our credit costs $111 a credit. So that's
00:12:08.260 --> 00:12:14.680
kind of $1,500 a quarter or so. And if you look at private four-year colleges, you know,
00:12:14.680 --> 00:12:21.080
they're at least $45,000 for a year now. So community colleges are much, much cheaper.
00:12:21.080 --> 00:12:25.600
It's like a 30X difference or something. Yeah. Yeah. Yeah. Yeah. Just for people listening,
00:12:25.600 --> 00:12:29.920
I actually went to a community college for my first couple of years out of high school and just thought
00:12:29.920 --> 00:12:35.180
it was a fabulous experience. It went out to do well in other colleges afterwards. Right. So it's
00:12:35.180 --> 00:12:41.520
definitely a nice place to be. I think it's got the right sort of low-key start. And the other thing,
00:12:41.520 --> 00:12:46.040
I guess, that's interesting to me is that you're teaching engineering courses. When I knew about
00:12:46.040 --> 00:12:51.080
community college, it was like you could take calculus and differential equations and chemistry
00:12:51.080 --> 00:12:56.340
and physics, but there was not like a full-on engineer that was like to prepare you for other
00:12:56.340 --> 00:13:02.080
engineering courses. These directly transfer to Portland State or to Oregon State. Some of the students
00:13:02.080 --> 00:13:07.460
go to the University of Washington. So you take engineering classes, but our students also take
00:13:07.460 --> 00:13:13.100
things like calculus and chemistry and physics and those courses too. Sure. Sounds fun. Kind of makes
00:13:13.100 --> 00:13:19.680
me wish I was back in college, sort of. I love it. Like this is honestly like my dream job. Every day I
00:13:19.680 --> 00:13:26.140
walk in, I'm like, oh, I love this place. I love this place. How cool. All right. So let's talk about
00:13:26.140 --> 00:13:31.520
the computing software that you have for your class. So you're teaching these engineering and
00:13:31.520 --> 00:13:37.720
engineering programming classes and programming labs and stuff. So traditionally, this is the realm of
00:13:37.720 --> 00:13:44.460
things like MATLAB and Mathematica, which are super expensive things. They only exist on the computer labs
00:13:44.460 --> 00:13:51.720
at the school because like no student is going to go, yeah, 1500 bucks for like a license. That seems like
00:13:51.720 --> 00:13:56.340
a good idea. Oh, and then you've got to buy all the other add-ons, right? Like, yeah, it's really
00:13:56.340 --> 00:14:01.980
the use of these tools while they're pretty good at solving engineering problems really means
00:14:01.980 --> 00:14:08.220
like you're, you're sort of stuck there, right? Yeah. Yeah. So our college has taught MATLAB in this
00:14:08.220 --> 00:14:15.160
programming course for about four years and it would cost students either $50 or $100 for the license.
00:14:15.160 --> 00:14:19.860
And then it also costs the college. It's like an academic license or something they can get.
00:14:19.860 --> 00:14:25.860
Yeah. Yeah. They get a student license and it says, I think, EDU, like at your command prompt in MATLAB,
00:14:25.860 --> 00:14:31.520
just to let you know that you're still a student. And, another problem with that is after two years,
00:14:31.520 --> 00:14:36.160
your license would expire and some students stay a little bit longer than two years. And so
00:14:36.160 --> 00:14:41.780
they'd come to me before they go to four year and they're like, ah, Peter, like I got to reinstall
00:14:41.780 --> 00:14:48.280
this new license. Can you get me another license to MATLAB? And it just felt like, like we were
00:14:48.280 --> 00:14:54.840
choosing certain students to succeed because there's not MATLAB installed in the multicultural center or
00:14:54.840 --> 00:15:01.460
MATLAB installed in the veterans resource center. Like it's just installed in these two computer labs and
00:15:01.460 --> 00:15:07.980
then our engineering lab. And for $50, like that might not seem like a big deal if you're a big
00:15:07.980 --> 00:15:13.900
programmer and you've got, you know, this big job at Google or Facebook, but for some community college
00:15:13.900 --> 00:15:19.640
students where food security is an issue, $50, that can be a really, really big deal.
00:15:19.640 --> 00:15:23.460
That can definitely be a big deal. I remember the shock of just the price of books.
00:15:23.460 --> 00:15:24.200
Oh yeah.
00:15:24.200 --> 00:15:31.400
Yeah. And the, and, and books in the course were over a hundred dollars. The book was awesome. It was
00:15:31.400 --> 00:15:35.960
really, really good, but it was super expensive. And then after the course, what are you going to do
00:15:35.960 --> 00:15:37.260
with that textbook again?
00:15:37.260 --> 00:15:39.840
Try to sell it. You just try to sell it.
00:15:39.840 --> 00:15:40.440
Right.
00:15:40.820 --> 00:15:53.460
It's the whole college books thing, but I'm just blown away how expensive those are. Right. But that's one possible path. The other path is maybe something that's really good at computation. That's kind of like MATLAB.
00:15:53.460 --> 00:15:54.500
Right.
00:15:54.500 --> 00:15:56.260
That's free and more accessible, right?
00:15:56.260 --> 00:16:09.640
Right. That's free, more accessible. So that's why we started investigating Python because we were like, okay, we can do these arrays in MATLAB, but Python has NumPy. We can do numerical computing.
00:16:09.640 --> 00:16:22.700
Or okay, MATLAB, we can build these plots in MATLAB, but Python, we have matplotlib. Or in MATLAB, there's this serial module where you can talk to hardware. Oh, well, in Python, we've got PySerial.
00:16:22.700 --> 00:16:23.380
Exactly.
00:16:23.380 --> 00:16:39.560
So I sort of started investigating like each time I was doing something in MATLAB, like, can I do this in Python? And the answer was always yes. And sometimes, especially when we were doing like HTTP requests or like trying to get data from like a web
00:16:39.560 --> 00:17:01.740
API for like tie data or something you're going to plot, it is just so much easier in Python to do that than it was in MATLAB. Like it just felt like we were having to do these backflips whenever we were trying to like read anything that was external to like the MATLAB sort of ecosystem. And so we decided to make the jump to teach Python in the course instead of teaching MATLAB.
00:17:01.740 --> 00:17:19.920
That's really cool. Now, all those reasons make tons of sense to me. But I can just see, you know, the 59 year old, almost retired engineering professor going, you know, MATLAB's worked pretty well. And I've got six years left, and I'm not a programmer.
00:17:20.740 --> 00:17:21.100
Right.
00:17:21.100 --> 00:17:23.960
As a department, we're not doing this. How did that go?
00:17:23.960 --> 00:17:46.420
There's still like some open disagreement, I'd say about it. And there's some are some benefits to MATLAB, like the installation story is really clear. And there's only one IDE, like you use MATLAB, and that's it. And there's only one way to write the code, run the code, which is use MATLAB. Like those are good arguments. But I don't know, community colleges are about like innovation.
00:17:46.420 --> 00:18:15.260
And doing quick iteration on courses, like we can change the way that we teach courses so much faster than four year universities can. So I just felt like it was an opportunity for the community college to like, lead in this area instead of just follow what other courses were doing. And now maybe down the line, when the students go in, they'll be like, yeah, we can do all of this in Python. Like, can I do my third year, like numerical methods class in Python? Like, maybe it'll bleed over the other way.
00:18:15.260 --> 00:18:40.100
Yeah, I bet that it will actually, I bet that you'll have these experiences where people learn Python here. And then they're like, you really want me to use that other thing? Like, I know, we could do it so much better with x, y, and z package, right? Like, right, it's probably gonna, you know, plant some interesting seeds. But there's some other things to consider, I guess, like, what were some of the things you did to decide on Python?
00:18:40.100 --> 00:18:45.460
I mean, obviously, you're personally a fan of Python, you know, is pretty well, but there's some other academic examples, right?
00:18:45.460 --> 00:19:08.040
I wanted to make sure that it would not only be useful for students, but that like real engineers use Python. So like the Large Hadron Collider, like they use Python, or like the Allen Brain Science Institute, they use Python, or Instagram, or YouTube, Facebook, like they use Python. So like real engineers are using Python.
00:19:08.460 --> 00:19:17.360
And I actually just went and toured a company last week, that makes pacemakers here in Portland. And that company uses Python, too.
00:19:17.360 --> 00:19:18.280
Oh, how interesting.
00:19:18.280 --> 00:19:45.000
There are real engineers out there using Python, like every day. So I think it is quite applicable. Plus, not every single engineer is going to end up and every student student in engineering doesn't always end up being an engineer, you know, they might be a teacher, they might end up working in a medical office, I don't know. And having a general purpose language like Python, is a lot more useful than having, you know, MATLAB, like if you work in a medical office, what are you going to do with that? I don't know.
00:19:45.000 --> 00:20:11.620
Exactly. I do think it's interesting to consider like what you do outside of this discipline. If you have the skills to write something in Python, that in and of itself is a very marketable thing. You know what I mean? Like if you're like, man, I can crush it in LabVIEW. People are like, great, you know, Excel, right? Like, it's not going to really translate, right? Unless you're working in hardware or something like that, right? Like if it's, if you want to move out, I think it's really, really interesting.
00:20:14.100 --> 00:20:32.260
This portion of Talk Python To Me is brought to you by Linode. Are you looking for hosting that's fast, simple, and incredibly affordable? Well, look past that bookstore and check out Linode at talkpython.fm/Linode. That's L-I-N-O-D-E. Plans start at just $5 a month for a dedicated server with a gig of RAM.
00:20:32.260 --> 00:20:52.720
They have 10 data centers across the globe. So no matter where you are or where your users are, there's a data center for you. Whether you want to run a Python web app, host a private Git server, or just a file server, you'll get native SSDs on all the machines, a newly upgraded 200 gigabit network, 24-7 friendly support, even on holidays, and a seven-day money-back guarantee.
00:20:52.720 --> 00:21:05.100
Need a little help with your infrastructure? They even offer professional services to help you with architecture, migrations, and more. Do you want a dedicated server for free for the next four months? Just visit talkpython.fm/Linode.
00:21:06.540 --> 00:21:25.000
Yeah, and of course, Paul Romer and his collaborator won the Nobel Prize in economics using Jupyter notebooks and stuff, which is pretty trick. So that's awesome. And then also, this is partly why I opened the conversation this way. It's like, when you think of how much that costs, right? Maybe it doesn't cost an insane amount of money to run MATLAB.
00:21:25.000 --> 00:21:37.480
But when you look at trying to keep tuition as low as possible to make community colleges for the community, right? Things like that. So the price of not paying for MATLAB, it can't hurt, right?
00:21:37.480 --> 00:21:58.560
Yeah, and it can't hurt the colleges' bottom line either. They've got to pay for MATLAB. And then also then the textbooks for MATLAB, those are closed source too. So if you can move to Python, an open source free language, you can move to an open education resources textbook, like a free textbook. And then the college doesn't have to pay for the MATLAB license.
00:21:58.560 --> 00:22:14.000
Like we calculated, that's about $30,000 in one year of savings just by moving to Python if we do that in the first year course and then this engineering programming course. So it's like little bits, but like those little bits really do add up.
00:22:14.000 --> 00:22:24.240
They do. That's cool. I mean, maybe you could almost offer like another course that pay an instructor to offer a course that otherwise wouldn't be available rather than sending that over to MATLAB, right?
00:22:24.240 --> 00:22:29.120
Right. Or how many students could you give scholarships for that at a community college? That's a lot of students, right?
00:22:29.120 --> 00:22:34.260
That'd be actually excellent. Yeah, that's great. Maybe talk about some of the road bumps. Like what were some of the challenges?
00:22:34.260 --> 00:22:49.480
There were a lot of road bumps. So initially installation, that was a big road bump because we work at a big institution. So Portland Community College is actually the biggest college in Oregon. There are around 70,000 students, depending on how you count.
00:22:49.600 --> 00:23:00.060
So that's bigger than the U of O, University of Oregon, bigger than Oregon State. And so doing things like changing infrastructure, that's something that happens fairly slowly.
00:23:00.360 --> 00:23:08.920
And we wanted to make sure that we had Python installed when the quarter starts so that the students could use it. So that was one of the big roadblocks.
00:23:08.920 --> 00:23:10.380
Yeah, yeah, that's a huge challenge.
00:23:10.380 --> 00:23:17.980
When you're talking about those instructors, like you've been doing it for so many years and they only have a little bit to retire, like that is a huge barrier.
00:23:18.200 --> 00:23:24.880
Like telling the administration or like the IT people, you need to install this piece of software on every computer on campus.
00:23:24.880 --> 00:23:28.080
Like that can be a real non-starter at some places.
00:23:28.080 --> 00:23:29.380
Yeah, I can imagine.
00:23:29.380 --> 00:23:35.200
What kind of hardware and OSs do you use? Is it mostly Windows? Do you have like Mac machines? What do you got?
00:23:35.200 --> 00:23:37.760
We got all Windows machines and...
00:23:37.760 --> 00:23:38.780
Windows 10?
00:23:38.960 --> 00:23:52.980
Yeah, Windows 10 at the college. And the student machines, students, I've like done surveys and students overwhelmingly use Windows. There might be one student that uses a Mac or there might be zero students who use a Mac.
00:23:52.980 --> 00:23:53.700
How interesting.
00:23:53.700 --> 00:23:54.860
In the class, yeah.
00:23:54.860 --> 00:24:02.020
I mean, you look at the price of a Mac versus like a decent Windows laptop, though. It's like three to four times the price, right? So it makes sense.
00:24:02.020 --> 00:24:15.540
Right. And also some students use either Chromebooks because they're even cheaper or they use tablets. And so the installation story of Python on a Chromebook or Python on a tablet, that's not great right now either.
00:24:15.540 --> 00:24:23.620
Hey, I saw the Apple ad. It told me my iPad can replace my computer. I got this keyboard. Let's go. It's like, oh, you're an engineering student. What are you thinking, man?
00:24:23.620 --> 00:24:31.160
Right, right, right. I'll probably write a little blog post about it. I got Python going like on my Chromebook, but it's not super easy.
00:24:31.160 --> 00:24:36.720
And if you're like a student starting out learning programming, that's not going to be something that you can do.
00:24:36.720 --> 00:24:38.740
No, that's definitely a challenge. Yeah.
00:24:38.740 --> 00:24:53.100
Yeah. And then like the other challenge just was textbook. So in the course with MATLAB, we had a textbook from a regular big textbook manufacturer and it had end of review problems, you know, and it had example questions and stuff like that.
00:24:53.160 --> 00:24:54.640
Everything an instructor would want in a textbook.
00:24:54.640 --> 00:25:02.160
And there are awesome, like great Python books out there, but very few of them have homework questions at the end.
00:25:02.160 --> 00:25:04.820
That was like something big that we were missing.
00:25:04.820 --> 00:25:16.640
And also we wanted to make sure that if we were moving to this free programming language, that the textbook would also be free, that we wouldn't like offset the cost of the software by like having a $300 book.
00:25:16.840 --> 00:25:19.100
Yeah. Now Wiley's rich instead of MATLAB, whatever.
00:25:19.100 --> 00:25:20.240
Right, right. Exactly.
00:25:20.240 --> 00:25:25.660
I would say like installation and then figuring out like textbook and then course content.
00:25:25.660 --> 00:25:30.540
Those were kind of like the big roadblocks to adopting Python here at the community college.
00:25:30.540 --> 00:25:31.580
That makes a lot of sense.
00:25:31.580 --> 00:25:35.640
So we're going to talk about JupyterHub, which is a solution that you settled on.
00:25:35.700 --> 00:25:43.920
But just a few other things that come to mind as I think about this is there's coder.com, which is Visual Studio Code plus Docker container in your browser.
00:25:43.920 --> 00:25:46.560
So that would work on like a tablet or a Chromebook.
00:25:46.560 --> 00:25:49.660
There's Python Anywhere, which is pretty awesome.
00:25:49.660 --> 00:25:52.180
So there are a few solutions, right?
00:25:52.180 --> 00:25:58.080
But they're either brand new and didn't exist a year or two ago when you were doing this, or they're maybe not quite as comprehensive.
00:25:58.080 --> 00:26:02.120
Like I don't know if Python Anywhere does any like data science-y stuff.
00:26:02.120 --> 00:26:03.360
That's easy for you.
00:26:03.360 --> 00:26:05.020
I just have no awareness of that.
00:26:05.020 --> 00:26:09.440
So maybe let's talk about JupyterHub before we move off the student story.
00:26:09.440 --> 00:26:11.220
I want to ask one more question, right?
00:26:11.220 --> 00:26:17.860
So this is, I guess, programming for engineering, but it sounds like a lot of them have to take this course.
00:26:17.860 --> 00:26:24.940
I suspect there's a little bit more of a challenge to write Python and run Python than there is to write MATLAB.
00:26:24.940 --> 00:26:26.620
I'm not 100% sure.
00:26:26.620 --> 00:26:30.720
I've done enough MATLAB that I felt like you could just start typing in like the library.
00:26:30.720 --> 00:26:34.140
There's no import this or important things that you had to use.
00:26:34.520 --> 00:26:36.420
It's a little more formal to do Python.
00:26:36.420 --> 00:26:38.560
So how is that received by the students?
00:26:38.560 --> 00:26:40.620
We're like, yes, we get to learn a real programming language.
00:26:40.620 --> 00:26:42.260
Or was it like, oh, are you kidding me?
00:26:42.260 --> 00:26:43.140
Now this is even harder.
00:26:43.140 --> 00:26:49.620
I guess I'd say it was the wealth of options was maybe the difficult thing for students.
00:26:49.620 --> 00:26:52.900
Because like you were saying, you could run Python on Python Anywhere.
00:26:52.900 --> 00:26:54.380
There's also Replit.
00:26:54.380 --> 00:26:56.080
There's also Python Tutor.
00:26:56.080 --> 00:26:58.320
There's also like Google Colab.
00:26:58.320 --> 00:27:00.240
Like there are all these different ways.
00:27:00.240 --> 00:27:06.360
And one thing that intro students I think crave is just like, tell me how to do it.
00:27:06.360 --> 00:27:09.420
Like you pick the tool, just tell me how to do it.
00:27:09.420 --> 00:27:14.900
And so what we decided on was to use JupyterHub in my class.
00:27:14.900 --> 00:27:17.500
And so that sort of settled that.
00:27:17.500 --> 00:27:20.600
You don't have to like install Python.
00:27:20.600 --> 00:27:24.480
And you don't have to like go to any of these other sites and use their interface.
00:27:24.480 --> 00:27:27.280
Like we're just going to be using JupyterHub.
00:27:27.400 --> 00:27:28.500
That's what we decided on.
00:27:28.500 --> 00:27:28.740
Okay.
00:27:28.740 --> 00:27:29.920
Yeah, that makes a lot of sense.
00:27:29.920 --> 00:27:33.100
It's basically Jupyter Notebooks hosted.
00:27:33.100 --> 00:27:36.500
It's a server for hosting Jupyter Notebooks on a central server.
00:27:36.500 --> 00:27:40.400
So did you get like a super nice Linux machine?
00:27:40.400 --> 00:27:43.580
Lots of cores so they can go do math on it?
00:27:43.580 --> 00:27:45.100
Well, sort of.
00:27:45.100 --> 00:27:46.020
Did it actually not need it?
00:27:46.020 --> 00:27:48.740
Actually, my laptop is plugged in here.
00:27:48.740 --> 00:27:50.080
Right, right.
00:27:50.080 --> 00:27:52.820
So let's like back up just a little bit.
00:27:52.820 --> 00:27:56.140
So to make sure that everybody knows what a Jupyter Notebook is.
00:27:56.140 --> 00:27:59.960
So Jupyter Notebook is a way to write and run Python code.
00:27:59.960 --> 00:28:03.300
And it also contains things that are called markdown cells.
00:28:03.300 --> 00:28:04.940
So you can also write text in them.
00:28:04.940 --> 00:28:10.180
So they're this great way for writing, running Python code, and then explaining what the code does,
00:28:10.180 --> 00:28:15.300
which is super useful when you're teaching an engineering class to have both of those things available.
00:28:15.300 --> 00:28:18.320
Explain what the code does and then write the code.
00:28:18.760 --> 00:28:21.940
And these Jupyter Notebooks, they just run in web browsers.
00:28:21.940 --> 00:28:28.860
So I was thinking when we were doing the course, like, well, if it can just run in a web browser,
00:28:28.860 --> 00:28:32.920
then maybe a student can like just open up a web browser and run it.
00:28:32.920 --> 00:28:35.240
Like they won't need to install Python in their computer.
00:28:35.240 --> 00:28:38.960
And so I was like Googling around and I found like Jupyter Hub.
00:28:38.960 --> 00:28:39.840
Like it exists.
00:28:39.840 --> 00:28:41.620
Like Project Jupyter created this.
00:28:41.620 --> 00:28:42.840
And I was like, awesome.
00:28:42.840 --> 00:28:44.320
This is exactly what I want.
00:28:44.320 --> 00:28:45.200
Yeah, that's cool.
00:28:45.200 --> 00:28:45.880
That's great.
00:28:46.600 --> 00:28:50.540
So I installed it on a virtual machine on DigitalOcean.
00:28:50.540 --> 00:28:57.320
And what I found was the very first quarter that I did this, it was in a hybrid class.
00:28:57.320 --> 00:29:01.000
And that means some of the class is in person, some of the class is online.
00:29:01.000 --> 00:29:07.960
And when they did the computing labs that were online, the students would log in at different times.
00:29:07.960 --> 00:29:10.900
Not everybody tries to log in at exactly the same time.
00:29:11.220 --> 00:29:12.740
When it's just totally online.
00:29:12.740 --> 00:29:19.980
And just a real small virtual machine, like a $10 a month virtual machine worked just fine for that.
00:29:19.980 --> 00:29:29.160
And the first day that we went into the class that was all in person and everybody tried to log in at exactly the same time,
00:29:29.160 --> 00:29:33.140
that kind of crawled the server like a little bit and it took a little while.
00:29:33.600 --> 00:29:48.340
So sort of what I'm realizing now is I either have to like up the size of the server that I've got or the JupyterHub documentation talks about using Kubernetes and deploying Docker containers instead of running it all on one individual server.
00:29:48.340 --> 00:29:50.920
But totally thanks to Talk Python.
00:29:50.920 --> 00:29:53.000
Like I used one of the credits from DigitalOcean.
00:29:53.000 --> 00:29:54.720
That's how I ran that first course.
00:29:54.720 --> 00:29:55.940
Wow, that's awesome.
00:29:55.940 --> 00:29:56.680
Yeah, how cool.
00:29:57.160 --> 00:30:02.800
So I was actually able to like get a bigger server than the one that I currently have now because of that credit.
00:30:02.800 --> 00:30:09.640
Yeah, you know, it's just amazing what you can do with computational resources and virtual machines these days.
00:30:09.640 --> 00:30:17.740
When I was in, when I was getting my math degree at four-year college, the last year we got this computing, like shared computing server.
00:30:17.740 --> 00:30:22.680
It was like a used computer they had bought secondhand from some other place, right?
00:30:22.680 --> 00:30:26.220
It was a Silicon Graphics, big mainframe type of thing.
00:30:26.220 --> 00:30:29.700
And they paid a quarter million dollars for this used computer.
00:30:30.420 --> 00:30:34.000
And, you know, like seven or eight people could log into it and do stuff.
00:30:34.000 --> 00:30:36.260
And it was kind of okay.
00:30:36.260 --> 00:30:39.740
And then here you are running like all that on, you know, 10 bucks.
00:30:39.740 --> 00:30:41.200
It's really impressive.
00:30:41.200 --> 00:30:41.880
All right.
00:30:41.880 --> 00:30:42.440
Yeah, yeah.
00:30:42.440 --> 00:30:43.540
It's so cool.
00:30:43.540 --> 00:30:48.140
So, you know, I think there's a lot of advantages to having these notebooks.
00:30:48.140 --> 00:30:50.900
I mean, certainly you have JupyterHub and run them there.
00:30:50.900 --> 00:30:57.180
Like they also, if you put them into GitHub, GitHub like will execute them and actually render them live.
00:30:57.180 --> 00:30:59.320
And there's NB Viewer and there's Binder.
00:30:59.320 --> 00:31:00.840
There's all sorts of stuff, right?
00:31:00.840 --> 00:31:01.340
Yeah.
00:31:01.340 --> 00:31:04.580
And Google Colab will now run them too.
00:31:04.580 --> 00:31:14.220
So there are just a lot, a lot of ways that even without starting a virtual machine that you can either view or interact with Jupyter Notebooks.
00:31:14.220 --> 00:31:15.980
It's a pretty amazing technology.
00:31:15.980 --> 00:31:22.920
And then one of the other things about it is Jupyter stands for Julia, Python, and R.
00:31:22.920 --> 00:31:26.740
So you don't even have to run just Python in Jupyter Notebooks.
00:31:26.740 --> 00:31:34.600
Like you could also run the R programming language or you could run Julia or there are a bunch of different backends that you can plug into it too.
00:31:34.600 --> 00:31:37.720
And then there are like these extensions too.
00:31:37.900 --> 00:31:49.100
So I found this really neat extension that you could plug in and it allowed you to do draw.io flowcharts like right in the JupyterLab interface.
00:31:49.100 --> 00:31:58.320
So students can like draw the flowcharts that describe, you know, their loops or their if statements right there in the JupyterHub interface, which is pretty cool too.
00:31:58.500 --> 00:31:59.040
That's really awesome.
00:31:59.040 --> 00:32:06.800
It sounds like this solves, like that virtual machine you went and created, it sounds like that solves it for your instance of the class.
00:32:06.800 --> 00:32:16.800
But I can see as a college, as a department going, okay, well, we can't always just, you know, call Peter the week before and have him use some credits to get a VM running mic.
00:32:16.800 --> 00:32:18.960
What's the long-term plan there?
00:32:20.240 --> 00:32:28.180
Well, so one of the reasons that I set up JupyterHub was I was worried that the college wouldn't install the software before the quarter started.
00:32:28.180 --> 00:32:35.600
And it also gave the students like a way to log on and like run Python before the class even started.
00:32:35.600 --> 00:32:41.860
And I think for some students, that's really nice to like just get their feet wet and be like, oh, this is what we're doing.
00:32:41.860 --> 00:32:44.000
And like, oh, this isn't too hard.
00:32:44.000 --> 00:32:47.960
And they can't come in and use the lab computers during like winter break or whatever.
00:32:48.580 --> 00:32:54.400
So it did turn out that the Anaconda distribution of Python did get installed on the college computers.
00:32:54.400 --> 00:33:04.900
So now at the college, I have the students open Jupyter Notebooks using either the Anaconda prompt or just using the Windows Start menu and opening a Jupyter Notebook that way.
00:33:04.900 --> 00:33:11.380
And at least for us in engineering, like the Anaconda distribution is super helpful.
00:33:11.380 --> 00:33:13.100
It has Matplotlib.
00:33:13.100 --> 00:33:14.420
It has NumPy.
00:33:14.420 --> 00:33:15.860
It has Pandas.
00:33:15.860 --> 00:33:17.360
It's got PyCereal.
00:33:17.800 --> 00:33:22.020
Like all the packages that you would want to install, all of those are already included.
00:33:22.020 --> 00:33:26.880
And doing like pip install installations and virtual environments.
00:33:26.880 --> 00:33:30.660
Like if you've been doing it for a while, that sort of seems like, oh, yeah, that's just easy.
00:33:30.660 --> 00:33:32.580
You just create a new virtual environment.
00:33:32.580 --> 00:33:35.920
For a student, it's really kind of complicated and opaque.
00:33:35.920 --> 00:33:37.100
Like, what is this?
00:33:37.100 --> 00:33:37.520
Yeah.
00:33:37.520 --> 00:33:39.660
Like, I just want to open a file and make it run.
00:33:39.660 --> 00:33:40.680
Like, why am I doing this?
00:33:40.680 --> 00:33:40.860
Right.
00:33:40.860 --> 00:33:41.200
Right.
00:33:41.540 --> 00:33:45.300
And so using Anaconda, then the students don't have to install anything.
00:33:45.300 --> 00:33:48.040
Like, you import NumPy and MP and it just works.
00:33:48.040 --> 00:33:51.780
So are they generally using their local computers these days?
00:33:51.780 --> 00:33:55.300
Generally, they're using in the classroom their local computers.
00:33:55.300 --> 00:34:00.200
But I actually just like logged on to the JupyterHub server about half an hour ago.
00:34:00.320 --> 00:34:03.720
And there were like a couple of students that had logged on.
00:34:03.720 --> 00:34:05.640
So students are still using it.
00:34:05.640 --> 00:34:06.840
Yeah, that's pretty awesome.
00:34:06.840 --> 00:34:12.020
So earlier you spoke about this challenge of the textbooks.
00:34:12.020 --> 00:34:18.020
And, you know, like I said, I remember the textbooks just being like a huge expense that I didn't see coming.
00:34:18.020 --> 00:34:19.120
Like I saw tuition coming.
00:34:19.260 --> 00:34:23.660
I didn't see $500 a semester in books also.
00:34:23.660 --> 00:34:26.260
Like, geez, where am I going to get that money from as a kid, you know?
00:34:26.260 --> 00:34:26.840
Right, right.
00:34:26.840 --> 00:34:33.780
And there are, like you said, a bunch of great Python books that people can just sort of colloquially learn Python.
00:34:33.780 --> 00:34:35.840
Like you read, it's interesting, right?
00:34:35.840 --> 00:34:39.920
But not in the formal school sense, right?
00:34:39.920 --> 00:34:41.860
Like chapter three is going to have this test.
00:34:41.860 --> 00:34:43.820
And here's some example exercises like it.
00:34:43.820 --> 00:34:46.540
So you're working on a book for this, right?
00:34:46.540 --> 00:34:52.740
Along with making JupyterHub go so the students could see how to run Python before the quarter started.
00:34:52.740 --> 00:34:59.820
I also wrote this open source book so that the students could read the book before the quarter started too.
00:34:59.820 --> 00:35:01.740
And I was kind of inspired.
00:35:01.740 --> 00:35:05.260
Like Jake Vander Plaas, he wrote the Python Data Science Handbook.
00:35:05.260 --> 00:35:07.040
And that was written in Jupyter Notebooks.
00:35:07.040 --> 00:35:10.600
And there are a couple of other books that were written in Jupyter Notebooks.
00:35:10.800 --> 00:35:16.540
And I was like, I don't want to both like write the code and then I have to like test all the code.
00:35:16.540 --> 00:35:20.520
And then like 3.7 is going to come out and then I have to retest all the code.
00:35:20.520 --> 00:35:23.780
Like why not just write the whole thing in a Jupyter Notebook?
00:35:23.780 --> 00:35:29.420
And then like the code that produces the plot, that's the plot that's like right there in the book.
00:35:29.860 --> 00:35:38.620
So I wrote the book in Jupyter Notebooks and then students could view it in NB Viewer or go on to Binder and run them themselves.
00:35:38.720 --> 00:35:50.280
And then I also used a package called mkdocs to build a web version of the book so that the students can just go to a website and see what their homework is and read through the material.
00:35:50.280 --> 00:35:51.360
Yeah, this is really nice.
00:35:51.360 --> 00:35:53.760
So problem solving with python.com, right?
00:35:53.760 --> 00:35:56.420
Yeah, that's the textbook website.
00:35:56.420 --> 00:35:58.360
And it just got published on Amazon.
00:35:58.360 --> 00:36:01.860
So if you want a hard copy, that'll cost a little bit of money.
00:36:01.860 --> 00:36:06.800
But all the students can use the web version or look at all the notebooks for free.
00:36:06.800 --> 00:36:13.360
And some other authors have sort of adopted that same kind of idea that if you get the hard copy, you have to pay a little bit of money.
00:36:13.360 --> 00:36:17.080
But if you're going to use the PDF or like use the web version, that's free.
00:36:17.080 --> 00:36:19.360
And that's what I did it for my book too.
00:36:19.360 --> 00:36:19.860
Oh, yeah.
00:36:19.860 --> 00:36:21.020
It looks really interesting.
00:36:21.020 --> 00:36:23.000
I like the exercises seem cool.
00:36:23.000 --> 00:36:24.160
The review questions seem cool.
00:36:24.160 --> 00:36:32.080
You have a Kindle version, which is maybe some weird intermediate thing where, you know, I really love the Kindle because you can take notes and highlights, right?
00:36:32.080 --> 00:36:36.420
Like the web pages are great, but it's super hard to use it as reference, you know?
00:36:36.600 --> 00:36:40.540
Yeah, and it's sometimes nice to be able to read the Kindle in bed or you're like on the bus.
00:36:40.540 --> 00:36:43.460
You know, it's nice to be able to have that version too.
00:36:43.460 --> 00:36:50.440
But part of writing the book, big challenge was how do you output to all of these different formats?
00:36:50.440 --> 00:36:52.700
Like you have to create a website version.
00:36:52.700 --> 00:36:55.320
You have to create the print version.
00:36:55.320 --> 00:36:56.740
You have to create a PDF.
00:36:57.100 --> 00:36:58.820
You have to create the Kindle version.
00:36:58.820 --> 00:37:02.740
And I don't want to write four different books all at the same time.
00:37:02.960 --> 00:37:12.680
So Project Jupyter, they've got this nbconvert package and that'll allow you to export Jupyter notebooks to various other file formats.
00:37:12.680 --> 00:37:23.580
And lucky if you know Python, then that can help you with some of this stuff to be able to get the web version up and get a separate PDF made and get the separate Kindle version made.
00:37:23.740 --> 00:37:28.760
So I'm just really, really thankful for all the people at Project Jupyter and all the hard work that they did.
00:37:28.760 --> 00:37:29.280
That's awesome.
00:37:29.280 --> 00:37:32.840
So the source of the book is a series of Jupyter notebooks?
00:37:32.840 --> 00:37:33.400
Yep.
00:37:33.400 --> 00:37:33.920
What are more?
00:37:33.920 --> 00:37:34.400
Many.
00:37:34.400 --> 00:37:35.280
Okay.
00:37:35.280 --> 00:37:35.540
Yeah, yeah.
00:37:35.540 --> 00:37:35.840
Many.
00:37:35.900 --> 00:37:41.840
So there's sort of like one big directory and in there is a couple subdirectories for each chapter.
00:37:41.840 --> 00:37:45.620
And in each chapter, there are between, I don't know, six or ten books.
00:37:45.620 --> 00:37:48.060
So there's a notebook for each section of the book.
00:37:48.060 --> 00:37:51.280
And then those all get put together to build a website.
00:37:51.280 --> 00:37:59.280
Another real benefit that I didn't realize until students started using it was that you can make edits on the fly really, really quickly.
00:37:59.500 --> 00:38:06.060
Like I can just, you know, pull the GitHub repo down and start editing one of the notebooks and then save it and push it back up.
00:38:06.060 --> 00:38:08.560
And then the students like version is changed.
00:38:08.560 --> 00:38:16.100
So having like a class of students is a great way to see where all like your little typos, grammatical mistakes, what's confusing.
00:38:16.100 --> 00:38:19.060
Like it's probably like the awesomest editing system.
00:38:19.060 --> 00:38:25.160
I don't really mean to use the students as editors, but they've just been great, like sending me suggestions to improve the book.
00:38:25.160 --> 00:38:30.460
Well, the normal iterative cycle on textbooks is years, right?
00:38:30.460 --> 00:38:30.720
Right.
00:38:30.720 --> 00:38:32.840
It's not near live.
00:38:32.840 --> 00:38:35.020
So that's a pretty cool aspect.
00:38:35.020 --> 00:38:43.860
This portion of Talk Python To Me is brought to you by StellarS, the AI-powered talent agent for top tech talent.
00:38:43.860 --> 00:38:46.860
Hate your job or feeling just kind of meh about it?
00:38:46.860 --> 00:38:51.360
StellarS will help you find a new job you'll actually be excited to go to.
00:38:52.000 --> 00:38:55.740
StellarS knows that a job is much more than just how it sounds in a job description.
00:38:55.740 --> 00:38:59.980
So they built their AI-powered talent agent to help you find the ideal job.
00:38:59.980 --> 00:39:09.660
StellarS does all the work and screening for you, scouting out the best companies and roles and introducing you to opportunities outside your network that you wouldn't have otherwise found.
00:39:10.220 --> 00:39:22.460
Combining deep AI matching with human support, StellarS pairs things down to a maximum of five opportunities that tightly match your goals, like compensation, work-life balance, working on products you're passionate about, and team chemistry.
00:39:22.460 --> 00:39:29.420
They then facilitate warm intros, and there's never any pressure, just opportunities to explore what's out there.
00:39:29.420 --> 00:39:35.180
To get started and find a job that's just right for you, visit talkpython.fm/StellarS.
00:39:35.180 --> 00:39:40.320
That's talkpython.fm/S-T-E-L-L-A-R-E-S.
00:39:40.320 --> 00:39:43.140
Or just click the link in your show notes in your podcast player.
00:39:45.880 --> 00:39:52.380
Do you encourage them to use GitHub issues and PRs and things like that, or do you just say, hey, send me a note that there's something wrong here?
00:39:52.380 --> 00:39:55.740
Yeah, so far with the students, I've just said, hey, send me a note.
00:39:55.740 --> 00:40:02.980
And if anyone wants to send me a PR, and absolutely, if anybody wants to use the book in their class, please do so.
00:40:02.980 --> 00:40:09.440
So far in the course, we haven't gotten into Git and version control and how to do those sorts of things.
00:40:09.440 --> 00:40:11.620
So I thought it was a little bit much to ask.
00:40:12.160 --> 00:40:14.700
And students, it's easy for them to send me an email.
00:40:14.700 --> 00:40:16.160
So so far, that's how it is.
00:40:16.160 --> 00:40:23.680
But if anybody else reads the book and wants to make changes to it or wants to use one chapter but not use the other chapters,
00:40:23.680 --> 00:40:28.260
they can definitely just go to the GitHub repo and pull it down and use what they need.
00:40:28.260 --> 00:40:28.700
Interesting.
00:40:28.700 --> 00:40:31.000
Maybe add an appendix for something or other.
00:40:31.000 --> 00:40:31.400
Yeah.
00:40:31.400 --> 00:40:33.800
And I took this idea from Allen Downey.
00:40:33.800 --> 00:40:36.840
He's wrote a couple Python books, like the Think Python book.
00:40:36.840 --> 00:40:39.980
At the end of his book, he had this list of contributors.
00:40:40.280 --> 00:40:44.100
So every time I think somebody sent him something, then he put it in a list.
00:40:44.100 --> 00:40:49.160
So I'll start listing anybody at the back of the book and the contributors if anybody sends me any edits.
00:40:49.160 --> 00:40:49.480
Yeah.
00:40:49.480 --> 00:40:49.720
OK.
00:40:49.720 --> 00:40:51.080
Well, that's a great idea.
00:40:51.080 --> 00:40:51.840
Yeah.
00:40:51.840 --> 00:40:52.860
So people should check that out.
00:40:52.860 --> 00:40:54.880
It seems like a really nice resource.
00:40:54.880 --> 00:41:02.240
Even you think it's good for students who just want to learn Python and have they're not in like your ENG 101 course?
00:41:02.240 --> 00:41:13.960
So if you're not an engineering major and you're not going to go on to a four-year engineering degree, I think it's still a really good intro resource because it's designed for students who don't have any experience in programming.
00:41:14.680 --> 00:41:23.420
And also, if you're into data science and you want to get into data science, the tools that engineers use are a lot like the tools that data scientists use.
00:41:23.560 --> 00:41:26.640
So in the book, there's a whole chapter on NumPy.
00:41:26.640 --> 00:41:29.740
There's a chapter on Matplotlib and building plots.
00:41:29.740 --> 00:41:32.020
Pandas and data frames are used.
00:41:32.020 --> 00:41:36.460
And then some other packages like PySerial for communicating with hardware.
00:41:36.460 --> 00:41:41.680
Also, SymPy for doing kind of symbolic math, for doing math with Python.
00:41:41.680 --> 00:41:43.340
That's also in the book.
00:41:43.340 --> 00:41:48.100
So if you're into data science, it could also be like a good resource for you, I think.
00:41:48.100 --> 00:41:49.180
Yeah, I think it would be.
00:41:49.180 --> 00:41:54.960
When you first told me about it, I was thinking it's mostly an engineering book that has some Python in it.
00:41:54.960 --> 00:42:01.180
But it's mostly a programming book where the examples and the intended audience are engineers, right?
00:42:01.180 --> 00:42:01.880
Yeah, exactly.
00:42:01.880 --> 00:42:03.860
Yeah, that seems to me like that would be really useful.
00:42:03.860 --> 00:42:10.880
When I was in engineering, I did like one year in chemical engineering before I decided I didn't want to be in chemical engineering.
00:42:11.160 --> 00:42:15.160
And they told me during this period, I said, I would love to take a programming course.
00:42:15.160 --> 00:42:16.880
Can I take like a C++ course?
00:42:16.880 --> 00:42:19.040
They said, look, that can be an elective.
00:42:19.040 --> 00:42:22.040
But you first have to take Fortran.
00:42:22.040 --> 00:42:25.360
That's going to be the most important computer course you ever take in your life.
00:42:25.360 --> 00:42:26.320
And you've got to study that.
00:42:26.320 --> 00:42:29.060
And then you're allowed to do an elective C++ course, right?
00:42:29.060 --> 00:42:30.940
It's like mid-90s or something.
00:42:30.940 --> 00:42:38.380
And I just, I would love to have a book like this that covered a modern language that wasn't already old in 1995.
00:42:40.080 --> 00:42:48.580
Yeah, and hopefully, hopefully, whatever the students learn in my course right now, and then in another 20 years, hopefully that will still be useful.
00:42:48.580 --> 00:42:51.300
We'll be at Python, what, version 10 by that point or something, right?
00:42:51.300 --> 00:42:52.060
Yeah, exactly.
00:42:52.060 --> 00:42:54.080
I've heard talk of Python 4.
00:42:54.080 --> 00:42:55.440
I have no idea what that's going to mean.
00:42:55.440 --> 00:42:59.340
We're working on the versions as a community, I believe.
00:42:59.340 --> 00:43:02.780
Oh, I guess it's worth asking, right?
00:43:02.780 --> 00:43:03.800
This is Python 3?
00:43:03.800 --> 00:43:05.760
This is Python 3.6.
00:43:05.760 --> 00:43:08.240
And I call the book the 3.6 edition.
00:43:08.240 --> 00:43:12.300
And I'm working on, for the spring, the 3.7 edition.
00:43:12.300 --> 00:43:17.900
And then I'll change my virtual environment that I run all the notebooks in, make sure it all runs with 3.7.
00:43:18.520 --> 00:43:23.860
The new f-strings, I think that that is a killer feature in Python.
00:43:23.860 --> 00:43:25.920
And so the book does use f-strings.
00:43:25.920 --> 00:43:31.900
It just makes inserting numbers and other strings into strings so, so much easier.
00:43:31.900 --> 00:43:33.720
So it's definitely Python 3 only.
00:43:33.720 --> 00:43:34.100
Perfect.
00:43:34.100 --> 00:43:35.520
It's time, right?
00:43:35.520 --> 00:43:36.600
Yeah, it's time.
00:43:36.920 --> 00:43:38.980
It's been time for a while, but it's really time now.
00:43:38.980 --> 00:43:41.640
I see you have a chapter on MicroPython.
00:43:41.640 --> 00:43:42.260
Yeah.
00:43:42.260 --> 00:43:43.720
And also external hardware.
00:43:43.720 --> 00:43:44.340
That's pretty cool.
00:43:44.340 --> 00:43:45.600
What do you guys do with that?
00:43:45.600 --> 00:43:51.180
With external hardware, we connect the computers to little Arduinos, little microcontrollers.
00:43:51.180 --> 00:43:56.700
Students can control LEDs or they can read temperature sensors, things like that.
00:43:56.700 --> 00:44:00.980
And we used to use MATLAB to do that, and it was pretty cumbersome.
00:44:00.980 --> 00:44:05.760
But the PySerial package allows you to communicate with external hardware.
00:44:06.340 --> 00:44:12.020
So Python talks to these little Arduinos, these little microcontroller boards through the
00:44:12.020 --> 00:44:14.800
serial interface using PySerial.
00:44:14.800 --> 00:44:20.720
And the students each quarter do these projects with these little microcontrollers.
00:44:20.720 --> 00:44:27.660
So, for example, one student group made a project that opened a set of doors that allowed this
00:44:27.660 --> 00:44:29.120
car to run down a track.
00:44:29.120 --> 00:44:34.140
Or another student group had a set of photo gates, and they measured how fast the car ran.
00:44:34.540 --> 00:44:42.960
Or another student group put a light sensor on this aquaponics fish tank grow system and measured
00:44:42.960 --> 00:44:44.980
the amount of light that the plants were getting.
00:44:44.980 --> 00:44:50.320
And it sort of ended up being that the students would have to learn two different programming
00:44:50.320 --> 00:44:50.820
languages.
00:44:50.820 --> 00:44:56.000
They'd have to use MATLAB, and then they'd have to learn the Arduino programming language,
00:44:56.000 --> 00:44:59.000
which was just sort of like C to do their projects.
00:44:59.200 --> 00:45:01.920
But Python has MicroPython.
00:45:01.920 --> 00:45:04.180
So you don't have to learn Arduino.
00:45:04.180 --> 00:45:07.620
You can run Python on the little microcontrollers.
00:45:07.620 --> 00:45:08.320
It's awesome.
00:45:08.320 --> 00:45:09.340
It's so amazing.
00:45:09.340 --> 00:45:09.800
Yeah.
00:45:09.960 --> 00:45:15.060
This quarter, the students will use those little microcontrollers and run MicroPython on them.
00:45:15.060 --> 00:45:18.880
And then they can use most of the regular Python commands that they learned throughout the rest
00:45:18.880 --> 00:45:19.380
of the course.
00:45:19.380 --> 00:45:20.260
Yeah, that's really interesting.
00:45:20.260 --> 00:45:22.460
Because going from MATLAB to C, that's a big step.
00:45:22.460 --> 00:45:22.820
Definitely.
00:45:22.820 --> 00:45:28.580
But hopefully going from like Python to MicroPython, like that won't be as huge of a jump.
00:45:28.580 --> 00:45:33.140
And I'm also looking forward just to see the things that the students are going to be able
00:45:33.140 --> 00:45:34.060
to do with them.
00:45:34.060 --> 00:45:37.240
Like they always come up with these awesome, awesome projects.
00:45:37.240 --> 00:45:41.540
One student group had a coffee cup and the temperature thermometer.
00:45:41.540 --> 00:45:45.840
And their idea was they were going to have it like send you a text message when your coffee
00:45:45.840 --> 00:45:46.460
got cold.
00:45:46.460 --> 00:45:49.200
Like I'm just super excited to see what they turn out to be this quarter.
00:45:49.200 --> 00:45:50.000
That's cool.
00:45:50.000 --> 00:45:52.940
You've got five minutes to finish your coffee before you won't like it anymore.
00:45:52.940 --> 00:45:53.340
Go.
00:45:53.340 --> 00:45:54.540
Yeah.
00:45:54.540 --> 00:45:55.220
Oh, how cool.
00:45:55.220 --> 00:46:02.520
I can certainly see this IoT device programming aspect of being an engineer really being useful,
00:46:02.520 --> 00:46:02.780
right?
00:46:02.880 --> 00:46:05.460
Like engineers build things, they have sensors, right?
00:46:05.460 --> 00:46:08.760
Understanding like the control mechanisms seems great.
00:46:08.760 --> 00:46:10.900
Engineers solve problems in teams.
00:46:10.900 --> 00:46:12.500
That's what I always tell my students.
00:46:12.500 --> 00:46:19.020
And so like they use computers to solve problems, not just to design computer stuff.
00:46:19.020 --> 00:46:22.580
So we try in the course to like make them solve a real problem.
00:46:22.580 --> 00:46:27.640
And MicroPython and like those little teeny microcontrollers, like you can solve real problems
00:46:27.640 --> 00:46:28.540
with programming.
00:46:28.540 --> 00:46:29.200
It's really neat.
00:46:29.200 --> 00:46:29.560
Yeah.
00:46:29.560 --> 00:46:32.620
A real in the physical world with atoms, not bits, right?
00:46:32.620 --> 00:46:33.740
Yeah, exactly.
00:46:33.740 --> 00:46:34.260
Exactly.
00:46:34.260 --> 00:46:34.820
Yeah.
00:46:34.820 --> 00:46:35.100
Cool.
00:46:35.100 --> 00:46:40.040
I guess one other follow-up thing I'd like to ask you about this whole JupyterHub and
00:46:40.040 --> 00:46:47.920
Jupyter Notebooks is what tools or advice do you have for people who may want to use JupyterHub as
00:46:47.920 --> 00:46:51.840
their like homework, student work area, right?
00:46:51.920 --> 00:46:56.240
Do you use things like NB Grader or do you use like is there, what advice do you have for
00:46:56.240 --> 00:46:56.680
people I guess?
00:46:56.680 --> 00:47:01.800
Well, so if an instructor wants to do this, I guess one of the big pieces of advice is you
00:47:01.800 --> 00:47:04.620
have to think about authentication early.
00:47:04.620 --> 00:47:07.300
Like how are the students going to log on?
00:47:07.300 --> 00:47:12.340
Because you could have them all get GitHub usernames and passwords and do it that way.
00:47:12.340 --> 00:47:15.920
Our college uses Google apps like Gmail and stuff.
00:47:15.920 --> 00:47:21.820
So you could use like your Google logins or you could create individual usernames and passwords
00:47:21.820 --> 00:47:24.720
that you like mail out to individual people.
00:47:24.720 --> 00:47:30.220
So like thinking about authentication, I think is like one of the things early on that you should
00:47:30.220 --> 00:47:30.820
think about.
00:47:30.820 --> 00:47:36.200
And then another one is just data persistence or like state persistence.
00:47:36.200 --> 00:47:42.800
So when the JupyterHub starts, it creates these new servers and there are different ways to
00:47:42.800 --> 00:47:43.260
run it.
00:47:43.260 --> 00:47:49.480
If you run it in a Docker container, it's possible that all of your work, once you close down your
00:47:49.480 --> 00:47:52.400
server, like you close your web browser, all that goes away.
00:47:52.400 --> 00:47:55.920
So that's the way that Binder works is that you can run these notebooks.
00:47:55.920 --> 00:48:00.620
But if you save like homework number one and you close it, like and you come back later,
00:48:00.620 --> 00:48:01.220
it's gone.
00:48:01.220 --> 00:48:02.220
That'd be a little frustrating.
00:48:02.220 --> 00:48:03.720
Yeah, that would be totally frustrating.
00:48:03.720 --> 00:48:06.140
So you can't quite do like a whole course in that.
00:48:06.140 --> 00:48:11.740
So you have to think about how are you going to allow data to persist on the server if users
00:48:11.740 --> 00:48:13.020
are creating it.
00:48:13.020 --> 00:48:17.840
Another little concern of mine was all of the labs and the assignments are on GitHub.
00:48:17.840 --> 00:48:24.200
So how can I pull all of the labs and the assignments into the student's environment so
00:48:24.200 --> 00:48:27.000
they don't have to go to GitHub and look at them.
00:48:27.000 --> 00:48:30.420
They're like right there in their Jupyter notebook when they're going to the
00:48:30.420 --> 00:48:31.820
they log into JupyterHub.
00:48:31.820 --> 00:48:37.640
And there's this neat little extension called nb-git-puller, I think.
00:48:37.640 --> 00:48:43.860
And this nb-git-puller extension, you click a link and then it automatically like pulls down
00:48:43.860 --> 00:48:50.280
a repo from GitHub and sticks it into one of the JupyterLab or JupyterHub instances.
00:48:50.700 --> 00:48:53.380
So that was like a really neat package to find.
00:48:53.380 --> 00:48:53.860
Oh, yeah.
00:48:53.860 --> 00:48:55.260
That is pretty cool.
00:48:55.260 --> 00:48:58.740
A one-way git repository access.
00:48:58.740 --> 00:48:59.320
That's nice.
00:48:59.320 --> 00:49:04.840
Also, how did you deal with like, did you set it up so students each had their own private
00:49:04.840 --> 00:49:07.080
set of things but you could see them?
00:49:07.080 --> 00:49:12.160
Because obviously if one student can see another is like that takes like copy and homework to
00:49:12.160 --> 00:49:12.980
another level, right?
00:49:13.420 --> 00:49:14.280
Yeah, totally.
00:49:14.280 --> 00:49:17.480
There are different ways to set up JupyterHub.
00:49:17.480 --> 00:49:23.620
But the way that this one is set up is that when a student logs in, they basically get a new user
00:49:23.620 --> 00:49:26.700
on a virtual private server on the Linux server.
00:49:26.820 --> 00:49:33.260
And so their user on that Linux server doesn't have access to really anything outside their
00:49:33.260 --> 00:49:34.100
own home folder.
00:49:34.100 --> 00:49:37.460
So each one of the students has a different Linux user.
00:49:37.460 --> 00:49:38.880
They have a different home folder.
00:49:38.880 --> 00:49:46.600
And so they can't really see anything outside of just their local like user profile.
00:49:46.600 --> 00:49:47.180
Yeah, OK.
00:49:47.180 --> 00:49:53.780
And if a student like is super, super clever, like actually JupyterLab has command line available
00:49:53.780 --> 00:49:58.900
and they're like able to like hack into the server, send me an email and we'll talk about
00:49:58.900 --> 00:50:03.380
it because you're like way, way above like where a lot of students are if you're able to do that.
00:50:03.380 --> 00:50:05.600
And maybe it's OK if you're copying somebody's homework.
00:50:05.600 --> 00:50:05.900
Yeah.
00:50:05.900 --> 00:50:07.720
If you figure out how to hack the server.
00:50:07.720 --> 00:50:09.200
Yeah, interesting.
00:50:09.200 --> 00:50:09.700
All right.
00:50:09.700 --> 00:50:09.860
Yeah.
00:50:09.860 --> 00:50:13.740
But it sounds like you could use Linux permissions and roles and whatnot to make it work.
00:50:13.740 --> 00:50:14.200
Yeah, yeah.
00:50:14.200 --> 00:50:15.460
That's one way to do it.
00:50:15.460 --> 00:50:19.600
Then doing the Docker containers and Kubernetes, that's like another way to do it.
00:50:19.600 --> 00:50:20.240
That's pretty cool.
00:50:20.240 --> 00:50:21.780
It sounds like a fun project.
00:50:21.780 --> 00:50:23.020
Yeah, it's super awesome.
00:50:23.360 --> 00:50:29.480
And I built a set of documentation because as I was building the JupyterHub server, I wanted
00:50:29.480 --> 00:50:32.240
to make sure like I can do this again the next quarter.
00:50:32.240 --> 00:50:38.940
So I have a little website built with MkDocs that shows every step that I went through in
00:50:38.940 --> 00:50:40.980
order to build my JupyterHub deployment.
00:50:40.980 --> 00:50:46.560
So if anybody wants to build their own JupyterHub server, they can definitely take a look at that
00:50:46.560 --> 00:50:49.020
online and see if they can build their own.
00:50:49.020 --> 00:50:50.880
It's actually it's not too hard.
00:50:51.220 --> 00:50:55.100
Like you need to do a little bit of Linux stuff and you've got to start the virtual private
00:50:55.100 --> 00:50:55.480
server.
00:50:55.480 --> 00:50:59.340
But like you can do it if you're teaching engineering programming at college.
00:50:59.340 --> 00:51:00.580
Like you can launch JupyterHub.
00:51:00.580 --> 00:51:01.220
You can do it.
00:51:01.220 --> 00:51:03.220
Yeah, that's certainly true.
00:51:03.220 --> 00:51:04.320
Cool.
00:51:04.320 --> 00:51:07.720
Yeah, that probably about rounds it out for our main conversation.
00:51:07.720 --> 00:51:09.800
You're trying to turn the tables on me here.
00:51:09.800 --> 00:51:12.740
I see you threw out some stuff that say you want to ask me a couple of questions.
00:51:12.840 --> 00:51:16.400
So I don't know if I have a good answers, but I'm game.
00:51:16.400 --> 00:51:16.820
Go ahead.
00:51:16.820 --> 00:51:17.860
All right.
00:51:17.860 --> 00:51:25.020
So one of my big questions is I'm just so grateful to everybody at Project Jupyter and
00:51:25.020 --> 00:51:31.820
Min Regan Kelly and Carol Willing and everybody who works even at NumFocus to help build like
00:51:31.820 --> 00:51:35.480
NumPy and Pandas and all of the tools that we use.
00:51:35.580 --> 00:51:41.180
What is a great way to thank people that build some of these open source tools?
00:51:41.180 --> 00:51:46.520
I'm not at the level where I can like directly contribute to the NumPy source code.
00:51:46.520 --> 00:51:50.140
Like what is a good way to thank people and say thank you for what you did?
00:51:50.260 --> 00:51:53.280
Obvious way might be to do like add a new feature or something, right?
00:51:53.280 --> 00:51:56.020
But that's a different level maybe.
00:51:56.020 --> 00:52:00.560
I think starting just by saying thank you actually is really valuable.
00:52:00.560 --> 00:52:03.820
So much of the open source stuff I think is thankless, right?
00:52:03.820 --> 00:52:09.180
People will get angry because some feature doesn't work and they'll go rail against the maintainers.
00:52:09.180 --> 00:52:13.880
And like just having a counterbalance like all these people are appreciated.
00:52:13.880 --> 00:52:17.060
Maybe sharing your story, which obviously you're doing here, right?
00:52:17.060 --> 00:52:23.360
But as a more general comment, like your work has really enabled me to teach, make Python
00:52:23.360 --> 00:52:25.700
and engineering more accessible to more folks, right?
00:52:25.700 --> 00:52:28.260
Like hearing that I think is a lot.
00:52:28.260 --> 00:52:35.400
And then if you're in an organization that can somehow contribute back to it, you know, I
00:52:35.400 --> 00:52:37.220
mean, I realize that a lot of people aren't.
00:52:37.220 --> 00:52:41.760
But if you work, say, like at a big company, you know, maybe your company could somehow sponsor
00:52:41.760 --> 00:52:47.060
that project to help, you know, make it not purely volunteer, but help make that a job.
00:52:47.060 --> 00:52:55.320
One of my pet peeves is there are many, many billion, billion dollar companies built upon things like
00:52:55.320 --> 00:53:00.260
Pandas, Django, Flask, SQLAlchemy.
00:53:00.880 --> 00:53:19.740
And if those companies just sent back 0.01% of their profit, even not just revenue profit, just to say, look, we probably should maybe support the thing that is the foundation of our business a little bit like that would just there's like a handful of people like I probably could count them on my hand.
00:53:20.180 --> 00:53:22.880
Literally, that maintain Flask, right?
00:53:22.880 --> 00:53:31.640
Like, how much do these giant companies need to contribute to actually just make those people's lives great to just sit around and contribute to Flask, right?
00:53:31.640 --> 00:53:36.080
So I feel like if that was if that's something that people could do, that would be amazing.
00:53:36.080 --> 00:53:45.220
But I think just saying thank you, maybe contribute a tutorial, maybe contribute a case study, or, you know, it doesn't have to be a new feature, right?
00:53:45.220 --> 00:53:51.180
It could be even documentation or, hey, let me I see your docs are on Python 2 for your tutorials.
00:53:51.180 --> 00:53:52.580
Can I upgrade that to Python 3?
00:53:52.580 --> 00:53:59.620
Because I know that's, you know, just like little because that's the last thing that folks that are trying to write the software want to do is like rewrite their tutorials.
00:53:59.620 --> 00:54:01.800
You up for a couple more tough ones?
00:54:01.800 --> 00:54:02.700
Yeah, hit me.
00:54:02.700 --> 00:54:03.560
All right.
00:54:03.560 --> 00:54:03.900
All right.
00:54:03.900 --> 00:54:09.720
So this is like a secret question, but I hear it from students a lot.
00:54:09.720 --> 00:54:13.840
Are you still afraid that some of the software you build is going to break?
00:54:14.360 --> 00:54:18.580
And does that feeling ever go away that you're not thinking in the back of the head?
00:54:18.580 --> 00:54:21.080
Oh, my God, what I just built like it's going to crash.
00:54:21.080 --> 00:54:22.680
Yeah, that's a great question.
00:54:22.680 --> 00:54:32.440
I certainly have little scripts and apps and utilities that are like super sketchy because they're like I needed them once or twice to do a little thing.
00:54:32.440 --> 00:54:38.140
Those will probably break because they're not very well put together because they're just a quick one offs.
00:54:38.140 --> 00:54:40.940
But at the same time, I'm not afraid because like they're not really important.
00:54:40.940 --> 00:54:43.280
I could just if I need them again, I can kind of fix it.
00:54:43.540 --> 00:54:51.920
But things that do make me nervous are like the training website that people have paid tons of money for so that they can take their classes.
00:54:51.920 --> 00:54:54.160
Maybe they've got a project next week.
00:54:54.160 --> 00:54:58.400
And it takes a long time to feel like it's not going to break anymore.
00:54:58.400 --> 00:55:00.160
But I feel like it's not going to break.
00:55:00.160 --> 00:55:00.960
All right.
00:55:00.960 --> 00:55:06.660
Like not in any like super significant way, but it takes years.
00:55:06.660 --> 00:55:08.300
So let me just put it to you this way.
00:55:08.300 --> 00:55:18.320
If I go on vacation, like, for example, I went skiing two weeks ago up on Mount Hood, went stayed up there in Timberline for a couple of days.
00:55:18.480 --> 00:55:26.120
And I was thinking, I really don't want to take my computer because I'm going to have to leave it in the car and like sub zero weather and it might hurt the battery.
00:55:26.120 --> 00:55:28.200
But what if the website goes down?
00:55:30.300 --> 00:55:32.440
Maybe I'll bring my computer just in case.
00:55:32.440 --> 00:55:34.780
And I'm, you know, still and I would say that's one.
00:55:34.780 --> 00:55:37.980
Like so I decided, no, it's been fine for the last six months.
00:55:37.980 --> 00:55:39.360
I'm not going to touch it before I leave.
00:55:39.360 --> 00:55:41.080
It'll probably be fine.
00:55:41.080 --> 00:55:47.180
Worst case, I'll buy an SSH client on my iPad and try to get in there and fix it that way.
00:55:48.120 --> 00:55:53.740
There's always like a little bit of a like a little bit of an uneasiness because you just you never know.
00:55:53.740 --> 00:55:53.960
Right.
00:55:53.960 --> 00:55:55.480
Like it could be things out of control.
00:55:55.480 --> 00:55:55.680
Right.
00:55:55.680 --> 00:55:59.260
Like maybe something happens in the data center or you just don't know.
00:55:59.260 --> 00:56:02.040
But generally it does go away.
00:56:02.040 --> 00:56:05.720
But it takes a long time on any given project, I think, before it feels OK.
00:56:05.720 --> 00:56:06.020
Yeah.
00:56:06.020 --> 00:56:09.220
I just think that's like being afraid of that your thing will break.
00:56:09.220 --> 00:56:15.520
It's not something that programmers talk a whole lot about, but it's something that I do hear from students and that I feel myself.
00:56:15.520 --> 00:56:21.780
So I just want to make sure that like actually a lot of other people sometimes felt that way, too, and that it was normal.
00:56:21.780 --> 00:56:22.120
Yeah.
00:56:22.120 --> 00:56:23.420
I'll share one more story with you.
00:56:23.420 --> 00:56:30.820
The very first website that I wrote that did e-commerce was for a pretty expensive product for quite a bit of students.
00:56:30.820 --> 00:56:31.920
It was a training thing.
00:56:31.920 --> 00:56:33.940
It was not mine, like my own thing.
00:56:33.940 --> 00:56:35.000
This is for a company I work for.
00:56:35.000 --> 00:56:38.980
And they would come and buy like $4,000 things.
00:56:39.720 --> 00:56:46.620
And I remember writing that and just being super nervous about shipping this offer.
00:56:46.620 --> 00:56:48.940
I'm like, people are going to go put their credit card in here.
00:56:48.940 --> 00:56:50.240
We're going to charge them $4,000.
00:56:50.240 --> 00:56:51.600
What if I mess it up?
00:56:51.600 --> 00:56:56.160
Like what if this is supposed to be dollars and it's cents or it's supposed to be cents and I put in dollars?
00:56:56.160 --> 00:56:59.400
Like just, you know, the consequence of failure was really high.
00:56:59.460 --> 00:57:07.280
Like what if I end up charging somebody, you know, $40,000 or like just like those things are super nerve wracking.
00:57:07.280 --> 00:57:13.140
But, you know, the more you go through them, right, the second, the third, the fourth time, you're like, ah, okay, I'll just be careful.
00:57:13.140 --> 00:57:14.180
But this is how it goes.
00:57:14.180 --> 00:57:17.040
So, yeah, it doesn't ever go away all the way.
00:57:17.040 --> 00:57:18.680
But, yeah, it gets a lot better.
00:57:18.680 --> 00:57:24.720
So, my final question is what's the hardest problem that you ever worked on that just had a super simple solution?
00:57:24.720 --> 00:57:29.160
You're banging on your head for like two weeks and then you were like, oh, it's just this.
00:57:29.160 --> 00:57:29.520
Yeah.
00:57:29.520 --> 00:57:31.500
There's been a couple of those.
00:57:31.500 --> 00:57:34.560
I would say there's certainly some around like APIs.
00:57:34.560 --> 00:57:36.160
And you're like, oh, man, I just can't get this to work.
00:57:36.160 --> 00:57:38.000
And I go, why didn't I just, the order is like this.
00:57:38.000 --> 00:57:42.960
But I do have an engineering related one for you that's probably like this.
00:57:43.320 --> 00:57:47.020
I was working on this project with one other developer.
00:57:47.020 --> 00:57:54.200
And we were, this is actually coming from MATLAB code into C++, C#, something like that.
00:57:54.200 --> 00:57:55.700
This is before Python.
00:57:55.700 --> 00:58:02.800
And it was doing real-time wavelet decomposition of like a time series.
00:58:02.800 --> 00:58:08.400
And the times, it was something like you have all this state, about 250 measurements per second.
00:58:08.400 --> 00:58:13.220
So, you have four milliseconds to process a measurement, right, like per measurement.
00:58:13.520 --> 00:58:14.340
You don't have much time.
00:58:14.340 --> 00:58:22.540
And we take all this MATLAB code and we convert like thousands of lines of wavelet decomposition code and stuff.
00:58:22.540 --> 00:58:27.240
And just looking at this going, I sure hope this works because I can barely like understand what I'm doing here, right?
00:58:27.240 --> 00:58:29.400
But it also has to be fast enough.
00:58:29.400 --> 00:58:30.360
It has to be real-time.
00:58:30.360 --> 00:58:33.020
So, it can't take more than four milliseconds per bit.
00:58:33.020 --> 00:58:35.240
Or if you queue it up, you know, like times the number of things.
00:58:36.140 --> 00:58:40.320
And so, we get to it and we run it and it's not fast enough.
00:58:40.320 --> 00:58:41.340
Like, oh my God.
00:58:41.340 --> 00:58:46.600
Like, we're going to have to optimize that wavelet code because I cannot change that.
00:58:46.600 --> 00:58:49.440
Like, I got it working but really I don't understand more.
00:58:50.160 --> 00:58:56.960
And it turned out, I turned a profiler against it and it was using a list instead of a dictionary to hold a bunch of stuff.
00:58:56.960 --> 00:59:02.820
And it had to do like lookup based on some cases or like what would be better by key rather than by position, right?
00:59:03.240 --> 00:59:08.900
And we just switched the data structure from a list to a dictionary and it got like 10 times faster.
00:59:08.900 --> 00:59:09.200
Cool.
00:59:09.200 --> 00:59:09.700
So, boom.
00:59:09.700 --> 00:59:10.720
It fell under four milliseconds.
00:59:10.720 --> 00:59:11.240
It was done.
00:59:11.240 --> 00:59:12.340
Problem solved.
00:59:12.340 --> 00:59:13.140
Right?
00:59:13.140 --> 00:59:15.440
But like it was, this program is too slow.
00:59:15.440 --> 00:59:16.380
What is it doing?
00:59:16.380 --> 00:59:21.640
Oh, it's just doing like index of type operations on the list.
00:59:21.640 --> 00:59:24.980
Like, that's 80% of the CPU usage is list lookup.
00:59:24.980 --> 00:59:27.320
Switch it to dictionary and that 80% goes away.
00:59:27.320 --> 00:59:27.700
Boom.
00:59:27.700 --> 00:59:28.440
Fast.
00:59:28.440 --> 00:59:29.360
That's it, I guess.
00:59:30.080 --> 00:59:34.020
For me, it just seems to have come down to go to PyPI.
00:59:34.020 --> 00:59:34.500
Yeah.
00:59:34.500 --> 00:59:38.940
I was trying to surf these webpages and then it was like, oh, just use Beautiful Soup.
00:59:38.940 --> 00:59:40.940
Or like, oh, I was trying to get a website.
00:59:40.940 --> 00:59:42.180
Oh, just use Request.
00:59:42.180 --> 00:59:45.320
So, now that's kind of the first thing that I do is go to PyPI.
00:59:45.320 --> 00:59:45.740
Yeah.
00:59:45.740 --> 00:59:47.040
I remember that being a big problem.
00:59:47.040 --> 00:59:56.220
If you either come from a language that doesn't have a rich standard library like C++ or something or C or you just don't know, you have no awareness, you're like, oh, I got to do this thing.
00:59:56.220 --> 00:59:57.420
So, how am I going to implement it?
00:59:57.420 --> 00:59:59.060
Like, that should not be your first thought.
00:59:59.160 --> 01:00:02.580
Your first thought should be, can I pip install an answer here?
01:00:02.580 --> 01:00:02.920
Right?
01:00:02.920 --> 01:00:03.420
Right.
01:00:03.420 --> 01:00:04.460
Can I pip install a solution?
01:00:04.460 --> 01:00:05.040
For sure.
01:00:05.040 --> 01:00:05.860
For sure.
01:00:05.860 --> 01:00:06.520
Nice.
01:00:06.520 --> 01:00:06.860
All right.
01:00:06.860 --> 01:00:09.620
Thanks for the turnaround on the questions there.
01:00:09.620 --> 01:00:10.080
That was fun.
01:00:10.080 --> 01:00:14.140
Before we call it a day, though, I got to ask you the two questions, as always.
01:00:14.140 --> 01:00:16.920
If you're going to write some Python code, what editor do you use?
01:00:17.100 --> 01:00:21.240
Well, I like this question because students often want to know which editor to use, too.
01:00:21.240 --> 01:00:23.880
So, I've got kind of a multi-pronged answer.
01:00:23.880 --> 01:00:28.440
If I'm writing a one-file thing, I'll use a Jupyter Notebook or Jupyter Lab.
01:00:28.440 --> 01:00:33.520
And if I'm writing a multi-file thing, often I use Visual Studio Code.
01:00:33.520 --> 01:00:40.000
And if I've got something really big, you know, like a Django site or like Flask, then I use PyCharm.
01:00:40.000 --> 01:00:40.460
All right.
01:00:40.460 --> 01:00:41.980
Those all sound like good answers to me.
01:00:41.980 --> 01:00:42.400
I agree.
01:00:42.400 --> 01:00:42.880
Right on.
01:00:42.880 --> 01:00:44.880
And then, notable PyPI package?
01:00:45.140 --> 01:00:50.100
So, I've got kind of a niche one, but a package I've been using is called SCIMDRAW.
01:00:50.100 --> 01:00:52.980
And the SCIM stands for schematic.
01:00:52.980 --> 01:01:00.540
So, it's a package that draws circuit diagrams, like puts resistors and capacitors and stuff in circuit diagrams.
01:01:00.540 --> 01:01:03.300
And I've used that package to make test questions.
01:01:03.300 --> 01:01:06.480
And there's some figures in the book that I used it with.
01:01:06.480 --> 01:01:10.280
So, if you've got to draw some circuit diagrams, like check out SCIMDRAW.
01:01:10.280 --> 01:01:10.960
That's pretty awesome.
01:01:10.960 --> 01:01:11.460
All right.
01:01:11.460 --> 01:01:14.100
Well, definitely enjoyed talking to you about this, Peter.
01:01:14.220 --> 01:01:15.360
It was really fun.
01:01:15.360 --> 01:01:19.620
And I'm glad you found your way from MATLAB to Python and SuperHub.
01:01:19.620 --> 01:01:21.360
That was awesome talking to you, Michael.
01:01:21.360 --> 01:01:22.660
Thank you so much for having me.
01:01:22.660 --> 01:01:23.100
Yeah, you bet.
01:01:23.100 --> 01:01:24.280
So, final call to action.
01:01:24.280 --> 01:01:25.380
People are excited about this.
01:01:25.380 --> 01:01:31.680
Maybe they want to use your book or contribute or they want to like try to set up a similar thing in their environment.
01:01:31.680 --> 01:01:33.440
What do they do?
01:01:33.440 --> 01:01:37.800
So, my final call to action would be if you want to take a class, think about community colleges.
01:01:37.800 --> 01:01:39.640
They have programming classes too.
01:01:39.640 --> 01:01:43.380
If you're an instructor, please use my book or send me a PR.
01:01:43.380 --> 01:01:44.480
If you want any changes.
01:01:44.480 --> 01:01:47.900
And if you're teaching MATLAB, Python can do everything.
01:01:47.900 --> 01:01:52.000
So, if you're afraid, set up a JupyterHub server and you can start next quarter.
01:01:52.000 --> 01:01:52.720
That's awesome.
01:01:52.720 --> 01:01:53.460
All right.
01:01:53.460 --> 01:01:54.720
Well, thank you so much for sharing your story.
01:01:54.720 --> 01:01:55.200
It was a lot of fun.
01:01:56.960 --> 01:01:59.580
This has been another episode of Talk Python To Me.
01:01:59.580 --> 01:02:02.360
Our guest on this episode was Peter Kazarinov.
01:02:02.360 --> 01:02:04.960
And it's been brought to you by Linode and Stellarress.
01:02:04.960 --> 01:02:09.080
Linode is your go-to hosting for whatever you're building with Python.
01:02:09.080 --> 01:02:12.620
Get four months free at talkpython.fm/linode.
01:02:12.620 --> 01:02:14.500
That's L-I-N-O-D-E.
01:02:15.220 --> 01:02:20.620
Find the right job for you with Stellarress, the AI-powered talent agent for the top tech talent.
01:02:20.620 --> 01:02:24.540
Visit talkpython.fm/Stellarress to get started.
01:02:24.540 --> 01:02:29.420
That's talkpython.fm/S-T-E-L-L-A-R-E-S.
01:02:29.420 --> 01:02:30.180
Stellarress.
01:02:30.180 --> 01:02:32.660
Want to level up your Python?
01:02:32.660 --> 01:02:37.520
If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
01:02:37.780 --> 01:02:45.660
Or if you're looking for something more advanced, check out our new Async course that digs into all the different types of Async programming you can do in Python.
01:02:45.660 --> 01:02:50.340
And of course, if you're interested in more than one of these, be sure to check out our Everything Bundle.
01:02:50.340 --> 01:02:52.220
It's like a subscription that never expires.
01:02:52.220 --> 01:02:54.520
Be sure to subscribe to the show.
01:02:54.520 --> 01:02:57.020
Open your favorite podcatcher and search for Python.
01:02:57.020 --> 01:02:58.160
We should be right at the top.
01:02:58.160 --> 01:03:07.160
You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct RSS feed at /rss on talkpython.fm.
01:03:07.680 --> 01:03:09.240
This is your host, Michael Kennedy.
01:03:09.240 --> 01:03:10.760
Thanks so much for listening.
01:03:10.760 --> 01:03:11.820
I really appreciate it.
01:03:11.820 --> 01:03:13.580
Now get out there and write some Python code.
01:03:13.580 --> 01:03:13.740
Thank you.
01:03:13.740 --> 01:03:14.360
Thank you.
01:03:14.360 --> 01:03:14.640
Thank you.
01:03:14.640 --> 01:03:14.640
Thank you.
01:03:14.640 --> 01:03:15.220
Thank you.
01:03:15.220 --> 01:03:16.120
Thank you.
01:03:16.120 --> 01:03:16.120
Thank you.
01:03:16.120 --> 01:03:16.120
Thank you.
01:03:16.120 --> 01:03:16.120
Thank you.
01:03:16.120 --> 01:03:17.020
Thank you.
01:03:17.020 --> 01:03:17.020
Thank you.
01:03:17.020 --> 01:03:17.020
Thank you.
01:03:17.020 --> 01:03:17.020
Thank you.
01:03:17.020 --> 01:03:17.920
Thank you.
01:03:17.920 --> 01:03:17.920
Thank you.
01:03:17.920 --> 01:03:17.920
Thank you.
01:03:17.920 --> 01:03:17.920
Thank you.
01:03:17.920 --> 01:03:17.920
Thank you.
01:03:17.920 --> 01:03:17.920
Thank you.
01:03:17.920 --> 01:03:18.820
Thank you.
01:03:18.820 --> 01:03:18.820
Thank you.
01:03:18.820 --> 01:03:18.820
Thank you.
01:03:18.820 --> 01:03:18.820
Thank you.
01:03:18.820 --> 01:03:18.820
Thank you.
01:03:18.820 --> 01:03:19.720
Thank you.
01:03:19.720 --> 01:03:19.720
Thank you.
01:03:19.720 --> 01:03:20.320
Thank you.
01:03:20.320 --> 01:03:21.220
Thank you.
01:03:21.220 --> 01:03:21.220
Thank you.
01:03:21.220 --> 01:03:21.220
Thank you.
01:03:21.220 --> 01:03:21.820
Thank you.
01:03:21.820 --> 01:03:21.820
Thank you.
01:03:21.820 --> 01:03:22.320
Thank you.
01:03:22.320 --> 01:03:23.220
Thank you.
01:03:23.220 --> 01:03:24.120
Thank you.
01:03:24.120 --> 01:03:25.120
Thank you.
01:03:25.120 --> 01:03:26.120
Thank you.
01:03:26.120 --> 01:03:27.120
Thank you.
01:03:27.120 --> 01:03:28.120
Thank you.
01:03:28.120 --> 01:03:29.120
Thank you.
01:03:29.120 --> 01:03:30.120
Thank you.
01:03:30.120 --> 01:03:30.620
you
01:03:30.620 --> 01:03:31.120
you
01:03:31.120 --> 01:03:31.620
you
01:03:31.620 --> 01:04:01.600
Thank you.
00:00:00.001 --> 00:00:05.040
The Nobel Prize in Economics recently went to Paul Romer, a convert from proprietary software
00:00:05.040 --> 00:00:10.380
like MATLAB, over to Python and the SciPy stack. Paul said, the more I learn about proprietary
00:00:10.380 --> 00:00:15.740
software, the more I worry that objective truth might perish from the earth. That's quite a
00:00:15.740 --> 00:00:20.680
statement, but what if your organization is deeply committed to proprietary software such as MATLAB?
00:00:20.680 --> 00:00:25.220
Well, don't despair, because Peter Karzarnoff, a professor at Portland Community College,
00:00:25.220 --> 00:00:29.460
is here to share his experience converting his courses over to Python and JupyterHub.
00:00:29.940 --> 00:00:34.800
This is Talk Python To Me, episode 201, recorded January 23rd, 2019.
00:00:34.800 --> 00:00:52.680
Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the
00:00:52.680 --> 00:00:57.260
ecosystem, and the personalities. This is your host, Michael Kennedy. Follow me on Twitter,
00:00:57.260 --> 00:01:01.960
where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm,
00:01:01.960 --> 00:01:07.360
and follow the show on Twitter via at Talk Python. This episode is brought to you by Linode and
00:01:07.360 --> 00:01:11.120
Stellar S. Please check out what they're offering during their segments. It really helps support the
00:01:11.120 --> 00:01:13.120
show. Peter, welcome to Talk Python.
00:01:13.120 --> 00:01:15.400
Thanks, Michael. I'm so excited to be here.
00:01:15.400 --> 00:01:19.600
Yeah, it's really excellent to have you on the show. You and I have spoken throughout the years
00:01:19.600 --> 00:01:25.040
over Twitter and other mediums, and it's great to finally get to talk to you in more depth.
00:01:25.040 --> 00:01:29.140
Yeah, it's great to connect. I can't wait to tell my story about choosing Python over MATLAB
00:01:29.140 --> 00:01:31.380
and using JupyterHub in my classroom.
00:01:31.380 --> 00:01:35.900
Yeah, absolutely. I think that is such a good choice, and it's happening more and more. There's
00:01:35.900 --> 00:01:43.140
some really interesting quotes from the guy who won the Nobel Prize in economics.
00:01:43.900 --> 00:01:52.500
I think that was Mathematica, Python over Mathematica. But basically, the knowledge of the free world was
00:01:52.500 --> 00:01:59.160
in danger because of these proprietary systems, and Python and open source was the thing that would
00:01:59.160 --> 00:02:05.520
keep it free and keep sharing the knowledge, which is pretty interesting. So definitely a trend you're
00:02:05.520 --> 00:02:10.940
seeing around a lot of data science teams I worked with and stuff as well. All right, so we'll get to
00:02:10.940 --> 00:02:14.580
that, and we'll dig into that, and it'll be fun. But let's start with your story. How did you get into
00:02:14.580 --> 00:02:15.260
programming in Python?
00:02:15.260 --> 00:02:21.040
I got involved in programming kind of late. I'm an adult, and I didn't get started until about three
00:02:21.040 --> 00:02:27.640
years ago. Growing up, I wasn't a gamer, and at age eight, I wasn't like pounding away at like a
00:02:27.640 --> 00:02:33.960
Commodore 64 in order to like write new programs. My dad, he was a biochemist. He wasn't a programmer,
00:02:33.960 --> 00:02:38.480
and my mom, she did art stuff for the school district, and she wasn't a programmer either.
00:02:38.480 --> 00:02:44.760
And like there were some kids in high school who like programmed their calculators to play games,
00:02:44.760 --> 00:02:48.520
but I wasn't that kid. I played soccer, and I went camping and stuff like that.
00:02:48.520 --> 00:02:51.140
That's cool. You know, that's probably a good way to grow up, honestly.
00:02:51.140 --> 00:02:51.540
Yeah.
00:02:51.540 --> 00:02:56.320
I was always kind of blown away with those people that would program like their HP calculators and
00:02:56.320 --> 00:03:00.840
stuff because they didn't have a proper keyboard. It was like texting. Like remember when you'd have to
00:03:00.840 --> 00:03:06.840
hit like one or two, maybe it was two, three times to get a C to come out. Like who could program that
00:03:06.840 --> 00:03:07.880
way? But they did, right?
00:03:07.880 --> 00:03:16.380
Yeah, but they like did it. But that wasn't me. So I did my graduate work at UW, and I worked on making
00:03:16.380 --> 00:03:21.600
plastic transistors and plastic solar cells. It was really cool research, and that was kind of the
00:03:21.600 --> 00:03:26.760
first time that I did some programming, and I used LabVIEW. Have you heard of LabVIEW before?
00:03:26.760 --> 00:03:31.600
I've heard of LabVIEW. It's like this graphical programming interface, but it's...
00:03:31.600 --> 00:03:31.600
Yeah.
00:03:31.600 --> 00:03:33.100
Is it hardware focused?
00:03:33.100 --> 00:03:38.960
Yeah, it's really just focused on hardware, and you kind of drag these wires like around the screen
00:03:38.960 --> 00:03:45.140
in order to connect components. So I was just using that to interface with hardware and like measure
00:03:45.140 --> 00:03:47.220
devices and collect data and stuff.
00:03:47.220 --> 00:03:51.340
Cool. Tell me about this plastic hardware stuff that you were doing. Like,
00:03:51.560 --> 00:03:57.320
did you find a way to make plastic that was conductive, or was it like wrapping chips, or what
00:03:57.320 --> 00:03:57.680
was it?
00:03:57.680 --> 00:04:04.500
We were in graduate school making N-type semiconductor plastic. So regular chips that are in your computer
00:04:04.500 --> 00:04:09.600
or your phone, they have both P-type and N-type silicon in there, and that's what helps the
00:04:09.600 --> 00:04:15.320
transistors shuttle electrons across. And we were making these specialty plastics that would shuttle
00:04:15.320 --> 00:04:20.740
electrons when you applied what was called a gate voltage. So we were basically making like
00:04:20.740 --> 00:04:24.780
these little transistors just out of plastic. It was really, really neat.
00:04:24.780 --> 00:04:26.920
Wow, that's crazy. Could you 3D print those these days?
00:04:26.920 --> 00:04:31.200
Probably. And we were thinking about maybe you could roll-to-roll print them, like you print a
00:04:31.200 --> 00:04:36.720
newspaper. Maybe you could inkjet print them, like you're printing out a regular piece of paper.
00:04:36.720 --> 00:04:42.380
But the research was just very fundamental, like trying to measure core electrical properties of
00:04:42.380 --> 00:04:42.960
these plastics.
00:04:42.960 --> 00:04:43.920
That's pretty excellent.
00:04:43.920 --> 00:04:44.620
Yeah.
00:04:44.620 --> 00:04:50.380
Okay, cool. So you had to learn this LabVIEW draggy-droppy programming language so that you could work on this
00:04:50.380 --> 00:04:54.400
hardware, right? And I find a lot of people actually get into programming along these lines. They're like,
00:04:54.400 --> 00:04:59.600
well, I didn't really think I'd be a programmer, but this thing I thought was really cool required this
00:04:59.600 --> 00:05:04.600
step to like basically make it go. And maybe it's pretty small, but you know, there it was, right?
00:05:04.600 --> 00:05:08.840
Right. Then I started working at Portland Community College, where I work now.
00:05:08.840 --> 00:05:13.960
And I was digging through these things. They're called course content outline guides. They're kind
00:05:13.960 --> 00:05:20.340
of like course descriptions that are up on the web. And I noticed that this course content outline guide,
00:05:20.340 --> 00:05:27.120
this course description had the word his in it. And the phrase was, the student may work at his desk.
00:05:27.120 --> 00:05:32.600
And I was like, this is not good. Like I've got two daughters. Like I want them to go into engineering.
00:05:32.600 --> 00:05:39.220
I really like it. We shouldn't have like his in this description. So I started looking through all of the
00:05:39.220 --> 00:05:44.960
other course pages that were up. And I quickly realized that there are way, way too many to do
00:05:44.960 --> 00:05:50.800
by hand, right? Like we have over 1300 classes and I can't click on every single one and read through
00:05:50.800 --> 00:05:56.680
every single one. So I was telling one of my colleagues about this and he was like, oh, you should,
00:05:56.680 --> 00:06:00.980
you know, learn Python, like try this Python thing. And you could like write a little program that could
00:06:00.980 --> 00:06:04.380
do it. And I was like, okay, I'll give it a try.
00:06:04.380 --> 00:06:06.340
It sounds really hard, but okay.
00:06:06.340 --> 00:06:11.800
It sounds hard, but I'll try. And so like, I found this package, beautiful soup. And like, I wrote this
00:06:11.800 --> 00:06:17.640
little script and, it was probably about a week. And I got this thing where I scraped every single
00:06:17.640 --> 00:06:24.220
one of these content guides, about 1300 classes and found like any time that there was a his,
00:06:24.220 --> 00:06:29.700
he, or like him in them. And it was just like amazing that this thing that I was clicking through
00:06:29.700 --> 00:06:35.480
individual links and like reading all the texts. Like I could just like type Python and then my
00:06:35.480 --> 00:06:40.360
script.py. And then like, it all just came out into one CSV. It was like amazing.
00:06:40.360 --> 00:06:46.260
Wow. That's pretty interesting. A couple of thoughts. One, I think that's definitely a noble effort
00:06:46.260 --> 00:06:53.100
because we already have enough barriers to folks who are underrepresented getting to,
00:06:53.100 --> 00:06:57.800
into STEM fields, into programming and stuff. Like we don't need to, to make it less comfortable.
00:06:57.800 --> 00:07:02.220
Right. Right. So I think that's good. Is this thing open source? Like if somebody worked at
00:07:02.220 --> 00:07:07.240
Johnson County community college or whatever, right? Like, like, could they borrow your thing
00:07:07.240 --> 00:07:12.220
and turn it loose on theirs? Yeah. I mean, the code is up on GitHub. If somebody wants to try,
00:07:12.220 --> 00:07:18.080
like this is my first Python project. So I hard coded in a lot of the URLs and stuff like that.
00:07:18.080 --> 00:07:25.020
So it's not totally transferable right now, but all of those like GUI kicks that the Python
00:07:25.020 --> 00:07:29.940
ecosystem has been talking about. Maybe I could turn it into one of those GUIes and somebody
00:07:29.940 --> 00:07:34.040
in another community college could just like click it and make it work for them. That would be pretty
00:07:34.040 --> 00:07:38.960
cool. Yeah. That'd be totally cool. Like you put some GUI on a little CLI on it or like if somebody
00:07:38.960 --> 00:07:43.920
wants, they could create a web app and then you just give it like the base URL of your college and
00:07:43.920 --> 00:07:47.940
it'll go through and it'll do it. Right. Right. Give it, give it a little CSV download. That'd be sweet.
00:07:48.460 --> 00:07:53.680
So my other non-technical question here though, it's like, I definitely agree that this is a good
00:07:53.680 --> 00:08:00.020
thing to be aware of and to try to eliminate, but how do you eliminate it? I mean, like replacing every
00:08:00.020 --> 00:08:07.620
him with a her seems like a step that is in like, it's the idea of it is, is right, but it also doesn't
00:08:07.620 --> 00:08:12.080
seem right. Like, so to me, I don't know, this is an English question. Like this just bothers me in
00:08:12.080 --> 00:08:17.800
English. There's not a way to speak about a person in a non-gendered way really. So I don't know. I
00:08:17.800 --> 00:08:23.400
try to use they, them, their, but like obviously they're singular, but you know, like what would
00:08:23.400 --> 00:08:29.400
you propose here? Like as part of this? For those, you could say at the student's desk or at their desk
00:08:29.400 --> 00:08:35.660
or at a person's desk. You don't at all need to use any of those like gendered pronouns. Right. As long
00:08:35.660 --> 00:08:38.880
as there's more than one student and there always will be, it'll be fine. Right. It's just like,
00:08:38.880 --> 00:08:42.940
it's when it's singular. I'm like, man, I'm going to say they, and I know it's singular and
00:08:42.940 --> 00:08:48.280
it's probably wrong, but to me it feels better than he, when it's a her or her, when it's a he.
00:08:48.280 --> 00:08:52.040
And you know, it's just like, I don't know. It's just weird. We need a better bit of English here.
00:08:52.040 --> 00:08:57.780
All right. So great. So that's how you got into programming. As you saw in the Python is how you
00:08:57.780 --> 00:09:01.000
saw this problem. You're like, your friends, like, you know what? Like a little bit of requests,
00:09:01.000 --> 00:09:05.760
a few for-in loops and some beautiful soup. And you got this problem solved. Actually,
00:09:06.560 --> 00:09:10.840
you said you teach at Portland Community College here in lovely Portland, Oregon.
00:09:10.840 --> 00:09:14.080
What do you do day to day? Like what kind of classes do you teach? Things like that.
00:09:14.080 --> 00:09:19.720
I teach engineering at Portland Community College and we're a community college. So we teach the
00:09:19.720 --> 00:09:26.920
first two years of a four-year engineering program. And we also teach two years of a two-year degree
00:09:26.920 --> 00:09:32.360
in engineering. So some of the students go on to jobs and some of the students go on to four-year
00:09:32.360 --> 00:09:39.360
universities. So I teach some of the intro classes. We call that ENGR 101. And I also teach the engineering
00:09:39.360 --> 00:09:45.220
programming class. And then in the second year for engineering students, I teach some of the mechanical
00:09:45.220 --> 00:09:49.540
classes like material science, manufacturing, and machine design.
00:09:49.540 --> 00:09:54.740
Cool. Those sound interesting. First of all, maybe we should just define what a community college
00:09:54.740 --> 00:09:59.660
is for folks who are not in the United States. I feel like this is kind of a U.S. type of thing.
00:09:59.660 --> 00:10:03.360
Like in the U.S. we have four-year colleges and we have super expensive four-year colleges.
00:10:03.360 --> 00:10:09.580
And then we have high school. And high school is especially bad in the U.S. in terms of preparing
00:10:09.580 --> 00:10:15.900
people for a job. Like in Europe, I feel like maybe what they learn is not necessarily better. But
00:10:15.900 --> 00:10:21.360
in the end, they either have a vocational track that they can sort of follow on, especially in Germany,
00:10:21.360 --> 00:10:27.600
or like they go a little bit farther in high school so that they actually have a little more skills
00:10:27.600 --> 00:10:32.980
when they come out. So in the U.S., like having a high school degree almost is like not having a
00:10:32.980 --> 00:10:38.220
degree at all, right? So maybe just talk about that so people who are not familiar with this idea know
00:10:38.220 --> 00:10:44.160
what it is. Yeah. So in the U.S., after high school, you could go to a regular four-year school,
00:10:44.160 --> 00:10:48.860
you know, like the University of Michigan or Stanford or something. But they're also these community
00:10:48.860 --> 00:10:55.100
colleges. And they're usually two-year programs. And they kind of have two separate aims.
00:10:55.480 --> 00:11:00.820
So one of them is as a vocational school. So you could go after high school and we have,
00:11:00.820 --> 00:11:05.800
say, an automotive department. You learn how to be an auto mechanic. Or we have a welding program.
00:11:05.800 --> 00:11:11.480
You learn how to be a welder. Or we have like a pre-nursing program. So you learn how to be a
00:11:11.480 --> 00:11:17.040
medical assistant. And then the other function that the community college is served here in the U.S.
00:11:17.040 --> 00:11:23.040
is to prepare students and get them doing their first two years of college. And then they'll finish
00:11:23.040 --> 00:11:28.120
their third and fourth year of college at a regular school. So it's both that kind of vocational school
00:11:28.120 --> 00:11:32.920
as well as kind of like the first two years of what you consider regular college.
00:11:32.920 --> 00:11:39.200
Yeah. Okay. Great. And it's also typically much, much cheaper than a four-year school.
00:11:39.200 --> 00:11:43.600
Even a state four-year school. But like especially the other ones. So folks who go here,
00:11:43.600 --> 00:11:48.920
maybe they're not academically ready for a four-year school. Maybe they're not entirely sure that that's
00:11:48.920 --> 00:11:54.540
for them. So they're going to take a less intensive route to like find their way. The reason I'm bringing
00:11:54.540 --> 00:12:00.620
this up is it's sort of relevant to the conversation later around like expensive proprietor software and
00:12:00.620 --> 00:12:08.260
so on. Yeah. Yeah, exactly. So at PCC right now, I think our credit costs $111 a credit. So that's
00:12:08.260 --> 00:12:14.680
kind of $1,500 a quarter or so. And if you look at private four-year colleges, you know,
00:12:14.680 --> 00:12:21.080
they're at least $45,000 for a year now. So community colleges are much, much cheaper.
00:12:21.080 --> 00:12:25.600
It's like a 30X difference or something. Yeah. Yeah. Yeah. Yeah. Just for people listening,
00:12:25.600 --> 00:12:29.920
I actually went to a community college for my first couple of years out of high school and just thought
00:12:29.920 --> 00:12:35.180
it was a fabulous experience. It went out to do well in other colleges afterwards. Right. So it's
00:12:35.180 --> 00:12:41.520
definitely a nice place to be. I think it's got the right sort of low-key start. And the other thing,
00:12:41.520 --> 00:12:46.040
I guess, that's interesting to me is that you're teaching engineering courses. When I knew about
00:12:46.040 --> 00:12:51.080
community college, it was like you could take calculus and differential equations and chemistry
00:12:51.080 --> 00:12:56.340
and physics, but there was not like a full-on engineer that was like to prepare you for other
00:12:56.340 --> 00:13:02.080
engineering courses. These directly transfer to Portland State or to Oregon State. Some of the students
00:13:02.080 --> 00:13:07.460
go to the University of Washington. So you take engineering classes, but our students also take
00:13:07.460 --> 00:13:13.100
things like calculus and chemistry and physics and those courses too. Sure. Sounds fun. Kind of makes
00:13:13.100 --> 00:13:19.680
me wish I was back in college, sort of. I love it. Like this is honestly like my dream job. Every day I
00:13:19.680 --> 00:13:26.140
walk in, I'm like, oh, I love this place. I love this place. How cool. All right. So let's talk about
00:13:26.140 --> 00:13:31.520
the computing software that you have for your class. So you're teaching these engineering and
00:13:31.520 --> 00:13:37.720
engineering programming classes and programming labs and stuff. So traditionally, this is the realm of
00:13:37.720 --> 00:13:44.460
things like MATLAB and Mathematica, which are super expensive things. They only exist on the computer labs
00:13:44.460 --> 00:13:51.720
at the school because like no student is going to go, yeah, 1500 bucks for like a license. That seems like
00:13:51.720 --> 00:13:56.340
a good idea. Oh, and then you've got to buy all the other add-ons, right? Like, yeah, it's really
00:13:56.340 --> 00:14:01.980
the use of these tools while they're pretty good at solving engineering problems really means
00:14:01.980 --> 00:14:08.220
like you're, you're sort of stuck there, right? Yeah. Yeah. So our college has taught MATLAB in this
00:14:08.220 --> 00:14:15.160
programming course for about four years and it would cost students either $50 or $100 for the license.
00:14:15.160 --> 00:14:19.860
And then it also costs the college. It's like an academic license or something they can get.
00:14:19.860 --> 00:14:25.860
Yeah. Yeah. They get a student license and it says, I think, EDU, like at your command prompt in MATLAB,
00:14:25.860 --> 00:14:31.520
just to let you know that you're still a student. And, another problem with that is after two years,
00:14:31.520 --> 00:14:36.160
your license would expire and some students stay a little bit longer than two years. And so
00:14:36.160 --> 00:14:41.780
they'd come to me before they go to four year and they're like, ah, Peter, like I got to reinstall
00:14:41.780 --> 00:14:48.280
this new license. Can you get me another license to MATLAB? And it just felt like, like we were
00:14:48.280 --> 00:14:54.840
choosing certain students to succeed because there's not MATLAB installed in the multicultural center or
00:14:54.840 --> 00:15:01.460
MATLAB installed in the veterans resource center. Like it's just installed in these two computer labs and
00:15:01.460 --> 00:15:07.980
then our engineering lab. And for $50, like that might not seem like a big deal if you're a big
00:15:07.980 --> 00:15:13.900
programmer and you've got, you know, this big job at Google or Facebook, but for some community college
00:15:13.900 --> 00:15:19.640
students where food security is an issue, $50, that can be a really, really big deal.
00:15:19.640 --> 00:15:23.460
That can definitely be a big deal. I remember the shock of just the price of books.
00:15:23.460 --> 00:15:24.200
Oh yeah.
00:15:24.200 --> 00:15:31.400
Yeah. And the, and, and books in the course were over a hundred dollars. The book was awesome. It was
00:15:31.400 --> 00:15:35.960
really, really good, but it was super expensive. And then after the course, what are you going to do
00:15:35.960 --> 00:15:37.260
with that textbook again?
00:15:37.260 --> 00:15:39.840
Try to sell it. You just try to sell it.
00:15:39.840 --> 00:15:40.440
Right.
00:15:40.820 --> 00:15:53.460
It's the whole college books thing, but I'm just blown away how expensive those are. Right. But that's one possible path. The other path is maybe something that's really good at computation. That's kind of like MATLAB.
00:15:53.460 --> 00:15:54.500
Right.
00:15:54.500 --> 00:15:56.260
That's free and more accessible, right?
00:15:56.260 --> 00:16:09.640
Right. That's free, more accessible. So that's why we started investigating Python because we were like, okay, we can do these arrays in MATLAB, but Python has NumPy. We can do numerical computing.
00:16:09.640 --> 00:16:22.700
Or okay, MATLAB, we can build these plots in MATLAB, but Python, we have matplotlib. Or in MATLAB, there's this serial module where you can talk to hardware. Oh, well, in Python, we've got PySerial.
00:16:22.700 --> 00:16:23.380
Exactly.
00:16:23.380 --> 00:16:39.560
So I sort of started investigating like each time I was doing something in MATLAB, like, can I do this in Python? And the answer was always yes. And sometimes, especially when we were doing like HTTP requests or like trying to get data from like a web
00:16:39.560 --> 00:17:01.740
API for like tie data or something you're going to plot, it is just so much easier in Python to do that than it was in MATLAB. Like it just felt like we were having to do these backflips whenever we were trying to like read anything that was external to like the MATLAB sort of ecosystem. And so we decided to make the jump to teach Python in the course instead of teaching MATLAB.
00:17:01.740 --> 00:17:19.920
That's really cool. Now, all those reasons make tons of sense to me. But I can just see, you know, the 59 year old, almost retired engineering professor going, you know, MATLAB's worked pretty well. And I've got six years left, and I'm not a programmer.
00:17:20.740 --> 00:17:21.100
Right.
00:17:21.100 --> 00:17:23.960
As a department, we're not doing this. How did that go?
00:17:23.960 --> 00:17:46.420
There's still like some open disagreement, I'd say about it. And there's some are some benefits to MATLAB, like the installation story is really clear. And there's only one IDE, like you use MATLAB, and that's it. And there's only one way to write the code, run the code, which is use MATLAB. Like those are good arguments. But I don't know, community colleges are about like innovation.
00:17:46.420 --> 00:18:15.260
And doing quick iteration on courses, like we can change the way that we teach courses so much faster than four year universities can. So I just felt like it was an opportunity for the community college to like, lead in this area instead of just follow what other courses were doing. And now maybe down the line, when the students go in, they'll be like, yeah, we can do all of this in Python. Like, can I do my third year, like numerical methods class in Python? Like, maybe it'll bleed over the other way.
00:18:15.260 --> 00:18:40.100
Yeah, I bet that it will actually, I bet that you'll have these experiences where people learn Python here. And then they're like, you really want me to use that other thing? Like, I know, we could do it so much better with x, y, and z package, right? Like, right, it's probably gonna, you know, plant some interesting seeds. But there's some other things to consider, I guess, like, what were some of the things you did to decide on Python?
00:18:40.100 --> 00:18:45.460
I mean, obviously, you're personally a fan of Python, you know, is pretty well, but there's some other academic examples, right?
00:18:45.460 --> 00:19:08.040
I wanted to make sure that it would not only be useful for students, but that like real engineers use Python. So like the Large Hadron Collider, like they use Python, or like the Allen Brain Science Institute, they use Python, or Instagram, or YouTube, Facebook, like they use Python. So like real engineers are using Python.
00:19:08.460 --> 00:19:17.360
And I actually just went and toured a company last week, that makes pacemakers here in Portland. And that company uses Python, too.
00:19:17.360 --> 00:19:18.280
Oh, how interesting.
00:19:18.280 --> 00:19:45.000
There are real engineers out there using Python, like every day. So I think it is quite applicable. Plus, not every single engineer is going to end up and every student student in engineering doesn't always end up being an engineer, you know, they might be a teacher, they might end up working in a medical office, I don't know. And having a general purpose language like Python, is a lot more useful than having, you know, MATLAB, like if you work in a medical office, what are you going to do with that? I don't know.
00:19:45.000 --> 00:20:11.620
Exactly. I do think it's interesting to consider like what you do outside of this discipline. If you have the skills to write something in Python, that in and of itself is a very marketable thing. You know what I mean? Like if you're like, man, I can crush it in LabVIEW. People are like, great, you know, Excel, right? Like, it's not going to really translate, right? Unless you're working in hardware or something like that, right? Like if it's, if you want to move out, I think it's really, really interesting.
00:20:14.100 --> 00:20:32.260
This portion of Talk Python To Me is brought to you by Linode. Are you looking for hosting that's fast, simple, and incredibly affordable? Well, look past that bookstore and check out Linode at talkpython.fm/Linode. That's L-I-N-O-D-E. Plans start at just $5 a month for a dedicated server with a gig of RAM.
00:20:32.260 --> 00:20:52.720
They have 10 data centers across the globe. So no matter where you are or where your users are, there's a data center for you. Whether you want to run a Python web app, host a private Git server, or just a file server, you'll get native SSDs on all the machines, a newly upgraded 200 gigabit network, 24-7 friendly support, even on holidays, and a seven-day money-back guarantee.
00:20:52.720 --> 00:21:05.100
Need a little help with your infrastructure? They even offer professional services to help you with architecture, migrations, and more. Do you want a dedicated server for free for the next four months? Just visit talkpython.fm/Linode.
00:21:06.540 --> 00:21:25.000
Yeah, and of course, Paul Romer and his collaborator won the Nobel Prize in economics using Jupyter notebooks and stuff, which is pretty trick. So that's awesome. And then also, this is partly why I opened the conversation this way. It's like, when you think of how much that costs, right? Maybe it doesn't cost an insane amount of money to run MATLAB.
00:21:25.000 --> 00:21:37.480
But when you look at trying to keep tuition as low as possible to make community colleges for the community, right? Things like that. So the price of not paying for MATLAB, it can't hurt, right?
00:21:37.480 --> 00:21:58.560
Yeah, and it can't hurt the colleges' bottom line either. They've got to pay for MATLAB. And then also then the textbooks for MATLAB, those are closed source too. So if you can move to Python, an open source free language, you can move to an open education resources textbook, like a free textbook. And then the college doesn't have to pay for the MATLAB license.
00:21:58.560 --> 00:22:14.000
Like we calculated, that's about $30,000 in one year of savings just by moving to Python if we do that in the first year course and then this engineering programming course. So it's like little bits, but like those little bits really do add up.
00:22:14.000 --> 00:22:24.240
They do. That's cool. I mean, maybe you could almost offer like another course that pay an instructor to offer a course that otherwise wouldn't be available rather than sending that over to MATLAB, right?
00:22:24.240 --> 00:22:29.120
Right. Or how many students could you give scholarships for that at a community college? That's a lot of students, right?
00:22:29.120 --> 00:22:34.260
That'd be actually excellent. Yeah, that's great. Maybe talk about some of the road bumps. Like what were some of the challenges?
00:22:34.260 --> 00:22:49.480
There were a lot of road bumps. So initially installation, that was a big road bump because we work at a big institution. So Portland Community College is actually the biggest college in Oregon. There are around 70,000 students, depending on how you count.
00:22:49.600 --> 00:23:00.060
So that's bigger than the U of O, University of Oregon, bigger than Oregon State. And so doing things like changing infrastructure, that's something that happens fairly slowly.
00:23:00.360 --> 00:23:08.920
And we wanted to make sure that we had Python installed when the quarter starts so that the students could use it. So that was one of the big roadblocks.
00:23:08.920 --> 00:23:10.380
Yeah, yeah, that's a huge challenge.
00:23:10.380 --> 00:23:17.980
When you're talking about those instructors, like you've been doing it for so many years and they only have a little bit to retire, like that is a huge barrier.
00:23:18.200 --> 00:23:24.880
Like telling the administration or like the IT people, you need to install this piece of software on every computer on campus.
00:23:24.880 --> 00:23:28.080
Like that can be a real non-starter at some places.
00:23:28.080 --> 00:23:29.380
Yeah, I can imagine.
00:23:29.380 --> 00:23:35.200
What kind of hardware and OSs do you use? Is it mostly Windows? Do you have like Mac machines? What do you got?
00:23:35.200 --> 00:23:37.760
We got all Windows machines and...
00:23:37.760 --> 00:23:38.780
Windows 10?
00:23:38.960 --> 00:23:52.980
Yeah, Windows 10 at the college. And the student machines, students, I've like done surveys and students overwhelmingly use Windows. There might be one student that uses a Mac or there might be zero students who use a Mac.
00:23:52.980 --> 00:23:53.700
How interesting.
00:23:53.700 --> 00:23:54.860
In the class, yeah.
00:23:54.860 --> 00:24:02.020
I mean, you look at the price of a Mac versus like a decent Windows laptop, though. It's like three to four times the price, right? So it makes sense.
00:24:02.020 --> 00:24:15.540
Right. And also some students use either Chromebooks because they're even cheaper or they use tablets. And so the installation story of Python on a Chromebook or Python on a tablet, that's not great right now either.
00:24:15.540 --> 00:24:23.620
Hey, I saw the Apple ad. It told me my iPad can replace my computer. I got this keyboard. Let's go. It's like, oh, you're an engineering student. What are you thinking, man?
00:24:23.620 --> 00:24:31.160
Right, right, right. I'll probably write a little blog post about it. I got Python going like on my Chromebook, but it's not super easy.
00:24:31.160 --> 00:24:36.720
And if you're like a student starting out learning programming, that's not going to be something that you can do.
00:24:36.720 --> 00:24:38.740
No, that's definitely a challenge. Yeah.
00:24:38.740 --> 00:24:53.100
Yeah. And then like the other challenge just was textbook. So in the course with MATLAB, we had a textbook from a regular big textbook manufacturer and it had end of review problems, you know, and it had example questions and stuff like that.
00:24:53.160 --> 00:24:54.640
Everything an instructor would want in a textbook.
00:24:54.640 --> 00:25:02.160
And there are awesome, like great Python books out there, but very few of them have homework questions at the end.
00:25:02.160 --> 00:25:04.820
That was like something big that we were missing.
00:25:04.820 --> 00:25:16.640
And also we wanted to make sure that if we were moving to this free programming language, that the textbook would also be free, that we wouldn't like offset the cost of the software by like having a $300 book.
00:25:16.840 --> 00:25:19.100
Yeah. Now Wiley's rich instead of MATLAB, whatever.
00:25:19.100 --> 00:25:20.240
Right, right. Exactly.
00:25:20.240 --> 00:25:25.660
I would say like installation and then figuring out like textbook and then course content.
00:25:25.660 --> 00:25:30.540
Those were kind of like the big roadblocks to adopting Python here at the community college.
00:25:30.540 --> 00:25:31.580
That makes a lot of sense.
00:25:31.580 --> 00:25:35.640
So we're going to talk about JupyterHub, which is a solution that you settled on.
00:25:35.700 --> 00:25:43.920
But just a few other things that come to mind as I think about this is there's coder.com, which is Visual Studio Code plus Docker container in your browser.
00:25:43.920 --> 00:25:46.560
So that would work on like a tablet or a Chromebook.
00:25:46.560 --> 00:25:49.660
There's Python Anywhere, which is pretty awesome.
00:25:49.660 --> 00:25:52.180
So there are a few solutions, right?
00:25:52.180 --> 00:25:58.080
But they're either brand new and didn't exist a year or two ago when you were doing this, or they're maybe not quite as comprehensive.
00:25:58.080 --> 00:26:02.120
Like I don't know if Python Anywhere does any like data science-y stuff.
00:26:02.120 --> 00:26:03.360
That's easy for you.
00:26:03.360 --> 00:26:05.020
I just have no awareness of that.
00:26:05.020 --> 00:26:09.440
So maybe let's talk about JupyterHub before we move off the student story.
00:26:09.440 --> 00:26:11.220
I want to ask one more question, right?
00:26:11.220 --> 00:26:17.860
So this is, I guess, programming for engineering, but it sounds like a lot of them have to take this course.
00:26:17.860 --> 00:26:24.940
I suspect there's a little bit more of a challenge to write Python and run Python than there is to write MATLAB.
00:26:24.940 --> 00:26:26.620
I'm not 100% sure.
00:26:26.620 --> 00:26:30.720
I've done enough MATLAB that I felt like you could just start typing in like the library.
00:26:30.720 --> 00:26:34.140
There's no import this or important things that you had to use.
00:26:34.520 --> 00:26:36.420
It's a little more formal to do Python.
00:26:36.420 --> 00:26:38.560
So how is that received by the students?
00:26:38.560 --> 00:26:40.620
We're like, yes, we get to learn a real programming language.
00:26:40.620 --> 00:26:42.260
Or was it like, oh, are you kidding me?
00:26:42.260 --> 00:26:43.140
Now this is even harder.
00:26:43.140 --> 00:26:49.620
I guess I'd say it was the wealth of options was maybe the difficult thing for students.
00:26:49.620 --> 00:26:52.900
Because like you were saying, you could run Python on Python Anywhere.
00:26:52.900 --> 00:26:54.380
There's also Replit.
00:26:54.380 --> 00:26:56.080
There's also Python Tutor.
00:26:56.080 --> 00:26:58.320
There's also like Google Colab.
00:26:58.320 --> 00:27:00.240
Like there are all these different ways.
00:27:00.240 --> 00:27:06.360
And one thing that intro students I think crave is just like, tell me how to do it.
00:27:06.360 --> 00:27:09.420
Like you pick the tool, just tell me how to do it.
00:27:09.420 --> 00:27:14.900
And so what we decided on was to use JupyterHub in my class.
00:27:14.900 --> 00:27:17.500
And so that sort of settled that.
00:27:17.500 --> 00:27:20.600
You don't have to like install Python.
00:27:20.600 --> 00:27:24.480
And you don't have to like go to any of these other sites and use their interface.
00:27:24.480 --> 00:27:27.280
Like we're just going to be using JupyterHub.
00:27:27.400 --> 00:27:28.500
That's what we decided on.
00:27:28.500 --> 00:27:28.740
Okay.
00:27:28.740 --> 00:27:29.920
Yeah, that makes a lot of sense.
00:27:29.920 --> 00:27:33.100
It's basically Jupyter Notebooks hosted.
00:27:33.100 --> 00:27:36.500
It's a server for hosting Jupyter Notebooks on a central server.
00:27:36.500 --> 00:27:40.400
So did you get like a super nice Linux machine?
00:27:40.400 --> 00:27:43.580
Lots of cores so they can go do math on it?
00:27:43.580 --> 00:27:45.100
Well, sort of.
00:27:45.100 --> 00:27:46.020
Did it actually not need it?
00:27:46.020 --> 00:27:48.740
Actually, my laptop is plugged in here.
00:27:48.740 --> 00:27:50.080
Right, right.
00:27:50.080 --> 00:27:52.820
So let's like back up just a little bit.
00:27:52.820 --> 00:27:56.140
So to make sure that everybody knows what a Jupyter Notebook is.
00:27:56.140 --> 00:27:59.960
So Jupyter Notebook is a way to write and run Python code.
00:27:59.960 --> 00:28:03.300
And it also contains things that are called markdown cells.
00:28:03.300 --> 00:28:04.940
So you can also write text in them.
00:28:04.940 --> 00:28:10.180
So they're this great way for writing, running Python code, and then explaining what the code does,
00:28:10.180 --> 00:28:15.300
which is super useful when you're teaching an engineering class to have both of those things available.
00:28:15.300 --> 00:28:18.320
Explain what the code does and then write the code.
00:28:18.760 --> 00:28:21.940
And these Jupyter Notebooks, they just run in web browsers.
00:28:21.940 --> 00:28:28.860
So I was thinking when we were doing the course, like, well, if it can just run in a web browser,
00:28:28.860 --> 00:28:32.920
then maybe a student can like just open up a web browser and run it.
00:28:32.920 --> 00:28:35.240
Like they won't need to install Python in their computer.
00:28:35.240 --> 00:28:38.960
And so I was like Googling around and I found like Jupyter Hub.
00:28:38.960 --> 00:28:39.840
Like it exists.
00:28:39.840 --> 00:28:41.620
Like Project Jupyter created this.
00:28:41.620 --> 00:28:42.840
And I was like, awesome.
00:28:42.840 --> 00:28:44.320
This is exactly what I want.
00:28:44.320 --> 00:28:45.200
Yeah, that's cool.
00:28:45.200 --> 00:28:45.880
That's great.
00:28:46.600 --> 00:28:50.540
So I installed it on a virtual machine on DigitalOcean.
00:28:50.540 --> 00:28:57.320
And what I found was the very first quarter that I did this, it was in a hybrid class.
00:28:57.320 --> 00:29:01.000
And that means some of the class is in person, some of the class is online.
00:29:01.000 --> 00:29:07.960
And when they did the computing labs that were online, the students would log in at different times.
00:29:07.960 --> 00:29:10.900
Not everybody tries to log in at exactly the same time.
00:29:11.220 --> 00:29:12.740
When it's just totally online.
00:29:12.740 --> 00:29:19.980
And just a real small virtual machine, like a $10 a month virtual machine worked just fine for that.
00:29:19.980 --> 00:29:29.160
And the first day that we went into the class that was all in person and everybody tried to log in at exactly the same time,
00:29:29.160 --> 00:29:33.140
that kind of crawled the server like a little bit and it took a little while.
00:29:33.600 --> 00:29:48.340
So sort of what I'm realizing now is I either have to like up the size of the server that I've got or the JupyterHub documentation talks about using Kubernetes and deploying Docker containers instead of running it all on one individual server.
00:29:48.340 --> 00:29:50.920
But totally thanks to Talk Python.
00:29:50.920 --> 00:29:53.000
Like I used one of the credits from DigitalOcean.
00:29:53.000 --> 00:29:54.720
That's how I ran that first course.
00:29:54.720 --> 00:29:55.940
Wow, that's awesome.
00:29:55.940 --> 00:29:56.680
Yeah, how cool.
00:29:57.160 --> 00:30:02.800
So I was actually able to like get a bigger server than the one that I currently have now because of that credit.
00:30:02.800 --> 00:30:09.640
Yeah, you know, it's just amazing what you can do with computational resources and virtual machines these days.
00:30:09.640 --> 00:30:17.740
When I was in, when I was getting my math degree at four-year college, the last year we got this computing, like shared computing server.
00:30:17.740 --> 00:30:22.680
It was like a used computer they had bought secondhand from some other place, right?
00:30:22.680 --> 00:30:26.220
It was a Silicon Graphics, big mainframe type of thing.
00:30:26.220 --> 00:30:29.700
And they paid a quarter million dollars for this used computer.
00:30:30.420 --> 00:30:34.000
And, you know, like seven or eight people could log into it and do stuff.
00:30:34.000 --> 00:30:36.260
And it was kind of okay.
00:30:36.260 --> 00:30:39.740
And then here you are running like all that on, you know, 10 bucks.
00:30:39.740 --> 00:30:41.200
It's really impressive.
00:30:41.200 --> 00:30:41.880
All right.
00:30:41.880 --> 00:30:42.440
Yeah, yeah.
00:30:42.440 --> 00:30:43.540
It's so cool.
00:30:43.540 --> 00:30:48.140
So, you know, I think there's a lot of advantages to having these notebooks.
00:30:48.140 --> 00:30:50.900
I mean, certainly you have JupyterHub and run them there.
00:30:50.900 --> 00:30:57.180
Like they also, if you put them into GitHub, GitHub like will execute them and actually render them live.
00:30:57.180 --> 00:30:59.320
And there's NB Viewer and there's Binder.
00:30:59.320 --> 00:31:00.840
There's all sorts of stuff, right?
00:31:00.840 --> 00:31:01.340
Yeah.
00:31:01.340 --> 00:31:04.580
And Google Colab will now run them too.
00:31:04.580 --> 00:31:14.220
So there are just a lot, a lot of ways that even without starting a virtual machine that you can either view or interact with Jupyter Notebooks.
00:31:14.220 --> 00:31:15.980
It's a pretty amazing technology.
00:31:15.980 --> 00:31:22.920
And then one of the other things about it is Jupyter stands for Julia, Python, and R.
00:31:22.920 --> 00:31:26.740
So you don't even have to run just Python in Jupyter Notebooks.
00:31:26.740 --> 00:31:34.600
Like you could also run the R programming language or you could run Julia or there are a bunch of different backends that you can plug into it too.
00:31:34.600 --> 00:31:37.720
And then there are like these extensions too.
00:31:37.900 --> 00:31:49.100
So I found this really neat extension that you could plug in and it allowed you to do draw.io flowcharts like right in the JupyterLab interface.
00:31:49.100 --> 00:31:58.320
So students can like draw the flowcharts that describe, you know, their loops or their if statements right there in the JupyterHub interface, which is pretty cool too.
00:31:58.500 --> 00:31:59.040
That's really awesome.
00:31:59.040 --> 00:32:06.800
It sounds like this solves, like that virtual machine you went and created, it sounds like that solves it for your instance of the class.
00:32:06.800 --> 00:32:16.800
But I can see as a college, as a department going, okay, well, we can't always just, you know, call Peter the week before and have him use some credits to get a VM running mic.
00:32:16.800 --> 00:32:18.960
What's the long-term plan there?
00:32:20.240 --> 00:32:28.180
Well, so one of the reasons that I set up JupyterHub was I was worried that the college wouldn't install the software before the quarter started.
00:32:28.180 --> 00:32:35.600
And it also gave the students like a way to log on and like run Python before the class even started.
00:32:35.600 --> 00:32:41.860
And I think for some students, that's really nice to like just get their feet wet and be like, oh, this is what we're doing.
00:32:41.860 --> 00:32:44.000
And like, oh, this isn't too hard.
00:32:44.000 --> 00:32:47.960
And they can't come in and use the lab computers during like winter break or whatever.
00:32:48.580 --> 00:32:54.400
So it did turn out that the Anaconda distribution of Python did get installed on the college computers.
00:32:54.400 --> 00:33:04.900
So now at the college, I have the students open Jupyter Notebooks using either the Anaconda prompt or just using the Windows Start menu and opening a Jupyter Notebook that way.
00:33:04.900 --> 00:33:11.380
And at least for us in engineering, like the Anaconda distribution is super helpful.
00:33:11.380 --> 00:33:13.100
It has Matplotlib.
00:33:13.100 --> 00:33:14.420
It has NumPy.
00:33:14.420 --> 00:33:15.860
It has Pandas.
00:33:15.860 --> 00:33:17.360
It's got PyCereal.
00:33:17.800 --> 00:33:22.020
Like all the packages that you would want to install, all of those are already included.
00:33:22.020 --> 00:33:26.880
And doing like pip install installations and virtual environments.
00:33:26.880 --> 00:33:30.660
Like if you've been doing it for a while, that sort of seems like, oh, yeah, that's just easy.
00:33:30.660 --> 00:33:32.580
You just create a new virtual environment.
00:33:32.580 --> 00:33:35.920
For a student, it's really kind of complicated and opaque.
00:33:35.920 --> 00:33:37.100
Like, what is this?
00:33:37.100 --> 00:33:37.520
Yeah.
00:33:37.520 --> 00:33:39.660
Like, I just want to open a file and make it run.
00:33:39.660 --> 00:33:40.680
Like, why am I doing this?
00:33:40.680 --> 00:33:40.860
Right.
00:33:40.860 --> 00:33:41.200
Right.
00:33:41.540 --> 00:33:45.300
And so using Anaconda, then the students don't have to install anything.
00:33:45.300 --> 00:33:48.040
Like, you import NumPy and MP and it just works.
00:33:48.040 --> 00:33:51.780
So are they generally using their local computers these days?
00:33:51.780 --> 00:33:55.300
Generally, they're using in the classroom their local computers.
00:33:55.300 --> 00:34:00.200
But I actually just like logged on to the JupyterHub server about half an hour ago.
00:34:00.320 --> 00:34:03.720
And there were like a couple of students that had logged on.
00:34:03.720 --> 00:34:05.640
So students are still using it.
00:34:05.640 --> 00:34:06.840
Yeah, that's pretty awesome.
00:34:06.840 --> 00:34:12.020
So earlier you spoke about this challenge of the textbooks.
00:34:12.020 --> 00:34:18.020
And, you know, like I said, I remember the textbooks just being like a huge expense that I didn't see coming.
00:34:18.020 --> 00:34:19.120
Like I saw tuition coming.
00:34:19.260 --> 00:34:23.660
I didn't see $500 a semester in books also.
00:34:23.660 --> 00:34:26.260
Like, geez, where am I going to get that money from as a kid, you know?
00:34:26.260 --> 00:34:26.840
Right, right.
00:34:26.840 --> 00:34:33.780
And there are, like you said, a bunch of great Python books that people can just sort of colloquially learn Python.
00:34:33.780 --> 00:34:35.840
Like you read, it's interesting, right?
00:34:35.840 --> 00:34:39.920
But not in the formal school sense, right?
00:34:39.920 --> 00:34:41.860
Like chapter three is going to have this test.
00:34:41.860 --> 00:34:43.820
And here's some example exercises like it.
00:34:43.820 --> 00:34:46.540
So you're working on a book for this, right?
00:34:46.540 --> 00:34:52.740
Along with making JupyterHub go so the students could see how to run Python before the quarter started.
00:34:52.740 --> 00:34:59.820
I also wrote this open source book so that the students could read the book before the quarter started too.
00:34:59.820 --> 00:35:01.740
And I was kind of inspired.
00:35:01.740 --> 00:35:05.260
Like Jake Vander Plaas, he wrote the Python Data Science Handbook.
00:35:05.260 --> 00:35:07.040
And that was written in Jupyter Notebooks.
00:35:07.040 --> 00:35:10.600
And there are a couple of other books that were written in Jupyter Notebooks.
00:35:10.800 --> 00:35:16.540
And I was like, I don't want to both like write the code and then I have to like test all the code.
00:35:16.540 --> 00:35:20.520
And then like 3.7 is going to come out and then I have to retest all the code.
00:35:20.520 --> 00:35:23.780
Like why not just write the whole thing in a Jupyter Notebook?
00:35:23.780 --> 00:35:29.420
And then like the code that produces the plot, that's the plot that's like right there in the book.
00:35:29.860 --> 00:35:38.620
So I wrote the book in Jupyter Notebooks and then students could view it in NB Viewer or go on to Binder and run them themselves.
00:35:38.720 --> 00:35:50.280
And then I also used a package called mkdocs to build a web version of the book so that the students can just go to a website and see what their homework is and read through the material.
00:35:50.280 --> 00:35:51.360
Yeah, this is really nice.
00:35:51.360 --> 00:35:53.760
So problem solving with python.com, right?
00:35:53.760 --> 00:35:56.420
Yeah, that's the textbook website.
00:35:56.420 --> 00:35:58.360
And it just got published on Amazon.
00:35:58.360 --> 00:36:01.860
So if you want a hard copy, that'll cost a little bit of money.
00:36:01.860 --> 00:36:06.800
But all the students can use the web version or look at all the notebooks for free.
00:36:06.800 --> 00:36:13.360
And some other authors have sort of adopted that same kind of idea that if you get the hard copy, you have to pay a little bit of money.
00:36:13.360 --> 00:36:17.080
But if you're going to use the PDF or like use the web version, that's free.
00:36:17.080 --> 00:36:19.360
And that's what I did it for my book too.
00:36:19.360 --> 00:36:19.860
Oh, yeah.
00:36:19.860 --> 00:36:21.020
It looks really interesting.
00:36:21.020 --> 00:36:23.000
I like the exercises seem cool.
00:36:23.000 --> 00:36:24.160
The review questions seem cool.
00:36:24.160 --> 00:36:32.080
You have a Kindle version, which is maybe some weird intermediate thing where, you know, I really love the Kindle because you can take notes and highlights, right?
00:36:32.080 --> 00:36:36.420
Like the web pages are great, but it's super hard to use it as reference, you know?
00:36:36.600 --> 00:36:40.540
Yeah, and it's sometimes nice to be able to read the Kindle in bed or you're like on the bus.
00:36:40.540 --> 00:36:43.460
You know, it's nice to be able to have that version too.
00:36:43.460 --> 00:36:50.440
But part of writing the book, big challenge was how do you output to all of these different formats?
00:36:50.440 --> 00:36:52.700
Like you have to create a website version.
00:36:52.700 --> 00:36:55.320
You have to create the print version.
00:36:55.320 --> 00:36:56.740
You have to create a PDF.
00:36:57.100 --> 00:36:58.820
You have to create the Kindle version.
00:36:58.820 --> 00:37:02.740
And I don't want to write four different books all at the same time.
00:37:02.960 --> 00:37:12.680
So Project Jupyter, they've got this nbconvert package and that'll allow you to export Jupyter notebooks to various other file formats.
00:37:12.680 --> 00:37:23.580
And lucky if you know Python, then that can help you with some of this stuff to be able to get the web version up and get a separate PDF made and get the separate Kindle version made.
00:37:23.740 --> 00:37:28.760
So I'm just really, really thankful for all the people at Project Jupyter and all the hard work that they did.
00:37:28.760 --> 00:37:29.280
That's awesome.
00:37:29.280 --> 00:37:32.840
So the source of the book is a series of Jupyter notebooks?
00:37:32.840 --> 00:37:33.400
Yep.
00:37:33.400 --> 00:37:33.920
What are more?
00:37:33.920 --> 00:37:34.400
Many.
00:37:34.400 --> 00:37:35.280
Okay.
00:37:35.280 --> 00:37:35.540
Yeah, yeah.
00:37:35.540 --> 00:37:35.840
Many.
00:37:35.900 --> 00:37:41.840
So there's sort of like one big directory and in there is a couple subdirectories for each chapter.
00:37:41.840 --> 00:37:45.620
And in each chapter, there are between, I don't know, six or ten books.
00:37:45.620 --> 00:37:48.060
So there's a notebook for each section of the book.
00:37:48.060 --> 00:37:51.280
And then those all get put together to build a website.
00:37:51.280 --> 00:37:59.280
Another real benefit that I didn't realize until students started using it was that you can make edits on the fly really, really quickly.
00:37:59.500 --> 00:38:06.060
Like I can just, you know, pull the GitHub repo down and start editing one of the notebooks and then save it and push it back up.
00:38:06.060 --> 00:38:08.560
And then the students like version is changed.
00:38:08.560 --> 00:38:16.100
So having like a class of students is a great way to see where all like your little typos, grammatical mistakes, what's confusing.
00:38:16.100 --> 00:38:19.060
Like it's probably like the awesomest editing system.
00:38:19.060 --> 00:38:25.160
I don't really mean to use the students as editors, but they've just been great, like sending me suggestions to improve the book.
00:38:25.160 --> 00:38:30.460
Well, the normal iterative cycle on textbooks is years, right?
00:38:30.460 --> 00:38:30.720
Right.
00:38:30.720 --> 00:38:32.840
It's not near live.
00:38:32.840 --> 00:38:35.020
So that's a pretty cool aspect.
00:38:35.020 --> 00:38:43.860
This portion of Talk Python To Me is brought to you by StellarS, the AI-powered talent agent for top tech talent.
00:38:43.860 --> 00:38:46.860
Hate your job or feeling just kind of meh about it?
00:38:46.860 --> 00:38:51.360
StellarS will help you find a new job you'll actually be excited to go to.
00:38:52.000 --> 00:38:55.740
StellarS knows that a job is much more than just how it sounds in a job description.
00:38:55.740 --> 00:38:59.980
So they built their AI-powered talent agent to help you find the ideal job.
00:38:59.980 --> 00:39:09.660
StellarS does all the work and screening for you, scouting out the best companies and roles and introducing you to opportunities outside your network that you wouldn't have otherwise found.
00:39:10.220 --> 00:39:22.460
Combining deep AI matching with human support, StellarS pairs things down to a maximum of five opportunities that tightly match your goals, like compensation, work-life balance, working on products you're passionate about, and team chemistry.
00:39:22.460 --> 00:39:29.420
They then facilitate warm intros, and there's never any pressure, just opportunities to explore what's out there.
00:39:29.420 --> 00:39:35.180
To get started and find a job that's just right for you, visit talkpython.fm/StellarS.
00:39:35.180 --> 00:39:40.320
That's talkpython.fm/S-T-E-L-L-A-R-E-S.
00:39:40.320 --> 00:39:43.140
Or just click the link in your show notes in your podcast player.
00:39:45.880 --> 00:39:52.380
Do you encourage them to use GitHub issues and PRs and things like that, or do you just say, hey, send me a note that there's something wrong here?
00:39:52.380 --> 00:39:55.740
Yeah, so far with the students, I've just said, hey, send me a note.
00:39:55.740 --> 00:40:02.980
And if anyone wants to send me a PR, and absolutely, if anybody wants to use the book in their class, please do so.
00:40:02.980 --> 00:40:09.440
So far in the course, we haven't gotten into Git and version control and how to do those sorts of things.
00:40:09.440 --> 00:40:11.620
So I thought it was a little bit much to ask.
00:40:12.160 --> 00:40:14.700
And students, it's easy for them to send me an email.
00:40:14.700 --> 00:40:16.160
So so far, that's how it is.
00:40:16.160 --> 00:40:23.680
But if anybody else reads the book and wants to make changes to it or wants to use one chapter but not use the other chapters,
00:40:23.680 --> 00:40:28.260
they can definitely just go to the GitHub repo and pull it down and use what they need.
00:40:28.260 --> 00:40:28.700
Interesting.
00:40:28.700 --> 00:40:31.000
Maybe add an appendix for something or other.
00:40:31.000 --> 00:40:31.400
Yeah.
00:40:31.400 --> 00:40:33.800
And I took this idea from Allen Downey.
00:40:33.800 --> 00:40:36.840
He's wrote a couple Python books, like the Think Python book.
00:40:36.840 --> 00:40:39.980
At the end of his book, he had this list of contributors.
00:40:40.280 --> 00:40:44.100
So every time I think somebody sent him something, then he put it in a list.
00:40:44.100 --> 00:40:49.160
So I'll start listing anybody at the back of the book and the contributors if anybody sends me any edits.
00:40:49.160 --> 00:40:49.480
Yeah.
00:40:49.480 --> 00:40:49.720
OK.
00:40:49.720 --> 00:40:51.080
Well, that's a great idea.
00:40:51.080 --> 00:40:51.840
Yeah.
00:40:51.840 --> 00:40:52.860
So people should check that out.
00:40:52.860 --> 00:40:54.880
It seems like a really nice resource.
00:40:54.880 --> 00:41:02.240
Even you think it's good for students who just want to learn Python and have they're not in like your ENG 101 course?
00:41:02.240 --> 00:41:13.960
So if you're not an engineering major and you're not going to go on to a four-year engineering degree, I think it's still a really good intro resource because it's designed for students who don't have any experience in programming.
00:41:14.680 --> 00:41:23.420
And also, if you're into data science and you want to get into data science, the tools that engineers use are a lot like the tools that data scientists use.
00:41:23.560 --> 00:41:26.640
So in the book, there's a whole chapter on NumPy.
00:41:26.640 --> 00:41:29.740
There's a chapter on Matplotlib and building plots.
00:41:29.740 --> 00:41:32.020
Pandas and data frames are used.
00:41:32.020 --> 00:41:36.460
And then some other packages like PySerial for communicating with hardware.
00:41:36.460 --> 00:41:41.680
Also, SymPy for doing kind of symbolic math, for doing math with Python.
00:41:41.680 --> 00:41:43.340
That's also in the book.
00:41:43.340 --> 00:41:48.100
So if you're into data science, it could also be like a good resource for you, I think.
00:41:48.100 --> 00:41:49.180
Yeah, I think it would be.
00:41:49.180 --> 00:41:54.960
When you first told me about it, I was thinking it's mostly an engineering book that has some Python in it.
00:41:54.960 --> 00:42:01.180
But it's mostly a programming book where the examples and the intended audience are engineers, right?
00:42:01.180 --> 00:42:01.880
Yeah, exactly.
00:42:01.880 --> 00:42:03.860
Yeah, that seems to me like that would be really useful.
00:42:03.860 --> 00:42:10.880
When I was in engineering, I did like one year in chemical engineering before I decided I didn't want to be in chemical engineering.
00:42:11.160 --> 00:42:15.160
And they told me during this period, I said, I would love to take a programming course.
00:42:15.160 --> 00:42:16.880
Can I take like a C++ course?
00:42:16.880 --> 00:42:19.040
They said, look, that can be an elective.
00:42:19.040 --> 00:42:22.040
But you first have to take Fortran.
00:42:22.040 --> 00:42:25.360
That's going to be the most important computer course you ever take in your life.
00:42:25.360 --> 00:42:26.320
And you've got to study that.
00:42:26.320 --> 00:42:29.060
And then you're allowed to do an elective C++ course, right?
00:42:29.060 --> 00:42:30.940
It's like mid-90s or something.
00:42:30.940 --> 00:42:38.380
And I just, I would love to have a book like this that covered a modern language that wasn't already old in 1995.
00:42:40.080 --> 00:42:48.580
Yeah, and hopefully, hopefully, whatever the students learn in my course right now, and then in another 20 years, hopefully that will still be useful.
00:42:48.580 --> 00:42:51.300
We'll be at Python, what, version 10 by that point or something, right?
00:42:51.300 --> 00:42:52.060
Yeah, exactly.
00:42:52.060 --> 00:42:54.080
I've heard talk of Python 4.
00:42:54.080 --> 00:42:55.440
I have no idea what that's going to mean.
00:42:55.440 --> 00:42:59.340
We're working on the versions as a community, I believe.
00:42:59.340 --> 00:43:02.780
Oh, I guess it's worth asking, right?
00:43:02.780 --> 00:43:03.800
This is Python 3?
00:43:03.800 --> 00:43:05.760
This is Python 3.6.
00:43:05.760 --> 00:43:08.240
And I call the book the 3.6 edition.
00:43:08.240 --> 00:43:12.300
And I'm working on, for the spring, the 3.7 edition.
00:43:12.300 --> 00:43:17.900
And then I'll change my virtual environment that I run all the notebooks in, make sure it all runs with 3.7.
00:43:18.520 --> 00:43:23.860
The new f-strings, I think that that is a killer feature in Python.
00:43:23.860 --> 00:43:25.920
And so the book does use f-strings.
00:43:25.920 --> 00:43:31.900
It just makes inserting numbers and other strings into strings so, so much easier.
00:43:31.900 --> 00:43:33.720
So it's definitely Python 3 only.
00:43:33.720 --> 00:43:34.100
Perfect.
00:43:34.100 --> 00:43:35.520
It's time, right?
00:43:35.520 --> 00:43:36.600
Yeah, it's time.
00:43:36.920 --> 00:43:38.980
It's been time for a while, but it's really time now.
00:43:38.980 --> 00:43:41.640
I see you have a chapter on MicroPython.
00:43:41.640 --> 00:43:42.260
Yeah.
00:43:42.260 --> 00:43:43.720
And also external hardware.
00:43:43.720 --> 00:43:44.340
That's pretty cool.
00:43:44.340 --> 00:43:45.600
What do you guys do with that?
00:43:45.600 --> 00:43:51.180
With external hardware, we connect the computers to little Arduinos, little microcontrollers.
00:43:51.180 --> 00:43:56.700
Students can control LEDs or they can read temperature sensors, things like that.
00:43:56.700 --> 00:44:00.980
And we used to use MATLAB to do that, and it was pretty cumbersome.
00:44:00.980 --> 00:44:05.760
But the PySerial package allows you to communicate with external hardware.
00:44:06.340 --> 00:44:12.020
So Python talks to these little Arduinos, these little microcontroller boards through the
00:44:12.020 --> 00:44:14.800
serial interface using PySerial.
00:44:14.800 --> 00:44:20.720
And the students each quarter do these projects with these little microcontrollers.
00:44:20.720 --> 00:44:27.660
So, for example, one student group made a project that opened a set of doors that allowed this
00:44:27.660 --> 00:44:29.120
car to run down a track.
00:44:29.120 --> 00:44:34.140
Or another student group had a set of photo gates, and they measured how fast the car ran.
00:44:34.540 --> 00:44:42.960
Or another student group put a light sensor on this aquaponics fish tank grow system and measured
00:44:42.960 --> 00:44:44.980
the amount of light that the plants were getting.
00:44:44.980 --> 00:44:50.320
And it sort of ended up being that the students would have to learn two different programming
00:44:50.320 --> 00:44:50.820
languages.
00:44:50.820 --> 00:44:56.000
They'd have to use MATLAB, and then they'd have to learn the Arduino programming language,
00:44:56.000 --> 00:44:59.000
which was just sort of like C to do their projects.
00:44:59.200 --> 00:45:01.920
But Python has MicroPython.
00:45:01.920 --> 00:45:04.180
So you don't have to learn Arduino.
00:45:04.180 --> 00:45:07.620
You can run Python on the little microcontrollers.
00:45:07.620 --> 00:45:08.320
It's awesome.
00:45:08.320 --> 00:45:09.340
It's so amazing.
00:45:09.340 --> 00:45:09.800
Yeah.
00:45:09.960 --> 00:45:15.060
This quarter, the students will use those little microcontrollers and run MicroPython on them.
00:45:15.060 --> 00:45:18.880
And then they can use most of the regular Python commands that they learned throughout the rest
00:45:18.880 --> 00:45:19.380
of the course.
00:45:19.380 --> 00:45:20.260
Yeah, that's really interesting.
00:45:20.260 --> 00:45:22.460
Because going from MATLAB to C, that's a big step.
00:45:22.460 --> 00:45:22.820
Definitely.
00:45:22.820 --> 00:45:28.580
But hopefully going from like Python to MicroPython, like that won't be as huge of a jump.
00:45:28.580 --> 00:45:33.140
And I'm also looking forward just to see the things that the students are going to be able
00:45:33.140 --> 00:45:34.060
to do with them.
00:45:34.060 --> 00:45:37.240
Like they always come up with these awesome, awesome projects.
00:45:37.240 --> 00:45:41.540
One student group had a coffee cup and the temperature thermometer.
00:45:41.540 --> 00:45:45.840
And their idea was they were going to have it like send you a text message when your coffee
00:45:45.840 --> 00:45:46.460
got cold.
00:45:46.460 --> 00:45:49.200
Like I'm just super excited to see what they turn out to be this quarter.
00:45:49.200 --> 00:45:50.000
That's cool.
00:45:50.000 --> 00:45:52.940
You've got five minutes to finish your coffee before you won't like it anymore.
00:45:52.940 --> 00:45:53.340
Go.
00:45:53.340 --> 00:45:54.540
Yeah.
00:45:54.540 --> 00:45:55.220
Oh, how cool.
00:45:55.220 --> 00:46:02.520
I can certainly see this IoT device programming aspect of being an engineer really being useful,
00:46:02.520 --> 00:46:02.780
right?
00:46:02.880 --> 00:46:05.460
Like engineers build things, they have sensors, right?
00:46:05.460 --> 00:46:08.760
Understanding like the control mechanisms seems great.
00:46:08.760 --> 00:46:10.900
Engineers solve problems in teams.
00:46:10.900 --> 00:46:12.500
That's what I always tell my students.
00:46:12.500 --> 00:46:19.020
And so like they use computers to solve problems, not just to design computer stuff.
00:46:19.020 --> 00:46:22.580
So we try in the course to like make them solve a real problem.
00:46:22.580 --> 00:46:27.640
And MicroPython and like those little teeny microcontrollers, like you can solve real problems
00:46:27.640 --> 00:46:28.540
with programming.
00:46:28.540 --> 00:46:29.200
It's really neat.
00:46:29.200 --> 00:46:29.560
Yeah.
00:46:29.560 --> 00:46:32.620
A real in the physical world with atoms, not bits, right?
00:46:32.620 --> 00:46:33.740
Yeah, exactly.
00:46:33.740 --> 00:46:34.260
Exactly.
00:46:34.260 --> 00:46:34.820
Yeah.
00:46:34.820 --> 00:46:35.100
Cool.
00:46:35.100 --> 00:46:40.040
I guess one other follow-up thing I'd like to ask you about this whole JupyterHub and
00:46:40.040 --> 00:46:47.920
Jupyter Notebooks is what tools or advice do you have for people who may want to use JupyterHub as
00:46:47.920 --> 00:46:51.840
their like homework, student work area, right?
00:46:51.920 --> 00:46:56.240
Do you use things like NB Grader or do you use like is there, what advice do you have for
00:46:56.240 --> 00:46:56.680
people I guess?
00:46:56.680 --> 00:47:01.800
Well, so if an instructor wants to do this, I guess one of the big pieces of advice is you
00:47:01.800 --> 00:47:04.620
have to think about authentication early.
00:47:04.620 --> 00:47:07.300
Like how are the students going to log on?
00:47:07.300 --> 00:47:12.340
Because you could have them all get GitHub usernames and passwords and do it that way.
00:47:12.340 --> 00:47:15.920
Our college uses Google apps like Gmail and stuff.
00:47:15.920 --> 00:47:21.820
So you could use like your Google logins or you could create individual usernames and passwords
00:47:21.820 --> 00:47:24.720
that you like mail out to individual people.
00:47:24.720 --> 00:47:30.220
So like thinking about authentication, I think is like one of the things early on that you should
00:47:30.220 --> 00:47:30.820
think about.
00:47:30.820 --> 00:47:36.200
And then another one is just data persistence or like state persistence.
00:47:36.200 --> 00:47:42.800
So when the JupyterHub starts, it creates these new servers and there are different ways to
00:47:42.800 --> 00:47:43.260
run it.
00:47:43.260 --> 00:47:49.480
If you run it in a Docker container, it's possible that all of your work, once you close down your
00:47:49.480 --> 00:47:52.400
server, like you close your web browser, all that goes away.
00:47:52.400 --> 00:47:55.920
So that's the way that Binder works is that you can run these notebooks.
00:47:55.920 --> 00:48:00.620
But if you save like homework number one and you close it, like and you come back later,
00:48:00.620 --> 00:48:01.220
it's gone.
00:48:01.220 --> 00:48:02.220
That'd be a little frustrating.
00:48:02.220 --> 00:48:03.720
Yeah, that would be totally frustrating.
00:48:03.720 --> 00:48:06.140
So you can't quite do like a whole course in that.
00:48:06.140 --> 00:48:11.740
So you have to think about how are you going to allow data to persist on the server if users
00:48:11.740 --> 00:48:13.020
are creating it.
00:48:13.020 --> 00:48:17.840
Another little concern of mine was all of the labs and the assignments are on GitHub.
00:48:17.840 --> 00:48:24.200
So how can I pull all of the labs and the assignments into the student's environment so
00:48:24.200 --> 00:48:27.000
they don't have to go to GitHub and look at them.
00:48:27.000 --> 00:48:30.420
They're like right there in their Jupyter notebook when they're going to the
00:48:30.420 --> 00:48:31.820
they log into JupyterHub.
00:48:31.820 --> 00:48:37.640
And there's this neat little extension called nb-git-puller, I think.
00:48:37.640 --> 00:48:43.860
And this nb-git-puller extension, you click a link and then it automatically like pulls down
00:48:43.860 --> 00:48:50.280
a repo from GitHub and sticks it into one of the JupyterLab or JupyterHub instances.
00:48:50.700 --> 00:48:53.380
So that was like a really neat package to find.
00:48:53.380 --> 00:48:53.860
Oh, yeah.
00:48:53.860 --> 00:48:55.260
That is pretty cool.
00:48:55.260 --> 00:48:58.740
A one-way git repository access.
00:48:58.740 --> 00:48:59.320
That's nice.
00:48:59.320 --> 00:49:04.840
Also, how did you deal with like, did you set it up so students each had their own private
00:49:04.840 --> 00:49:07.080
set of things but you could see them?
00:49:07.080 --> 00:49:12.160
Because obviously if one student can see another is like that takes like copy and homework to
00:49:12.160 --> 00:49:12.980
another level, right?
00:49:13.420 --> 00:49:14.280
Yeah, totally.
00:49:14.280 --> 00:49:17.480
There are different ways to set up JupyterHub.
00:49:17.480 --> 00:49:23.620
But the way that this one is set up is that when a student logs in, they basically get a new user
00:49:23.620 --> 00:49:26.700
on a virtual private server on the Linux server.
00:49:26.820 --> 00:49:33.260
And so their user on that Linux server doesn't have access to really anything outside their
00:49:33.260 --> 00:49:34.100
own home folder.
00:49:34.100 --> 00:49:37.460
So each one of the students has a different Linux user.
00:49:37.460 --> 00:49:38.880
They have a different home folder.
00:49:38.880 --> 00:49:46.600
And so they can't really see anything outside of just their local like user profile.
00:49:46.600 --> 00:49:47.180
Yeah, OK.
00:49:47.180 --> 00:49:53.780
And if a student like is super, super clever, like actually JupyterLab has command line available
00:49:53.780 --> 00:49:58.900
and they're like able to like hack into the server, send me an email and we'll talk about
00:49:58.900 --> 00:50:03.380
it because you're like way, way above like where a lot of students are if you're able to do that.
00:50:03.380 --> 00:50:05.600
And maybe it's OK if you're copying somebody's homework.
00:50:05.600 --> 00:50:05.900
Yeah.
00:50:05.900 --> 00:50:07.720
If you figure out how to hack the server.
00:50:07.720 --> 00:50:09.200
Yeah, interesting.
00:50:09.200 --> 00:50:09.700
All right.
00:50:09.700 --> 00:50:09.860
Yeah.
00:50:09.860 --> 00:50:13.740
But it sounds like you could use Linux permissions and roles and whatnot to make it work.
00:50:13.740 --> 00:50:14.200
Yeah, yeah.
00:50:14.200 --> 00:50:15.460
That's one way to do it.
00:50:15.460 --> 00:50:19.600
Then doing the Docker containers and Kubernetes, that's like another way to do it.
00:50:19.600 --> 00:50:20.240
That's pretty cool.
00:50:20.240 --> 00:50:21.780
It sounds like a fun project.
00:50:21.780 --> 00:50:23.020
Yeah, it's super awesome.
00:50:23.360 --> 00:50:29.480
And I built a set of documentation because as I was building the JupyterHub server, I wanted
00:50:29.480 --> 00:50:32.240
to make sure like I can do this again the next quarter.
00:50:32.240 --> 00:50:38.940
So I have a little website built with MkDocs that shows every step that I went through in
00:50:38.940 --> 00:50:40.980
order to build my JupyterHub deployment.
00:50:40.980 --> 00:50:46.560
So if anybody wants to build their own JupyterHub server, they can definitely take a look at that
00:50:46.560 --> 00:50:49.020
online and see if they can build their own.
00:50:49.020 --> 00:50:50.880
It's actually it's not too hard.
00:50:51.220 --> 00:50:55.100
Like you need to do a little bit of Linux stuff and you've got to start the virtual private
00:50:55.100 --> 00:50:55.480
server.
00:50:55.480 --> 00:50:59.340
But like you can do it if you're teaching engineering programming at college.
00:50:59.340 --> 00:51:00.580
Like you can launch JupyterHub.
00:51:00.580 --> 00:51:01.220
You can do it.
00:51:01.220 --> 00:51:03.220
Yeah, that's certainly true.
00:51:03.220 --> 00:51:04.320
Cool.
00:51:04.320 --> 00:51:07.720
Yeah, that probably about rounds it out for our main conversation.
00:51:07.720 --> 00:51:09.800
You're trying to turn the tables on me here.
00:51:09.800 --> 00:51:12.740
I see you threw out some stuff that say you want to ask me a couple of questions.
00:51:12.840 --> 00:51:16.400
So I don't know if I have a good answers, but I'm game.
00:51:16.400 --> 00:51:16.820
Go ahead.
00:51:16.820 --> 00:51:17.860
All right.
00:51:17.860 --> 00:51:25.020
So one of my big questions is I'm just so grateful to everybody at Project Jupyter and
00:51:25.020 --> 00:51:31.820
Min Regan Kelly and Carol Willing and everybody who works even at NumFocus to help build like
00:51:31.820 --> 00:51:35.480
NumPy and Pandas and all of the tools that we use.
00:51:35.580 --> 00:51:41.180
What is a great way to thank people that build some of these open source tools?
00:51:41.180 --> 00:51:46.520
I'm not at the level where I can like directly contribute to the NumPy source code.
00:51:46.520 --> 00:51:50.140
Like what is a good way to thank people and say thank you for what you did?
00:51:50.260 --> 00:51:53.280
Obvious way might be to do like add a new feature or something, right?
00:51:53.280 --> 00:51:56.020
But that's a different level maybe.
00:51:56.020 --> 00:52:00.560
I think starting just by saying thank you actually is really valuable.
00:52:00.560 --> 00:52:03.820
So much of the open source stuff I think is thankless, right?
00:52:03.820 --> 00:52:09.180
People will get angry because some feature doesn't work and they'll go rail against the maintainers.
00:52:09.180 --> 00:52:13.880
And like just having a counterbalance like all these people are appreciated.
00:52:13.880 --> 00:52:17.060
Maybe sharing your story, which obviously you're doing here, right?
00:52:17.060 --> 00:52:23.360
But as a more general comment, like your work has really enabled me to teach, make Python
00:52:23.360 --> 00:52:25.700
and engineering more accessible to more folks, right?
00:52:25.700 --> 00:52:28.260
Like hearing that I think is a lot.
00:52:28.260 --> 00:52:35.400
And then if you're in an organization that can somehow contribute back to it, you know, I
00:52:35.400 --> 00:52:37.220
mean, I realize that a lot of people aren't.
00:52:37.220 --> 00:52:41.760
But if you work, say, like at a big company, you know, maybe your company could somehow sponsor
00:52:41.760 --> 00:52:47.060
that project to help, you know, make it not purely volunteer, but help make that a job.
00:52:47.060 --> 00:52:55.320
One of my pet peeves is there are many, many billion, billion dollar companies built upon things like
00:52:55.320 --> 00:53:00.260
Pandas, Django, Flask, SQLAlchemy.
00:53:00.880 --> 00:53:19.740
And if those companies just sent back 0.01% of their profit, even not just revenue profit, just to say, look, we probably should maybe support the thing that is the foundation of our business a little bit like that would just there's like a handful of people like I probably could count them on my hand.
00:53:20.180 --> 00:53:22.880
Literally, that maintain Flask, right?
00:53:22.880 --> 00:53:31.640
Like, how much do these giant companies need to contribute to actually just make those people's lives great to just sit around and contribute to Flask, right?
00:53:31.640 --> 00:53:36.080
So I feel like if that was if that's something that people could do, that would be amazing.
00:53:36.080 --> 00:53:45.220
But I think just saying thank you, maybe contribute a tutorial, maybe contribute a case study, or, you know, it doesn't have to be a new feature, right?
00:53:45.220 --> 00:53:51.180
It could be even documentation or, hey, let me I see your docs are on Python 2 for your tutorials.
00:53:51.180 --> 00:53:52.580
Can I upgrade that to Python 3?
00:53:52.580 --> 00:53:59.620
Because I know that's, you know, just like little because that's the last thing that folks that are trying to write the software want to do is like rewrite their tutorials.
00:53:59.620 --> 00:54:01.800
You up for a couple more tough ones?
00:54:01.800 --> 00:54:02.700
Yeah, hit me.
00:54:02.700 --> 00:54:03.560
All right.
00:54:03.560 --> 00:54:03.900
All right.
00:54:03.900 --> 00:54:09.720
So this is like a secret question, but I hear it from students a lot.
00:54:09.720 --> 00:54:13.840
Are you still afraid that some of the software you build is going to break?
00:54:14.360 --> 00:54:18.580
And does that feeling ever go away that you're not thinking in the back of the head?
00:54:18.580 --> 00:54:21.080
Oh, my God, what I just built like it's going to crash.
00:54:21.080 --> 00:54:22.680
Yeah, that's a great question.
00:54:22.680 --> 00:54:32.440
I certainly have little scripts and apps and utilities that are like super sketchy because they're like I needed them once or twice to do a little thing.
00:54:32.440 --> 00:54:38.140
Those will probably break because they're not very well put together because they're just a quick one offs.
00:54:38.140 --> 00:54:40.940
But at the same time, I'm not afraid because like they're not really important.
00:54:40.940 --> 00:54:43.280
I could just if I need them again, I can kind of fix it.
00:54:43.540 --> 00:54:51.920
But things that do make me nervous are like the training website that people have paid tons of money for so that they can take their classes.
00:54:51.920 --> 00:54:54.160
Maybe they've got a project next week.
00:54:54.160 --> 00:54:58.400
And it takes a long time to feel like it's not going to break anymore.
00:54:58.400 --> 00:55:00.160
But I feel like it's not going to break.
00:55:00.160 --> 00:55:00.960
All right.
00:55:00.960 --> 00:55:06.660
Like not in any like super significant way, but it takes years.
00:55:06.660 --> 00:55:08.300
So let me just put it to you this way.
00:55:08.300 --> 00:55:18.320
If I go on vacation, like, for example, I went skiing two weeks ago up on Mount Hood, went stayed up there in Timberline for a couple of days.
00:55:18.480 --> 00:55:26.120
And I was thinking, I really don't want to take my computer because I'm going to have to leave it in the car and like sub zero weather and it might hurt the battery.
00:55:26.120 --> 00:55:28.200
But what if the website goes down?
00:55:30.300 --> 00:55:32.440
Maybe I'll bring my computer just in case.
00:55:32.440 --> 00:55:34.780
And I'm, you know, still and I would say that's one.
00:55:34.780 --> 00:55:37.980
Like so I decided, no, it's been fine for the last six months.
00:55:37.980 --> 00:55:39.360
I'm not going to touch it before I leave.
00:55:39.360 --> 00:55:41.080
It'll probably be fine.
00:55:41.080 --> 00:55:47.180
Worst case, I'll buy an SSH client on my iPad and try to get in there and fix it that way.
00:55:48.120 --> 00:55:53.740
There's always like a little bit of a like a little bit of an uneasiness because you just you never know.
00:55:53.740 --> 00:55:53.960
Right.
00:55:53.960 --> 00:55:55.480
Like it could be things out of control.
00:55:55.480 --> 00:55:55.680
Right.
00:55:55.680 --> 00:55:59.260
Like maybe something happens in the data center or you just don't know.
00:55:59.260 --> 00:56:02.040
But generally it does go away.
00:56:02.040 --> 00:56:05.720
But it takes a long time on any given project, I think, before it feels OK.
00:56:05.720 --> 00:56:06.020
Yeah.
00:56:06.020 --> 00:56:09.220
I just think that's like being afraid of that your thing will break.
00:56:09.220 --> 00:56:15.520
It's not something that programmers talk a whole lot about, but it's something that I do hear from students and that I feel myself.
00:56:15.520 --> 00:56:21.780
So I just want to make sure that like actually a lot of other people sometimes felt that way, too, and that it was normal.
00:56:21.780 --> 00:56:22.120
Yeah.
00:56:22.120 --> 00:56:23.420
I'll share one more story with you.
00:56:23.420 --> 00:56:30.820
The very first website that I wrote that did e-commerce was for a pretty expensive product for quite a bit of students.
00:56:30.820 --> 00:56:31.920
It was a training thing.
00:56:31.920 --> 00:56:33.940
It was not mine, like my own thing.
00:56:33.940 --> 00:56:35.000
This is for a company I work for.
00:56:35.000 --> 00:56:38.980
And they would come and buy like $4,000 things.
00:56:39.720 --> 00:56:46.620
And I remember writing that and just being super nervous about shipping this offer.
00:56:46.620 --> 00:56:48.940
I'm like, people are going to go put their credit card in here.
00:56:48.940 --> 00:56:50.240
We're going to charge them $4,000.
00:56:50.240 --> 00:56:51.600
What if I mess it up?
00:56:51.600 --> 00:56:56.160
Like what if this is supposed to be dollars and it's cents or it's supposed to be cents and I put in dollars?
00:56:56.160 --> 00:56:59.400
Like just, you know, the consequence of failure was really high.
00:56:59.460 --> 00:57:07.280
Like what if I end up charging somebody, you know, $40,000 or like just like those things are super nerve wracking.
00:57:07.280 --> 00:57:13.140
But, you know, the more you go through them, right, the second, the third, the fourth time, you're like, ah, okay, I'll just be careful.
00:57:13.140 --> 00:57:14.180
But this is how it goes.
00:57:14.180 --> 00:57:17.040
So, yeah, it doesn't ever go away all the way.
00:57:17.040 --> 00:57:18.680
But, yeah, it gets a lot better.
00:57:18.680 --> 00:57:24.720
So, my final question is what's the hardest problem that you ever worked on that just had a super simple solution?
00:57:24.720 --> 00:57:29.160
You're banging on your head for like two weeks and then you were like, oh, it's just this.
00:57:29.160 --> 00:57:29.520
Yeah.
00:57:29.520 --> 00:57:31.500
There's been a couple of those.
00:57:31.500 --> 00:57:34.560
I would say there's certainly some around like APIs.
00:57:34.560 --> 00:57:36.160
And you're like, oh, man, I just can't get this to work.
00:57:36.160 --> 00:57:38.000
And I go, why didn't I just, the order is like this.
00:57:38.000 --> 00:57:42.960
But I do have an engineering related one for you that's probably like this.
00:57:43.320 --> 00:57:47.020
I was working on this project with one other developer.
00:57:47.020 --> 00:57:54.200
And we were, this is actually coming from MATLAB code into C++, C#, something like that.
00:57:54.200 --> 00:57:55.700
This is before Python.
00:57:55.700 --> 00:58:02.800
And it was doing real-time wavelet decomposition of like a time series.
00:58:02.800 --> 00:58:08.400
And the times, it was something like you have all this state, about 250 measurements per second.
00:58:08.400 --> 00:58:13.220
So, you have four milliseconds to process a measurement, right, like per measurement.
00:58:13.520 --> 00:58:14.340
You don't have much time.
00:58:14.340 --> 00:58:22.540
And we take all this MATLAB code and we convert like thousands of lines of wavelet decomposition code and stuff.
00:58:22.540 --> 00:58:27.240
And just looking at this going, I sure hope this works because I can barely like understand what I'm doing here, right?
00:58:27.240 --> 00:58:29.400
But it also has to be fast enough.
00:58:29.400 --> 00:58:30.360
It has to be real-time.
00:58:30.360 --> 00:58:33.020
So, it can't take more than four milliseconds per bit.
00:58:33.020 --> 00:58:35.240
Or if you queue it up, you know, like times the number of things.
00:58:36.140 --> 00:58:40.320
And so, we get to it and we run it and it's not fast enough.
00:58:40.320 --> 00:58:41.340
Like, oh my God.
00:58:41.340 --> 00:58:46.600
Like, we're going to have to optimize that wavelet code because I cannot change that.
00:58:46.600 --> 00:58:49.440
Like, I got it working but really I don't understand more.
00:58:50.160 --> 00:58:56.960
And it turned out, I turned a profiler against it and it was using a list instead of a dictionary to hold a bunch of stuff.
00:58:56.960 --> 00:59:02.820
And it had to do like lookup based on some cases or like what would be better by key rather than by position, right?
00:59:03.240 --> 00:59:08.900
And we just switched the data structure from a list to a dictionary and it got like 10 times faster.
00:59:08.900 --> 00:59:09.200
Cool.
00:59:09.200 --> 00:59:09.700
So, boom.
00:59:09.700 --> 00:59:10.720
It fell under four milliseconds.
00:59:10.720 --> 00:59:11.240
It was done.
00:59:11.240 --> 00:59:12.340
Problem solved.
00:59:12.340 --> 00:59:13.140
Right?
00:59:13.140 --> 00:59:15.440
But like it was, this program is too slow.
00:59:15.440 --> 00:59:16.380
What is it doing?
00:59:16.380 --> 00:59:21.640
Oh, it's just doing like index of type operations on the list.
00:59:21.640 --> 00:59:24.980
Like, that's 80% of the CPU usage is list lookup.
00:59:24.980 --> 00:59:27.320
Switch it to dictionary and that 80% goes away.
00:59:27.320 --> 00:59:27.700
Boom.
00:59:27.700 --> 00:59:28.440
Fast.
00:59:28.440 --> 00:59:29.360
That's it, I guess.
00:59:30.080 --> 00:59:34.020
For me, it just seems to have come down to go to PyPI.
00:59:34.020 --> 00:59:34.500
Yeah.
00:59:34.500 --> 00:59:38.940
I was trying to surf these webpages and then it was like, oh, just use Beautiful Soup.
00:59:38.940 --> 00:59:40.940
Or like, oh, I was trying to get a website.
00:59:40.940 --> 00:59:42.180
Oh, just use Request.
00:59:42.180 --> 00:59:45.320
So, now that's kind of the first thing that I do is go to PyPI.
00:59:45.320 --> 00:59:45.740
Yeah.
00:59:45.740 --> 00:59:47.040
I remember that being a big problem.
00:59:47.040 --> 00:59:56.220
If you either come from a language that doesn't have a rich standard library like C++ or something or C or you just don't know, you have no awareness, you're like, oh, I got to do this thing.
00:59:56.220 --> 00:59:57.420
So, how am I going to implement it?
00:59:57.420 --> 00:59:59.060
Like, that should not be your first thought.
00:59:59.160 --> 01:00:02.580
Your first thought should be, can I pip install an answer here?
01:00:02.580 --> 01:00:02.920
Right?
01:00:02.920 --> 01:00:03.420
Right.
01:00:03.420 --> 01:00:04.460
Can I pip install a solution?
01:00:04.460 --> 01:00:05.040
For sure.
01:00:05.040 --> 01:00:05.860
For sure.
01:00:05.860 --> 01:00:06.520
Nice.
01:00:06.520 --> 01:00:06.860
All right.
01:00:06.860 --> 01:00:09.620
Thanks for the turnaround on the questions there.
01:00:09.620 --> 01:00:10.080
That was fun.
01:00:10.080 --> 01:00:14.140
Before we call it a day, though, I got to ask you the two questions, as always.
01:00:14.140 --> 01:00:16.920
If you're going to write some Python code, what editor do you use?
01:00:17.100 --> 01:00:21.240
Well, I like this question because students often want to know which editor to use, too.
01:00:21.240 --> 01:00:23.880
So, I've got kind of a multi-pronged answer.
01:00:23.880 --> 01:00:28.440
If I'm writing a one-file thing, I'll use a Jupyter Notebook or Jupyter Lab.
01:00:28.440 --> 01:00:33.520
And if I'm writing a multi-file thing, often I use Visual Studio Code.
01:00:33.520 --> 01:00:40.000
And if I've got something really big, you know, like a Django site or like Flask, then I use PyCharm.
01:00:40.000 --> 01:00:40.460
All right.
01:00:40.460 --> 01:00:41.980
Those all sound like good answers to me.
01:00:41.980 --> 01:00:42.400
I agree.
01:00:42.400 --> 01:00:42.880
Right on.
01:00:42.880 --> 01:00:44.880
And then, notable PyPI package?
01:00:45.140 --> 01:00:50.100
So, I've got kind of a niche one, but a package I've been using is called SCIMDRAW.
01:00:50.100 --> 01:00:52.980
And the SCIM stands for schematic.
01:00:52.980 --> 01:01:00.540
So, it's a package that draws circuit diagrams, like puts resistors and capacitors and stuff in circuit diagrams.
01:01:00.540 --> 01:01:03.300
And I've used that package to make test questions.
01:01:03.300 --> 01:01:06.480
And there's some figures in the book that I used it with.
01:01:06.480 --> 01:01:10.280
So, if you've got to draw some circuit diagrams, like check out SCIMDRAW.
01:01:10.280 --> 01:01:10.960
That's pretty awesome.
01:01:10.960 --> 01:01:11.460
All right.
01:01:11.460 --> 01:01:14.100
Well, definitely enjoyed talking to you about this, Peter.
01:01:14.220 --> 01:01:15.360
It was really fun.
01:01:15.360 --> 01:01:19.620
And I'm glad you found your way from MATLAB to Python and SuperHub.
01:01:19.620 --> 01:01:21.360
That was awesome talking to you, Michael.
01:01:21.360 --> 01:01:22.660
Thank you so much for having me.
01:01:22.660 --> 01:01:23.100
Yeah, you bet.
01:01:23.100 --> 01:01:24.280
So, final call to action.
01:01:24.280 --> 01:01:25.380
People are excited about this.
01:01:25.380 --> 01:01:31.680
Maybe they want to use your book or contribute or they want to like try to set up a similar thing in their environment.
01:01:31.680 --> 01:01:33.440
What do they do?
01:01:33.440 --> 01:01:37.800
So, my final call to action would be if you want to take a class, think about community colleges.
01:01:37.800 --> 01:01:39.640
They have programming classes too.
01:01:39.640 --> 01:01:43.380
If you're an instructor, please use my book or send me a PR.
01:01:43.380 --> 01:01:44.480
If you want any changes.
01:01:44.480 --> 01:01:47.900
And if you're teaching MATLAB, Python can do everything.
01:01:47.900 --> 01:01:52.000
So, if you're afraid, set up a JupyterHub server and you can start next quarter.
01:01:52.000 --> 01:01:52.720
That's awesome.
01:01:52.720 --> 01:01:53.460
All right.
01:01:53.460 --> 01:01:54.720
Well, thank you so much for sharing your story.
01:01:54.720 --> 01:01:55.200
It was a lot of fun.
01:01:56.960 --> 01:01:59.580
This has been another episode of Talk Python To Me.
01:01:59.580 --> 01:02:02.360
Our guest on this episode was Peter Kazarinov.
01:02:02.360 --> 01:02:04.960
And it's been brought to you by Linode and Stellarress.
01:02:04.960 --> 01:02:09.080
Linode is your go-to hosting for whatever you're building with Python.
01:02:09.080 --> 01:02:12.620
Get four months free at talkpython.fm/linode.
01:02:12.620 --> 01:02:14.500
That's L-I-N-O-D-E.
01:02:15.220 --> 01:02:20.620
Find the right job for you with Stellarress, the AI-powered talent agent for the top tech talent.
01:02:20.620 --> 01:02:24.540
Visit talkpython.fm/Stellarress to get started.
01:02:24.540 --> 01:02:29.420
That's talkpython.fm/S-T-E-L-L-A-R-E-S.
01:02:29.420 --> 01:02:30.180
Stellarress.
01:02:30.180 --> 01:02:32.660
Want to level up your Python?
01:02:32.660 --> 01:02:37.520
If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
01:02:37.780 --> 01:02:45.660
Or if you're looking for something more advanced, check out our new Async course that digs into all the different types of Async programming you can do in Python.
01:02:45.660 --> 01:02:50.340
And of course, if you're interested in more than one of these, be sure to check out our Everything Bundle.
01:02:50.340 --> 01:02:52.220
It's like a subscription that never expires.
01:02:52.220 --> 01:02:54.520
Be sure to subscribe to the show.
01:02:54.520 --> 01:02:57.020
Open your favorite podcatcher and search for Python.
01:02:57.020 --> 01:02:58.160
We should be right at the top.
01:02:58.160 --> 01:03:07.160
You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct RSS feed at /rss on talkpython.fm.
01:03:07.680 --> 01:03:09.240
This is your host, Michael Kennedy.
01:03:09.240 --> 01:03:10.760
Thanks so much for listening.
01:03:10.760 --> 01:03:11.820
I really appreciate it.
01:03:11.820 --> 01:03:13.580
Now get out there and write some Python code.
01:03:13.580 --> 01:03:13.740
Thank you.
01:03:13.740 --> 01:03:14.360
Thank you.
01:03:14.360 --> 01:03:14.640
Thank you.
01:03:14.640 --> 01:03:14.640
Thank you.
01:03:14.640 --> 01:03:15.220
Thank you.
01:03:15.220 --> 01:03:16.120
Thank you.
01:03:16.120 --> 01:03:16.120
Thank you.
01:03:16.120 --> 01:03:16.120
Thank you.
01:03:16.120 --> 01:03:16.120
Thank you.
01:03:16.120 --> 01:03:17.020
Thank you.
01:03:17.020 --> 01:03:17.020
Thank you.
01:03:17.020 --> 01:03:17.020
Thank you.
01:03:17.020 --> 01:03:17.020
Thank you.
01:03:17.020 --> 01:03:17.920
Thank you.
01:03:17.920 --> 01:03:17.920
Thank you.
01:03:17.920 --> 01:03:17.920
Thank you.
01:03:17.920 --> 01:03:17.920
Thank you.
01:03:17.920 --> 01:03:17.920
Thank you.
01:03:17.920 --> 01:03:17.920
Thank you.
01:03:17.920 --> 01:03:18.820
Thank you.
01:03:18.820 --> 01:03:18.820
Thank you.
01:03:18.820 --> 01:03:18.820
Thank you.
01:03:18.820 --> 01:03:18.820
Thank you.
01:03:18.820 --> 01:03:18.820
Thank you.
01:03:18.820 --> 01:03:19.720
Thank you.
01:03:19.720 --> 01:03:19.720
Thank you.
01:03:19.720 --> 01:03:20.320
Thank you.
01:03:20.320 --> 01:03:21.220
Thank you.
01:03:21.220 --> 01:03:21.220
Thank you.
01:03:21.220 --> 01:03:21.220
Thank you.
01:03:21.220 --> 01:03:21.820
Thank you.
01:03:21.820 --> 01:03:21.820
Thank you.
01:03:21.820 --> 01:03:22.320
Thank you.
01:03:22.320 --> 01:03:23.220
Thank you.
01:03:23.220 --> 01:03:24.120
Thank you.
01:03:24.120 --> 01:03:25.120
Thank you.
01:03:25.120 --> 01:03:26.120
Thank you.
01:03:26.120 --> 01:03:27.120
Thank you.
01:03:27.120 --> 01:03:28.120
Thank you.
01:03:28.120 --> 01:03:29.120
Thank you.
01:03:29.120 --> 01:03:30.120
Thank you.
01:03:30.120 --> 01:03:30.620
you
01:03:30.620 --> 01:03:31.120
you
01:03:31.120 --> 01:03:31.620
you
01:03:31.620 --> 01:04:01.600
Thank you.