Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book

« Return to show page

Transcript for Episode #78:
Setting Expectations for Open Source Participation

Recorded on Thursday, May 17, 2018.

00:00 KENNEDY: Hello and welcome to Python Bytes. Where we deliver Python news and headlines directly to your earbuds, this is episode 78, recorded May 17th, 2018, I'm Michael Kennedy,

00:10 OKKEN: I'm Brian Okken.

00:11 KENNEDY: And we have a special guest with us here, don't we Brian? Yeah, hey Kojo.

00:15 IDRISSA: Hello.

00:16 KENNEDY: Yeah, we have Kojo Idrissa here on the show. Thank you for coming and joining us.

00:20 IDRISSA: No problem, and thank you for having me.

00:22 KENNEDY: Yeah, it's really great, all three of us got to have a wonderful time at PyCon didn't we?

00:26 IDRISSA: Yes, we did.

00:27 KENNEDY: Oh my goodness, so I'm totally going to recap on that first. But lets just say thanks to Datadog. This episodes brought to you by Datadog, check them out at They were at PyCon, and so were all of us. In fact, Kojo, you and I, we kind of jumped into the deep end like right at the beginning. I was sort of standing around outside and you were, you walked into this room and you know just, hey we don't have enough people to or enough room to give this welcome speech to all the newcomers. So you and I ended up giving the welcome speech to a second group.

00:59 IDRISSA: Yep you and I and Trey Hunner ended up sort of as the impromptu host of that.

01:04 KENNEDY: Yeah first it was Trey Hunner and I mean I saw you walk up I'm like hey you need to come up to the front and be part of this. So that was really awesome, thanks for doing that with me. Brian what was your favorite thing about PyCon?

01:12 OKKEN: I guess seeing everybody that I only know from their little tiny circle icon on Twitter and being able to see them in person and chat. I was actually often surprised because I didn't recognize somebody even though I see their little picture all the time.

01:27 KENNEDY: Well you know how many tiny pixels, it's like a 64 by 64 sort of thing right? Yeah pretty funny, pretty funny. So Kojo how about you, favorite thing at PyCon?

01:38 IDRISSA: For me my favorite thing about PyCon was I mean just getting a chance to get caught up with folks. Me getting a chance to get caught up with people that I already know, then also getting a chance to meet new people. And I think the sort of impromptu leading of the new attendee session was nice because it it made it easier to meet new people so.

01:57 KENNEDY: Yeah that was really nice because the people felt more comfortable coming up and speaking to you and me after that. I think my favorite thing was actually the live Python Bytes recording, that was fun right Brian?

02:06 OKKEN: Oh that was blast! Yeah it was really good, we need to do that every year.

02:09 KENNEDY: I'm definitely planning on doing that again every year, I'm thinking about trying to actually propose that as an official part, official activity that is part of some of these conferences like PyCascades or maybe PyCon or something, but if nothing else certainly the open session was awesome. We'll talk more about that later but let's get to your first item Brian. Somebody forgot an else statement is that what happened?

02:31 OKKEN: There's more else statements in Python that you might not know about. I read this and like oh yeah I forgot about these! Anyway so both for, I mean you can use else clauses for if statements, everybody knows that, but for and while loops also also have if statements, or else clauses they're while and for loops are loops and if they complete all the way through, then the else clause gets run. And there's a little article to describe that that we've linked to called "The Forgotten Optional Else in Python Loops" but I wanted to highlight it because often I forget about it. The thinking around this is that if you're using a loop to search for something or search for different things and you want to bail out if you find something, one of the ways is to mark a flag to say hey I found this thing. But you don't need a flag if you take advantage of the else clause so I just wanted to highlight that and remind everybody.

03:27 KENNEDY: Yeah so both the for and while loops and these definitely both seemed a little bit funky to me when I, when I learned about it, wait the while loop has an else clause? My mind is melting. Kojo did you interact with these, have you ever used an else clause on a loop?

