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 #69:
Digging into StackOverflow's 2018 survey results

Recorded on Thursday, Mar 15, 2018.

00:00 Michael KENNEDY: Hello and welcome to Python Bytes where we bring Python news and headlines directly to your earbuds. This is Episode #69, recorded March 15, 2018. I’m Michael Kennedy.

00:00 Brian OKKEN: And I’m Brian Okken.

00:00 KENNEDY: And Brian, nothing to cover notebooks or anything like last time. We had kind of an over the top notebook thing, didn’t we?

00:00 OKKEN: Yeah, we did. We covered a few topics on notebooks.

00:00 KENNEDY: We probably won’t do that again this week. We just want to say a quick thanks to DigitalOcean. They’re sponsoring this episode and many of the episodes of Python Bytes. They really are helping make the show happen. Check them out at do.co/Python. We’ll talk more about that later.

00:00 Maybe we’ll talk about notebooks, Brian.

00:00 OKKEN: Let’s talk about them just for a little bit.

00:00 KENNEDY: Alright, just for a little bit.

00:00 OKKEN: So, because we talked about notebooks so much last time, one of our listeners contacted us and said we should take a look at a project called pynb. It says, “Jupyter Notebooks as plain Python code with embedded Markdown text.” So, the comment from our listener was loves Jupyter Notebooks but he also loves using his own editor. I think he uses PyCharm. I like doing that, too, but it’s not trivial to edit. I haven’t even tried to edit a notebook in PyCharm. You probably can but I haven’t tried. But I like this idea. There’s basically a converter that you can convert back and forth between Python code with embedded Markdown, back and forth to a notebook. So, it looks pretty cool.

00:00 KENNEDY: Yeah, it’s pretty wild. So, you define a cell’s function and then you can put docstring-type equivalent of Markdown that becomes a cell. And then you put a little bit of Python and that becomes a Python cell. Then more Markdown within docstrings. Super cool. So, a really nice simple example. It’s quite cool.

00:00 OKKEN: Yeah, and one of the things that it points out which is nifty, it allows you to use diffs better with your version control tools or things like that. It’s worth checking out if you want to do more with notebooks but want to be able to store them in plain text better.

00:00 KENNEDY: It’s really right down to the essence of it, isn’t it? Because the notebooks are pretty verbose if you crack open the text file and look at them. You look at this and it’s literally what you would see in the notebook. It’s all you type; it’s pretty cool.

00:00 OKKEN: It was on my ‘to-do’ list, to play with notebooks a little bit, so I’ll play with this also.

00:00 KENNEDY: Yeah, so pynb. PyNotebook. Check that out. Very cool.

00:00 So, you know how there’s this really cool William Gibson quote.

00:00 “The future is already here, it’s just not evenly distributed.”

00:00 OKKEN: I love that.

00:00 KENNEDY: That’s a cool quote. I love it, too. Often when I think of, ‘Where’s that future we were hoping for? It’s not here.’ Maybe it is, it’s just not evenly distributed. This next thing feels like it kind of falls into that realm. It’s definitely from the futuristic world. I don’t know how far futuristic. Is this two years in the future, ten years or a hundred years, or something like that? Or is it just living science fiction? But I promise this has something to do with Python, it just takes a moment to get to it.

00:00 The announcement is that Microsoft has created a quantum computing language called Q# (sharp).

00:00 OKKEN: Yeah, okay. This just sounds neat.

00:00 KENNEDY: This is awesome, right? It’s been out for a little while and we were talking before the show and it was almost worth covering before because, wow, there’s a programming language specifically designed for quantum computers. It’s a pretty nice language, actually. But the news is, now it’s available for MacOS and Linux and you can try it.

00:00 So, there’s this new language called Q# and if you look at it, it’s a little bit like C#. It’s also a little bit like TypeScript in some ways, but also like Python. I was really pleased to see the if statements don’t have parentheses around the condition, and stuff like that. Because we don’t need them. Why are we forced to write all those parentheses? They’re unnecessary. We all know that from Python and Q# is borrowing some of these cool ideas. The type annotations are very much similar to Python type annotations as well. Quite cool.

00:00 There’s this new language. One of the first questions you might ask is, ‘Great, there’s this quantum computer programming language, but there’s no quantum computers.’ What’s the point? Why are we going to run this. I know there’s a couple of bits but you can’t go and get a quantum computer to test your program on. So, how do you test it?

00:00 OKKEN: Good question.

