Python Bytes - #125 Will you conquer the deadlock empire?

Episode Date: April 13, 2019

Topics covered in this episode: My How and Why: pyproject.toml & the 'src' Project Structure The Deadlock Empire: Slay dragons, master concurrency! Cog 3.0 StackOverflow 2019 Developer Survey R...esults Cuv’ner “A commanding view of your test-coverage" Mobile apps launched Extras Joke See the full show notes for this episode on the website at pythonbytes.fm/125

Transcript
Discussion (0)
Starting point is 00:00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds. This is episode 125, recorded April 10th. I'm Michael Kennedy. And I'm Brian Hocken. And this episode is brought to you by Datadog. Check them out at pythonbytes.fm slash datadog. We'll click the link in your show notes. We'll tell you more about them later.
Starting point is 00:00:18 Brian, first, I want to know how you're doing. I'm doing really good. We just keep reading these numbers, and 125, they just keep getting bigger. I know. It's pretty incredible, the growth of the podcast. And, you know, I just want to say thank you to everyone listening because, like, we keep doing it because people care. They appreciate it. Sponsors are sponsoring the show because listeners are listening.
Starting point is 00:00:35 And it's just great. I love doing it with you. So it's cool that we're still going. Me too. For sure. For sure. Okay. Now, I feel like, didn't we just have an XKCD about like the
Starting point is 00:00:45 whole packaging and dependency management thing? Yeah. Yeah, actually. And I feel like we've got like requirements.txt. We have PipLock. We have a PyProject.toml. Probably stuff I don't even know about yet, but listeners are going to tell me now because that's the magic of talking about this in the podcast is you mentioned these seven things, but did you know about these three others, which is amazing. But here we are again with some more packaging, right? Yeah. What's the story? We've covered PyProject.toml. And a lot of times we think about that going with either going with flit or poetry for packaging, but it does work with a set of tools too. So Brian Skin is a friend of the show, and he wrote an article called My How and Why, PyProject, Toml, and the Source Project Structure.
Starting point is 00:01:31 So if you're using pyproject.toml with flit, flit doesn't allow you to use, right now, unless you fork it or something, flit doesn't allow you to use a source directory to keep all of your source in. But you can do setup tools of course and how do you get all of those pieces together and so i wanted to highlight this article mostly because brian put together this article with setup tools and pyproject.toml
Starting point is 00:01:56 how to get that working with a source directory and then also included how to put his black settings for black within and talks within a tomo file as well and just all of the pieces how to make sure dot all the i's and cross the t's to make sure it works oh that's really cool nice work brian and uh brian skin that is and yeah it's like brings together a lot of the cool stuff we've spoken about already on the show so happy to see that and so do you know it's pyproject.toml, that's like the current new hotness that is like, where's that? It's working with setup tools. That's kind of a big deal, right? The pyproject.toml makes it so that you can, wheels can be specified. And when you're pip installing stuff, so pip works with it so that
Starting point is 00:02:40 when you're installing things, you can tell pip where everything is and how things work. So the TOML file is the standard. Whether you use setup tools or flit or poetry to build the wheel, that's up to you. Or you can make up your own. But it's the standard interfaces at the TOML interface. All right, cool. Thanks for that.
Starting point is 00:03:03 Are you ready to go on an adventure? A multi-threaded dungeon, if you will. A parallel dungeon. So as you and all the listeners probably know, I'm a big fan of async, await, parallelism, all that kind of stuff. But there is the problem, not so much with async and await,
Starting point is 00:03:21 but certainly with the threading and other forms of parallelism of getting your application to a deadlock, having race conditions for things that look like they should be atomic, but they turn out to be multiple steps. And so you could have them interrupted by other threads like X plus equals one, something to that effect, right? So I found, I ran across this cool little website called the deadlock empire, and it's subtitled Slay Dragons Master Concurrency. Oh, that's great. So basically, this is like a coding game in your browser that you go along and you go through these different challenges.
Starting point is 00:03:59 And so one of the challenges is to just have two threads hit a lock at the same time. So one is blocked waiting for the other to go through, for example. Another one is to like understand how things that look atomic, like x plus equals one actually break into like multiple steps and have the threads get in there and like, basically call x plus equals one, but in the end, there's only one more, not two more in the value there, things like that. So deadlocks are really bad news in programs. They're super hard to debug. They're not fun. But I think this looks like it could be a little bit of fun.
Starting point is 00:04:32 Yeah, I'm looking forward to trying this. And at the end, there's a boss battle at the end. Boss battle, that's so awesome. I haven't made it to the end, so I haven't seen the boss yet. But yeah, I mean, in the show notes, I laid out a simple little example of like how you might end up doing totally normal stuff that ends up with a deadlock in your application. And you know, sometimes when your app goes crazy, it's obvious like the CPU level pin 100%, at least on one core. But in deadlocks, it's just like, it looks like your app is not doing anything. You're like, well, what is it doing? I don't know. It's like, it's just waiting.
Starting point is 00:05:02 It's super frustrating and challenging. So I like this little game to help people explore this idea. If you're teaching concurrency, it seems like a really cool thing to show your students. And it just seems fun. Are you able to deadlock with async and await? Well. I guess you could if two things are waiting for each other. The challenge with async and await, it's tricky, right? Like normally you're doing threads.
Starting point is 00:05:22 You're actually doing parallelism. I mean, you have the GIL, but of course course if you do anything with the network you can kind of split that up and still run into this problem but with async by default in python it all runs on a single thread okay right you have an async event loop you go to where they say create get event loop and then you queue up work to run on there and then it interlaces in like co-routine style with the await keyword but it doesn't actually run at the same time in multiple threads so you wouldn't really run into it with like a re-intro lock but if you use the regular non-re-intro version you could so not really but the problem that you can run into is you can still get into the challenge of where you have corrupted data and you need effectively some kind of lock so it
Starting point is 00:06:03 gets to be pretty tricky actually and i don't think it's really well addressed or well laid out in the async and await world not in python where it's on one thread but yeah this is cool it's fun all right uh what's i don't even know how to transition this next one you just take it what are we doing cog here well ned bachelder of coverage fame and others. Great guy. He just released an update to a little tool he's got called cog. And so there's a cog 3.0 and I'll just read what he says. Cog, it's a small tool that finds snippets of Python within text files or within any, could be a Python file or another program file, but within files executes the Pythonets, and then inserts the result back into the file. It's kind of a bizarre little thing. He says it's good for adding a little bit of
Starting point is 00:06:50 computational support to an otherwise static file, but it hadn't been supported for a few years. I mean, it worked, but it hadn't had any updates, but he just recently updated it, moved it from Bitbucket to GitHub, added Travis and AppVeyor continuous integration, a bunch of other changes. One of the things that's kind of fun is he added MuttMutt mutation testing. I've never heard of MuttMutt. I've heard of Hypothesis. Well, yeah, it's completely different. So mutation, well, we should cover it another time but briefly mutation testing is running your test suite and then
Starting point is 00:07:25 randomly changing something about your source code and then running your test suite again and making sure that it fails so if you can randomly change your code and your test suite still passes well then there's problems with your test suite it doesn't cover enough right right because changing your code should have some sort of outcome. Yeah, especially things like switching a less than operator to a greater than operator or something. Right, right, right. So one of the things that he commented on, which I've still been thinking about how to,
Starting point is 00:07:57 a place to use this because it's a neat little tool. But he said, as a part of the sentence, was now I use it for making all my presentations so if you had your presentations in markdown and you had a little python snippet you can have the the output of the snippet put somewhere else in the same presentation that's very cool yeah that's quite cool yeah anyway yeah you know what it reminds me of the sort of like jupiter notebooks for static files before Jupyter notebooks or something like that. Yeah.
Starting point is 00:08:29 Without all the dependency of like a proper notebook, right? It can just be like, you said, like a markdown file or a text file. But, you know, the output can kind of like appear under the code listings live. People doing wacky things like generating test functions with it or sticking it in C code to generate headers for things and all sorts of stuff that is going on with this tool. Oh, yeah. How interesting. It's like almost a code gen, right? Because if it can change static files, it can change source files. Yeah.
Starting point is 00:08:56 Cool. All right. Well, that's very cool. Thanks for sharing that. Let me share a little bit about Datadog before we get to the next one, which is a doozy. So this episode, as many of them are, brought to you by Datadog. And so thank you to Datadog for keeping us going strong. Datadog is a monitoring and analytics service that takes all of your metrics and logs and
Starting point is 00:09:15 distributed traces and puts them in one place. So it auto-instruments things like async libraries, like asyncio and frameworks like Django and Tornado, and helps you visualize your app performance even across boundaries. So if you have like microservices and database stuff and all that going on, which a lot of us do, you can like get a view of a single request across all that, which is pretty awesome. So get started for free with a 14 day trial at pythonbytes.fm slash data dog and get a cool t-shirt as well. So definitely recommend them and they're a big supporter of the show.
Starting point is 00:09:48 So thanks to that. Yeah, thank you very much. Are you a developer? I am a developer. I've been surveyed. Have you been surveyed? Yes, I always take the Stack Overflow. Wait, I don't know if I do this. Yeah, Stack Overflow survey. I usually do the Python. Is that the same one? This is a different one. Okay. But they're both
Starting point is 00:10:03 good and they both have good things to say about python they just have a different focus a little bit so i am a huge fan of the stack overflow developer survey and i do kind of like voting i see it as like my my civic duty in the community to go and fill this thing out when it comes out because it really is the best view i think of the of the developer, the state of developers and technology that's out there, right, that I've seen anyway. So the big news is the survey was a while ago, but the results and the analysis are out. And would you be surprised, Brian, to hear there's good news for Python in here? Well, I'm hoping. Is there? Yeah, there definitely is.
Starting point is 00:10:41 So there's a lot of good news. Last year, we spoke about the incredible growth of Python, which is a data science report done by Stack Overflow, talking about how it's shooting towards the top and just blow past all the other languages. Well, that is now moving forward. We're one year into that trend, and it's definitely looking like it. So we've already seen a popular language fall victim to Python in a sense of it's not as popular. So I guess a
Starting point is 00:11:06 couple of things to call out about this that are interesting. One is there's a lot of gender and equity focus in this report, like much more than there has been in the past. I would say, especially at the beginning, they talk a lot about that. And there's a lot of analysis you can read into. I'll have a few comments on it, but not too much. Let's start with about like six or seven little topics I pulled out that I think are worth covering in this format. So one is they ask people, do you contribute to open source? And they learned that about 65% of professional developers on Stack Overflow contribute to open source projects at least once a year. That's pretty good, right? Yeah. Yeah. Higher than I was expecting. Yeah. I mean, you would say like, of course everyone should but you know everyone's busy maybe they don't have a project
Starting point is 00:11:48 they're skilled in right there they work at a place when they're not allowed to so 65 that's over half that's pretty good they also broke it out by language that said developers who work with rust web assembly and elixir contribute to open source at the highest rate, while those who work with VBA, C Sharp, and SQL do so at the lowest rate. So take that to mean what you want. Yeah, I haven't seen a lot of VBA open source projects lately. Oh, yeah, that killer macro, it's out there. Macro framework. All right. Yeah, I mean, some of it just doesn't really lend itself so much. So this one has to do kind of with that equity thing, which you spoke about this before when you talked about getting a job or growing in your career, which was a really
Starting point is 00:12:29 interesting thing you covered on the show. And this one was under the title of competence and experience. And they have a graph that basically graphs imposter syndrome year over year, broken out by gender. Oh, wow. Which is pretty interesting. Okay. Yeah. So we talked about resumes before and how men are more likely to apply when they're half qualified. They're like, I don't really have all these things, but Hey, I know this part of it really well. And I'll learn the rest. So forget it. I'm applying to this job and women more, you know, statistically speaking are more likely to wait until they have all the requirements met before they'll jump in and throw their name in the hat. Right. Kind of the same thing here in this graph. So the idea is how experienced do you judge yourself to
Starting point is 00:13:10 be? So do you feel like you're a very qualified developer? You're still kind of a newbie, whatever, things like that. So they found that the curve for qualified self-assessment of men is much higher, especially white guys, I think, much higher than for women. So regardless of the years, like if they have the same amount of experience and stuff, which I think is also just kind of like touching on the same difference, right? For better or worse. So I think that's pretty interesting. But on the tech side, we've got the programming and scripting and markup languages. And I told you that another language falls victim to Python. Well, Python is ranked fourth as the most popular programming language, but it doesn't really count because two of those are HTML and like SQL, which nobody can
Starting point is 00:13:57 go write a whole app in HTML or a whole app in SQL. Like it's a complimentary thing you use alongside like real languages. So if you factor those out, there's JavaScript, Python, and Java. It's a complementary thing you use alongside real languages. So if you factor those out, there's JavaScript, Python, and Java. And it used to be JavaScript, Java, Python. So that switch where Python now edges out Java is the second most popular actual programming language. So that's pretty cool, right? Yeah. It'll be great when Java's just gone so we don't have this confusion of Java, JavaScript. You know what's so ironic is you're talking about like this language that was developed in like 10 days to throw a little scripting onto a web browser,
Starting point is 00:14:31 Netscape, I think, and then only grabbed the JavaScript name because Java was hot at the time, displacing Java, right? That's kind of rough. But no, it's true. It's totally true, but funny. All right, so databases,
Starting point is 00:14:43 if you talk about popular ones, it was MySQL It's totally true, but funny. All right. So databases, if you talk about popular ones, it was MySQL, Postgres, Microsoft SQL Server, SQLite, and MongoDB were in the top five. And then I love the dreaded and loved and wanted things, right? What language is dreaded? What database is loved and so on? So for languages, we have the most loved is Rust and Python. The most wanted is Python and JavaScript. And the most dreaded ties into our opening statement, VPA and Objective-C. So what do you think? Does that sound right to you?
Starting point is 00:15:12 Yeah, definitely. Right on. People programming in Objective-C because they have to. Yeah. I mean, even if you're doing iOS stuff, Swift at least. There's other options as well but object this is a funky one all right in terms of loved databases and wanted so the most loved is postgres most wanted is mongodb development environments they have a graph of like who's using what oh my gosh visual studio
Starting point is 00:15:38 code is crushing it it's like 50 and then everything else wow which visual studio code is only a couple years old so that's a pretty big deal yeah and then finally one. Wow. Which Visual Studio Code is only a couple years old. So that's a pretty big deal. Yeah. And then finally, one thing I want to point you at, point people at, is this thing that says how technologies are connected. So there's a really cool graph there. And if you go there and you find Python
Starting point is 00:15:56 and you follow the graph out, it seems like it makes a lot of sense to me. It seems like, yeah, these other technologies are often used together with Python and it's pretty cool. All right, well, that's the survey. I'm linking to the whole survey, and people can go check it out because there's a lot to it. And these are just some of the interesting bits I decided to pull out for us.
Starting point is 00:16:14 Yeah, I'm definitely going to check this out. It looks neat. Yeah, it's a cool one. All right, earlier you mentioned mutt-mutt and mutation testing and changing your code and the fact that if you can change your code, especially things like less than to greater than on some kind of test, that should make a difference. And the problem was you didn't have potentially code coverage. Well, this next one that you found
Starting point is 00:16:34 is going to help us with that, right? Right. So actually, I've been using the coverage.py and usually with PyTest a lot lately, actually, to make sure I kind of mostly do it to find out where there's absolutely no coverage, which files have no, like nothing on them. So I can make sure I go test those. If I think I'm covering an API to definitely make sure that I really am.
Starting point is 00:16:57 But a lot of the visualization, so the visualization coverage itself will output, you can tell it to output an HTML file. And that's what I often use to go look at things. But some people, and sometimes it's me, like the command line a lot. So this is, we're going to cover a tool called, it's CUV apostrophe NER. Is it like Covener? I would say Covener, yeah. Covener, kind of like governor with an accent or something.
Starting point is 00:17:24 Like a Southern governor. Yeah. So it's pretty cool. It does these graphic visualizations of your coverage, but in a terminal window. And for better or worse, I'm still trying to learn how to interpret them, but at the very least, it's pretty cool. It's worth trying out, but it also does more than just the coverage graphs. It'll also highlight
Starting point is 00:17:45 you can do diffs, coverage diffs to figure out where you have problems with your, which lines of code need changed or need more coverage. So it'll be fun to try to play with it and work it into a workflow to be able to avoid popping up in the web browser for the coverage report.
Starting point is 00:18:02 Yeah, it's cool. It has a nice, it's like basically a nice visualization in ANSI terminal graphics, right? And with little like histograms of what's covered and what's not covered and so on for your code. I like it. You know, I definitely, as people know, a fan of PyCharm.
Starting point is 00:18:18 The tools for visualizing stuff in there is really great. But if you were for some reason, like logging into some kind of continuous integration or some reason you run it where you don't have it. This seems like a cool tool to bring into play. Yeah. Or if also some people like me go through days where I try to avoid using the mouse at all. That's a good goal. This next one is something that a couple of people have asked for. And I did have this as just an extra item I was going to throw out there, but I thought it might be fun to dig into it because some listeners have asked for it.
Starting point is 00:18:55 So big news is I had just launched a set of mobile apps for my training site. That's so cool. Yeah, thanks. So you can go into your Android tablet or your phone or whatever and go to the Play Store and find the app, download it, run it. It's a truly native app. It works really well. But they've asked like, hey, could you tell us a little bit about this app? Like, how did you build it? Like, show me how you did that in Python. Well, sadly, it's not in Python. I wish it were in Python. We talk all the time about, wouldn't it be better if we had better GUIs in Python? But it's not. So the story is,
Starting point is 00:19:22 basically, I built this app along with another developer named Georgie did a great job did most of the work on the mobile side of things in C sharp and Xamarin which I guess takes me back to some stuff I did long ago but you know I looked around I tried so many different things the ionic framework so I could do it in javascript I looked at some of the python options and they just didn't seem like they were going to cut it for like truly mobile native stuff so i built all the mobile apps and c-sharp and xamarin and all the back and stuff is pyramid mongodb python of course so that's pretty cool what's also cool is we have about 90 percent code share between the ios and the android version so make a change in one almost always applies to the other platform
Starting point is 00:20:01 which is pretty cool because they both compile down to native apps, which is pretty fun. So yeah, I thought it was a pretty good experience in the end. And yeah, I wish I could have built it all in Python, but that's just the way it goes sometimes. Can't do it all in Python, I guess. Not yet. I'm actually okay with having a multi-language environment.
Starting point is 00:20:20 I'm too. I just would rather be able to stick to one. I guess I can understand the appeal of the Node.js folks wanting to just have JavaScript everywhere, except for that it's JavaScript. But it's all right. So yeah, no, it came out pretty good. And I definitely, you know,
Starting point is 00:20:35 people are thinking about mobile apps, recommend it. It seems pretty well. I built everything on my Mac, except for the prototype. So I guess the way it worked is I built out a prototype on Windows as a Windows app, then use that to develop all the backend APIs that are in Python and Pyramid, get that all just working fine. And then I went to a place called TopTal. And they help you find developers, which is pretty cool. So I found Georgie there. I'll tell you more about that in a sec. But found Georgie and gave him my C sharp code and a bunch
Starting point is 00:21:05 of specs. And he turned that into a couple of mobile apps with a little tiny bit of help for me. So almost all the work went to him on that, but it was a pretty good workflow to build out with it. Like some technology, I know, give it to someone else, right. It really helped that to drive the, the backend services and stuff. So it was like maybe five weeks from start to finish, which is pretty short for a real app, I think. Yeah, cool that you had like the demo or kind of a Windows prototype already done. Yeah, exactly.
Starting point is 00:21:31 And because it was C Sharp, like it factored it, you know, just copied over to the Xamarin project and it just kept going. So anyway, I had a pretty good experience with TopTile. If people want to check it out, I have put a referral link in there and that will give me a little bit of credit if you actually sign up
Starting point is 00:21:45 so you could sign up as somebody who wants some work or somebody who wants to hire somebody if you use that link it'll help support new features for my app redirect that money that credit back into more development should be cool so try the apps out at training.talkbython.fm apps and you get two free courses that they're free on the site but they like surface specifically in the app we don't have the ios version out but we'll we have it out soon. And I guess one more comment is, man, people who work on devices and app developers, you have my sympathy, right? There are so many wires and so many devices on my desktop here or on my desk, like my actual desk. It is upsetting. Did you try all the app on a whole bunch of devices?
Starting point is 00:22:25 Yeah, I had to go. I was only doing iOS stuff. I had my iPad and whatnot. But we did a lot of work on Android. So I had to go buy all these Android devices. And now they're everywhere. And then the whole interaction with the App Store. Oh, my gosh. If anyone works at Google and has, say, over the App Store approval process,
Starting point is 00:22:44 it was downright, I don't't know what's the right word here it was very disrespectful and very very bad for example like the app description says something to like take the great courses at talk python training it's one of the best ways to learn python online some to that effect right the app was immediately rejected because they said, you're trying to impersonate an app called Learn Python. Okay, so maybe an automated system did this. Fine, I'll talk to the people. No, it was days of conversation to convince them.
Starting point is 00:23:16 No, I'm not impersonating an app called Learn Python. Python is knowledge that can be learned. It is not a thing. It is a activity that you can also do here. I mean, and it was like eight days of stuff like this. It was really, really, it was bad. So anyway, finally got through that, got able to launch it, super fun.
Starting point is 00:23:35 So, you know, some people ask for like, give them the background on how the apps were created and whatnot. So that's the story. Okay, cool. Cool. Yeah, well, that's it for all our main items, even the one that got promoted out from the extras. But what else do you got to talk about? You got a cool little project Okay, cool. TalkPython and TestingCode. And we've had people ask us for that for Python Bytes.
Starting point is 00:24:05 So it is now up. We were just being lazy and not putting it up, and now it's up. There's a link in the show notes, but essentially it's patreon.com slash pythonbytes with just all one word. Yeah, that's cool. Thanks for putting that together. Yeah, you know, we have had these Patreons both for our individual, personal, private podcasts or single-person podcasts. But I think it's cool to have one for Python Bytes. If people want to support it, they can go there.
Starting point is 00:24:29 You know, even a dollar a week, it doesn't seem like very much. But in the end, you know, it totally adds up. On our personal, our solo efforts, we have them both set up on a per episode. This one, I think I've set it up as a per month. So you can do as little as a buck a month. It'll help out.
Starting point is 00:24:46 Yeah. Yeah, that's super cool. Also, there's a link in the episode pages now to that as well. I updated the site today. Sweet. Cool. So speaking of sweet, every year I'm always super excited to go to PyCon. So much fun.
Starting point is 00:24:56 Going back to Cleveland. Yes. You're going to be there, of course, yeah? Yep. Ohio. Ohio. Yeah. So this year we're doing a special booth.
Starting point is 00:25:04 We had a booth last year, and we had our own little booth. But we're trying something So this year we're doing a special booth. We had a booth last year and we had our own little booth. But we're trying something different this year. We'll see how it goes. I think it's going to go well. We're doing a partnership with JetBrains and you and me and a bunch of other folks who are doing really cool stuff. Dan Bader from RealPython, the PyBytes guys, some other creators, and trying to do like a sort of Python community creator thing in this big booth. So we'll be at the booth every now and then.
Starting point is 00:25:32 We're going to have a theater at the booth. So we'll have little mini presentations during the expo times. We'll have like some desks where we can do like little private office hours and get-togethers, little tables. So be sure to check us out somewhere around the JetBrains booth. We won't be there all the time, but much of the time. Yep. It'll be fun.
Starting point is 00:25:50 Yeah. I've already got some cool presentations in mind for that little theater thing. So hopefully, hopefully that works well. Yeah. So we opened this whole show with XKCD, right? Let's round it out with it as well. Okay. So there's a cool thing.
Starting point is 00:26:02 This is a blog post by Jake Vanderplass and then some examples from somewhere else, which came to us on recommendation from Tim Harrison. So thanks, Tim. And it's XKCD plots in MATLAB. Have you seen this? In MATPLATLIB, brother? Yeah, I think it's totally fun. It's so fun. It's like, yeah, it's really, really cool. So if you were going to create graphs and plots like in the style of XKCD, well, now you just go into Matplotlib and you can just tell it to do that. Where is this setting? Yeah. Yeah, I don't know. I don't see exactly where to set it real quick.
Starting point is 00:26:34 But anyway, you just go in there and you say, you know, plot this. And it literally looks like this cartoony style, which seems like fun and silly. But also, I think sometimes when you're trying to not be overly scientific you're trying to just make a a rough point sometimes that style can be really helpful yeah and it has that look like you just wrote it with a pen or something like that yeah i love it i'm gonna use it for serious stuff because i'm that kind of a person that's awesome you totally should do all your weekly reports and xkcd plots we have like graphs for our defect reports and pass-fail test results and stuff like that. I totally want to get that in XKCD form.
Starting point is 00:27:10 Yeah, awesome. So another quick one, the Euro SciPy 2019 conference. It was announced it'll be September 2nd to 6th in Bilbao, Spain. That's pretty awesome. I would definitely go if I were nearby. I don't know, maybe I'll still go,
Starting point is 00:27:24 but no plans at the moment. But anyway, if you're anywhere near there and you want to go, that I'm sure is going to be a great conference. And then the last thing, a friend of mine, the one Falco, actually turned me on to this, you know, this summer. I don't know. It's this winter, actually. This thing called font ligatures for coding. Have you heard or seen these things? Yeah.
Starting point is 00:27:41 I don't like them, but tell me more. All right. I'll tell you, and you can tell me why you don't like them. So basically, there are certain fonts and the one that I'm linking to and the one that I've been using last couple of months called FiraCode, F-I-R-A code, is the font. And it supports what are called font ligatures. And these are off by default in your editor. Probably even if you select the font, it probably won't show these. But you can turn it on, you can turn on PyCharm. You can turn it on in Visual Studio Code, things like that. And it will take the actual characters you type
Starting point is 00:28:11 and reinterpret them as what you would think of them as. So, for example, if you say exclamation mark equals, it replaces that with an equal sign with a slash through it, like not equals from math. And if you say double equals, it has like just a regular equal sign, a little bit longer. But if you say triple equals, like from JavaScript, where you're doing a quality test, it'll actually put three vertical lines,
Starting point is 00:28:35 like exactly the same for math. And arrows connect, and greater than is like the greater than sign you learned in elementary school, where it's like a greater than and then like a little slanty equal thing at the bottom. Oh yeah. For greater than equal. Yeah.
Starting point is 00:28:48 Yeah. So it takes a little bit to get used to. It doesn't actually change the code at all. There's a cool little comparison in the bottom where it says fear code and fear mono right side by side and shows you all the different things that it does and whatnot. So it doesn't actually change your code file to double equal slash. It just shows you a different view of it. So if you hit backslash on a double, you know,
Starting point is 00:29:10 like a double equal or, you know, not equals, it'll just turn into the not sign, like the exclamation mark. So anyway, it's pretty fun. People can try that out. And I actually have grown to really like it. Okay. But you don't like it? No, it's not my code. That's not what I type. It's what you meant, though. It's what you meant. Only if I spent that much time in math. Yeah, that's probably true. Yeah.
Starting point is 00:29:31 Okay. Yeah, it's pretty funny. But the thing that I think is cool is it doesn't actually change the source file, so you don't have to impose it on your team. You can just impose it on yourself. Yeah, right. Or as a good joke on somebody who left their computer foolishly unlocked. But I will try it.
Starting point is 00:29:46 I like it. It takes getting used to, but I like it now. Yeah, cool. I feel like we should, as usual, round this out with a good joke. Or at least a joke. Okay. We can't promise it's good. No, that's subjective, but we can promise something that we perceive to be a joke.
Starting point is 00:30:00 Okay. All right, hit me. First one. When your hammer is C++, everything begins to look like a thumb. Your thumb mostly. Yeah. That's awesome. I love it. And this is one of my favorites. I don't know if we've covered it already. Why don't jokes work in octal? I don't know. Because 7, 10, 11. Okay. If that one just totally passed by you, I'm going to make it even less funny by explaining it so it's from the joke of why is six afraid of seven because seven eight nine but eight and nine in octal is ten and eleven
Starting point is 00:30:31 okay yeah that's good but my whenever we tell us the seven eight nine joke my youngest daughter always follows that up with well why did seven eight nine because he was trying to eat three square meals a day perfect anyway. Anyway, how about you? I love it. All right. I got one real quick one here, which I feel like actually, see, you're already laughing, right? It's good.
Starting point is 00:30:53 Yeah, yeah. It's good. So, because you're a Vim user, a lot of people are Vim users, but Vim is like voodoo black magic keyboard stuff that happens. And it's really cool when you know it, but it's every now and you're like, why can't I select that word or whatever? So the joke is I've been using Vim for a long time now, mainly because I can't figure out how to exit.
Starting point is 00:31:15 Perfect. All right. Well, let's, let's leave it there. Thanks everyone for listening as always. Yeah. Thank you.
Starting point is 00:31:22 Thank you for listening to Python Bytes. Follow the show on Twitter via 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
Starting point is 00:31:37 for sharing something cool. On behalf of myself and Brian Ocken, this is Michael Kennedy. Thank you for listening and sharing this podcast with your friends and colleagues.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.