03:41 IDRISSA: On a for loop I don't know that I have actually.

03:45 KENNEDY: Yeah I always look at them and wonder, wonder why they're there I mean it's pretty cool to know about them, I feel like this is a one of those things that you could get asked in a job interview. Right like oh what does the else clause do? Like wait there's an else clause, how interesting? So this is I would say one of the less used part, major pieces of syntax in the language for sure.

04:04 IDRISSA: I would definitely, since I know a lot of people don't know about em, if I was going to use em, I'd probably add a comment there to say hey if we don't find the things then we do this stuff.

04:13 KENNEDY: It's interesting, it's definitely one of these sort of pythonic things that is not necessarily kind of obvious right it's kind of like self contradictory in that sense. Yeah pretty interesting. Alright Kojo you found some really cool stuff with some libraries and dependencies right? Tell us about those.

04:30 IDRISSA: I got exposed to this really I think on the last day of PyCon. There's this website called and what it does is it lets you not only find different packages so like PyPI will let you find a number of different packages, but what does is it will let you find dependencies based on packages. You go to, you search for a certain package and then you can see what other packages that package depends on. It's an interesting way to sort of see, to find out, like if you're building a project,

05:01 OKKEN: what things are you depending on, then maybe what things that those are depending on that you might not have been aware of. It will also point out like versions and that sort of thing so you can drill down fairly deep into it. The person who introduced it to me was pointing out that I can't remember the package now but there's a certain package that depends on Twine which is the packaging tool but it depends on an older version of Twine. And so on older version of Twine like let's say maybe like a year or so old,

05:25 IDRISSA: and so you can find that kind of information. And so I thought that was interesting. And then along with that, is run by a site that is called tidelift, it is looking to, how to help bring some financial support into opensource software. I mean I didn't get a chance to look into that in great detail, but it's interesting how the two are connected.

05:44 KENNEDY: That's pretty interesting. It's almost like you can get consulting support agreements for a package that you might, that you might want to use. This is kind of what it sounds like.

05:55 IDRISSA: Yeah it seems that way, like I said I haven't had a chance to dig into it in a lot of detail, so I focused a little more on, but I think with you can help determine okay well what packages might I need or want consulting support on. So what are the packages that my project depends on heavily and at the same time might not be getting as much support as I might want and so maybe I want to focus my support dollars on that particular package, this may be two or three levels down in the stack.

06:25 KENNEDY: Yeah how interesting. It says they, give maintainers and core teams a platform and marketplace for building sustainable business around their project. I bet that resonates with a lot of folks who are out there listening to this show.

06:39 IDRISSA: I know there's been a lot of work done, a lot of people who have been looking into how do we make opensource projects sustainable instead of having to depend on volunteer work.

06:47 KENNEDY: The most straightforward way that this has worked traditionally is either a very small amount of donations or consulting. If I work on say Flask, then maybe I could consult, help people out who are doing large Flask things. But this looks like a nicer sort of more formal arrangement. Hopefully that takes off, that'd be great for people.

07:10 OKKEN: One of the things, I was just playing with it, I think one of the fun things about is to look up a, if you're trying to use a, use a new package that you haven't used before, new library, you can look to see who else is using it so you can maybe look at their source code and see how they're using it.

07:27 IDRISSA: It's true, that's interesting.

07:28 KENNEDY: I see some other projects like, here's some library, who else uses it, oh look, requests uses it, so that must mean it's pretty stable or something like that.

07:35 OKKEN: Or even just to look at code examples of how they're used, how they're using it.

07:39 KENNEDY: Yeah very cool, that's a good find Kojo thanks. So either of you guys out there, are you using type annotations? Type hence in your Python code?

07:46 IDRISSA: I am not. I had a brief discussion about them when I was in Chicago a couple of weeks ago so.

07:52 KENNEDY: Yeah okay, Brian?

07:53 OKKEN: Yeah I'm starting to.