00:00 KENNEDY: So, they’ve for this emulator-type thing that emulates the behavior of a quantum computer. Though I suspect it’s slower than a real one.

00:00 OKKEN: Maybe I’m just not up to date. Are there quantum computers now?

00:00 KENNEDY: I can’t remember who was, maybe IBM, but there’s a couple of bits, maybe a two bit quantum computer in a super cold environment that can do very simple things. But it’s not like a general purpose… Unless you’ve for a liquid hydrogen bath to put it in and things like that. (Laughs)

00:00 It’s based on topological qubits and quantum computers, hence Q# and it’s out for MacOS and Linux. It’s awesome. On Windows, you can play with it in Visual Studio Standard, but on Mac and Linux, you can use Visual Studio Code. And there’s a quantum programming code extension for Visual Studio Code. That’s pretty cool.

00:00 OKKEN: Yeah, so you’re saying this ties into Python somehow?

00:00 KENNEDY: Somehow. In fact, they said, ‘We created this new language and we created a way to emulate it.’ There’s actually some stuff in the Cloud computing platform Azure where you can plug in these things, thought they all tie together in interesting ways. But they said, ‘We know other languages exist and they’re really important. The one language we think is so important it should be involved in this as well is Python.’

00:00 So, you can now use Python to program quantum computers.

00:00 OKKEN: Oh, that is awesome.

00:00 KENNEDY: It’s awesome, right? It’s emulating quantum computers, but still super awesome. They said, ‘A lot of this analysis has to do with data science-y type stuff, so we’ll also support Jupyter.’

00:00 OKKEN: Yeah, I predict a whole bunch of people in college doing their theses on stuff like this.

00:00 KENNEDY: Yeah, that’s a really good point. Putting the science-y aspect back in computer science, right?

00:00 OKKEN: Yeah, definitely. That’d be neat.

00:00 KENNEDY: So, do you speak Spanish, Brian?

00:00 OKKEN: You know, this is embarrassing. I took two years of it in high school but I barely can order a burrito. My Spanish is not very good. But there is a fellow – A. Vallbona (@avallbona) I think is his name – that does speak Spanish. He gave a talk at PyConES in 2017 about pytest. And he let me know about it and showed me the slides. And this was kind of cool, he sent it to me on Twitter and said, ‘Hey, I forgot to tell you. I gave this talk last year.’ I think it was in September. I said, ‘That looks really cool, there’s a lot of neat stuff in it.’ Unfortunately, I don’t speak Spanish, but neat, anyway. And he said, ‘Oh, let me translate it for you.’ So, he translated the slide deck for me. And the slide deck, we have a link to the English slides. And also, if you speak Spanish or want to watch anyway, there’s a video on YouTube that we’ll link to.

00:00 One of the reasons why I want to bring it up is because there’s some neat things in there that I never heard of before. There’s some that I have and some that I haven’t. For instance, he does talk about using pytest-django, how to hook pytest up with Django models and stuff. And then a thing called model-mommy, which is a way to mock out Django models. I hadn’t heard of that. One of the things that I need to talk about in full length on my podcast is pytest-lazy-fixture, which is probably soon to be one of the recommended ways to have fixtures be able to go into a test function parameterized input. It takes a bit of explaining.

00:00 But there’s also some fun things. Freezegun is a way to “freeze” time for your testing into a specific spot and the interface looks really cool on freezegun.

00:00 KENNEDY: That’s cool.I love the names here, the model-mommy and the freezegun. These are great.

00:00 OKKEN: Yeah. Then there’s a package called eradicate, which removes all the comments out of some code, because sometimes code is easier to read if you remove the comments. So, that’s fun. (Laughs)

00:00 KENNEDY: Code comments are deodorant for code spells, right? They are there to explain why your code is poorly written, right, a lot of the times if they’re not full-on documentation for a help statement. I totally agree. That’s awesome.

00:00 OKKEN: Those are some fun things and I wanted to bring it up. A bonus topic, just today it was announced pytest.org started a reference page which has a one page full reference to the pytest API.

00:00 KENNEDY: That’s cool, all in one place. Super nice.

00:00 Speaking about stuff in one place, let me tell you about DigitalOcean and a cool feature they have. So, you know that you can go to DigitalOcean and create virtual machines, right? Like Linux servers and stuff.

00:00 OKKEN: Yeah.

