Python Bytes - #69 Digging into StackOverflow's 2018 survey results
Episode Date: March 18, 2018Topics covered in this episode: pynb: Jupyter Notebooks as plain Python code with embedded Markdown text Microsoft’s quantum computing language is now available for macOS * pytest talk in Spanish...* StackOverflow Developer Survey Results 2018 demoshell * Clear statement on Python 2 EOL* Extras Joke See the full show notes for this episode on the website at pythonbytes.fm/69
Transcript
Discussion (0)
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 69, recorded March 15th, 2018. I'm Michael Kennedy.
And I'm Brian Akin.
And Brian, probably nothing to cover with notebooks or anything.
Like last time we had kind of an over-the-top notebook thing, didn't we?
Yeah, we did. We covered a few topics on notebooks.
Good. 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 Byte.
So they really are helping make the show happen.
Check them out at do.co slash python.
We'll talk more about that later.
Maybe we'll talk about notebooks, Brian.
Yeah, let's talk about them just for a little bit.
All right, for a little bit.
So because we talked about notebooks last time, one of let's talk about them just for a little bit. So because we talked about
notebooks last time, one of our
listeners contacted us and said
we should take
a look at a project called
PYNB. It says Jupyter
notebooks in 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 you can't, it's like not trivial to edit.
I haven't even tried to try to edit a notebook in PyCharm.
You probably can, but I haven't tried. But anyway, I like this idea of it's basically a converter that you can convert back and forth between a plain text or a Python code with embedded Markdown back and forth to a notebook.
So it looks pretty cool.
Yeah, it's pretty wild.
So you define like a cells function, and then you can put like docstring type equivalent of markdown and that becomes a
cell and then you put a little bit of python that becomes a python cell the more markdown within
docstrings and that becomes like another cell and yeah it's super cool so really nice simple example
it's quite cool yeah and one of the things that it points out which is uh nifty is uh allows you to
to use uh diffs better with with your version control tools or things like that.
So that's, yeah, 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.
It's really just right down to the essence of it, isn't it?
Because the notebooks, they're pretty verbose if you crack open the text file and look at them.
You know, you look at this and it's like literally what you would see in the notebook is like all you type. It's pretty cool.
Was one of my to-do list was to play with some notebooks a little bit. So I'll play with this
also. Yeah. So PiNB, Pi Notebook, check that out. Very, very cool. So you know how there's this
really cool William Gibson quote, the future is already here. It's just not evenly distributed.
Yeah. I love that. That's a cool quote. Yeah, I do too. And I often, when I think of like, oh, where's that future we
were hoping for? Well, it's not well here. Well, maybe it is. It's just not evenly distributed.
So this next thing feels like it kind of falls into that realm. And it's definitely like from
the futuristic world. I don't know how far futuristic is this two years in the future,
10 years or a hundred years
or, or something like that. Or is it just live in science fiction? But I promise this has something
to do with Python. It just takes a moment to get to it. So the, the announcement is that Microsoft
has created a quantum computing language called Q sharp. Yeah. Okay. This just sounds neat.
This is awesome. Right. And it's been out for a little while.
And we were talking before the show.
It was almost worth covering before just because, wow, there's a programming language specifically designed for quantum computers.
That's a pretty nice language, actually.
But the news is now it's available for macOS and Linux.
And you can try it, right?
So there's this new language called Q sharp. And if you look
at it, it's a little bit like C sharp. It's also a little bit like either TypeScript in some ways,
but also like Python. And I was really pleased to see like, 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? Like they're unnecessary. We all know that from Python and Q sharp is sort of borrowing some of these cool ideas.
The type annotations are very much similar to Python's type annotations as well. So quite cool.
There's this new language. One of the first questions you might ask is like, great,
there's this quantum computer programming language, but there's no quantum computers.
So what's the point? Like, why are we going to run this? I mean, I know there's like a couple of bits, but not, you can't go and get like a quantum
computer to test your program on. So how do you test it? Good question. Yeah. So they've got like
this emulator type thing that emulates the behavior of a quantum computer. Although I suspect it's
slower than a real one. Well, are there, maybe I'm just not up to date are there quantum computers now there are like i can't
remember who was feels like ibm but there's like a couple of bits like a two-bit quantum computer
and like like a super super cold environment that can do like very simple things so but it's not
like a general purpose you know unless you've got like a hydrogen bath, like liquid hydrogen bath to put it in and things like that.
So it's based on topological qubits and quantum computers.
So hence Qsharp.
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 like a quantum programming code extension
for Visual Studio Code.
So that's pretty cool.
Yeah.
And so you're saying that this ties into Python somehow?
Somehow.
In fact, so they said, all right,
we created this new language
and we created this way to emulate it.
And there's actually some stuff
in their cloud computing platform, Azure,
where like you can plug in these things.
So like they all tie together in interesting ways.
But they said, look, 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 as python so you can now you can now
call uh use python to program quantum computers oh that is awesome yeah that's awesome right it you
know emulated quantum computers, but still super awesome.
And they said, oh, and a lot of this analysis has to do with like data science-y type stuff.
So we'll also support Jupiter.
Yeah, I predict a whole bunch of like people in college doing their thesis on this stuff like this.
Yeah, that's a really good point.
Put the science-y aspect back in computer science, right?
Yeah, definitely.
That'd be neat.
So do you speak Spanish, Brian?
You know, this is embarrassing.
I took two years of it in high school, but I barely can order a burrito.
Yeah, my Spanish is not very good.
But there is a fellow, Abe Albana, I his name. Um, that does speak Spanish.
And he gave a talk at PyCon ES in 2017 about PyTest and let me know about it and,
uh,
showed me the slides and,
and this was kind of cool.
He sent it to me on Twitter and said,
Hey,
um,
I forgot to tell you,
I gave this talk last year and I think it was in September.
And,
uh,
and I said said that looks really
cool there's a lot of neat stuff in it unfortunately I don't speak Spanish um 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 um and there's also if you speak Spanish or want to watch
anyway um there's a video on YouTube
that we'll link to. But one of the things I, one of the reasons why I wanted to bring it up is
because there's some neat things in there that I'd never heard of before. There's some that I have
and some that I haven't. Like for instance, he does talk about using PyTest Django. So how to,
how to hook up PyTest with Django models and stuff. And then a thing called Model Mommy,
which is a way to mock out Django models.
Haven't heard of that.
One of the things that doesn't get,
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.
Anyway, it takes a bit of explaining.
But then there's also some fun things.
Freeze gun is a way to freeze time for your testing into a specific spot.
And the interface looks really cool on freeze gun.
That's cool. I love the names here, the model mommy and the interface looks really cool on FreezeGun. That's cool.
I love the names here,
the Model Mommy and the FreezeGun.
These are great.
Yeah.
And then 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.
Code comments are deodorant for code spells, right?
They're there to explain why your code is poorly written, right?
So a lot of the times, if they're not full-on documentation meant for like a help statement,
yeah, I totally agree.
That's awesome.
Anyway, those are some fun things.
So I wanted to bring it up.
And then a bonus topic just today was announced that PyTest.org added a reference page,
which has a one-page reference, full reference to the PyTest API.
Oh, that's cool.
All in one place?
Yeah.
Super nice.
All right.
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?
Yeah.
Yeah.
So, you know, that's just the start a lot of time.
What if you want to run GitLab or you want to set up MongoDB
or you're going to run a discourse server?
You got to install Ruby,
you got to install the whole discourse stuff,
the database, et cetera.
So one of the things you can do at DigitalOcean
when you go to create a new machine,
they call them droplets,
is you can create these one-click apps.
So I can click over here and say,
I would like to click and say, boom,
new discourse server all set up,
configured and saved, go.
I want a new Go server, go.
I want a new WordPress instance, go.
And just click it and it's up and running.
It's pretty awesome.
Really? Okay, that's neat.
Yeah, you can even do Docker.
Like you want a Docker server, boom, hit that button
and you've got Docker 17, 12 running. Yeah, Ubuntu 16. Yeah, you can even do Docker. Like you want a Docker server, boom, hit that button, and you've got Docker 17.12 running, yeah, on Ubuntu 16.04.
Perfect.
Neat.
I'll have to check out all the one-click things they've got.
Sounds cool.
Yeah, so they've got a bunch of stuff that helps you get going in a nice way.
So check that out, do.co.python,
and let them know that they are doing the right thing supporting our show.
Great.
It is once again that season in which the Stack Overflow developer survey results come back, come out.
So the 2018 developer survey results are out.
They said they had a hundred thousand, over a hundred thousand developers this time.
I think last year they had 64,000.
So this is cool.
It's growing.
And I thought it'd be fun to just cover some of the
high points they spent a lot of time actually talking about like history of education you know
like how much education level did your parents have a lot of that kind of social stuff interesting
that that sounds yeah yeah it's pretty interesting like, things like that. There's a bunch of that, but I'm going to focus mostly on like the tech, tech bits.
So first, one of the first questions they asked was about open source.
And they said, how many of you contribute to open source?
And 55% of professional developers contribute to open source.
That's higher than I would have expected.
That's awesome.
Yeah.
Yeah.
It's really awesome.
I think for all respondents, there were some students and stuff and people who retired.
So it was slightly higher.
It's not surprising, but I thought the professional 55% was like the most interesting there.
And then people often feel like if they didn't get a computer science degree in school, like they don't necessarily belong in programming or it's hard for them to get into programming.
But it turns out that only 64 percent of the people have cs degrees that's actually um yeah i think that that's
actually seems high to me um there's only about a third or less of the people i work with have cs
degrees yeah i agree i think that seems even high for my experience as well maybe cs degree people
spend a lot of time on stack overflow i don't don't know. Maybe. But why are they spending so much time? Because supposedly they have a degree.
Exactly.
Come on.
So one of the social things they talked about
was sort of the sense of belonging.
Oh, nice.
People's perspective as developers among their peers.
So they put that under the banner
of experience and belonging.
They had a graph and they said,
okay, how much do you feel this is true or false over time? Like how much does this apply to you
over time? Well, not over time, but if you've had one year experience versus the people with
five year experience versus people with 10 years, there's like a graph over years of experience
and this metric. So they said, your connection and sense of community with other developers.
And apparently the more time you spend in the programming world, the more that, you know, 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, right?
How much do you see it as a zero-sum game, I guess?
And in the beginning, people feel quite high that it's like direct competition.
That person gets more recognition.
I get less.
They get a raise.
I don't.
I don't know.
Something like that.
But over time, that diminishes quite significantly.
That's good.
Same thing for, yeah, for sure.
And then also the feeling of I'm not as good of a programmer as my peers.
Pretty high at the beginning.
Over time, people feel less and less and less like that's a true statement, which I thought
it was good as well.
I mean, 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.
Yeah.
But it also shows that we need to try to teach students, try to get that connectedness and
the less competitiveness, teach that earlier.
Yeah, right away, 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 12 hours a day.
Does that include your phone?
I think it might even be behind a screen.
I'm not entirely sure,
but if I could kick back and play games
or watch Netflix or whatever.
It was also notable that the usage of Python has exceeded C Sharp for the first time.
They called that out specifically, I think.
Yeah.
Cool.
Then a couple more things.
So like there's languages and databases.
They talk about the most loved, the most dreaded, and the most wanted.
So most love is you're using it and you love it.
Dreaded is like you've had to use it or you've never ever want to use it.
It gives you fear.
And then wanted is I'm not yet using it, but I want to use it.
So these are all interesting ways to measure things.
So languages most love.
Number one is Rust.
Even though not that many people use it, among the people who use it, they love it so much,
apparently.
Kotlin is number two and Python is number three.
Pretty nice.
Okay.
Yeah.
Dreaded, VB6, and CoffeeScript. Keep away.
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%.
So it drops off really quick, and Python
is sort of ruling that. Yeah.
That's great. Yeah. Databases,
yeah, databases, most love Postgres.
Most dreaded is IBM DB2, Memcached and Oracle.
And Memcached was responsible for the largest distributed denial of service
attack ever.
And that was put onto GitHub recently.
And then most wanted is MongoDB.
A most popular editor, Visual Studio Code.
Pretty interesting.
Yeah.
And for developers, what OS do they use?
Last thing.
Windows, 49%. Mac OS, 27%. Linux, 23%. pretty interesting yeah and for developers what os do they use last thing windows 49 mac os 27
linux 23 not where they deploy to but what do they write their code on that and this is one that we
need to pay attention to more i think because um of all the a lot of the the podcasters and bloggers
and all of that within the python community, I think either Linux or
Mac OS might be higher. Much higher. But you're teaching to a group of people that half of them
are running Windows. So you just can't ignore Windows. Yeah, it's a really good point that like,
even though it's sort of the thought leaders and the people who see at conferences and speakers and
whatnot are probably either Linux or Mac.
The actual people doing the work and using the stuff is, is very much windows still.
So definitely not to be forgotten.
Speaking of presenting,
speaking of presenting,
um,
Doug Hellman,
um,
and he came up with,
and there's got a new project,
um,
called demo shell.
And the idea is, um, it came out like somebody named Gene Hack 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.
Yeah, it's a great idea.
But instead of fiddling with it,
so this demo shell,
the idea is basically just to do that,
to capture a Python project,
to 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 puts your prompt back at the top. And it's in its very early stages.
So I actually reached out to Doug and said, hey, do you want me to announce this yet? Are you
ready for it? And he said, yeah, I put it up there to start the discussion.
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.
Essentially, 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.
Yeah, I think it's 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 like flat right and
it's usually in some room with a crappy projector screen that's like too small like a third of it's
off you know people in the back can't see it at all and this is perfect right you just everything
stays at the top it's really great and people out there looking to find an open source project to work on,
all right, go and express some interest.
You might be met with commit privileges on the repo.
But it's still in its really small stages.
There's not a lot of code there.
So it's pretty easy to read.
So yeah, that's awesome.
This is cool.
Nice.
All right.
So let's wrap this up
with a really nice definitive statement.
The last thing I want to talk about is Python 2's end of life.
So we've spoken before how 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, beginning of the year?
Well, my friend Nikola Erosi, who I have more news about in just a little bit,
he's 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 like, say, 2020, will it go into like,
well, we'll do security fixes for a while,
but no new features and we're not changing anything
or like, what is that going to happen earlier?
Guido 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, period.
Support from the core devs of PSF, Python.org,
completely stops on that date.
Yeah, there's your answer.
That's pretty abundantly clear, isn't it?
Yeah, but that's way out.
That's way in the future.
That has to be at least a year and a half away.
So for those people with like 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?
Yeah, or I mean, if you're planning on leaving your job
and going to another company within the next couple of years,
don't worry about it.
Yeah, exactly.
No, I've got a better one for you, Brian.
I got a better one.
Or you want to get a really sweet consulting job
migrating Python 2 to Python 3.
You know, learn all the nuances
and go and, you know,
when people are freaking out in November of 2019,
you're going to be in sweet demand.
Actually, that's not a bad idea.
Right.
My rate's $250 an hour to start.
So let's go with that.
Yeah.
I can help you with this problem.
It's going to take a while, though.
I got about a year to beef up on my conversion.
Do some conversion studying.
That's right.
All right.
Yeah.
Awesome.
You got any news or extra things you want to throw out there? You did some recent test study in this, right? Alright. Yeah. Awesome. You got any news or
extra things you want to throw out there? You did some recent
test and code episodes, right? Yeah,
so I guess I just wanted to shout out that I'm
back into recording more often.
Yay!
Yeah, and I thought
I'd start with
a little test project. So I've got
a project called Cards that
is kind of a to-do app.
But I'm focusing around using it
just as an example bed
to talk about things
that I get questions about all the time.
So, okay, your book is great
for how to write the tests actually,
but what tests do I write?
How do I pick which tests to write?
How do I pick test cases?
Basically, this intro to quality
assurance, but 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. Yeah, those are really awesome. I think that's great advice. And when people get
that wrong, testing seems super horrible, right?
You're like, what do you mean I got to test every single thing?
Like, if you're focused on testing the wrong thing, you can just feel super, like it's
just super busy work.
Yeah, but testing should be something to help you develop faster, not slow you down.
And that's where I'm focusing my energy.
How about you?
Anything else?
Well, I just got back from Pycon slovakia that was pretty
awesome so i wanted to send a shout out to everyone there who i met and that was that was
fun so if you're in central europe ish uh next year be sure to check that out that was a good
event i also have a new course you do and i'm excited about it yeah it's on the most uh most
wanted database technology so this is our the first course based on Flask that I have. So this
is on a thing called EVE, E-V-E, 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. So it's a super cool way and it's like really declarative. So you say,
here's my models, here's my endpoints, here's the validation for them. Make that a rest service,
go. And it's nice. So that's out now. That's actually written by Nicola Aroshi, the guy who
talked about the Python 2.7 statement. He wrote that and we just shipped it. He's also the creator
and maintainer of Eve. So he's pretty qualified to talk about it. That's great. And I've already started listening to it because I'm very interested in this topic.
Yeah. Awesome. Cool. Well, links in the show notes. Check that out. And I think that might be it.
I'm really excited that we have a concrete statement on Python 2.7 and it's not like,
it's just vague, right?
Yeah. That's good to have it. I wonder if they updated the clock.
Exactly. I was just thinking that.
We've got to recalibrate all the clocks because they were all guessing.
They probably got shorter.
Awesome.
All right.
Well, thanks again, Brian, and thanks, everyone, for listening.
Thank you for listening to Python Bytes.
Follow the show on Twitter via at Python Bytes.
That's Python Bytes as in B-Y-T-E-S.
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 Auchin,
this is Michael Kennedy.
Thank you for listening and sharing this podcast
with your friends and colleagues.