07:54 KENNEDY: Yeah I think it's interesting like, I certainly don't go type crazy on the code that I write, there's some obvious benefits for like really large organizations, and there's a great article I want to link to called "The Other Great Benefit of Python Typed Annotations" so they talk about things that are fairly straightforward you know it's like we've had these types of annotation for a while, but maybe it's a little unclear when you to use them. It's good if you have some big project that you want to somehow verify that things are working right so you can employ static code analysis right with like MyPy or a lot of things. We've talked about some of the tooling, previously Brian that you could run across your code and it will like generate these and then you can decide to incorporate them. One idea I really like is sort of a twist on an Uncle Bob quote, who's sort of a software architect guy, says cleaner code or the code that is self-documented is really great. And traditionally people said well we don't need a comment when you can use a function or a variable that's well named. Maybe another way to look at it or another thing to say is like we don't need a comment when you can specify, to talk about the types, when you could say specify type annotation. Instead of just having a comment saying hey this variable is such and such, a typed annotation makes that sort of readability super super easy. That's great and then obviously they're sort of optional right this whole progressive typing or gradual typing thing they're doing is great so you can add it and it won't break you code but it also won't make it any faster. Just use it where it's useful for you. But this article says the final sort of straw that was the massive benefit for this guy and I agree with him which is why I brought this in, is around code completion.

09:35 IDRISSA: Yeah definitely.

09:36 KENNEDY: Right so like I've got some big application and I typically put this sort of stuff on the boundaries of one layer talking to another layer, so I have the web app, the web app consumes some sort of data access slayer, logic layer that deals with services and data. If you annotate just the stuff that is like public from that data layer, it just flows through the rest of your application and makes it super super obvious, which I think that's pretty nice.

10:01 OKKEN: I was actually looking at an example of this this last week of for instance if you, if you got a class, like a new data class that has type annotations and you assign that to a variable and then you try to access elements of the variable, PyCharm can help you for instance, other editors as well, but PyCharm does those hints and will tell you the types of the different elements that you have access to.

10:25 KENNEDY: Right or if you were to return some object from a method it might just have no completion cause who knows where that could be, but if you annotate the return type all of a sudden it like comes back to life. What editor do you use?

10:36 IDRISSA: Primarily Sublime, but my co workers, I've had some co workers use Sublime and some who use PyCharm so I've started using PyCharm more between wire working so the other QA person uses PyCharm so I sort of go back and forth between the two. Like on my personal machines I've got Sublime and on my work machine I've got both and so I use them both in slightly different ways.

10:58 KENNEDY: You're getting sucked into the PyCharm orbit.

11:01 IDRISSA: And I remember, I've heard good things about it but I also remember reading an article you wrote I think about the nine benefits of PyCharm.

11:08 KENNEDY: Yeah that was quite a while ago, that really lays it out right. And this code completion's one of them and this type annotation makes that better which I think is pretty awesome. I just want to throw that out there, there's the whole sort of static code analysis stuff, but this code completion, pretty major. Alright before we get to the next one let me tell you all about Datadog because they are major supporters of the show and they really are helping keep it going so be sure to check them out. It's a monitoring solution that provides deep visibility into distributed application. So maybe you got some microservices or got different Python applications and you want to see how the database and Python app and Lennox itself are interacting, go check out Datadog. In just a few minutes you can investigate some bottlenecks in your code, figure out where it's slow and make it better just reading a few dashboards. So pretty cool. So visualize your Python performance today, get started with a free trial of Datadog and they'll send you a cool Datadog t-shirt which is awesome so go to Brian when people create opensource projects they usually do it cause it's something that they love, but then people start to depend on these projects and that can create some sort of animosity right? There's a lot of burnout in the opensource space because of it I think.

12:23 OKKEN: Definitely we've seen a lot in the last couple of years of people even taking a month off or six months off to try to get away from some of it. Dropping projects trying to find other maintainers because maintenance is kind of a hard problem. This was something that was brought up in from Brock Cannon, I saw this talk Sunday morning for the Sunday morning keynote at PyCon and you said that he also gave it at PyCascades.