00:00 KENNEDY: So, that’s just the start. What if you want to run GitLab or you want to set up MongoDB? Or you’re going to run a discourse server. You’ve got to install Ruby, you’ve got to install the discourse stuff, the database, etc. So, one of the things you can do at DigitalOcean when you go to ‘create a new machine, they call them droplets, you create these one-click apps. So, one click over here and say, ‘Boom. New discourse server all set up. Configure it and save, go.’ ‘I want a new ghost server, go.’ ‘I want a new WordPress instance, go.’ And just click it and it’s up and running. It’s really awesome.

00:00 OKKEN: Really? Okay, that’s neat.

00:00 KENNEDY: Yeah, you can even do Docker. You want a Docker server? Boom, hit that button. You’ve got Docker 17.12 running on Ubuntu 16.04. Perfect.

00:00 OKKEN: Neat. I’ll have to check out all the one-click things they’ve got. Sounds cool.

00:00 KENNEDY: Yeah, so they’ve got a bunch of stuff that helps you get going in a nice way. So, check that out at do.co/Python and let them know that they’re doing the right things supporting our show.

00:00 OKKEN: Great.

00:00 KENNEDY: It is once again that season which the StackOverflow developer survey results come out. So, the 2018 developer survey results are out. They had over 100,000 developers this time. I think last year they had 64,000 so this is cool, it’s growing. I thought it’d be fun to just cover some of the highpoints. They spent a lot of the time actually talking about history of education. Like, ‘How much education did your parents have?’ A lot of that kind of social stuff.

00:00 OKKEN: Interesting. That sounds neat, yeah.

00:00 KENNEDY: It’s pretty interesting, things like that. There’s a bunch of that, but I’m going to focus mostly on the tech bits. So, one of the first questions they asked was about Open Source. They said, “How many of you contribute to Open Source?” And 55% of professional developers contribute to Open Source.

00:00 OKKEN: That’s higher than I would have expected, that’s awesome.

00:00 KENNEDY: Yeah, it’s really awesome. I think for all respondents, there were some students and stuff and people who were retired. It was slightly higher, but that’s not surprising. I thought the professional 55% was the most interesting there. People often feel like if they didn’t get a computer science (CS) degree in school than they don’t necessarily belong in programming or it’s hard for them to get into programming. But it turns out only 64% of the people have CS degrees.

00:00 OKKEN: That actually seems high to me. There’s only about a third or less of the people I work with that have CS degrees.

00:00 KENNEDY: Yeah, I agree. I think that seems high from my experience as well. Maybe CS degree people spend a lot of time on StackOverflow. I don’t know. (Laughs)

00:00 OKKEN: Maybe. Why are they spending so much time because they have a degree.

00:00 KENNEDY: Exactly, c’mon. So, one of the social things they talked about was the sense of belonging. People’s perspective as developers among their peers. They put that under the banner of ‘experience and belonging.’ They had a graph and they said, “How much do you feel this is true or false over time? How much does this apply to you?” If you’ve had one year experience versus the people with five years experience versus the people with ten years experience. There’s a graph over years of experience and this metric. They said, ‘Your connection and sense of community over other developers.’ And apparently the more time you spend in the programming world, the more that matches. Which makes sense, right? But they also said, ‘How much do you feel like you’re competing with your peers instead of actually working together?’ How much do you see it as a zero sum game, I guess? In the beginning, people feel quite high that it’s direct competition. ‘That person gets more recognition, I get less.’ ‘They get a raise, I don’t.’ Something like that. But over time that diminishes quite significantly.

00:00 OKKEN: That’s good.

00:00 KENNEDY: And then the feeling of, ‘I’m not as good of a programmer as my peers.’ Pretty high in the beginning and over time people feel less and less like that’s a true statement. Which I thought was good as well. It seems to me like all of these are going in the right direction the longer you’re in programming, which is a positive statement for the whole ecosystem.

00:00 OKKEN: Yeah, but it also shows that we need to try to teach students, try to get that connectedness, less competitiveness. Teach that earlier.

00:00 KENNEDY: Yeah, right away. You want a kind of a bleak statement that totally applies to me. “How much time do you spend on computers?” The most popular answer? Nine to twelve hours a day. (Laughs)

00:00 OKKEN: Does that include your phone? (Laughs)

00:00 KENNEDY: I think it might be behind a screen, I’m not entirely sure but if I can kick back and play games or watch Netflix or whatever. It was also notable that the usage of Python has exceeded C# for the first time. They called that out specifically I think.

00:00 OKKEN: Yeah, cool.

