Transcript: Python at Microsoft - Nina Zakharenko
Welcome to another episode of Django Chat, a weekly podcast on the Django Web Framework.
I'm Carlton Gibson, joined as ever by Will Vinson.
How are you, Will?
I'm great.
Hi, Carlton.
Hello, Will.
And today we've got uh Nina Zakarenko with us.
Hello, Nina.
How are you?
I'm doing great.
Hi, Carlton.
Hi, Will.
Hello.
Thanks for coming on.
So, Nina, we always ask this.
It's a good good opener.
Can you tell us a little bit about yourself, how you got into programming, how you found Python and Django, and you know, what's your backstory?
What's your origin story?
My superhero.
Oh, there we go.
Uh yeah.
Um, so I've always been interested in computers from a young age.
I started uh hacking together my first websites on GeoCities probably around the time when I was 12 or so.
And I had more of a traditional background, so I went to college for computer science and kind of went went through that whole misery uh to start my development career.
Super.
Yeah, I I have a I have a ton of pop quiz knowledge about things that have not been helpful to my career at all.
Um well neither of us have f degrees, so we uh you know empathize with that too.
Um so I started out my career doing enterprise Java and working for large financial institutions, and uh it it took me a bit of time to realize that that was horribly boring and not how I wanted to be spending my days.
And uh I kind of thought about what technologies the companies I did want to work for were using, and Python seemed to be a common thread.
I heard great things about the Python community, and so uh at some point, maybe about five to six years of Java, um, under my belt, I decided to switch to Python.
I had a really hard time teaching it to myself on the side because it was just really hard conceptually for me to switch from using uh compiled language full-time to something dynamic like Python.
And so I I quit my job for three months and I went to hacker school, uh, now known as the Recurse Center, which is uh kind of a self-directed writer's retreat for programmers.
And I taught myself uh Python over three months and then kind of haven't looked back since.
Recurse Center sounds amazing.
I mean, at any stage in your career, I think the chance to spend a couple months just learning and having some colleagues.
I mean, I'd like to do something like that right now.
Yeah, it was fantastic.
I I I recommended to everyone.
Uh I went completely broke in the process because a lot of folks who had gone through the program had spent a lot of time planning for it.
And for me, I was just like, I'm really sick of what I'm doing.
I did not plan for this.
Uh but I I think I need to to go and make it happen.
Um, but you know, kind of kind of equaled out uh in the future.
And then you made your way out west from there, right?
I was I think I first heard of you in the context of um some of your Reddit work, and I remember it being like, oh, like Salt Lake City, like there's you know, there's awesome skiing out there.
I didn't know there was tech out there, though obviously people know.
Yeah, yeah, they call it the Silicon Slopes, which I think is pretty cute.
You know, when you go and visit, you're like, this is perfect.
Like I I got to go to Park City for the first time last year, and you fly in and 40 minutes you're there and
yeah, so I moved from New York City to Park City and it was a shock.
Um you were in Park City.
Well, because you could they say, right, you can you can leave like Boston or New York in the morning and with the time difference you can be on the slopes by noon, which is actually true.
Uh I I did learn two things.
Uh Park City in the winter, I think, is has a population of 21,000 people, but in the fall when I had moved there, I think it was between five and seven thousand.
So I moved from one of the biggest cities in the world to a tiny, tiny city.
And it was I I it it took a lot of adjusting.
Uh, I'll say that.
But uh
But I mean it's not the middle of nowhere, right?
You've got the Olympic training facility there.
I mean, I use the like the the community like gym there.
When I went out there, I I had to take a shower, and it's like the nicest gym I've ever seen.
After two months, you've kind of you've done all the things.
Uh and what I learned from living there, yeah.
You know the people, you see the same people everywhere.
I learned that the skiing in Park City was actually not that good.
And uh big big in Little Cottonwood was where it's at.
So Snowbird and and Alta and Brighton.
And so I would drive from Park City to Snowbird to ski, like an amateur, and I I moved the following year, but uh yeah, lesson learned.
Okay, that's nice little interlude there.
Uh so I know you, Nina, from like um you're massive on Twitter, you're massive at the conferences, you've got all these courses, you've got talks, you've got things.
So can we talk through some of the the things you've done there?
So, you know, one thing I want to talk to you about is your Django Con talk from um last year where you um about debugging.
Was it goodbye, print, hello, debugger was the term.
Yeah, and it's just fantastic, you know.
Um I'll just I'll just rant from a little bit about why I loved it so much, and then you can perhaps spin off from there.
But you've been using the debugger for years, and then all of a sudden you just get, oh you know, and did you know you can use this little interact command and then you can pull up an iPython debugger, and it's like, no, I didn't know this.
So anyway, that I I I've been using that, that's been my new hammer ever since.
Um so I want to say thank you for that, but perhaps you can talk a little bit about your talk, tell us tell the listeners, and we'll link to it in the show notes and things.
Yeah, I'd be happy to.
I'm actually in the process of recording a new and improved version of that talk for PyCon US.
It's gonna be released on the virtual PyCon 2020 YouTube page.
Okay.
Oh, great.
So that should that probably be out when this comes out.
Um Yeah, I know quite a few senior engineers who still use the print statement to debug and to troubleshoot.
And um my goal with this talk was really to show people that the debugger is not scary.
Because I think a lot of people's first introduction to it is just like, oh, this is a lot of text.
There's an arrow and a prompt, and what do I type in here?
And how do I set this up and what packages do I need to install?
And there's so many commands to keep track of.
Um, my my goal with this talk, like a lot of my talks, was to just kind of distill it to the basics.
So, what can somebody walk away with in half an hour where they feel not quite so overwhelmed by all of the options and all of the commands?
How do they kind of get their training wheels on to start using the debugger right away and then incrementally build on that knowledge in the areas where they felt like they had gaps?
Um, and I was really kind of shocked by how few develop few Python developers use the Python debugger because every time uh I give this talk, I think I've given it twice now, uh I asked people to raise their hands and and uh kind of show, you know, how many folks in the audience use the debugger.
And the first time I gave the talk, I expected the number to be 50, 60 percent.
It was 10%.
I was shocked.
It's really not a widely used tool, but it is so helpful.
I mean, it it saves me dozens of hours, you know, debugging, working on a project.
A lot of times I'll just copy code straight out of the debugger into my code base because that's where I got it working.
Uh and I the the first time I gave this talk, somebody uh afterwards approached me and they were just like, you you know the the head explode meme?
Yeah, yeah.
That that was kind of
the one with the rainbows, the 70s one.
They're like, oh my god, thank you for telling me this and explaining this.
This is gonna save me uh hours and hours a week at work.
I can't wait to try it.
And so I kind of I feel like I'm spreading the good word, you know, by giving this talk and and and sharing this information.
Yeah, no, and I think a a little bit of debugger skills just goes a long way.
You don't need to know all the minutia, you don't need, you know, if you can just put in a breakpoint and stop it in the place where something's going wrong and examine a few variables, that can make all the difference.
And then, you know, you you can step up to that and step through code and back and up and down and you know, move around the stack, and that that's more advanced, but just to be able to stop it there, well, you can't necessarily unit test because your code isn't structured right, but you can get the debugger in there and you can see what's happening.
Yeah.
Should should we give a a quick overview of debugging uh to your listeners who might not be familiar?
Yeah, go on in.
Oh, I choose you, Carlton.
Oh well, okay.
So what do you do?
Well, debugging.
You want why do you put a print statement in?
You put a print statement in.
You put a print statement in because you want them to see what's happening at a point, so you you print a value.
What you can do with the debugger is you can put in a breakpoint, and the code literally just stops there, and you get a little console.
And it's not quite a Python console, and like a plain variable, you can type, you know, you could type it and it will print the representation of that variable, and that's kind of handy.
Um and you can you can but you can examine the variables in that point.
And the thing that really um amazed me for Nina's talk that I didn't know, and I've been you you know, been doing the debugger for a long time, was that you can type interact, and that actually opens a Python shell, and it's like, and then you've got a proper shell, and you can do whatever because to print an object in the the um in the debugger, you kind of have to use these arcane uh commands, and sometimes you can't examine the the variable you want.
But if you type interact and you're into the Python shell, you can just use it's just the Python shell, and it's amazing.
And it's like, ah, I can I don't have need these crazy debugger commands.
So that's fantastic.
And anyway, you can then once you've got your breakpoint, you say, Well, actually, I need to see what's happening ten lines on, and you can you can type the file name and then the line number, and you can set a new breakpoint, and and then you can press continue, and it will jump on till it gets to the next breakpoint, and then you can see what's going on there.
And with this, you've got visibility into your code that perhaps because of the structure or whatever, you can't get with unit testing.
Ideally, it would be all be perfectly unit testable, but you know, I know code's not like that.
Yeah, and and the fun thing is you can put breakpoints in your unit test.
Yes.
Yes, you can.
And you can do things like um assert false in your unit test, and then you can run your your test runner with the the PDB flag so that when it hits that assert false, it'll open up the debugger.
And then you can print your variables.
So say that I don't know, you you you've got your unit test and you don't know what some variable is meant to look like, but it you know what it looks it's gonna look like because you can just print it in the shell, and then you can copy copy and paste that into your unit test, and black will format it nicely, and then you can remove the assert false, run it again, and your unit test passed, and you didn't have to type it out by hand.
Do you recall how you found out about it and started using it?
Because clearly it's not a standard part of what Python developers are learning.
Like, were you reading the you know, maybe you're you know, my the two things I can think of is some colleague happened to mention to you, it's just like, oh yeah, you should do it this way, or you were just as a newbie to Python reading the you know standard library or something and was like, well, this looks good and didn't realize it was not widely used.
I've been using it for so long that I honestly don't remember, but I know that I came across the uh uh command line shell version of breakpoints first and discovered IDE breakpoints second, and so a lot of my workflow around debugging still revolves around interfacing from the command line.
Uh, but I I honestly don't remember how I came across them.
Uh, but the idea for this talk started out a few years ago because I I went to a talk about debugging and kind of uh left a little bit less than satisfied.
I don't remember which one it was, but the talk was just kind of an overview of all the commands.
And so the talk was run this command and this will happen, run this command and that will happen.
And I think I left more confused uh than I I I walked in.
And I I kind of always wanted to put my own spin on it.
Yeah, well, you know, if you did, then certainly a lot of other people did, but maybe they didn't raise their hand and ask questions to you know bring out the insight that the talk the speaker could
have shared.
And uh it's been kind of it it the talk is just about half an hour, and I feel like everybody who walks out of it walks out of it a little bit more productive, right?
And like it uh as I say with the the interact command, it's been like oh because sometimes it's difficult in the PDB command line, it's difficult to do exactly what you want to do because some things you can't type because they're PDB commands, so it's like ah, how do I now examine this?
But as soon as you can drop into the that's that's literally been a life changer for me.
For the you know, nine months I've been like, ah, every time I type it, I'm like, thank you, Nina.
I love that.
Even before DjangoCon, Carlton, I remember you were all excited about it.
And I do recall that you and I gave our talks at the same time, and Carlton went to your talk, not to mine, though he'd gone to mine the first, and I was like, Well, it better have been good.
And he's like, Oh,
I have to go.
Sniped.
I'm so sorry.
I watched the video it was.
Yeah.
Yeah, it's there's one other thing I want to call out about the talk.
Uh, there are some folks who've been doing Python for a long time who also walked away with knowledge uh about the PDBRC file, the dot PDBRC file where you could uh add some configuration and add aliases.
And so one of my favorite bits uh was configuration where you can set up the ip iPython REPL, uh, a command that would allow you to open that up from your debugger.
Uh so letting you do things like uh the uh iPython magic commands, you know, like c paste where you could just cop copy and paste in a whole code block at once.
Like that was my when I discovered that, I was like, oh my god, I've been searching for this for years.
So you've actually just given up coding in an editor now.
You just cut you just spin up PDP and just start typing in code and straight into PDP until it's finished and then print it, yeah.
Um sometimes, yeah.
When when something is happening where I'm like, oh, what is going on or what does this variable look like?
It's I just always reach for a breakpoint.
Or, you know, is is this code bath being hit or not?
You know, is this method being called?
Just toss a breakpoint in there.
There's no need to wonder or search through log files or anything like that.
Throw a breakpoint.
Yeah.
Yeah, no.
So I thought that was a nice segue, Carlton, because we did want to ask you about Visual Studio Code.
Yeah.
Since you work at Microsoft, you have um a post, if not a talk, on that.
So I'm curious how how do you configure VS Code for your your Django work?
I'm sure there's some tips I'm because I use it personally, but I'm sure there's stuff I'm not using.
Yeah, so the nice thing is, I mean, once you have the Python extension set up, you really don't have to do much additional configuration.
Um, you do need to kind of you uh to get visual debugging going in VS Code, you have to set up your debug configuration just once, but uh Django is already present in the debug configuration.
So you don't really have to do anything there.
Uh it comes with debugging of Django templates out of the box, which is like
Yeah, yeah, that's super nice.
Yeah, super nice.
That's one of the killer features and something that at least I haven't figured out how to do with a command line debugger.
So if I need to debug templates, which I almost always do, I don't I don't know why templates just give me a lot of grief.
You know, the template syntax and
that's where the typos slip in there and it's it's always like a you know a percent or a bracket that's slightly off or yeah
for me anyways.
And so so in VS Code to be able to throw a breakpoint in a template and see what the data looks like like that is just huge to me.
It's it's saved me a ton of time.
And then um when I'm debugging more complex applications, the VS Code debugger is great too because you can just hover your mouse over variables uh in code that has already been executed and it'll just show you the value.
Yeah.
It it it's pretty amazing editor, and I I try to recall because I think it's only the last maybe three years where um it was Sublime 2 and then which is still good, but then it was a while before three came about, and then everyone got hopped up on Atom, which I still use and like from GitHub.
And then VS Code came in, and I think you know, I can say a lot of people's reaction was just like, yeah, that's from Microsoft, but it's so good that it's like and it's got the built-in terminal, and it's you know, since I saw it, I think maybe it's two years ago, I've it's you know, I haven't really used anything else.
Um and it's just it's just sort of to me, like I know it's the uh Microsoft had Visual Um Studio, I think, for a while for a long time, but it kind of just dropped and was like, wow, this is amazing and fast.
Yeah.
And free.
I I was a PyCharm user for many years, and then I switched over to Emacs for many years.
Um and the thing that I
Oh really?
You went that way?
You went from PyCharm to Emacs?
Oh wow.
By the time I switched from Emacs to VS Code, my Emacs configuration was like so out of control that I was just kind of I was just I was sick of it.
But you were using Emacs, so like let's be honest.
You know, it's like when
Linux people complain to me about config, I'm like, we are using Linux.
It it was great when my config was minimal, but then I was like, oh, I need this and I need that.
And then you know, all the config is Lisp, so I had to look at a lot of Lisp.
And it was my own undoing.
I made my configuration too complex.
Um, and if I had kind of stuck with the basics, it probably uh would still be using Emacs, but uh now I use an Emacs keyboard uh bindings plugin for VS Code.
And the thing I really like about VS Code is it comes super bare bones, right?
Like it is when you first download and install it, it's a really lightweight editor.
And you kind of pick and choose the plugins that you want to install based on the kinds of activities that you do and the kinds of code that you interact with.
So when you open a Python file for the first time, if you don't have the Python extension already installed, you'll get a pop-up that says, like, hey, there's an extension that can help you edit this kind of file.
And so you can kind of uh you you get a menu, right?
And you get to choose a few.
Yeah, it holds your hand and kind of suggest stuff, which is really nice.
Yeah.
You get to choose your own configuration, your own custom setup.
It's almost like I maybe all of us are old enough to remember like Clippy with Microsoft Word, which popped up and was useless.
It's sort of like actually helpful.
Yeah.
Yeah.
I think there's a lot of nostalgia out there for Clippy.
VS Code is like Clippy, pretty.
Um so you have you have you have so much work out there.
Is there anything else you want to add about um VS Code before I switch gears?
Do you have any Yeah,
no, I use it all the time.
So I um so I have a f an an old and first love, which is BB Edit, which is a mac a venerable Mac edit.
Still works.
Oh, more than still works.
I you know, I have it open all the time, but I also have open VS Code all the time.
And there are things that VS Code, you know, I'm typing away in VS Code, I'm like, I need to do this in um BB Edit.
So I've got a little um homebrew BB Edit VS Code extension, which lets me pop the currently working file where I'm at in BB Edit.
And things that I might put that online when I get it nice, um, but my JavaScript, uh anyway.
Another story.
Um But yeah, VS Codes, it's just super for me.
It's the speed at which it gets better, which is amazing.
Like it's you know, because it g it started off and it's like, okay, yeah, this is fine, this is interesting.
And then it's like, oh but there's this bug.
And by the time you've worked out exactly what the bug is, the next version's come along and fixed it, and you're like, hang on, that's amazing.
I saw this go past on Twitter the other day.
Someone was complaining about the fuzzy search, and then you know, literally the next day or next week, the the fuzzy search was improved.
And it's like, yeah, that's what that's where I think VS Code has um just so much momentum, is that it's just moving so quickly, it's it's getting better all the time.
And the language server that came in for Python just made it just phenomenal.
And then Microsoft have just um they've got this pyrite um static type checker which integrates with it perfectly, and it's like this is it's just a smooth environment.
It's lovely.
It's lovely.
Yeah.
If I could ever get it to discover my test properly, I'd be a happy note.
Well, yeah, you know where to send that feedback.
You can send it to me and and I'll make sure it gets routed properly.
Okay, okay.
Yeah, do you have a sense of how many people are working on it within Microsoft?
Because my sense is it's a pretty good sized team.
Uh it's a it's a fairly large team.
I I don't have the exact number, but the creator of the Python extension, uh it was developed by somebody else.
Um, Don I I'm gonna butcher his last name and for that I apologize.
Uh it's Don Giamani.
And he his software was kind of acquired by Microsoft, but he also came on board.
Uh so he started the extension, and then uh when Microsoft acquired it, they were able to build it up and make it this really great thing and have a team that you know now supports it.
Uh uh something that I'm I'm working on that isn't quite ready yet, but hopefully will be by the time the podcast airs is uh I'm planning on getting about four folks from the Python extension for VS Code team to come on my Twitch channel every two weeks and do uh kind of a community Q<unk>A.
So take questions through the chat, uh talk about any updates, any, you know, sneak peeks that they can share from future releases.
And I'm I'm really excited about that.
I did a pilot and uh, you know, everyone who kind of came on the show and was able to interact had a great time with it.
And so I think it's gonna be a great way for the team to interact with the community and then for folks to also ask questions and meet some of the people who who do the work.
It's it's been really nice to see Microsoft's commitment to Python.
I mean, also in the realm of um, you know, with the Windows Windows 10, the App Store, now you can install Python because I it it used to be a lot harder.
Yeah.
Um and even I had um I have a installpython3.com site, and one of the ways I I was recommending the new way to do it, and I f I forget who, but someone who's on the team at Microsoft came in and uh made some comments saying like yes, we recommend doing it this way as opposed to I forget the other way, but also we're adding there there were one or two complaints some people had in a discussion forum and he was saying you know we're we're gonna work on those and um because it's just you know they're just systematically removing a lot of the traditional barriers to develop
ment on Windows machines.
But you you can install like the 3.9 alpha out of the Microsoft store.
And it's like that's kind of quite easy.
That's that that makes testing it more fun, you know.
And if anyway.
That's awesome.
Yeah, I've I've you know, at as a a Python developer advocate at Microsoft, I've been thrilled to see uh the support and the presence at PyCon has been really great.
So we've been a Keystone sponsor for the past, oh, I don't know.
Uh this would have been uh my third PyCon with Microsoft, but I believe it would be four years in a row as Keystone sponsor.
And we have a lot of uh really fun and exciting virtual events planned for PyCon since we weren't able to meet in person.
We're doing a lot of hands-on labs and online workshops that are gonna be released uh kind of starting mid-April going through mid-May.
Great.
So they'll uh we'll have links to that.
Uh, there's also we should mention you and Carlton have done a video series on using Azure for uh deployment.
That's from last year, I think, right?
Right after Django code.
Yeah, so we're using um VS Code with Django, just showing you how that works, and then sticking your um Django app on um app service, um provisioned a um Postgres instance and um deployed um the Django app to Azure, to the app service there, all from within the VS Code um extension, which is quite cool and super easy.
Yeah, we should uh drop a link to that in the show notes because I I think the video came out quite good.
We got to film it in the Microsoft Studio in Redmond, uh, which is kind of a full-fledged studio with lots of cameras and lights, and we had a newscaster desk and you know it came out quite well.
Do you spend in your work, do you spend much time on on that side of it?
Or like if people have issues deploying Django stuff in Azure, can they reach out to you?
Or is there someone else on your team who's handles that?
Yeah, they can reach out uh to me and I'd be happy to route the request and take their feedback.
Uh usually the the best way is to open an issue on GitHub, but sometimes it can be hard to figure out what's the right project or you know what are the right tags, and if if it's something kind of more uh if there's a bigger issue, I'm happy to route and to escalate and to help out.
I guess while we're while we're talking about this though, we should just talk a little bit about Azure because uh the you know in the cloud world there's the three, right?
There's Amazon AWS, this Google Cloud Platform, and there's Azure.
And a lot of people veer straight to AWS, and not necessarily the the right option.
You know, the others are good too.
And I mean, I don't know what you think, what you'd say from the Microsoft stand, you know, what's the what's what's the Azure option?
I mean, for me it's great.
You can spin up, you can spin up a Postgres, you've then got things like the app service, you can spin up um compute instances, the same as everywhere else.
You know, it's um if I guess if you're tied into Microsoft already, it's a good place to look.
Yeah, yeah.
Yeah, we we have a fully featured suite of offerings.
We um offer uh deployment and serverless functions and kind of all of the all of the standard stuff, but I think where we really shine, and something that is uh really cool that the other cloud platforms don't necessarily offer is we have uh VS Code extensions around all of our offerings.
So there's a VS Code extension for web apps that lets you uh create deployments right from VS Code and do things like add environment variables, uh start and stop instances.
There's uh yeah, so there's an extension for our serverless functions, and uh it's it's just it's really nice to have a different way of interfacing with your cloud resources.
Yeah, and yeah, that's one thing I really like as well.
Like the blob store extension, it's really cool because you've uploaded to the blob store.
You can just, oh, I'm gonna edit my CSS online.
You know, it used to is it's like when you used to SSH into your server and edit your HTML live, and you can do that all that again from inside VS Code.
It's like anyway, okay.
Yeah, and I think it, you know, it offers uh it opens those services up to an audience that maybe is not necessarily quite as familiar with the command line and doesn't necessarily want to learn the ins and outs of a new command line tool.
Uh, some folks are just visual learners and visual explorers like I am.
And so yeah, to be able to interface with those resources uh from straight from your IDE, you know, in a in a in a way that you're kind of already familiar, it's it's lives next to your code, I think is really fantastic.
Yeah, super.
Okay, that's cool.
Well, maybe the last of the talks I wanted to ask you about is so you did the closing keynote at PyCon this past year, I think.
I did.
Um I mean that's not really Django related, it was more about uh hardware.
But I don't know what what's we'll we'll link to that talk as well.
I thought it was really interesting in person.
I guess where where do you find the time to play around with hardware too?
Uh well, it kind of started as more of uh uh a hobby and then has kind of migrated to something that I'm able to focus on at work, which I'm really thankful for.
But uh I started tinkering with hardware quite a few years ago.
And uh when I discovered CircuitPython, uh that I think that kind of really reinvigorated my my interest.
Uh it's it's uh a fork of MicroPython that's more focused on education.
And so to kind of move away from writing Arduino, which is kind of more of an analog to C and C, to writing Python to interface with microcontrollers.
I just thought that was so so fun and so awesome.
Uh and um we were going to be uh handing out pie badges at PyCon for completing hands-on labs.
Uh I know unfortunately that's not happening this year.
We're we're uh we're gonna be doing something virtual though, so so keep your eyes out.
Um, but I do have uh a whole CircuitPython repository available where if you do have a pie badge, uh you you can run it and it had some fun Easter eggs in it and uh um a little um a little version of an expo vert meter that I had written because uh I'm pretty introverted, but sometimes you know, you're at a conference or an event and uh yeah, I love talking to folks and catching up with old friends.
So there is an indicator of kind of where your social battery was.
Um got left.
Yeah, uh with a little red LED and a little red message, you know, if you're if your social battery was empty or you know, could display a green one if you wanted to chat with folks.
So there were a lot of cool little things built into the badge, and I can share uh a link to that repository as well.
If if somebody does have the hardware, they they can play with it and try it out because uh, you know, unfortunately Adafruit isn't shipping at the moment.
Yeah, well, because last last year they gave everyone a you know a chip, well a little board.
And so I I remember going through the airport being like, you know, I'm sure you've seen a lot of these.
Yeah, because it is the kind of thing you're like, I just want you to see this thing.
Like it does look scary, but it's it's not.
It was it was a fun uh swag from last year.
Carlton, you were gonna say something like that.
Yeah, no,
I was because what I was gonna say was just that um I guess the trick with this kind of thing is always getting the right hardware.
So you know, you you go you you find an electronics tutorial and you buy your Arduino board and you start a kit and you get the right you know, and you get it up and running, and then you're like, ah, but I need this piece of kit which I haven't got.
And so I guess for for is there a do you have a kind of the kit if if you're getting started by this guide?
Because that's kind of handy, I think.
Yeah, well, so there are kind of two paths there.
I think the that Adafruit Circuit Playground Express, the device that they were giving out last year, is really a good all-in-one kit.
It it's a microcontroller, but it has buttons.
There's uh 10 LEDs on it, there's a little slide switch and a whole bunch of sensors, temperature sensor, light sensor.
So if you kind of just want one thing to get started with, I think it's a really good option.
Um there's also uh the BBC micro bit, which uh I think kind of has has less on board, but is also a great option.
Uh, and then kind of these days, if you're not able to get your hands on hardware, there are uh options for emulation.
So make code will allow you to use a block-based editor and have uh a circuit playground express emulated.
So you can learn about all the concepts without necessarily having the hardware.
And then um some of the interns who have interned for the Microsoft Garage have come up with a VS Code plugin called the Device Simulator Express.
And uh originally that just simulated the um circuit playground express, but there's been a recent release, I believe last week, that added support for the micro bit and the Adafruit clue board.
So if you don't have the hardware, you can still run CircuitPython and see um how it would look on the actual device.
So yeah, and if you're waiting for the board or you you know you can get the board later on, at least you're up and running.
Yeah, yeah, yeah.
Exactly.
Do you know does so bits box is something I see all the time for kids?
Does that is that MicroPython?
Are you familiar with that?
No, I'm not familiar.
Okay, yeah, they um and I guess just in my my parenting circles, um, they have these subscription where they'll send you hardware things for um kids six through twelve.
And um, I guess I was trying to more generally segue to uh teaching Python because you have a course we'll talk about.
But I've one thing I've noted is that especially for younger kids, doing hardware-based things is a much more accessible way, a real world way, because you don't need that much code and you can do things like um I think uh Nicholas Tolervy was a guest and was telling some of these stories of you can create like a wand and have like a like an Easter egg hunt in a library, or you can use a tiny bit of Python code with a you know one of these chips, and it's just a great introduction to students.
And I think that's being used more and more at the like late elementary, middle school level, rather than you know, defaulting to building a video game or a website.
Um so I don't know, it's just something I'm very much thinking of, and my oldest daughter is in that age group.
Um, but I'm I you know I'm so predisposed to think of software terms, but it's like, oh yeah, hardware, like a teeny bit of Python, and I'm you know, hashtag coding, but then you can like run around and make it interactive.
Makes total sense that especially for a a younger kid, that would be a great introduction.
Yeah, I mean there's just something exciting about making an LED blank.
Yeah.
Yeah.
Yeah, it's I mean it's yeah, it's a little more than just this, you know, your computer screen showing something or other.
Yeah.
You've got to teach them about the marquee tag.
That makes sense.
Don't don't teach them about the marquee tag.
Uh marquee tag is is over.
Uh yeah, one of the I think the first time I ever spoke this is gonna be like one of the first times I spoke about hardware at a at a conference was uh Pie Cascades um last year, early last year, and I did a few uh live demos with the hardware where I had a camera kind of pointing at the device and I would modify code on it.
And I I think I had three or four demos, and after each demo, the audience would just break out in applause.
And I was like, well, I wasn't.
I didn't know that.
Yeah, I didn't know that either.
I was not expecting it.
But folks were like really excited and really amped up to see the LEDs change color and you know, like watch me program changing the behavior of the buttons.
Like folks were really invested in it, and I was I was I was taken aback for sure.
They're probably also impressed that you live coded and it worked, right?
That's always like right.
Everyone who hasn't spoken before, they're like, I'll just live code this little bit and you want to say it's not gonna work.
So many ways it's not gonna work.
But you know, you made it work.
So I I had videos recorded of of all of it in case it didn't work.
Yeah, right.
I was gonna say that like that's the way to do it, like is to have yeah, have a backup or um yeah.
I mean, I've even had it like Boston related things where I always like throw a copy of everything online because just because like I have a MacBook and the person before me had a MacBook and it plugged into theirs doesn't mean it won't plug into mine.
And you know, not that I recall it.
Yeah, I had to give a 40-minute talk just uh, you know, that way.
And I was like, I'm never doing that again.
I'm always gonna throw a copy up online somewhere in case my s my my MacBook mysteriously doesn't work.
Um I I gave uh I did live demos for my PyCon keynote, and that was terrifying and uh funny enough.
I did it, I did a practice run and everything worked great, and then on the day of my camera was glitching.
The camera that I was using to display the hardware started kind of glitching out.
I'm gonna roll with it because I'm here and and I'm giving the talk.
So um
I want to ask about recording for um Pycon because you're doing recorded talks for PyCon Online this year.
So did do you feel like the pressure's much higher to make something put you know that the the production quality higher?
Because the um yeah, you know, once you're on stage live, you've just got to plow on.
And if your camera glitches, you've just gotta go through it and there's a certain diamond dynamism to that.
But if you're recording it, you'd be like, Oh no, I'm gonna redo that bit fifty eight times and till it's just right.
How would that do you feel that?
Or well
now that you mention it, Carlton?
Yeah thanks for that.
Yes, I know.
I mean, editing is really time consuming.
Um, I think I'm lucky that um I'm kind of I was already familiar with software to record screencasts locally on my machine because uh I do a lot of internal presentations that um take advantage of that format.
So um I know kind of a little bit about video editing.
I have a fair amount of gear for recording videos and for live streaming.
So I've been live stream coding on Twitch for the past few weeks.
Uh so you know I have a reasonable microphone and and good lighting and and a nice camera.
And so uh I feel pretty well set up to do my recorded talks.
But I think if you don't have that background and don't have that experience, it's it's a lot harder and a lot more nerve-wracking because you might want to make it perfect or re-record or or whatever, but you don't necessarily know how because the tooling is not that easy and not that straightforward.
I guess you've mentioned Twitch a couple of times.
I want to ask about that as well, because I always think, oh, you know, I've seen people doing Twitch.
I thought, oh, could I do Twitch and be like, is anyone gonna watch me reading the docs?
Like, do you have to you sort of plan it in advance or so that you actually do some coding, or do you just sit there reading the docs?
I don't know.
Like I don't.
Um so they're one of the most interest interesting things about live coding on on Twitch, I think, is at first I thought I would be productive, you know, as productive as I might be writing code on my own.
But actually uh I'm at least half as productive, if not less so when live coding.
Because I mean it's typing in public, right?
That's always error-prone 2x anyways.
Yeah, it's typing in public.
There's I keep an eye on the chat and I try to answer questions and interact, and then sometimes we go down rabbit holes.
Um, so kind of setting expectations for how much I can get done, which turns out to be little bite-sized pieces, but um, I don't plan much in advance.
And there have definitely been streams that are probably more boring than others.
There was one where I forgot to set a callback URL properly, and so I spent, you know, 45 minutes going, why is this not working?
And that's because you know, it was a misconfiguration with an API that I was using.
Um, there was one stream where I read docs about the logger for the most part, you know, and and log streams and log filters.
Yeah.
But I think that's in there's real value in that too, both in seeing that even the pros, you know, miss stuff and like and that, but more importantly, what is the process of debugging a situation?
Um and I don't know, like I like I play I play guitar and like John Mayer is a guitarist and he does these live streams from home and he'll just like noodle for 45 minutes and just like not miss a note, but that's not what programming is.
Nobody does that.
No.
So I think you know it's helpful just to show people like here's Carlton reading the docs, here's Will looking up on Google, and it turns up it's a tutorial he wrote two years ago.
Like, you know, this is day-to-day programming.
Yeah, exactly.
I, you know, I remember almost nothing, Google and Stack Overflow, that's my crutch.
Um, and a lot of times it's just like poke it with a stick and and see what happens.
Uh, it was definitely scary making mistakes at first because it's like, oh, everyone's gonna think I don't know how to program and how terrifying is this.
But, you know, uh the community that I've built up on Twitch is very nice and very wholesome.
Uh, if you come on the Twitch stream, you can get information about joining our Discord.
Uh and at the moment, I think there's just 40 wholesome folks who hang out in there and talk about Python and and everyone's really nice and welcoming and supportive.
And um, you know, I think it's it's good for people to see me make mistakes and you know the process of debugging and troubleshooting and figuring out what went wrong is is really important to show.
Well, I almost think that having having like a Q<unk>A where people ask you a question and just seeing how you Google for it is would be really valuable or Carlton.
I mean, because beginners just don't and I often think as terms as a teacher, how how do I teach people how to Google better?
Because it it it's a it's a little slippery, but you know, you I think there's some I've there's some value in that just seeing like, well, I don't know, but here's the terms I would type, here's how I look at something and say, oh, this is seems valid versus like this is total trash.
You know, how do I scan through Stack Overflow?
You know, that takes a long time to to get there.
And I don't know of a linear way to do it other than seeing real people do it.
Yeah, I'm not sure either.
Oh boy, that sounds like a pranking show.
Uh no, but I mean I mean I'm serious about this because I think I mean to your point about not making mistakes, I mean I I'm earlier in my coding career than either of you, and I've only just gotten to the point where I'm like more and more okay with like there's just I'm just never gonna know a lot of stuff, and even if I knew something, I probably forgot it.
But I'm not gonna apologize for that because I can figure it out.
Yeah.
Like I think that takes a long time.
It takes a while to get there.
Yeah, I think so too.
Um, yeah, the QA format helps.
Uh one of my favorite bits is when, you know, sometimes I make a typo or I do something wrong and somebody in chat is like, Hey, did you check this or you forgot to do that?
Uh so it's kind of a different style of pair programming.
I like to think that folks are like hanging out with me in my living room, right?
Yeah, yeah.
Well, so let's talk about um your Learn Python course.
Uh came out last year, links to it.
So you have this is on front end masters, but then also you have a a lot of the curriculum um online available.
I was just asking before we started recording, you're using um Grov Learn with a Hugo site for hosting?
Is that so um so so so why the course and what you know, how did you how did you determine how to structure it?
Because I'm always curious on on that.
Like I like that you didn't just dryly go like, here's data types, here's the Python flavor, here's you know, operators, right?
Because it's tempting when you're teaching to a fellow programmer who's on their third, fourth, sixth language, like we know these are the constructs of computer science, and here's the Python flavor of it.
You didn't um do that as much.
I think you made it much more maybe I'm actually new to programming uh kind of style, which I like I'm so I really appreciate that, but I'm curious how you got to that point.
Yeah, I didn't know that you had gone through the course uh before you kind of told me right right before we started the show, and so and yeah.
Carlton hasn't read my book, so I don't assume you've read my book.
Okay.
I have read your book.
Do you?
Yeah, all three?
No, just two of them.
Okay, all right.
Oh that's that's sweet.
That's still okay.
Yeah, I'm gonna recommend my course.
Your wife hasn't read that.
She does listen to the podcast though, so hi sweetie.
Oh, oh, this is sweet.
Sorry, so uh, how did you come up with the the um the structure?
Yeah, so um I have been an author on front end masters, I believe since 2014 or 2015.
Uh I did a course with Brian Holt on an introduction to web development, which I think is now pretty out of date.
So it's no longer on the platform.
I have a course that I taught on Git.
So it's a six hour, four to six hour workshop on Git.
And people come out of it just like, oh my God, I never understood Git before.
And now I know exactly what I'm doing.
Uh like I'll I'll have folks who who see me at conferences and they'll run up to me and be like, oh my god, you taught me Git.
Uh which is so like it's so it's so touching and so satisfying.
Um that's only two year two years ago, I think, right?
I think the Git course was two or three years ago.
Yeah.
I mean, cause because Git is one of those things like I use the same kind of five commands, but I mean, just yesterday I, you know, committed an API key with a demo I was making, which was a which is a no bueno.
And then I'm yeah, I was like, you know, how do I uh totally nuke this and rebase and all these things?
And I was like, oh my god.
Um I certainly haven't I should I should go through the course again because I'm definitely like, how do I do that thing?
Like if it's not a revert and it's not a git commit or a push or a pull, I'm like, I don't know, I gotta look it up.
And then whenever it's rebase, I get scared.
Or typing in you know, dash dash force or hard, then I'm like, it's like sudo, and I'm like, oh god.
Yeah, rebase is not that scary.
Don't force push to a shared branch.
So if you're working on a project with other
people, don't force
push to master.
Um and you know, I a lot of people don't don't know this or don't follow this, but just before you start fiddling with your branch, just make a new branch.
You can just from your current branch, you could just say get branch whatever, um, and it'll just make a backup branch.
And then you don't have to worry so much.
And I'll admit I'm I've gotten lazy in my own projects at just working off with master, and it's bitten me like twice in the last through two weeks that I'm you know, because in a team setting, of course I would create a branch and it was just me.
I'm just like cowboy coding, and then it's like God.
Yeah, I I still do branches and pull requests for my own projects because then I can go back and review the PR and I kind of have a history there.
But yeah, for the Python course, um, so these courses are available by subscription on Frontend Masters.
Uh I think the current charge is something like $40 a month, but you don't have access to just my courses.
There's a really full, vibrant library of courses available for one fee.
Um, it took me months to put my course together of just
Yeah, I bet.
Yeah.
Yeah.
This is something that I kind of do outside of work uh on my personal time, and it definitely uh ruined my social life for a few months.
Uh because uh there's kind of an approach that I take to teaching, this approach of taking complicated topics and distilling it down to the basics.
So, you know, I've done that with uh conference talks on topics like memory management in Python and and debugging.
Um, I've done it for my Git workshop, but Python was kind of a different beast to tackle because every time I thought I had the curriculum right, it's like, oh wait, I haven't introduced this foundational topic that will let the person make that aha connection at the next step.
And so now I have to rearrange everything.
And so the rearranging happened, I don't know, three, four times.
Like it took me a really long time to get the curriculum exactly how I wanted it, so that each concept that was introduced was the building blocks for the next one.
And there was no section where you're like, well, this is a mystery.
I don't understand how this works because I was able to kind of build it up step by step.
Uh, and I was really proud of how the course came out.
I I put a lot of time and effort into it.
Uh, I was supposed to be uh recording a new course in in June in Minneapolis, but I don't think that will be happening.
It was gonna be kind of a one day, you already know some programming.
Give me a one day of condensed Python to help me be productive after watching this course.
Um so I don't know, maybe front end masters will be going remote.
Uh maybe I'll have an update to share in in a few weeks.
But um I, you know, I I I love that people have a venue to compensate me for my work if they find the class valuable when they watch the course on front end masters.
It is uh something that I get paid for.
Um, but I know that not everybody is able to afford that.
And there's still a lot of folks out there who want to learn Python, and there aren't a lot of good free resources out there.
So I released um all of my course materials and all the exercises under learnpython.dev.
Um it is licensed in such a way where I really don't want other folks teaching my material, you know, because that's not why I put it out there and put it online.
I really put it out there for individual learners who want to learn Python, don't have resources uh and and can't necessarily afford to watch the full recording.
Uh and then I also released my course and the videos for free for two weeks uh at PyCon last year.
Yeah, I remember that.
That then that's when I first actually took took a look through it.
Um and then I just refreshed before this.
Oh nice.
Yeah.
Yeah, I mean I mean, because specifically like with Django, uh so part of the reason why I'm thinking about Python is because people ask me about Python um in the context of Django, and the big thing that they they ha have confusion about is um object-oriented around classes and mix-ins and inheritance.
That's that's the part where you know if you don't get that, then Django is really not gonna make sense to you.
Um and so I I I've pr um read with particular interest uh how you handled that.
So because you put that in the intermediate section and um Yeah, I like I mean I like also how you have practice things um for all of them because I do think that that's really helpful.
And as a teacher, it's it's sort of like how do you, you know, in a f in a traditional classroom you just assign it and people have to do it on their own.
People almost never do these things, but if they are self-motivated, it is nice to have like a you know, stretch yourself and then you know the answer is out there, but um, you know, really reinforce the learning by by trying to apply it in a different context.
I think that's I really like doing that without doing some sort of like made-up online validation quiz that you can just cheat on kind of thing.
Right.
Yeah, and I think folks learn best with muscle memory.
So throughout the whole video course, I encourage people to type along with me because that's how they'll get it to stick.
That's how the the concepts will really um they'll be able to internalize them a lot better if they type along with me.
And then all of the exercises, um, I walk through completing them with the students.
So I I think the video course came out really great.
Um I'm pretty proud of it.
You miss a lot if you just do the look at the the text for sure.
I mean, and I do think that that typing along, I mean, um back in the day, um Zed Shaw's learned Python the hard way.
One of the real positives of it was it emphasized type all this stuff out and make it work.
So I think beginners sometimes you know copy paste and all the rest.
And that muscle memory is is really important.
I mean, that's in a way I I mentioned to people they they want to learn how to program.
Like you better be a good typist.
Yes.
I you I mean, you know, and uh quite a few people aren't.
Um because man, if you're not a good typist, you're it's something people don't think about.
Yeah, and uh that's actually a skill that you can learn.
Um, I realized that I learned to type the wrong way.
And so I was going through some typing tutorials.
You know, I type really fast, but the way that I type is not um necessarily the correct way.
And the typing tutorials really helped me minimize, you know, straining my fingers and um like figuring out which keys to press with which finger and how to optimize all of that.
So it's painful when you see an educated person of a certain age using just their index fingers to type.
Yeah, it it always makes me think of uh
I feel empathy for them.
Yeah.
Yeah, halt
halt and catch fire.
Yeah, yeah.
Cameron was like the index finger typer.
Yeah.
But yeah, I mean, there's tons of free resources to learn to type online.
So even if you're not good at it, it's a skill that you can learn and it's just the same old muscle memory.
Yeah.
Um, one last question on the structure of it.
So you you go basic data types, and then you go functions, and then after that, lists and tuples and sets.
So that's um in the um canon of Python teaching, that's the one where it varies quite a bit on like when do you introduce functions?
Um I'm curious what why introduce functions before you get into data structures and logic.
Um if you recall.
Oh, I'm gonna I'm gonna have to think about that one.
It's it's been uh a little bit over a year since I've put the course together.
Um I I honestly don't remember, but I if I were to guess, it would be around the concept of arguments.
So I think functions accept arguments, and then a lot of the the data structures accept arguments as well.
And I think it's easier to think about it in the concept of like a very simple function accepting arguments and then moving on to the more complex.
Right.
A list doesn't really make sense if you don't understand arguments.
Um I like that you also have the you take the time to talk about function scope because again, for someone who doesn't have a computer science background, uh scope is is a gotcha.
Um I'm sure you have you seen the Python tutor site that Philip Go does.
Um he's in actually he's UC San Diego that will visualize how the um interpreter is running your Python code.
I I've seen it a bit, but I have not used it on uh any of my own code.
Yeah, well it's really helpful for, I mean, when you were talking about the debugger, I was thinking of it because you can just literally step through and see you know how scope is executed uh from the computer's point of view.
Um but anyways, just call out I like that you had the specific uh section on scope, because I think that's often not included.
Um that obviously will will get you.
Yeah, and I try to think back to all of the things that I found confusing when I was learning Python and you know think back to the aha moment when I finally figured it out.
So uh I put a nice uh illustration in there about how uh break and continue work with colored arrows and everything, and I I was quite pleased with that.
Yeah, well it's great.
We're linking to it.
People should watch the videos.
Um I mean, and I find not just as a teacher, but just sometimes I feel like I do Django more than I do Python.
So even if it's more the beginner stuff, I either I forget it or I just get a little bit different lens on it.
And um I really enjoy working through educational stuff.
I always get something out of it.
Um personally.
Yeah, yeah, I'm really glad to hear that.
What's the Tai Chi equivalent, Carlton?
What are the pose the the movements, right?
It's like it's not like kata, but yeah,
well but well, a a kata is a ja kada, I guess is a Japanese word.
Yeah, it's like a karate thing, yeah.
Yeah, yeah, yeah.
But it's the the form, isn't it?
So yeah, the the the point it's like
scale scared
is the the yeah exactly it's these basic movements which you know you might think oh you know five minutes I've got this but there's there's 50 years worth of depth in it and it's about keeping your tool sharp it's about always having we've talked about on the podcast before the beginner's mind it's about being open to you know the fact that you're everyone's on their edge and you're on your edge and you're trying to make yourself but better and sharper.
Um and you know reviewing educational materials it's always like yeah okay you know yeah yeah there's a new aspect I hadn't thought of there's always an ev every person puts it slightly differently and there's always a some a a a ah brilliant thanks yes and it's and what is it oh it was just list append but I hadn't thought of it that way.
Right.
Yeah I mean our our our our mutual friend Trey Hunter has Python morsels where it's like weekly Python exercises.
I mean I often I play music my kids play music um and that's why I have to supervise their lessons and I often think I wish that they're you know because professional musicians will spend a third half their times throughout their whole life practicing scales.
And you know I wish that I did more of that as a programmer.
I feel like I just you know airdrop into some project and just start you know putting out fires.
And I I kind of wish I had like a ramp up of just you know hitting my scales in the same way I do on my guitar or the piano.
Um so but is this not part of the um obsession that we all have with tooling right and it's all I've got to do that's
not tooling.
I feel like to me tooling is a w is is a can be a waste of time can be a black hole uh whereas this is just like reps.
Yeah.
It's just you know and and and and but not in like a you know lead code like interview.
I mean those can be a little bit helpful but um I I I wish I you know spent half an hour an hour every day just keeping my Python sharp to be honest.
I feel like it it gets gets lazy.
Yeah and it's foundational skills.
Uh this is something I I picked up from Raymond Hedinger but he always stressed the importance of being able to move between different data types in Python.
You know how do you quickly pull out what's in a dictionary into a list or a tuple and kind of fluidly move between all these different types because all the types have different pros and cons and and ways that you can work with them.
And like that is probably kind of one of my my biggest takeaways being able to to move a a list into a set and figure out you know well you know what are all the individual elements uh and not even kind of think twice about it or have to think about oh like which data structure should I have reached for uh that's been really useful in my day-to-day programming.
Well I guess if you're a typical you know Bay Area startup engineer you you bounce jobs every 18 months so you have to refresh those skills.
So that's like built-in practice.
So that's like what 1%
yeah well is so we're we're pretty much up on time.
Um is there anything else we haven't covered that you'd like to mention your work at Microsoft or personal projects?
Um yeah that there are uh a few things that I want to mention uh we already covered those kind of in the middle of the podcast but I really hope that folks can keep an eye out for the um the workshops and the labs and the tutorials that we're putting out for PyCon over the next few weeks.
Uh a lot of folks on our team have put an immense amount of effort into those and um I've I've been really happy with how they've come out.
So unfortunately we weren't able to bring our booth to PyCon but we tried to digitize as much of that experience uh as we could so that we could still share it with um you know attendees and and python enthusiasts um and the the last thing I wanted to mention is uh I'm gonna be kicking off some new live streams on Twitch.
So one is going to be every two weeks and I'm gonna have a QA with the Python uh extension for VS Code folks.
Um we're probably gonna be covering different areas maybe the debugger maybe AIML um so folks would like to keep an eye out for an announcement about that they they can follow me on Twitch uh at nnjaio and or twitter at nnj a and um in between those Q<unk>A's uh I think I'm gonna do uh a series on Twitch called um I'm still working out the name but I I think it's gonna be called Python tea time where I'
m gonna have a new guest every two weeks and we're just gonna kind of talk about what they're working on, how they're doing maybe any projects or news that they want to share uh because I feel like we all really miss the hallway track, you know, and just running into people and and catching up with them.
So this will be a virtual way of doing it.
And since uh I'll be streaming it on Twitch there'll be a chat and a QA so people can come and hang out and interact.
Great.
Well we will link to all those things.
Awesome.
So Nina thank you so much for taking the time to hop on.
Yeah.
Yeah thanks yeah we talked about this in person at DjangoCon in San Diego last year.
And so I'm really glad to kind of close the loop and go full circle and that we were able to connect.
Yeah well we did because we were getting drinks and I was like Carlton where were you and we were all sitting together he's like well I was with Nina and I was like you know so that was that was the first time I think I you and I ever spoke.
Yeah.
Uh so yes finally it happens and and you know and to your point on the hallway track again this podcast came about because of my 2018 Django Con experience where that was my first time going to a real tech conference to be honest and I love the hallway track and I thought how do we keep that going so
yeah that's awesome.
Well thanks so much for having me it was a pleasure.
Thanks for coming on super okay I guess that's it join us next time folks bye bye