12:51 KENNEDY: I don't know that it's exactly the same but the general message yes.

12:56 OKKEN: Yeah so the talk was called "Setting Expectations for Opensource Participation" but it really is, it was a discussion about kindness and paying for opensource with kindness and he really talked about, gave some examples of basically every communication you have with an opensource project, even like a bug report, you need to realize that you're taking somebody else's time out of their free time, free time that they could be spending on their own projects or with their family, and so beware of that and he gave some examples of some good interactions and some bad interactions. Then also some guidelines for how to communicate online, it was pretty good.

13:38 KENNEDY: The main takeaway was most of these interactions are you asking for a favor. And it sometimes doesn't seem that way right, so if I go to a project and say here's a pull request, it's super small, all it does is add this one feature, it's like 10 lines, you can just read that and it's no problem, but if the person decides to accept that, they're, not you, they're responsible now for maintaining it but also documenting it, potentially testing it, evolving it right, there's just so many layers it's like hey I did you such a nice favor, here's a puppy. I got you a puppy and then if the person doesn't like it it's like why don't they like the puppy? I got them a, that's so nice to give a puppy. But you're really giving this thing that you have to care for for a long time even if it's something as helpful as actually here's a pull request.

14:29 OKKEN: Yeah it's you're asking for work, for somebody else's work and we forget about that because we're used to, used to like products where we can like complain about the Apple laptop keyboards and it's just okay, but we probably ought to be nicer about that. But when you like even complain about tweet a negative thing about an opensource project or have a bug report where it's just like I need this to do this thing and it's broken, you're really hitting somebody, this is somebody's, somebody's passion, somebody spent a lot of time on and you're saying to them this is garbage. So yes do bug reports but do it in opensource it's volunteer effort so do it kindly, do it like you were asking your mother to do it or something like that. And he presented it so well that I think this sort of topic needs to be talked about more even within groups like I realized after listening to this and watching it that I think it will help me interact even with my own team at work when it isn't volunteer, it's people getting paid but you still need to be respectful and considerate.

15:37 KENNEDY: It's still basically a zero sum game for their time and energy. So by doing something you are sort of taking a slice of that that maybe they didn't ask you to take right? Yeah for sure. Kojo did you get to see this talk? Either in Vancouver or the conference?

15:52 IDRISSA: No I saw, there was a similar talk at PyCon Canada in Montreal. But I saw it in Vancouver.

15:58 KENNEDY: Have you had any interactions with folks where you see people like giving up on opensource projects or other folks being unkind?

16:06 IDRISSA: I've seen a little bit of that, maybe a little bit more than I would like. I have seen people sort of complaining about opensource projects maybe not meeting their standards or not being updated as quickly or as well as they would like. I tend to be a little bit prickly about that kind of thing because I think, so I'm relatively new to software engineering and a lot of my exposure to software engineering practices have been through the opensource community and through some of the larger opensource projects and so I have an understanding that a lot of these things that people depend on, are being built by volunteers who you know, who are doing it in their spare time. And I've been fortunate enough to meet a number of these people, and so you know I know some of these people personally so I guess it helps for me to sort of humanize it for me a little more. I try to sort of push back on those things, okay you know what, how much did you pay for this and how much are you paying for this and also you can, like if you want a problem fixed, there's a well documented process for you to make a contribution to help fix similar problems for yourself and if you're someone who's a more experienced developer, it's not that difficult for you to do.

17:08 KENNEDY: That's a really good point. I guess the thing is don't take it out on people, just vote with your feet. If you see a project that has a 100 unresponded to PRs, maybe that's not a real healthy project and your choices are don't be part of it or become a contributor. But don't abuse the person who's already overwhelmed and already has too much going on right.

17:30 IDRISSA: Exactly.

17:31 KENNEDY: Yeah yeah. Alright so what's your next pick Kojo?