00:00 KENNEDY: Then a couple more things. There’s languages and databases and they talk about ‘the most loved,’ ‘the most dreaded’ and ‘the most wanted.’ So, ‘the most loved’ is you’re using it and you love it. ‘The most dreaded’ is you had to use it and you never want to use it, it gives you fear. ‘The most wanted’ is, ‘I’m not yet using it but I want to use it.’ So, these are interesting ways to measure things. Languages ‘most loved,” number one is Rust. Even though not that many people use it, among people who use it, they love it so much. Kotlin isn't number two and Python is number three. Pretty nice.

00:00 ‘Dreaded,’ VB6 and CoffeeScript. ‘Wanted,’ Python is number one, ‘the most wanted’ language by 25%. Number two is JavaScript at 19%, which is quite a drop and then Go is at 16%. It drops down really quick and Python is ruling that.

00:00 OKKEN: Yeah, that’s great.

00:00 KENNEDY: Databases, ‘most loved’ is PostgreSQL. ‘Most dreaded’ is IBM Db2, Memcached (men-cash-dee) and Oracle. Memchad was responsible for the largest distributed denial-of-service (DDoS) attack ever and that was put on to GitHub recently. And then ‘most wanted’ is MongoDB.

00:00 ‘Most popular editor’ is Visual Studio Code. Pretty interesting. And for developers, “What OS do they use?” Windows, 49%. MacOS, 27%. Linux, 23%. Not where they deploy to but where they write their code on.

00:00 OKKEN: And this is one that we need to pay attention to more, I think. Because a lot of the podcasters and bloggers and all of that within the Python community, I think either Linux or MacOS might be higher.

00:00 KENNEDY: Much higher.

00:00 OKKEN: But you’re teaching to a group of people that half of them are running Windows. You just can’t ignore Windows.

00:00 KENNEDY: That’s a really good point. Even though the thought leaders and people you see at conferences and speakers and whatnot, are probably either Linux or Mac. The actual people doing the work and using the stuff is very much Windows still, so it’s definitely not to be forgotten.

00:00 Speaking of presenting… (Laughs)

00:00 OKKEN: Speaking of presenting, Doug Hellman, he’s got a new project called demoshell. The idea is somebody named Gene Hack (@genehack) on Twitter said, “Hey, speakers. If you’re going to do live demos in a shell, clear the screen after every command and get the prompt back to the top, so folks in the back can see what you’re doing.” And that’s completely reasonable.

00:00 KENNEDY: Yeah, that’s a great idea.

00:00 OKKEN: Instead of fiddling with it, this demoshell, the idea is basically just to do that. Capture a Python project, capture your input and emulate a shell, but it really just pushes all the work off to a shell to do the work. But between commands, it puts your prompt back at the top. It’s in its very early stages. I actually reached out to Doug and said, ‘Hey, so you want me to announce this yet? Are you ready for it? And he said, ‘Yeah, put it up there to start the discussion. I’ll be happy if a bunch of people showed up and started participating and adding things.’ But he added a warning also that, ‘Too much interest is going to be met with commit privileges on the repo.’ If you want stuff done, he might say, ‘Hey, just go ahead and do it.’ But actually, that’s a good thing. He’s up for people to help him out.

00:00 KENNEDY: I think this is really neat. It’s a cool idea. It definitely makes a lot of sense. I’ve done so many training classes where it’s not like stadium seating, it’s flat. It’s usually in some room with a crappy projector screen that’s too small and the people in the back can’t see it at all. This perfect, right? Everything stays at the top, it’s really great. And people out there looking to find an Open Source project to work on, go and express some interest. You might be met with commit privileges on the repo.

00:00 OKKEN: It’s still at its really small stages. There’s not a lot of code there, so it’s pretty easy to read.

00:00 KENNEDY: Yeah, that’s awesome. Nice.

00:00 Alright, so let’s wrap this up with a really nice definitive statement. The last thing I want to talk to you about is Python 2’s End Of Life (EOL). We’ve spoken before about there’s the Python Death Clock and we know that in 2020, Python 2 will go unsupported. What exactly does that mean? How strict are they going to be about that? Is it going to be at PyCon 2020? Is it going to be the end of the year? Well, my friend Nicola Iarocci (@nicolaiarocci), who I have more news about in just a little bit, he put this out on Twitter and got my attention. Basically, there was this discussion on the Python mailing list saying, ‘Will there be a period where Python 2.7 is in security-only status before hitting End Of Life?’ So, say, 2020, will it go into, ‘Well, we’ll do security fixes for awhile, but no new features and we’re not going to change anything.’ Or is that going to happen earlier. Guido (van Rossum) actually came out and said, “Let’s not play games with semantics. The way I see it, the situation for 2.7 is the End Of Life is January 1st, 2020. Beginning of 2020. And there will be no updates, not even source-only security patches after that date. Support from the CoreDevs, PSF, Python.org completely stops on that date.”

