- Podcasts
- The Python Show
- 28 - Python Content Creation
About this episodeIn episode 28, we welcome Rodrigo Girão Serrão (@mathsppblog) as our special guest. Rodrigo authored the free Python book, Pydon'ts…
In episode 28, we welcome Rodrigo Girão Serrão (@mathsppblog) as our special guest.
Rodrigo authored the free Python book, Pydon'ts – Write elegant Python code.
In this episode, we talk about:
* Python content creation
* Writing a Python book
* Working in open source
* Non-traditional hiring practices
* and much more!
Rodrigo also has a newsletter you can check out to learn more Python!
You can now sponsor The Python Show or one of my other endeavors. Learn more here:
Get full access to The Python Show at www.pythonshow.com/subscribe
Transcript
From the publisherThis transcript comes from the podcast’s own feed, shown as the publisher wrote it.
28 - Python Content Creation
Okay, I like to tell this short story. Well, the thing is, I think that one thing that defines me really well is the fact that, or that's important to understand more or less who I am, is that I really like solving problems and And I don't mean like the maths problems that you get in school, right? It's not you and me have both together. We have 12 apples and I have three more apples than you. So how many apples? It's not, that's not really the type of problems, just being challenged, being challenged. Yeah. And that's why I studied maths at university. And it's also why I got into programming in the first place. with Mike. I was drawing and my father, I think it was my father, asked me if I was drawing letters because I was drawing random squiggles, squiggly lines. And I said I was actually drawing numbers. So that was fun. And obviously they weren't numbers. But yeah, turns out I've enjoyed maths for a long time. And yeah, so then I ended up studying maths at university, which was lots of fun. of 13, I think. Not at university, obviously. I was 13 and a friend of mine turned to me and said, Rodrigo, I think you should learn Python. I think you'll like it. And I don't know, I didn't know anything about Python. So I checked Python out and I've been doing it ever since. So I guess my friend was correct. I did enjoy Python. That's cool. Yeah. Yeah, so that's how I, I said 13, I was 15. Sorry. I started Python when I was 15. Yeah. So that's how I got into it.
Yeah. People, people are afraid of math and I, you know, I didn't care for it at first, but I really started liking it in high school and, you know, now You know, people say computer programming, you have to know math and you have to know high level math. And I'm like, that's not true. You have to know like algebra and that'll get you through most programming problems. You know, calculus and statistics are nice for some very niche problems. Unless you, unless you like trying to, you know, do like guidance for like a car or a missile or a tractor or whatever, you're probably not going to need a lot of those advanced math Subjects.
yeah yeah essentially except for and like you said like niche programming on something specific yeah there there are of course you know there's always caveats to that there's yeah of course of course but i do i do think and sadly i haven't taken the time to verify this so this is just a gut feeling that i have and i might also be just thinking too highly of myself, but I have this feeling that people who study maths at a certain level learn some skills that are very useful in programming. And I'm not claiming mathematicians are the only ones that learn it, that's not what I'm saying, but I do feel like the ability to to look at a problem and just get rid of everything that's not essential to the problem, boil the problem down to the core structure, for example. That's the thing mathematicians tend to do well, and it's useful in programming. So, yeah.
My favorite Python packages are modules. Well, I always go back to a couple of modules from the standard library that I just absolutely love, both from a usefulness point of view, but also from a... I'm going to say elegance. I feel like the IterTools module and the FuncTools module are both very elegant. They have very elegant tools and I use them very, very often. It's not like it's a creative answer, but it's my answer. And yeah, I just, I just go back to those two modules very, very frequently.
Yeah, you're just nodding along. Okay, perfect. Yeah. So, so APL is array oriented. And so learning APL was a very interesting experience and then we can talk about it later. And then, and then what? And then NumPy tries to bring that array orientedness into Python. And so I've, I've appreciated, I've started to appreciate NumPy more because it does allow you to use patterns and ways of thinking that you couldn't in vanilla Python. So not only for the numerical calculation kind of stuff, but also like the way of thinking about problems. NumPy lets you use different ways of thinking. So I enjoy that. And also I might get, yeah, another thing I've been enjoying now very different from the other three. It's the mandatory textual reference because it's what I've been working on. And it's been lots of fun. So textual also, also one of my favorites in the present day at the time of recording.
Yeah. I know the basics, but I want to, I want to start learning it. Like I, like I learned a WX Python long ago. I got really good at WX and I can, I don't hardly even need to look at the docs for that anymore. And muscle memory. Yeah. I'd like to get at least one more Python GUI framework where I'm like that, where I can just, you know, it's, it's just muscle memory. It's, it's easy to do.
Well I guess not a very interesting answer but essentially it just happens you know because I was no let's let's trace back So I've always enjoyed helping my classmates when, when in school, if someone had a doubt and if I knew the answer, I would love to walk them through the thought process that would take them to the answer. So it wasn't, of course, I got better at these parts when, as I grew up and as I matured, but it wasn't necessarily about showing them the answer. It's about taking them through the process of, so in other words, really teaching, right? So it turns out I really enjoy teaching. And parallel to that, when I started university, more or less at the time I started university, so not because of, but at the same time, I created a blog because I wanted to have a place where I could jot down some notes about random programming projects that I made. You know, if I created a piece of code that did something interesting, I would want to be able to write down a couple of paragraphs, say, hey, I did this in this way and that way, and just post a picture or something. And the idea would be to have a place I could refer to, to see what I've done. It wasn't necessarily to show it to others, but this, yeah, it just grew. The blog grew and Apparently a couple of people enjoy reading what I write, so I started writing more often, and then I started sharing, and then I met Sandeep on Reddit, and Sandeep took me down a path that eventually led me to Twitter and to writing books and things like that. So that's actually how it started, yeah.
Yeah, it does, it does. I think I would... I'd keep blogging if no one read it because I really enjoy writing. But the occasional comments or the occasional realization that someone actually read what I wrote gives me motivation to write much more. So it's definitely a feedback loop that keeps me going. Absolutely. Yeah. Yeah.
Oh yeah, absolutely. Maybe I should keep track. I have no idea of how often or how many times I've gone back to things I've written. and that I've forgotten. I remember I've wrote, I've written about them, but I don't remember exactly what I wrote. So I go and check how something worked or what I did in the past to solve some problems. So it's definitely a very useful tool for yourself.
I just need to go back and check. Yeah, absolutely. And there's also, there's also a very cliche thing. I'm sure you agree, which is when you write, it also helps you learn. Yeah. So I've written about, I've written about topics that I wanted to learn about and I decided, okay, I'll just write about this. And that forces me to research and to think about it and to come up with examples and understand how things work. So I've, I've also used it as a learning aid.
I use that too. Yeah, so I did use Carbon in the past, but nowadays I use Snapify for actually a bunch of different things. So I use Snapify to share code screenshots, annotated screenshots, so I can write text and draw arrows and things like that, so that's brilliant. and I use it also when I give talks. I used to use PowerPoint, but nowadays I use Snapify to create my talk slides, so that's very useful. It's cool. Yeah, it is. It's a fairly recent feature, so I use it a lot. I also like to use Canva for basic designing things, thumbnails or Book Covers abstract images if i need some background or something like that but i i try not to use too many tools you know i've i've tried setting up like a very well-defined structure content creation pipeline with Notion and databases and calendars and things like that. And then I just drown in the complexity when I, when I, what I want is to teach Python.
Right. Tossed to the wayside. I didn't know that expression. Yeah. So yeah, I tossed Notion to the wayside. It's a, it's a brilliant tool, just not what I needed. I do use Obsidian sometimes as a, as a note taking app. So whenever I, for example, right now, at the time of this recording, I've been thinking about and writing about Dex and I have a like a note on Obsidian that's about decks and I'll dump every single use case and every single example of usage of a deck I'll drop it there and then I'll be able to share some of those examples on Twitter or write about them on my blog but I have like a place where I can dump everything you know and see oh there's a bunch of different things I've seen decks used for and I can extract the useful ones.
um you know they they like Microsoft Word and other people they're like they like Mac's pages and so everyone likes their own their own tool set yep to each their own absolutely so I thought it'd be fun to talk about how you ended up working at Texturalize or I think you mentioned you had stories about the interesting stories about working at your last couple of jobs actually
Right. Yes. Yes. Because I, well, I mean the, the, the stories I'm about to tell, I guess they're becoming more and more common in this day and age because of the internet. But the, when I look at my friends and the people I know, they still got their jobs and there's no problem with that. So I'm just stating a fact they got their jobs mostly through the more Let's I'm that is At the time, I was spending a lot of time on a website which is called CodeGolf.StackExchange.com So it's from the same network of websites as StackOverflow but this one is the CodeGolf community and for the people listening that don't know what CodeGolf is It's when you have a problem, a very well defined problem, and you want to solve it with programming, obviously, but with as few bytes of code as possible. So hence CodeGolf, because in golf, you want to get the ball in the hole, the fewest amount of shots. With CodeGolf, it's Shortest Amount of Golf crazy hacks that you can do in all sorts of different languages. But I also started to notice that the people that were really into code golf, the people that spent hours on that every week, they used golfing languages. So languages that were designed specifically for the purposes of code golf. And these languages, they're actually very interesting from the point of view of how they work. And they tend to look very cryptic, because what people do then is they take your letters and your most common characters and they give them lots of different meanings. So they overload each letter as much as possible and they use all sorts of interesting symbols because they want to be able to express complex ideas in a few characters, right? So they just pack as much as possible, okay? And so those things, they look like Garbage. They look like random characters that were spit out by, by random generator. And among those weird looking languages, I found APL. I found this language that have interesting looking symbols and that turned out to be quite good for code golf. And so I thought it was one of those toy golfing languages. And I'm almost done, I swear. And then one day, and one day I started learning APL. And I joined the chat room where people would talk about APL. And I noticed that there was one person there most of the time, and that single person was teaching me APL. And one day out of the blue, he turned to me and asked, Hey, Rodrigo, how would you like to come and intern with us? And at that moment I realized, wait, there's a company behind this language. This is not a toy language. And he's asking if I want to intern with them. So this, I'm sure this, this must be a thing, right? Yeah. So then I sent my CV and, and then I interned with them and then I stopped working for them because I finished, I had to finish my master's thesis. And then I went and I worked with them for what, one year, one year and a half, I think. So just because I was in a chat room, so that was very interesting and For me, a very different experience. Yeah.
Yeah, it was. And then, and then for Textualize, so for Textual, working on Textual, it was a similar thing. Less, more, more out in the open because I've, people have an easier time accessing Twitter than the other chatroom I mentioned, but I was posting on Twitter and then I met Will McGugan which is the guy behind Reach, a very popular library and we interacted a couple of times, sometimes we would comment under each other's posts and then essentially one day he... No, so first I told him, you know, I imagine I see myself working with you in a couple of years. And he said, yeah, I think I would see myself working with you as well. And then a couple of months later, he messaged me saying, hey, we're hiring two positions. Is this how you say it? We have two positions. Yeah, we're hiring. We have two positions and we can consider one of them being remote. because I was not interested in, in moving to Scotland. And yeah, so then, then I did go through the, the process of solving a, you know, just trying to work on an issue on GitHub, see if it's, if it looked like it would work out and then, then they hire me. But it was, I essentially just found a job on Twitter, basically, if you boil it down. Yeah.
Yeah, I don't know. I don't know. Everything can happen. Anything can happen. Yeah. It's just, I don't know. I think it's nice because there's, and it's not like you asked, but I'll say it either way, because some people might say, that I'm very lucky. And I mean, I am, to lots of extents, I am very lucky. But at the same time, there's this phrase that I really like, which is luck is when opportunity meets preparation, right? And I was lucky in essentially finding Wheel Out of the Blue on Twitter, but one thing that helped Will notice me was For example, all of the things I was sharing on Twitter and all of the things I had written on my blog, and that wasn't luck, right? I had to be there and I had to do it. And if people do things, if people do more things, they will be more exposed to luck. So, yeah, it's not sure, it's not guaranteed, but it increases your chances of being lucky.
So my experience with open source projects is mostly my experience with textual. And so one of the things I really like. is also one of the things that I don't like, which is it's out there in the open, right? So the good thing is you can see everything that's being done. And as a learning opportunity, that's just insane. Excellent for your growth. I have before textual. I had the written Python professionally but Every single time I had done it. I was the best on my team because I was the only one So by definition, I'm the best Right, which is good for your ego but not good if you're trying to learn and if you're trying to get better or it's not ideal and So working on open source has that excellent benefit of giving you the possibility of seeing everything that's being done. And so I can read all of my colleagues' code and I can see what other people try to create and I can see... I get exposed to different... I get exposed to pull requests from different people who think about software in different ways. So that's very enjoyable. That's cool. yeah yeah it is i i like it at least i like it but then the reverse side of that coin is everyone sees what you're doing so if you if you screw up if you screw up it's not like it's terrible yeah but it's yeah you need to be aware and you need to to be comfortable with the fact that if you're trying And if you're well-intentioned, then failing isn't terrible, you know, because it's going to happen. And so I think you just have to, so it's after you get used to it, it's not a bad thing. You just need to get used to the fact that you will get things wrong and people will point them out. because that's what code reviews are for, right? So there's a bunch of pull requests that I, some of them were closed. Some of them I had to refactor a couple of times. Some of them I had to refactor a bunch of times. And yeah, like the initial shock or in the beginning, it might be a shock, but it's actually a good thing. So. Yeah.
uh yeah if you pay attention to what's being said you can yeah you can learn a lot because hopefully yeah i think this is something that a lot of a lot of junior and maybe even senior programmers don't understand is when you switch roles so like i switched i recently switched to a new role a few months ago okay i'm the new guy but they consider me a senior programmer because i have so much experience right but you don't know the tech stack and so You know, I'll put up a PR and I'm like, if this looks good, this is going to work. And I'll break stuff because I don't know the tech stack. I don't realize that I'm going to break something that the code worked on my machine, you know? And so that's just something that's just something that comes with programming. And you start, once you've learned, yes, you might break something and that's okay. Yeah. You know, I just think more, more, more developers just need to understand that that's normal. That's just part of. of doing the work yeah yeah part of being an engineer is well you're gonna mess up sometimes sometimes you know crash the server the website will go down you know it happens that's why you have a backup right yeah you better have a backup so folks listening if you don't have backups go get them now yes yeah i think i think that's that's that's part of it it's not like
Yeah, well, personally, I did have a couple of those, those situations, you know, all of the tests pass. So it looks like it's working. And then it turns out a couple of hours later, there's someone saying, oh, hey, Why is my code broken? And it turns out, oh, I had just messed up. So yeah, not the most pleasant experience, but it's part of the job, I guess.
Well, there's one thing I wonder if you have any experience with this kind of situation, but one other thing that I appreciate working on open source is when you have some level of traction, you get, you get issues with people asking for features, reporting bugs, you get pull requests. And so interacting with these random people, like these random human beings, that either found bugs or want new features or are pushing code that fixes a bug or that introduces a new feature. So all of those interactions, I think they bring a new flavor to this show. So it's not just about writing code, it's also, you know, working with others and either show... What do I want to say?
I wouldn't say be a mentor because I don't, I don't think I'm in a position to be a mentor, but what I, yeah, what I want to say is that it makes the job more interesting. You know, the fact that you have to have these interactions and it's just, it's just another thing you have to bear in mind, you know, it's the interactions and, and making sure that you're, you communicate well with others and Especially when you have to say something like, Hey, thanks for your pull request, but we actually can't merge this because for some reason, or because we, we actually don't want this feature. It's the PR is not in a. Yeah. I don't know. It's, and it's, you have to be. Sensitive, you know, talking to us, you're going to say, look, maybe if we do X, Y, and Z then maybe we can merge this or, you know, So it's an interesting part of the job.
Yeah, that's something else that I think probably junior developers could learn from is as you become more senior, you have to go back and do a lot more code review. You don't get to do quite as much coding yourself. You're going to be the person who's reviewing the code and kind of a gatekeeper. And part of your job is to reject code that isn't up to the quality that you want. Up to the standards. So, you need to be very diplomatic, because you don't want to just say your code sucks. You want to say this code could work if you do X, Y, and Z, like you said. Or you might be like, This doesn't actually match the feature request. It just doesn't fix the bug. And, you know, go back to the drawing board. I think you're close. You probably just need to fix, you know, whatever that particular thing is. And, you know, there's nothing wrong with that. You can learn a lot from learning from your junior programmers. I learn a lot from mine. It's really fun to learn, you know, how they think because they're brand new and they have They bring that new learning that they got from university or their first job. They have all this different kind of knowledge that I didn't have when I started. And so it's really interesting to see what they come up with. But sometimes it's wrong and you have to correct them in a nice way.
Yeah. Yeah, absolutely. It's a difficult thing to do, I think, especially for For the four of us, so for us inside the team, we interact more often. So it's, I don't have to be very afraid of hurting their feelings if I write in a neutral tone, because we interact every day. And so it's fine, but maybe my neutral tone will not be well understood by someone who I have never met or interacted with. And so I have to be, like you said, more diplomatic and make sure that we agree that we both want the same thing, it's just not something else needs to happen, something, yeah, some code needs to change or whatever, yeah.
If I recall correctly, the PR was actually pretty decent, but they happened to be fixing a bug on a piece of code that was being refactored as part of a bigger overhaul of like a part of the code. And so we couldn't actually merge the PR because it was conflicting with the other larger one. So yeah, you have to tell the person, look, this is This is also being changed elsewhere. Would you mind waiting? Yeah, I think we asked that person to wait. Can you wait a bit while we finish that?
Up until today, I haven't been able to make any major contributions to the Python ecosystem in the form of packages. I don't know, for some reason I haven't had, it's not for some reason, I just haven't found anything that I wanted to do and that couldn't already be done. So I think that was essentially it. I do have like a tiny package. It's ridiculous how little code it is, but it's I think it's quite useful, at least for me, which is like when you have a, when you have an error in your code and when it prints the trace back, it will also print a link that you can click to Google the error automatically. And so it's very little code, but for, for people learning it's, it's, it has proven quite useful. Yeah. So it's, that's like the only, useful package i've created so in terms of packages there's that i don't understand how there's people that have 10 15 20 packages and all of them are i don't know somehow useful and they do things i don't understand how that's even possible but i mean kudos to them and that's great i i just i don't i can't conceive the context in which those things happen i just i can't
yeah there's some people here just like um i think it's Sebastian put out um what is it typer and yes typer and fast api fast api and some the other sql alchemy i think that's not alchemy no it's it's i can't think what it's called now i know what you're talking about though but yeah he's put out like three or four major packages and they're all super popular yeah and i know he works on them heavily too i'm like where do you find the time
It depends on what you define as new. I tend to work on chapters on that book. So I haven't defined what the end of the book will be. The idea I've been entertaining more recently is that I'll actually split the book into slightly smaller books because the book just keeps on growing and I have literally dozens of ideas for chapters. and I don't think it's reasonable to write a book that is, I don't know, 1000 pages long. So, yeah, probably not very reasonable. So I've been thinking of splitting that book specifically into, I don't know, a book with a more beginner focused chapters, maybe one book that focused on, I don't know, all sorts of Dunder methods, another one on more advanced topics, for example. Yeah. But it's because... Sorry, sorry.
Yeah well it does make some sense in my head but because I don't think it's a or at least for now I don't have a specific final goal in mind I just let it grow organically so one day I have an idea something I want to write about at that time I'll write a new chapter and I'll publish it and I think I'll be doing that for some time you know just write chapters yeah um yeah i do have other books i work on and other ones that are more well defined so i know when they'll end or when they have ended yeah yeah i understand that's cool i'm glad it's still progressing it's not just you're not having writer's block or something yeah no no writer's block i'm i'm blocked writing on that because i'm writing on something else but no writer's block i still have plenty of ideas for for things to cover yeah