17:35 IDRISSA: My pick sort of ties into that the idea of you've got these expectations for opensource participation, my thing is sort of focusing on different Python community events and so of course you know, we all just came from PyCon and one of the nice things about so there's PyCon itself and then for me one of the nice things about it was a chance to meet some of my, so get back together with some of my friends from Python community. Of course we started off with actually spending some time with you and with Trey to help sort of welcome the first time attendees to PyCon, sort of welcoming them into more active participation in the Python community.

18:06 KENNEDY: Yeah that was fun so let me ask you really quick about why you're on the topic. Give me three really quick things people should know to have like a better experience at PyCon. Or local ones maybe.

18:15 IDRISSA: I would say one try to have some idea of why you're there. Like why are you attending PyCon, are you looking for a job are you looking to hire people, are you looking to learn new things, are you looking to meet new folks, that sort of thing. And I think whether it's PyCon or your local Python meetup, it's sort of the same thing, you know what are you going for, just to learn or just to meet other developers who work in Python just like you do that kind of thing. I think that's one of the big things and the other thing is to maybe, with something like PyCon, try to manage your energy, cause there are a lot of people at PyCon, there's a lot going on, you probably won't be able to go to every talk, there's a temptation to try to consume as much information as you can. And then I think along with that managing your energy, there's something that we've pointed out to people, is to try to sort of, something like PyCon, try to optimize for the human interactions, like the open spaces and sort of the hallway track because the talks are awesome but they're all going to be recorded and the videos will be available fairly quickly, but the people that you meet and the human interactions that you have or the cool things that happen in the open spaces, those aren't going to be recorded. One of the things that I did at PyCon, one of the open spaces I was in was hosted by Adafruit and so we got to sit down with some of the circuit boards that were in our swag bags and you know write some code and make LEDs light up and that sort of thing and sit with people and so that's the thing I can't watch a video of that later, I can't do that again later, so actually had that sort of direct interaction with people so I think those would be sort of three things to help guide people.

19:46 KENNEDY: Alright I really liked the manage the energy cause I was done at the end. Brian how about you, wiped out at the end of PyCon?

19:49 OKKEN: Very wiped out yeah and I think that that contributed to some of my, kind of my funk and tiredness the last few days.

19:57 KENNEDY: I'm still feeling it as well. It was totally worth it but I am wiped out. Alright so the last one I want to share a personal story with you because we find all these things on the internet and I think they're great but like every now and then it's like I just found this thing and it so helped me with this problem that I was run into and I think it will help a lot of people out there. So I want to tell everyone about ngrok, N G R O K. And that is a free with a premium upgrade sort of thing service that you can go and basically ignoring all firewalls and all sorts of stuff expose basically your local ports, your local servers on your computer. So if I have say, like a mobile device and I have an app running on the mobile device and I want to test the services but I'm like developing it, maybe I want to even debug like how that's working I could actually open, I could run this ngrok command, it will do an SSH tunnel that exposes say my local dove port back to port 80 on the internet, then I go to that URL and hit something on my phone app and it like, I can step through it in PyCharm on my local machine. I think that that is pretty darn awesome, or if you want to make, say give access to your Rasberry PI so you can get into it and call operations on it, test your chat bot. The reason I was using it was I'm building a set of applications, like proper compiled applications that are offline for my courses. People can basically have offline access to the videos and then sync their account and not depend upon being on the web or on the internet right. So that's what I've been doing since I got back from PyCon. And I had been deploying stuff out to the internet then I'd connect to it and test it and like aw that service isn't quite working and it was getting a little painful, I'm like why am I doing this? Cause one is on my Windows machine one is on Mac and it was easier to just do that right, instead of, it wasn't on the same machine. And so I'm like I'm just going to fire up ngrok, and then I can actually do the same thing I just told you about, I can actually step through as the Windows app is interacting with the service that ultimately makes its way back over its GPS onto my local machine. Isn't that cool?

