Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to
your earbuds. This is episode 178, recorded April 15th, 2020. I am Brian Okken. I'm Michael
Kennedy. And this episode is brought to you by DigitalOcean. Who's first? I think I got my notes
wrong. Yeah. Well, I want to talk about something really quick before we actually get to the first
one. So we'll see. Okay. I just want to tell people about the YouTube channel. And obviously,
if people are watching on YouTube, they might know about the YouTube channel.
But most people subscribe to our podcast and we are multicasting and repurposing what we're doing
here on YouTube. We talked a little bit about it last time. So basically, each individual item
is now a separate YouTube video. And you can watch Brian and me talk about it if you want to consume
in that format and have a little bit of video and admire Brian's awesome shirts because he's got a
bunch he's going to be wearing throughout these different shows and it's going to be awesome.
Oh, you didn't have to set it up like that, man. I only have like one good shirt.
People loved the shirt for the first video we shared. That was like several comments about,
dude, your shirt is awesome.
Yeah. Go figure. Okay. So we're trying to teach you about Python also, but...
That's right. And fashion.
Shirts.
And fashion.
Yeah.
Yeah. It's pythonbytes.fm/YouTube. People could check that out.
Well, tell me about strings, Python. I mean, Michael.
I'll tell you about Python strings. You know what? Strings are confusing, man.
Especially when they're about numbers and dates, especially dates. So this seems to be like a
problem that vexes me permanently. And it's, you know, we talked about is programming Googling,
right? Like in our consensus was, you know, maybe in the early stages of your career, there's a lot of
Googling, but no, not really. You mostly just sit down and you think about the problems and you write
the code and you evolve the code. Like there's a lot of reading code before you actually do much
writing anyway.
But this topic in particular, I'm all about Googling this all the time. So Python has a
datetime.strptime for string pars time. You give it some piece of text like Wednesday, April 15th,
comma 10 colon 30 a.m. without a space. I want to take that and turn it into a datetime so I can
maybe compare it to something else, right? Like another time. How many days is that from now? Is
that in the future is in the past. I just need to store it in the database as not a string,
but a datetime because I want to order by it. I don't want it to be alphabetical, right? There's
all sorts of reasons you need to get a datetime from strings or go in the reverse. And yet the format,
you know, that's strptime has a, it has a format string that tells it how to look at the string and
then pull the pieces out. So would you know about that example I told you about like the Wednesday,
April 15th, 10 30 a.m.? That's definitely something I Google every single time.
Every time. And it's never quite right. So just for those of you listening, you really want to know
it's percent a space percent capital B space percent capital H comma space percent capital M colon percent
S a.m. Woo. Who would ever come up with that?
Well, I mean, these are intentionally short.
Yes, I know.
So that like they don't take up too much room, but they're and they sort of make sense. It's just
it's arbitrary, whether it's a capital Y or a lowercase y or capital D or lowercase D.
Right. And there's documentation you can go find. Like if you want the three letter date day of the
week, that's a percent a lowercase and whatnot. But putting that all together can be tricky.
So what I want to tell you about is this website by Lachlan Eaglin. And it's let me see what the URL is.
It's high stir F time dot com, which, of course, is linked in the show notes.
And the idea is you put the text you want to parse like Wednesday, April 15, April 2020 at the time or
whatever. You put that in there and you hit go and it will tell you that complex string that I told you
was the right answer to my parsing problem.
Yeah, it's awesome.
Yeah, you just put in like the output that you want it to have happen and it tells you the magical
incantation.
Right, right. Or the format of the thing you want to parse. And depending whether you're trying to go
to that string or from that string. But yeah, super, super handy. This bad boy is bookmarked for
me for sure, because this is way better than Googling. I can put it in there. It gives me a
quick, quick answer. I can throw it into a Python REPL and see, hey, did it work or did it not work?
It's really easy.
Yeah, nice.
Yeah. So not super complicated, but very handy. So people can bookmark that and try it out.
Well, I want to tell you about something easier. Also, I got to kind of thank Jack.
Jack McHugh has sent us a few suggestions and they're usually pretty darn nice. And here's this
one's from Jack. Pandas dash bokeh. Bokeh? Oh, I forget how to say that.
I love the logo. Pandas bokeh. I say bokeh. I don't know. You know, but it's like that F stop
difference where like the person in a portrait is like crisp, but the background is faded.
Yeah. And the logo is pandas clear bokeh, like in the background faded. It's beautiful.
It's a pretty cool logo. So I'm going to quote some from their website or the readme. It says,
pandas bokeh provides a bokeh plotting backend for pandas, geopandas, and PySpark dataframes,
similar to the already existing visualization features of pandas. Importing the library adds
a complimentary plotting method plot underscore bokeh on dataframes and series. Okay. So that's,
I mean, it's already built in and all it provides is plot bokeh, another function on it. What's the
big deal? Well, it's so cool. It's so easy. And I was, I tried out some of these examples this
morning and it's just a little tiny bit of code and you call, like you've got a data frame and you
call plot bokeh on it and it pops open like an interactive graph that you can look at everything.
It's actually pretty incredible. You have to do something a little different. You can plot bokeh,
but if you want the normal plotting to do the same awesome stuff that it's built in, you can set an
option, one of the pandas options to switch out the plotting backend. So that's neat. So apparently
what it's really doing is switching out the backend. And to me, I mean, it's plotting is not terribly
difficult, but this interface, at least for me, it makes it a lot easier instead of having to work
with frames and plots to just call this thing. And then all the different options you can have,
you can, you know, different point, you know, want it to look like an asterisk instead of a point
or something, all other different color, different scale or different titles. All that stuff is options
you can pass into the plot function. And the other thing that I, that I like a few more things.
One of them is you just, when you're pip install pandas dash bokeh, it pulls everything in because
it's all the rest of the stuff is dependent on it. So you get all of it just for a simple install.
And it also generates a general, it's able to do this interactively, but you can also generate
notebooks. Yeah. Yeah. You can generate notebooks and you can also generate standalone HTML files
with this in it.
This is really cool. And yeah, the fact you can generate standalone HTML, there's probably ways
to plug it into Flask sites, you know, Python websites and whatnot, pretty straightforward.
And the interactive bit is super nice. I mean, this is not about pandas interaction per se. This is just
bokeh, right? Being very cool and interactive, but you can zoom, you can pan as you move around,
you know, like it'll show you the marks on the graph and you can hide, you know, and sort of hide and show
elements. And there's even a cool example where they're showing the stock price of Apple versus Google.
And as you put the cursor along, it has the Apple logo next to Apple and the information,
like a little like card that talks about it over time, man, this is nice stuff. And all you got to
do is point it at a data frame. Not bad.
Yeah. And they've got a whole bunch of examples on there that GitHub repo with a bunch of working
examples too. Obviously for the examples, the data is just sort of random data that they're
throwing in there. But you know, once you know how to get your data, this does the rest of the work
for you. So it's cool.
Very cool. Yeah, it's just a great one. And thank you, Jack, for recommending it. And yeah,
it's a good one, Brian, for pulling it out.
We've had DigitalOcean as a sponsor for a while, and we really want to thank them. They've really
helped us out a lot. And they're plus, they're pretty darn cool. So thank you, DigitalOcean for
sponsoring this episode and many others. And in the past, we've told you about a lot of awesome things
with DigitalOcean, like their one-click install Kubernetes cluster support, their amazing new support
center and help documentation that's been around for a while. And our podcast runs on DigitalOcean,
and we're thrilled with it. And so if your business or your side project deserves great
hosting and that will grow with you and let you scale affordably, I really definitely want you to swing
by pythonbytes.fm/DigitalOcean to grab the $100 credit for new users. But there's something else
I want to tell you about DigitalOcean that's really cool. They've got something they've started recently
that's called Hub for Good. And it's designed to support COVID-19 relief efforts where DigitalOcean
through this is supplying $100,000 in infrastructure credits for new not-for-profit projects.
They're also giving $50,000 to COVID-19 relief fund, their own relief fund, but still it's really cool.
And they're also trying to raise awareness for COVID-19 related projects and provide learning for
developers and also provide visibility for these projects. And so I headed over there this morning
and checked it out. And there's a bunch of cool projects starting out that are related to COVID-19.
It's not just this sort of stuff, but it's things like there's even a platform to help teachers
interact with students during quarantine. A lot of cool projects through this. So thank you, DigitalOcean.
Yeah, this is a great project. And obviously the infrastructure is great and we love it,
but this is very cool too. I didn't know about this.
Yeah, it's pretty neat.
Yeah. So speaking of not knowing, I feel like I've been kind of exploring the cave of Python,
which is large and vast. And I just come on like a whole nother area. I'm like, it opens up like,
what is this? How have I not known about this? And this is NBDev. Have you heard of NBDev?
No.
Yeah. Okay. So let me tell you about it and I'll get your impressions later. So NBDev takes
notebooks and basically makes them on par with writing proper Python packages and solves all
these different problems. It lets you generate what's got to be some of the best documentation
period for that library that is sort of backed by a notebook. So it lets you develop like full Python
packages and libraries and notebooks where you can have all your code, your unit tests and your
documentation all in one place, but then you can take it and pip and you can upload it to pip and
make it a pip and solve a library that people have no idea that it came from a notebook.
Wow.
Is that crazy or what?
That's awesome. I got to check that out.
Yeah.
Yeah. And you know, you think about this idea of notebooks and to me, notebooks like burst on the
scene in the 2010-ish era, maybe 2012, 2011, like that timeframe. But this project references
this concept envisioned by Donald Knuth way back in 1983. And it says notebooks finally made literate
programming, this concept by Donald Knuth, a thing. So, you know, the old is new again, but in a really
cool way. And to me, this seems like just such a massive upgrade to notebooks. So notebooks have a
bunch of challenges in my view. Like I can't use a proper editor with it. Like if I don't use PyCharm or
VS Code and all of its navigation and it's cool, get blame and like history and just like all this
stuff is just not present, right? Documentation. I think that actually it really works well there,
right? But it's, it doesn't tie the documentation of the notebook to like parts of functionality that
might be created by the notebook, which is cool. One of the biggest problems with notebooks,
it's a benefit, but it's a big problem is if you run a notebook, it stores the output in the notebook.
So if you had like a bokeh plot or you had like a print of a data frame, that is in there and now it's
part of it. So if I'm working on a project and you're working on the same project and we both run the notebook
at different times or the same time, but separately, and it for some reason generates different results,
that's a merge conflict in Git, right? So basically you cannot use notebooks in like a sane way with Git
because anytime you work with it, if you're not careful and like don't remove all the output before
you save it, it's going to be a merge conflict. So this project has a Git pre-commit hook that will
remove that problem. So right before it gets committed, it'll automatically do the cleaning of that
metadata output. So it'll never have that as a conflict. It also has an ability to like a CLI go
just accept it. I just accept all the metadata changes. Mine are just right or whatever, right?
So it also has a CLI to automatically fix that. But if you do have those problems, but it also has this
pre-commit hook to avoid them entirely.
Nice. That's a nice use for pre-commit too.
Yeah. It's super, super clever. So if I write a function in the notebook, I can put hash export
in that cell and that becomes a public function in the package.
Oh, cool.
Right. So I write like documentation and pictures and I would say hash export. Now that's part of my
library that I'm building. It also lets you create the structure for Python packages. So you have like
the setup py and you can do the build wheels and whatnot automatically out of that. And it uses this
exported stuff. You can have your unit test in your notebook, which is pretty cool for the things that are in
there. And then finally you can edit it. You can take the edited library or the library that exported,
sorry, and then edit it with PyCharm or VS Code and then reverse export it. So what you can do is like say
push the changes that I've done with my editor back into the segments of the notebook where that code came from.
Oh man. Okay. I'm a little confused, but I got to try it out.
Yeah. You got to kind of read through it to get the sense, but there's just a bunch of stuff going on. Like all these things seem like,
yes, you should have been able to do that with notebooks, but obviously, right. That's not their origins, right?
They can't do everything at once, but all of these things seem awesome to me.
Yeah. Yeah. So in order to get started, it's going to basically create a Git repo for you is my understanding,
either on GitHub or GitLab. So you got to follow the getting started instructions and then you click a button and it'll like generate the
repo in the right structure, or you can use the CLI tooling to generate like the right repo with things like the Git commit prehooks and whatnot.
And if you're going to read the docs, check out nbdev.fast.ai.
Cause this comes from a fast AI people, the same one as the build, the FastAPI framework.
So some of the docs render better. There's certain things on GitHub that like it says, and here's a cool picture.
And it's just like source code. It's not quite right. So, so maybe check out the final link at the bottom in this section to get to,
if you're going to like browse through it, but it's basically a, you get the same thing out of GitHub.
Anyway, this to me seems like a massive improvement for notebooks and sort of brings them more into,
I can do things like, for example, you can now have your notebook and its tests running as part of continuous integration.
Like, so these networks are now like full participants in CI, CD, you can upload, you can like create packages and put them on pipe.
Yeah. There's all sorts of neat stuff. The documentation, like if you have a cool graph as part of your notebook,
that can become the documentation on pipe.
I or read the docs for those functions. I mean, it's crazy cool.
How, how this is like taking some of the awesome parts of notebooks, like the doc side and turn that into the help docs.
And then also letting you export the functionality still as a proper CS type thing.
Yeah. I definitely got to check this out.
How did I not even know this existed? Like, this is awesome.
Well, I don't know how long, I mean, it looks like, it looks like five months to me is my guess.
Okay. So we're not that behind the ball.
No, we're not that behind. Yeah.
But this looks neat.
Yeah. It's very neat.
Plus Fast AI is pretty cool. So I think this is probably pretty solid.
Yeah, I agree. It's definitely got some solid people behind it. So very cool. Very cool.
Anyway, NB Dev, quite neat.
I want to talk about something a little not neat, a little lighthearted. So this is a sort of a serious topic, but this is a article from Sebastian entitled Stop Naming Your Python Modules Utils.
And I don't think we've, I don't know if we've covered it before, but it's good advice. And it's something that happens. Basically, a lot of projects, public or private, will at some point end up having a utils.py or a utils package or something.
And this article is just saying, resist the urge. Utils is arguably one of the worst names for modules because it's very blurry and imprecise. Some of the names did not say what such a name does not say what the purpose of the code inside is.
And on the contrary, utils module can well contain almost anything. By naming a module utils, software developer lays down perfect conditions for an incohesive or uncohesive whatever code blob.
And I have definitely seen this in action. I have been one of the culprits before of having a pulling out a little helper function that I had in one file.
And I wanted to use it in a different module. So I didn't know where to put it. So I stuck it in a utils.py, added a couple more. So there's just a few methods.
And I come back six months later and there's like a couple dozen just junk drawer functions from all over the place in there.
So if you start, people will add junk to it. So Sebastian lists a few excuses. It's just one function, but it grows.
There's no other place in the code to put it. Well, try harder. And I need a place for company comments.
I don't even really know what that means, but name it company or something. And also Django does it.
Well, I don't know if you're a, well, maybe they shouldn't have, but they have it now, so they're not going to change it.
So the advice is to try name, try grouping your utility functions and naming them based on the role of how you're going to use it, or possibly group them in themes.
And also, if you see a utils.py crop up in a code review, just request that the person rename it to something else, if possible.
Just set up a CI rule to break the build if you see that file name.
Yeah. So what are your thoughts on this, on the utils?
See, I agree with Sebastian. Absolutely.
I understand the challenge because naming things in software is hard, but naming things in software is super important.
Because when you think about even just function names or class names or whatever,
usually what will happen is they'll get like a crummy, vague name and then a comment describing what they are doing.
And you're like, well, why don't you just make the name a little bit longer that says what it does?
And utils is kind of like the generic catch-all of saying like, well, I couldn't come up with a name.
So here it is.
We're just going to drop it here.
And in my code, I have like tons of different areas of which I organize it, you know, sort of like sub modules, I guess, if it's a, or sub packages, if it's a package, but not, sometimes it's not technically a package.
And I try to come up with names that are meaningful, right?
Like I have something called number converter that will like try to parse an integer or return a default value instead of throwing an exception or it'll try to parse some other thing.
Or maybe it's called conversions.py or whatever, but it's not like utils, right?
Like there's, there's usually some kind of a better structure you can find that will help you do this.
But, you know, there's that joke that, you know, naming things in computer science, that's one of the hardest problems, right?
And I do agree with that, but yeah, it's, it's worth the effort when you get it figured out.
If you don't believe me, you can just try it sometime.
If you're working on group project, just put one function in utils and you will see it grow.
And you'll have to find it.
Is this like the broken window theory of software?
Yep.
And MISC doesn't count either.
If you'd name it MISC, it's just as bad.
That's right.
Yeah.
There's probably some synonyms here in the code world that don't count.
So yeah.
Awesome.
I want to tell you about this one next that helps with performance or understanding that performance more specifically of your code.
So I don't know if you, how much profiling you guys do your work.
How much does performance matter to you guys?
It matters a lot.
Yeah.
I'm building things that go into testing in a production line.
So every millisecond that it takes, takes a millisecond longer to get something shipped.
So yes.
It matters.
Yeah.
It matters.
I'm supposed to mostly spend my time on the web and obviously it matters there, right?
Like every hundred milliseconds.
I think Amazon measured is like 1% loss of orders or something ridiculous like that, right?
Like, so understanding your performance is good.
We've had good, good in quotes, profilers for Python.
And they typically tell you about this function spent this much time.
But another challenge is my program is using too much memory or worse.
It's something long running like a web app or some background process.
And it's like growing.
It's like sort of leaking memory.
Why is that?
So I came across this project called Scaling, which is a high performance and high precision CPU and memory profiler for Python.
Cool.
Yeah.
So it lets you either analyze CPU time or it actually lets you on a line by line basis say, here's some memory.
What line made this and where is it coming from?
Yeah.
And so that's cool.
But one of the challenges for profiling is when you're profiling your code, you can make it, you don't get the same behavior.
It's sort of like the Heisenberg uncertainty principle, right?
It does one thing, but when you measure the profiler, you've changed it.
So now you kind of got to say, well, that part where it was the network, that was 50%, but now you made the computational bits way slower.
So that network part looks just like 20, right?
Like you're affecting it.
So for example, if you use profile, the built-in profile, it can make your code 30 times faster or a simple scenario than running it normally.
But you can use C profile, which is the C based one that's built in.
It only slows it down by 1.65 times.
So that's not too bad.
There's a line profiler that's 11 times slower.
And there's a whole bunch of other ones.
There's a memory profiler that's like over a thousand times slower.
So the scaling thing has a nice comparison to all these things.
It says, well, how does scaling do?
And it claims that it's got this built-in library that's much faster.
So for CPU stuff, it's 1.04 times the speed.
So like 4% slower.
And it does that through sampling, right?
It doesn't do instrumentation.
It doesn't rewrite the stuff.
It actually just asks frequently like, hey, where are you in the code?
But it still gets per line analysis of that, which is pretty cool.
And then the memory one is like another 10% slower because analyzing memory is hard.
But yeah, there's all sorts of cool stuff you can do with it.
The overhead is not too bad.
The precision is pretty good.
So like I said, it gives you like line by line level of how much time you're spending in various places.
It also is interesting in that it separates out the time spent running Python code from native code,
including like the base libraries and stuff.
So you can say like, I can only affect the Python stuff.
The other stuff is not a thing I can deal with.
So yeah, don't tell me about it or punish me for it.
Or maybe I do want to look at it, right?
Tell me about that.
So that's pretty cool.
And then also the memory stuff I think is pretty cool.
So it says it points to specific lines of code responsible for memory.
Memory growth.
And it's important.
It does this through a special memory allocator thing that comes with it.
And so while you can pip install Scalene, you can't inspect the memory allocation that way.
You have to go and install it directly and do some more setup.
On macOS, you can do brew install.
There's instructions in there on how to do that.
On other OSes, I have no idea what you do.
But you can't run the memory allocation directly.
You can't just say pip install it and then do the memory allocator.
There's some other lower subsystem that has to get installed for that to work.
Yeah.
And memory is an interesting one because it's a difficult one to chase down with Python.
Yeah.
It's very hard in Python because everything is a pointer.
Everything is an indirection.
It's not like, well, here's the block where we allocated this object or whatever, right?
Like it's pretty indirect.
And you don't typically have a hold of pointers in the memory address sense of it like you do in C or something, right?
So yeah, it's challenging.
I would love to see this integrated into PyCharm and VS Code.
Oh, yeah.
Right now, it just gives you a cool tabular text output or file output.
But if you could just right click in PyCharm and say, analyze with scalene, that'd be sweet.
Yeah, I wonder.
And also, that would solve some of the install thing.
So if you have to install it separately, some integration with PyCharm VS Code would be cool.
Right.
Like right now, you can do profiling.
And it's really awesome in PyCharm.
But I'm pretty sure it uses C profile.
So yeah, who knows?
Someday, baby.
Hey, while we're talking about editors, I don't know about VS Code.
But I do know, backing up a little bit, I do know that PyCharm does open notebooks okay.
Awesome.
Yeah.
Just back there.
Anyway.
Yeah, yeah, nice.
I want to tell you a little bit about testing.
Awesome.
I'm really surprised that you're covering this.
But okay, yeah, go ahead.
Yeah, it's interesting.
Lately, you've been covering the testing articles.
I know.
Isn't that my role now?
No, go ahead.
This is great.
Tell us about it.
Yeah.
This is a person named Carolyn that wrote an article called From 1 to 10,000 Test Cases
in Under an Hour, A Beginner's Guide to Proper...
That's productive.
And imagine if Carolyn was getting paid by the test, right?
Like, we're evaluating your bonus for the year.
Like, I wrote five times as many tests as anyone else, and I just started this month.
Heck yeah.
I would totally use...
If I was paid by the test case, I would definitely use Hypothesis on every project.
All right.
So how did she do this?
What is this property-based testing?
Okay.
So hopefully people have heard of property-based testing, but it is...
So the...
It's as opposed to, like, what do we call it?
Example-based testing.
So...
And this is kind of how she goes through this discussion.
It's...
The article is really just a really excellent introduction to property-based testing and
using Hypothesis.
And it's...
I mean, she's using Hypothesis in the example, but the intent is just property-based testing
because you can...
It's the same sort of strategy with every other type of property-based testing library.
She just happens to be using Hypothesis and Python.
So that's nice.
But the...
She starts off with a unit test example of just doing...
She has, like, a string sort or a...
Not a string sort, but a...
List sort.
A list sorting thing.
And if you were doing example-based testing, you just pick a few example tests.
Example test cases where you would take the input and you know what the sorted output should
look like and you, you know, run it through the function and make sure the output sort that
it's equal or equal to the expected one.
How would you do this with property-based testing?
And before she goes in...
And she does give an example of how to write some sort of test like that in property-based
testing.
But she stops and pauses and talks about kind of the different mindset.
You can't test against an exact example because you don't know what example is coming in.
So you have to think about property.
So like on a list sort thing, you don't have the exact answer, but you could check to make
sure that the link should be the same and that you can use sets on both the input and output
to make sure that the contents of the both are identical.
And then you can go through the answer and make sure that element-wise, every element i is
less than or equal to i plus one.
You know, there's ways to test sort without, you know, without just knowing the answer.
But it takes a mind shift a little bit.
And I think actually that's one of the benefits of property-based testing is thinking in terms
of that also.
I also think it's nice that she talks about how this isn't a replacement for example-based
testing.
It is a complement to it.
And so you can mix them together.
Then she goes on to introduce some of the aspects of hypothesis.
Like there's some cool strategies, like some lists and some integers and being able to set
the max examples to, so you can set how many.
And that's where you can just set it to 10,000 and wham, you have 10,000 test cases right away.
But, and just let hypothesis come up with the examples.
The real meat of the article, which I really appreciate is just the, how do you, the hard
part of property-based testing isn't the, some of it's the syntax and she does cover the syntax
and how to get this done.
But it's also just how to think about the properties, how to, the coming up with what properties to
test for is the hard part.
And so taking a little time to talk about that, I think this is a, is a great thing.
I'm also glad she threw in that one of the things you could, you should check for with
tests, property-based testing is making sure exceptions that get raised are expected exceptions.
So if you throw garbage in or different cases that don't make sense, you should know what
kind of exceptions are going to come out and that this can be caught with your tests with
hypothesis.
And then also a great use for all of this is to implement whatever functionality you wanted
in a very simplistic, but possibly slow or memory hoggy way or something.
And then you can compare the elegant version and the slow version within the tests to make
sure that they come up with the same answer.
This is also great.
If you're doing a refactoring, you can refactor part of your system and make sure that the
old and new way act the same.
So it's just a good introduction to all of this.
Yeah.
And a property-based testing is it's you're right.
It's such a mind shift and it's, I don't know, I haven't fully embraced it yet, but I feel
like there's probably some places where it would really be interesting and useful.
And I probably should just look into it.
You know, I, I don't know, I get stuck in my ways and then I just, I keep going that way.
At the end, she talks about if you're not using Python, what options you have as well, which
is kind of cool.
Right.
So it's like, hey, hypothesis is cool in Python.
But if you're on TypeScript, we got fast check.
We're on .NET.
They don't have dashes or A's or T's.
So there's FS check.
And in Java, there's this and C++ and Rust and so on.
So yeah, if it looks like you could use the same thinking and ideas across different parts
of your stack, if you're having different technologies in there.
This is another example of if it shows up in every language, it's probably something you
should be paying attention to.
So that's a really, that's a good rule of thumb.
It's like, yeah, if I see it all over the place, right, this is a general CS sort of thing
that's important.
Yeah.
You know what else I like about going through stuff like this is you come across things
that you didn't know about, right?
For example, you'd think that I would know about JSON.
It seems pretty simple, like the JavaScript object notation.
But apparently there's like a JSON 5 as well, which allows things like comments and whatnot
and multi-line strings and single quotes and elements that are not quoted for the keys
and so on.
And there's a whole cool library for JSON 5 support as if you want to have like a
a little bit more human-friendly JSON.
I had no idea that was a thing.
Yeah.
Neither did I.
And I was just like, why can't I put a comment in JSON?
This is driving me crazy.
So what I do is I have like a field that says comment or like double slash in quotes.
And then I have the string that is the comment because you can't actually have comments, but
you can have ignored keys and values.
So that's how I have comments in my JSON.
But anyway, she talks about using the JSON 5 library that's part of Python to support that.
Or not.
It's not built in, but it's a Python library.
You can use it to do that.
Pretty cool.
Yeah.
Nice.
Cool.
Yeah.
Well, I guess that's it for all of our items, huh, Brian?
Yeah, it is.
Got anything extra for us?
Yeah, I totally did.
But you nabbed it and put it in your section.
So go for it.
Tell us that you found a bunch of cool things there.
Yeah.
I want to get this one out of the way first.
Some sad news.
Have you, you've heard of Game of Life, right?
Yes.
Yeah.
Conway's Game of Life.
Yeah.
Conway's Game of Life.
Well, Conway, John Conway is, I'm going to link to an article that's a nice article talking about the Game of Life and John Conway.
But just an announcement that he is one of the victims of COVID-19, died from it recently.
So that's sad.
Yeah, it's definitely sad news.
Game of Life is kind of an excellent thing to have in the computer science realm.
Pretty neat.
So that's sad.
Something that's happy is GitHub is now free for all teams and individuals.
So that's a pretty cool announcement.
That's really awesome.
Yeah.
So previously you had to pay to have collaborators on a private repo.
I think maybe you could have some, but not a ton for private.
I can't remember.
Three, I think like that.
Yeah.
It's like evolving.
First you had to pay for private repos, then you didn't, but then you had to for collaborators.
And yeah, but that's awesome.
So it's much more free.
And then also for people who still pay GitHub, like me, it's half price.
It's 40.
It's, I don't know, whatever four divided by nine is.
It's now 44% of what you're paying before.
And people wonder like, why would you pay for GitHub organizations?
If you have an organization, so like Talk Python and the related training authors and content,
there's like a GitHub organization for Talk Python.
Have people collaborate on that.
You still have to pay, but it was $9 a month per user.
Now it's $4 a month per user.
So that's also bonus.
Yeah.
Pretty cool.
Yeah.
That's happy.
Yeah.
So last thing I wanted to bring up is that the PyCon US 2020 online is now live.
So there's a welcome video and more.
There's some talks linked and there's more on the way.
Yeah.
There's a nice welcome video from Emily Morehouse that she basically kicks off the virtual conference.
And this conference, I don't know if that's the right word for it.
This thing, this event is not like a lot of online virtual conferences.
Like on Saturday, we're all going to meet.
And then the talks are going to be these three hours and whatnot.
It's like, it's like a rolling release of information and videos that then you get to consume over the next couple of weeks.
So yeah, you're linking to the, basically the landing page for like stuff as it happens.
Right.
Yeah.
And I recommend, so also recommend checking out the, so if you go to any of the, like the welcome video,
and then go up and find the, the PyCon US 2020 top page and look at the videos there, then you can see them all listed as well.
Um, but they're, they're rolling out.
There's, and I know that they're not all recorded.
So some will come later.
For instance, I am still, I don't know if I will, but I'm still planning on recording my talk and posting it, just trying to figure out when to do that.
So.
Yeah.
Cool.
Anyway, I'm definitely looking forward to checking it out and see what comes along.
There's also, it's worth mentioning that they're at that link.
There's a place that has like the virtual expo and the expo hall is actually my favorite part of the conference is because you get to walk around and meet people and just, you know, see what's going on and you see all the companies and what they're doing.
But one of the things that happens there on Sunday in normal times is there's the like hiring job fair thing and all the job fair stuff is already up there.
So if people are looking for a Python job, there's like many, many links of this company's hiring for these four positions.
Click here.
This company's hiring for this position.
So if you're looking for a job, you want to get in there quick and, grab the good ones and apply to them.
Yeah.
One of the things that that's missing is how am I going to last an entire year with no new t-shirts?
I know.
Well, you're going to have to be up in your game there in this video version here.
I know.
I love all the conference swag.
Yeah, exactly.
Like, how do you even do that?
How do you even find a good tech shirt?
Like that you buy?
I know that there, but it'll be different.
Well, you want to know something that wasn't funny is I almost forgot to put a joke in our show notes here.
Oh no.
So I pulled up the terminal and I typed pie joke because I've pipX installed pie joke.
So it's, it's right there in the command line.
Anytime you need a laugh.
And this one is about QA software quality folks.
And, it's a take on a traditional one.
So here, I'll hit you with this.
See what you think.
How many QAs does it take to change a light bulb?
I don't know.
They noticed the room was dark.
They don't fix problems.
They find them.
Oh dear.
That's bad, right?
Yeah.
That's definitely why QA and development should be one team.
Absolutely.
Yeah.
All right.
Well, a good joke.
Nonetheless, a good pie joke.
Thanks.
Well, this was lovely today.
So thanks for talking with me.
Yeah, absolutely.
Thanks.
As always.
Great to chat with you.
See you later.
Bye.
Thank you for listening to Python Bytes.
Follow the show on Twitter 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.
This is Brian Okken.
And on behalf of myself and Michael Kennedy, thank you for listening and sharing this podcast
with your friends and colleagues.