00:00 OKKEN: Yeah, there’s your answer.

00:00 KENNEDY: That’s pretty abundantly clear, isn’t it?

00:00 OKKEN: Yeah, but that’s way out. That’s like way in the future.

00:00 KENNEDY: That has to be at least a year and a half away. (Laughs) So, for those people with millions of lines of code on Python 2, they probably should start checking out things like MyPy and some of the other tooling on pushing that along, right?

00:00 OKKEN: Yeah, or if you’re planning on leaving your job and going to another company within the next couple of years, don’t worry about it. (Laughs)

00:00 KENNEDY: Exactly. I’ve got a better one for you Brian. Or you want to get a really sweet consulting job migrating Python 2 to Python 3. Learn all of the nuances. When people are freaking out in November 2019, you’re going to be in sweet demand.

00:00 OKKEN: Actually, that’s not a bad idea.

00:00 KENNEDY: My rate’s $250 an hour to start, so let’s go with that. (Laughs) I can help you with this problem. It’s going to take a while though.

00:00 OKKEN: Hmm, I’ve got about a year to beef up on my conversion.

00:00 KENNEDY: Awesome. You've got any news or extra things you want to throw out there? You did some recent Test and Code episodes, right?

00:00 OKKEN: Yeah, so I guess I just wanted to shout out that I’m back into recording more often. And I thought I’d start with a little test project, so I’ve got a project called Cards, that’s kind of a to-do app. But I’m focusing on using it as an example bed to talk about things that I get questions about all the time. ‘Okay, your book is great for how to write the tests actually, but what test? Why write? How do I pick which test to write? How do I pick test cases?’ Basically, this intro to quality assurance (QA) for busy people that don’t have a QA team. How do I do that? So, that’s where we’re exploring. I’m two episodes into it and I’m just going to run with it until it runs out of steam, so check those out.

00:00 KENNEDY: Yeah, they’re really awesome. I think that it’s great advice and when people get that wrong, testing seems super horrible. You’re like, ‘What do you mean I’ve got to test every single thing?’ If you’re focused on testing the wrong thing, it’s just super busy work.

00:00 OKKEN: Yeah, but testing should be something to help you develop faster, not slow you down and that’s where I’m focusing my energy.

00:00 How about you? Any news?

00:00 KENNEDY: Well, I just got back from PyCon Slovakia. That was pretty awesome. I want to send a shout out to everyone there who I met. That was fun. If you’re in Central Europe next year, be sure to check that out. That was a good event.

00:00 Also, I have a new course.

00:00 OKKEN: You do and I’m excited about it.

00:00 KENNEDY: Yeah, it's on the most wanted database technology. So, this is the first course based on Flask that I have. So, this is a thing called EVE. The E framework, which is a way to take Flask and a MongoDB database and turn it into a really awesome RESTful API with validation and business logic and all that kind of stuff. It’s a super cool way and it’s really declarative, so you say, ‘Here’s my models. Here’s my end points. Here’s the validation for them. Make that a REST service, go.’ It’s nice. So, that’s out now. It’s actually written by Nicola Iarocci, the guy who talked about the Python 2.7 statement. He wrote that and he’s also the creator and maintainer of EVE, so he’s pretty qualified to talk about it.

00:00 OKKEN: That’s great. I’ve already started listening to it because I’m very interested in this topic.

00:00 KENNEDY: Yeah, awesome. Well, links in the show notes. Check that out. I think that might be it. I’m really excited that we have a concrete statement on Python 2.7 and it’s not vague.

00:00 OKKEN: Yeah, that’s good to have. I wonder if they updated the Death Clock.

00:00 KENNEDY: I was just thinking that. We’ve got to recalibrate all the clocks. They probably got shorter. Awesome.

00:00 Well, thanks again, Brian. Thanks everyone for listening.

00:00 Thank you for listening to Python Bytes. Follow the show on Twitter via @pythonbytes and get the full show notes at pythonbytes.fm. If you have a news item you want featured, just visit pythonbytes.fm 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