22:03 OKKEN: Yeah that's very cool. Yeah I got exposed to ngrok by a co-worker, and I hadn't seen it before and I go well that's you know, that's pretty awesome.

22:09 KENNEDY: Yeah thing that I think is most useful is so often I work in the web world right so traditionally I had maybe made some changes to the web app and then we might have like a scrum meeting or a quick sync up meeting like hey how's everybody doing, and I'm not ready to publish what I've done to the internet to staging and mess everyone else up. But I would still like to show people and let them interact with it, instead of doing like a screen share you can go well just go to this URL and you can run it on my machine which is incredible for a quick iteration of design and development.

22:42 IDRISSA: I just find an interesting application for ngrok may be like the weekend right before PyCon, some friends who run a group here in town called Girls Coding Club, they were doing a sort of tutorial session and so you had people sort of learning how to build basic web applications, I think they were using Rails, but then you can use Ngrok and expose that to the wider internet so that other people, so people in the class can sort of, can see each others applications where you can go send a link to a friend or what have you. So it's also really good for tutorials yeah.

23:10 KENNEDY: That is awesome. Yeah right for classes right, so I've got a slack channel for that group. Everyone could ngrok their stuff and throw it in and say hey mines at you know, random address dot ngrok dot o, click on and you can have a look and you could like, without having to reconfigure that on different people's servers. I love it and there's like a totally reasonable free tier which is pretty awesome. Alright well that's it for our items this week. I just have a few extra things I want to share, Brian anything else you want to throw out there?

23:37 OKKEN: I did on the plane coming back from PyCon, I finally finished editing the interview with Trey Hunner so soon there will be a testing code podcast with interview with Trey Hunner, so that should be on soon. I saw that you're starting to publish a little more frequently which is great.

23:53 KENNEDY: Thank you. I'm glad you're doing that. One of our listeners out there, Steven Howell, hello Steven, was kind enough to actually be live streaming our live, well semi live, in audience recording of Python Bytes last week. That's pretty cool right Brian?

23:53 OKKEN: That is neat, have you watched it?

23:53 KENNEDY: No well I watched some of it. He actually took the video and it starts a little bit ways in, but he put it up on the internet on YouTube so if you guys were listening to the live episode last week and you're like well what was that actually like, well click the link on the bottom and you'll be able to watch a pretty high quality version of it actually so that's petty cool. And then you know another thing I'd like to come back to just really quick is remember when we talked about how easy it is to have a systemd daemon as a Python application, to basically implement a systemd daemon in Python, we talked about that in episode 54.

23:53 OKKEN: Oh yeah totally, no I don't remember that.

23:53 KENNEDY: It turns out you basically have six or seven lines of configuration and then just an app with like a while true loop, it's insane. And that's all you have to do to create like a systems start run forever sort of application in Python and it's really beautiful. So I recently used that technique from episode 54 to build a global series of video servers throughout the world to do like geo located video surfing for all my courses to make that really much nicer so added one in Japan, Sao Paulo and Mumbai this week so that will make it a little better for people out there listening but it's also a cool application of what we talked about in episode 54.

23:53 IDRISSA: Nice, very interesting, yeah, very interesting.

23:53 KENNEDY: Incredibly simple, I think more people would probably want to do it if they knew how easy it was. Alright guys well that's all I got. Thank you Kojo for being here and Brian thank you as always for making the show happen.

23:53 OKKEN: Thank you.

23:53 IDRISSA: Thank you for inviting me.

23:53 KENNEDY: Yeah you bet, bye guys. Thank you for listening to Python Bytes follow the show on Twitter via @Pythonbytes. That's Python Bytes as in B Y T E S. And get the full show notes at If you have a news item you want featured just visit and send it our way. We're always on the lookout for sharing something cool. On behalf of myself and Brian Okken, this is Michael Kennedy, thank you for listening and sharing this podcast with your friends and colleagues.

Back to show page