Coding Blocks - Why is Python Popular?

Episode Date: February 15, 2021

We dig into all things Python, which Allen thinks is pretty good, and it's rise in popularity, while Michael and Joe go toe-to-toe over a gripe, ahem, feature....

Transcript
Discussion (0)
Starting point is 00:00:00 You're listening to Coding Blocks, episode 152. Subscribe to us on iTunes, Spotify, Stitcher, wherever you like to find your podcasts. I'm sure we're there. Look for us. Find us. If we're not there, then you probably didn't hear this to tell us that we're not there to let us know that we should add it there. But you'll figure out a way.
Starting point is 00:00:21 Life has a way and you'll figure it out. All right. And you can call, and you'll figure it out. All right. And you can call us at codingblocks.net. We can find show notes, examples, discussion, and a whole lot more. And see feedback, questions, and rants, too. Comments at codingblocks.net. Yep. You can follow us on Twitter at codingblocks.
Starting point is 00:00:37 Or head to www.codingblocks.net and find all the social links there at the top of the page. With that, I'm Alan Underwood. I joe zach and i'm michael outlaw now does it have to be curl or could i use wget like what does it have maybe uh what's the power show and i forget like invoke uh http invoke what request why do they do that yeah that's your fault you switch to command.exe and then you run that? Yeah, that's your fault. You switch to command.exe and then you run curl.exe. That's what you do. They have Docker images for all that.
Starting point is 00:01:15 This episode is sponsored by Datadog, the monitoring and security platform for end-to-end visibility into your applications. And Datastacks, the open multi-cloud stack for modern data apps built on open source, Apache Cassandra and Linode simplify your infrastructure and cut your cloud bills in half with Linode's Linux virtual machines. All right. Hey, and today we are looking at why Python is so popular because it's interesting to me.
Starting point is 00:01:46 It's interesting to everybody. That's what you hear, right? I'm with the show. I think somebody is taking his game jam experience a little too far. He's trying to push his desires on the entire world. We're fine with that, though. We'll talk about it. That's what it is.
Starting point is 00:02:04 So, you know, as we like to do, we have a little bit of podcast news here, and we usually, like, talk about the reviews for a second or two, but we have none today. So, but there is one thing that did happen because we laughed about it, and I think you made fun of our review page last time and said, you know, hey, there might be a link. Maybe it works. That does not sound like something I would say, sir.
Starting point is 00:02:32 Right, right. Maybe it wasn't. Maybe I dreamed it up. But I did actually go modify that page and update it with Audible and iTunes. So it has been... Yes, there are two links now that apparently work. So it has been links. Yes. There are two links now that, that apparently work.
Starting point is 00:02:47 So that's good news. Wow. Go ahead. Uh, I was just going to say, um, it was regarding reviews. So are you going to change the subject?
Starting point is 00:02:58 Are you staying there? Well, I was just going to say, if there's like no, no, no reviews is good reviews. Like I was trying to think of like you guys remember that the good news? No good news is good good news.
Starting point is 00:03:12 You don't remember that, Joe? Okay. No. Okay. I don't even remember what show that was from. I don't either. So you had something you were going to say about these reviews here there, Joe? So kind of.
Starting point is 00:03:24 So we didn't get any reviews, but there have been, let's see here, 678 ratings for the Game Jam. 678 votes have been cast and the results have been chosen.
Starting point is 00:03:39 We have a winner. I was just going to take a minute to tell you a little bit about the overall winners. We've got the top five here. I mean, it really started with a simple idea that I had for my game, and oh wait. Was I not the winner? Oh, yeah, you were.
Starting point is 00:03:57 No, I'm fair. So we've got some videos kind of in the pipeline. I'm just dragging my feet on it, but I want to say a huge shout out to everybody because it was really amazing. And so we'll be looking at these more closer over on YouTube.
Starting point is 00:04:12 But I just want to say a huge shout out to we'll do top three in each category just to get through it. But overall, Heartbreak, which is great and punny. Dead Broke was number two for overall. And this level is broken, number three. All fantastic. And it pains
Starting point is 00:04:27 me so much to not keep going because there's so much good in every category. The most fun, we had Dead Broke, Scaling Perpetua, and Attack on Alderia. And I swear we need to do a spoiler cast where we just talk about
Starting point is 00:04:44 every one of these games because it pains me so much to not tell you the things I liked about them all. I actually did go in and play several of them. There were some really good ones. It's taking literally everything I have to not jump in and start talking about these games. Creativity. Yeah. I'm in the same boat with you, Joe, but we already
Starting point is 00:05:06 have the post games. That's why I'm trying to not talk about it all over again, but I want to. That's the reason why we're not going into it. YouTube or Twitch, we'll be talking about it for a while still. Heartbreak No Thing is Broken.
Starting point is 00:05:23 Do not pre-order games oh very great and uh hey you've heard of this one before heartbreak again uh for quirk no thing is broken again and this level is broken uh for the quirk so yeah a lot a lot of overlaps there because they're i mean they're just amazing so yeah go check it out it's all free go play on the Moopstart right now we'll have a link in the show notes very cool and as we'd mentioned previously so you know we had decided to do a bunch of ergonomic keyboard
Starting point is 00:05:54 reviews so just a heads up you can go to our YouTubes at youtube.com slash coding blocks and we have the Kinesis Advantage 2 review up the Zinesis advantage to review up. The Zergotech freedom review is up. Both of those are live.
Starting point is 00:06:10 And the one that I'm working on right now, and you'll probably hear at some point during this episode is the moon lander. That is the next one up. And it's a little bit loud. So that one will probably be coming out here in the next couple weeks. So, uh, you know,
Starting point is 00:06:29 if you're not subscribed to the channel, definitely go check that out and, and sign up over there. If it's too loud, you're too old, dude, this, this thing is this thing's like little jackhammers.
Starting point is 00:06:41 I picked the correct keys is what you're trying to tell me. Yeah. If you, if you work on an island. What? No. You just type in like a rhythm and then you can like just make your own song up as you go, right? I think that's how it works. So, yeah. This one's going to be interesting.
Starting point is 00:07:00 I can't wait to do the review on this. So, you might actually get your keyboard back in 2021. That would be incredible. Yeah, there you go. Like, you know, you order the keyboard, you have to wait like six months for it to ship, and then you got to wait another six months for Alan to do the review. That's right.
Starting point is 00:07:19 By the time I get it, they're going to have version two, and I'm like, oh, man. Right. Yeah, you just hold on to it, Alan. I'll be like, oh, man. Right. Yeah, you just hold on to it. I'll be like, I can't. It's too loud. I can't keep it. Oh, man.
Starting point is 00:07:29 I feel like I'm getting a sense of where this review is going right from the start. It's going to start off with, Michael picked the wrong keys. I mean, Michael could hear me typing on his house right now. This is what's going on. All right. Yeah. me typing on his house right now is what's going on all right yeah i i mean on a slightly different topic though i i think some people don't take javascript developers seriously because they terrible love it that was from hit me up on slack with that one
Starting point is 00:08:11 from a tweet that he saw well done had to sneak that one in well alright well I guess on with the show that's awesome why are we doing this? Pip install show.
Starting point is 00:08:28 There we go. Are we just sharing opinions here or what are we trying to do? What's our goal here? Yeah, I guess. So you have the topic here, Joe. Like how you put the onus on us. Right, right. You have this idea and then you're like, yeah, so what are we doing, guys?
Starting point is 00:08:44 Oh, that question was to me i was reading the show notes y'all i don't even know what's coming up i didn't do anything else hey so so tell me though like um you were like hey what we need to do an episode on my python God, Siri. Like, really? How is she so bad? Remember when I said that Do Not Disturb wasn't the same thing as muting the volume? I'm going to have to turn her off. Like, I'm going to have to turn her off. That's ridiculous.
Starting point is 00:09:19 But, Joe, so I guess my question is, like, you were talking about why Python, like why everybody should do it. So what, what made you, what made you want to do this? Yeah. So it boils down to three questions. So when I first started trying to learn Python, because I had some professional goals that involved Python, my first question was, why does anyone like this? But then as I got to know a little better, I was like, wait, why do anyone like this but then as i got to know a little better i was like wait why do i like this uh because i you know i started turning the corner on it and now i'm at the phase where i'm really trying to understand like why does everybody love this like i'm starting to get
Starting point is 00:09:57 why i like a little bit but like why is it so popular and so that's what i was hoping to just discover with this show okay Okay. I like that. So I guess I dropped something in here. Like I, I went and did some Googling after you put, put this thought in our heads, we're going to talk about Python because I too am learning it professionally. Right. So I have my ideas of what I like about it and all that,
Starting point is 00:10:23 but I was curious what other people had to say. And the best that I saw, and I have this link in the resources that we like, but this one-liner here is kind of what did it. It's a general purpose, high-level programming language, which can be used to develop desktop GUI applications, websites, and apps that run sophisticated algorithms. Yeah, and that's fine, but so is JavaScript. That's my thing right there. So what you just said is exactly my thought. Like, if I were going to compare Python to anything, it would be JavaScript, and then I would say, why pick one over the other?
Starting point is 00:11:09 But maybe I'm wrong, but I thought – if you were to compare those two things, right? I thought that one of the big advantages is that – okay, let's say you want to provide a library for JavaScript, right? All your code is still in JavaScript. That's how it is, right? And I know that somebody is going to try to argue about WebAssembly or bring WebAssembly or something like that into the conversation. And some C bindings or something. Yeah, yeah, yeah. But let's go back to JavaScript from 10 years ago
Starting point is 00:11:52 and talk about JavaScript 10 years ago, Python 10 years ago, right? So that you can ignore WebAssembly type conversations. So you want to provide that library and all your JavaScript, that your JavaScript library is all in JavaScript because you're staying at that level. But my understanding, and I haven't actually seen this done,
Starting point is 00:12:12 I don't know, maybe I'm wrong, but I thought with Python, wow, my volume got really loud all of a sudden, that there were parts of it where it would, you could have a library, but it would drop down into, into like the lower level language,
Starting point is 00:12:32 like a C or something. Am I wrong? I mean, you can do that with marshalling and other languages too, though. Like, you know, so if you're working in a JavaScript game library,
Starting point is 00:12:39 for example, then it'll do stuff in, you know, like WebGL, not WebGL, but WebGL, STL, which whatever, basically level C, it wraps the bindings for those. So it's kind of similar in that it can call into native packages. You just need to grab the appropriate native packages
Starting point is 00:12:57 for the platform you're going to. I just don't know that that's necessarily an advantage that Python has over JavaScript. They both seem to do it pretty well. Well, it used to be, I think if you go back 10 years ago, like without what outlaw was saying a second ago,
Starting point is 00:13:13 I think that is, it used to be true, but like now with, um, with node JS and all that, like I've definitely seen see libraries that node can interact with. And it's probably because the node engine is written in C and all that kind of stuff.
Starting point is 00:13:31 So, so I don't know if it's necessarily a, just unique to Python anymore. Maybe it used to be, because I think I also saw that Python could also wrap Java assemblies and that kind of stuff too. Like there's all kinds of like, what is it? Jython? I think is what I'm like, there's all kinds of different ways to do this kind of stuff. But, but I think, I think you're right outlaw. Like that used to be one of the big selling things, but I don't know if it's as big anymore. I don't know. I don't know i don't i don't i mean it's straight up in the the documentation
Starting point is 00:14:06 that like hey here's how you can extend python in c or c plus plus like they they provide that instruction as part of it because my understanding was like some of the libraries like pandas for example like part of how it's able to be as fast as it is you have this like higher level abstraction language that is python but yet it can drop down you know there are some calls that are dropped down into like a faster more performant
Starting point is 00:14:36 you know language like a c and to do like you know matrix multiplication right well yeah but so I don't want to hang here too often but you can do to do like matrix multiplication, right? Well, yeah. So I don't want to hang here too often, but you can find those kind of articles too for C++. Like Node itself is basically extensions that JavaScript attaches to.
Starting point is 00:14:56 But I think I have two answers, but I don't want to say them yet because we haven't gotten to the ad break yet. So, no, I'm just kidding. That's not the reason. But I think I'm still kind of discovering or still trying to figure that out. And so I'll tell you my two answers that I've got written down here
Starting point is 00:15:12 as to what I think the difference is between Python and JavaScript. But before that, we can do a little bit of history. Did you know that Python was created in 1991? I did not know that. I didn't either. So that was years before JavaScript.
Starting point is 00:15:29 So years before Java. Years before many, many, many languages. Huh. That's pretty crazy, right? Yeah, in 91, I was still in school. Like grade school. Yeah, so in 91 so uh you know JavaScript I think was like 98 uh Java
Starting point is 00:15:50 uh around that time too but uh I was reading about like when it became so popular and what was going on and so uh by all accounts I could find uh which were pretty rough back then because things were kind of new but uh it appears that there was a major leap from 1998 to 2003.
Starting point is 00:16:06 So up to 98, it looks like things were kind of quiet. It was a niche. It was a thing. But there was a big leap there. And by what programming index was that leap? Oh, it's Tyobi, which is – Yes. Sorry, Tyobi.
Starting point is 00:16:21 No, no. Come on. Yeah. But back in 1998, Tyobi No, no. Come on. Yeah. But, you know, back in 1998, like, Toobie was the only game in town. You know? Visual Basic is still the number six language according to them, to their index. Yeah, the way they calculate that is not great. But I looked in other places, too, and so I did some research to try and figure out what it was.
Starting point is 00:16:41 And I was trying to think, too, like, that's somewhere around what I probably, you know, appeared on my radar. I remember seeing books and stuff. Of course I was attracted to the name that I thought, you know, my name Python, the references there is all just cool. So I remember seeing like the O'Reilly books kind of show up like somewhere in there.
Starting point is 00:16:54 Cause I used to browse bookstores back in the day. Okay. I want to learn some programming and, you know, I would see Python showing up somewhere around there. So Google, would you go to like a media play and get your programming books while you get your movies
Starting point is 00:17:07 and your music all in one stop? We didn't have those unfortunately. I'd go to Barnes & Noble. Okay, but you had media play, Alan. You know what I'm talking about, right? Oh, I do. I remember some media play. It was the craziest store ever that had all those things
Starting point is 00:17:23 in one place. Okay. But I definitely did not get my tech stuff at MediaPlay. I still went to Barnes & Noble and looked at the bigger selection there. Wait, was Barnes & Noble a thing? Wasn't MediaPlay a thing first? Barnes & Noble was big back then too. Yeah, for sure. Walden Books.
Starting point is 00:17:48 Yeah. noble was big back then too yeah for sure alden books yeah but uh so that's when i think so getting you guys are freaking me out i'm sorry i don't know what's going on but you guys are both freaking me out why oh you're both like looking around checking volume like checking the mics like what's going on here i yeah i don't know what alan's doing i can't explain that yeah sorry about something happened on my end where the volume got really loud, but apparently it's only my mic that changed. Well, I guess I'm the weirdo, I guess. Yeah, well, we knew that, though. Yeah.
Starting point is 00:18:17 All right. So I did a little bit of research, and I was trying to find the earliest references to things that maybe the killer app or the killer feature or the killer book that came out and um there was two things that kind of stuck out to me like one was uh google started rising up now google didn't really get popular for the first couple years but uh they got their start in 1994 but no one really heard them until like starting like you know 98 and kind of up there but they kind of had a an unofficial motto at the time where uh I found quote was pretty funny. It said, Python where we can, C++ where we must.
Starting point is 00:18:49 I thought it was pretty cool. And so Google has obviously had like an outsized kind of influence on generations of developers that came up with Google around that time. And you know, looking to Google as kind of like the pinnacle of technology for a long, long time and maybe still. But no, you said, I just want to make sure because somebody is going to catch this if we don't bother to catch it ourselves. Because you said Google was started in 1994? Yep. That's where –
Starting point is 00:19:17 But according to Wikipedia, they were started in 1998, which is more in line with what I remembered, which is why I was like, wait a minute, 1994? Oh, well, maybe I'm wrong. Because they were like, I don't know if you know, man, but Alta Vista was a much bigger deal before Google was, right? Yeah, it's not a bigger deal, but they were a big deal. September 4th, 1998. Okay, well, I guess I give something. So then that means that I still do not have a really good answer for why Python grew so fast in 98 to 2003, other than to say that JavaScript was pretty much only browser. I mean, it was only browser at that point.
Starting point is 00:19:59 And even then, like we were talking about DHTML and gross stuff is only for animations. No, no, no. It still makes sense timeline-wise why it grew from 98 to 2003 because Google was founded in 98. It wouldn't explain anything from 91 to 98, though. Right. And I thought that's where you were going because you were saying that – I thought you were saying that Google was starting in 94 and trying to draw a connection as to like you know anything that was happening there but yeah basically what we're saying is like the first five years of google's
Starting point is 00:20:29 existence uh you know they were heavy into python and that's what started you know maybe heavier usage of python during those yeah i just i couldn't find a good thing i couldn't get find anything really to tie it from wherever it started in 91, 90-ish to 98. Like there was like, I didn't understand where things go. Maybe that was just organic growth. Maybe it was like a dynamic language that was easy to use and all the things people like about it. And it didn't really have a competitor at that time.
Starting point is 00:20:57 So that's where it was kind of like slipping up, up, up. And then, you know, Google was popular. But even that's kind of a showing indicator because it didn't really get popular until kind of early on. People were saying like, well, how was Google built? And there was a lot of people talking about like search and stuff at the time. And then MIT switched over from Scheme to Python in 2009. And MIT is, of course, a really huge influential college and other colleges and universities had switched over to Python before that. But that was kind of like a big part of the change where Python really kind of got a big stamp of approval from the academic world.
Starting point is 00:21:33 And also, of course, during this whole time, the Internet was really kind of coming of age. And so we were getting data, data, data. People were saving more and more data. Storage was getting cheaper and cheaper. And so there's a big tie-in between Python and data science, of course. And so that's kind of carried on. But I read through a bunch of articles I could not find. I thought I would find something like somebody wrote a book that was really
Starting point is 00:21:54 popular or somebody had some app that was really popular. But I just could not find like a smoking bullet, smoking gun. Well, yeah, i looked too and i couldn't find anything that just really jumped out like why not pearl why not you know why did this become more popular than ruby over time right like like what what is it that this thing had? And I could not find anything that seemed to be like, this is what. This is what it was right here, right? Like, it just, I don't know. It just seems like it had a huge community is really what it boiled down to.
Starting point is 00:22:36 Yeah, that's one of my two things that I wrote down that, like, were really what sold Python is, like, one, it just had a really great community very early on of people that were really dedicated really smart really passionate and just pumped out really great libraries and content around python okay wait a couple things here one is uh so you said that like because of mit and other schools basically like academia giving it um you know the stamp of approval back in like 2009. And you referred to that as the time that like the internet was coming of age. Oh, no. I meant like 98 was the internet coming of age.
Starting point is 00:23:12 Oh, okay. Because I was like, wait, pets.com was in the 90s, dude. I don't know if you heard. Like they had like a little cute sock puppet and everything. Like that was way before 2009. Okay. That makes more sense. No, I mean like 98 is
Starting point is 00:23:25 like back when you know people were still aol people were just getting off aol in fact and like the internet was really becoming a huge force and then 2007 is like the first iphone right so like that was like a huge other generational leap but the so i still kind of think it was like 2007 as being like the birth of the modern web, like where interactivity and the way people, people use the web has changed a lot. Yeah. Um, yeah.
Starting point is 00:23:51 So I guess my, my other thing though is, and again, like I never, I never like searched for everything. I like just like from what I had, you know, in conversations with others.
Starting point is 00:24:01 Uh, and I just kind of like took it for granted and maybe I shouldn't have, but, uh, you know, at least in like recent years in like the last, let's say five to 10 years, you know, my understanding was that it, that the popularity was because of all ability to like drop to, to create those libraries in C. So you didn't have to, if you wanted to expand it, like, you know,
Starting point is 00:24:30 there was like a, a tried and true way, like, Hey, here's how you could do it and provide it real easy. And it would work. And that was what I just kind of like took, took those comments at face value. But I,
Starting point is 00:24:39 like I said, I, I had, I could be totally wrong and never bothered to like actually see like if there was any truth to that. But it just kind of made sense to me. Yeah, and I know Lua used to be popular with game engines because it interopts with C so well and other native technologies. So I'm not totally sold on that just because I've seen that in other languages.
Starting point is 00:24:59 I'm like, heck, why not C if that's the case? Or C Sharp or Java or Ruby? Well, okay, because we're always trying to build like a – okay, think about it this way. We created these computers. We're going to have like a very fast like walkthrough time here. We created the computers, and at first it was like, you fast, like walk through time here, we created the computers. And at first, it was like, you know, switches, like binary switches, right. And then, you know, as part of that is like, Oh, hey, you know what, we could write these code this code
Starting point is 00:25:34 in like an assembly language and do things. And then it was like, Oh, hey, we could add another higher level of distraction on top of that, which will be very portable. And that's C, right. And you can just like, you know, write your code everywhere. And it's a higher level, it's more portable than the assembly code that was that we were programming. And so we're always like, building a newer level of abstraction on top of the other thing that to like make some concepts easier. Right. And so Python is like a lot of language like a javascript for example like it's a higher level abstraction there's things in there that you don't even think about right
Starting point is 00:26:11 like you don't you don't question the memory or memory management or anything like those kind of things are done for you right in modern day languages right yeah so that's why that's why you would not use a c or a c plus plus oh yeah instead i agree with that but i'm saying like other like ruby has c bindings java script has c bindings like that i don't think there's anything limiting any other language from doing what what python's done with those native libraries i don't think there's anything i don't think that's like a killer feature of python it's great that it has it maybe you know oh i don't think there's anything. I don't think that's like a killer feature of Python. It's great that it has it. And maybe, you know,
Starting point is 00:26:46 well, I don't know. I wasn't trying to say like it was the killer feature, but like, you know, things just start to build on top of itself. Right. Cause,
Starting point is 00:26:54 cause I guess if you think about like you made the point about academia getting, getting hooked onto it. And so then it's like, Oh, well, if I want to like extend anything for, you know, this cool machine learning thing, like, I don't know, I'm just speculating.
Starting point is 00:27:09 I don't have like, I mean, following that thread though, I wouldn't be surprised now that, now that you mentioned the MIT and other academia jumping on that bandwagon, I would not be surprised if that's why it became such a leading thing for machine learning, right? Because there's a lot of study that happens with mathematics and all that kind of stuff with coding languages, right? In schools and academia specifically. So that makes a lot of sense. If they jumped on that bandwagon they started building libraries to do the math that needed to happen for the machine learning and all that that would
Starting point is 00:27:51 make sense why it grew again i haven't seen any article that like you said there was no smoking gun anywhere i could not i could not find anything that was like yeah this is why it got so popular it's been around for 30 years but now it's gotten hugely popular in the past five because of this. There wasn't that. But machine learning is definitely part of that. I mean, my other guess would be related to Jupyter Notebooks. I mean, there was a time when you first started hearing about Jupyter Notebooks, it was R, and then it was R and Python. And now, like, I don't hear any talk about R anymore.
Starting point is 00:28:30 I was like, hey and thought, you know, in a formatted way, which was Markdown, but also have like code that maintained its state that I could like share and be like, Hey, here you go. Check this out. Well, I think that's really important too, because notebooks are kind of a nightmare to work with as a programmer. Like if you're thinking about software engineering modularity being able to reuse software um just pluggable interface and stuff like that yeah it's really tough to do but it's so great if you're
Starting point is 00:29:15 a person working on a data science project who just wants to do some stuff with data and graph it and share it right it's perfect for that and i think part of that kind of grew maybe out of academia. I don't really know where that came from. Other than Python is really easy for new programmers to get started with. So if you tell somebody you can do a notebook in R, you can do a notebook in Python, and you show them what that looks like, I know what choice I'd make. How long ago do you think it was that the notebooks were, that Jupyter notebooks were started?
Starting point is 00:29:50 Ten years. Yeah, ten years. So according to Wikipedia, it's actually confusing because they say that the formation of Jupyter was 2015, but it spun off from iPod on in 2014. Wow. Okay. So we're going on seven years.
Starting point is 00:30:10 That's, that's a decent amount of time to be around, honestly. Yeah. But that goes along with that timeframe of it being like it's, it's rise happening within the last 10 years though. And, and if notebooks had any part of that,
Starting point is 00:30:26 any influence to that, it seems like a really great fit for academia where I've got some data. I want to show you how I worked through to get to some sort of result. And I want to be able to have my stuff fact checked by anyone else. You can take a look at the code, run parts, introspect, make changes,
Starting point is 00:30:40 you know, peer review, whatever. It seems like perfect for that. I don't know if that's what it was designed for initially, but it just seems to fit in really well. And it kind of fits in with the greater narrative that we're kind of seeing where like MIT finally said, okay, look, this is the one we're going with.
Starting point is 00:30:53 And then all of a sudden it's the data science king. Right. And there was, maybe there was no king of data science before that, you know, there was no like one true platform. And so maybe that flipped the switch or maybe, you know, maybe MIT picked it because it was obviously heading in that direction. I don't know which came first. You know what, though? What you said is actually what I would second is I think the reason why people get into
Starting point is 00:31:16 it is because it is easy. Yeah. It's not hard to read. It's funny. So Sean Martz had actually told me, hey, dude, you need to try out Python. And it's just like with anything else, right? Unless I've got something that I actually have to do, and it's hard for me to just jump into something because I don't like coming up with fake projects to work on. I can't stand that. And then when I did jump into it, it, I actually told him that it reminded me of JavaScript without all the braces, right? Like it's, it's spacing
Starting point is 00:31:52 instead of curly braces and spacing instead of all the brackets and stuff everywhere. And it just, it reminds me of JavaScript. Yeah. And I think that's a really great point that hit on there. So I went and Googled about reading about the MIT switch and what people had to say at the time. It was really unpopular. It was a very controversial decision. A lot of people thought they were catering to this new wave of programmers that were never going to learn how to really program and how computers work. And they never had a chance.
Starting point is 00:32:22 And, you know, people were really negative about the whole thing. They thought you should learn assembly and stick with scheme and stuff. But I didn't see anyone talking about data science. No one said, oh, yeah, they're picking it. It was always because they thought MIT was pandering to this kind of new generation of kids that just wanted to get stuff done and use libraries to make the code rather than building this stuff from a true architectural computer science background. But how am I going to be a script kitty if I've got write it all myself yeah that's right i need to stitch together other libraries oh yeah and you can see like um that was a lot of the conversation in the comments that i had
Starting point is 00:32:53 like hacker news uh you know back in 2009 a lot of people were saying like kids these days they just want to stitch together libraries they're not true programmers and of course there was a lot of people pushing back on that and you, you know, um, obviously that, uh, the people who are using libraries are doing a lot of really great things. And so you don't find many people making that argument anymore. I do have one, uh,
Starting point is 00:33:13 one, like maybe asterisk to make to that previous comment that I made about the Jupiter thing though, because like, uh, I didn't take into consideration. I Python, which is what originally started the whole notebook thing.
Starting point is 00:33:28 When do you think iPython started? Well, you said it split off of it in 2014, so I'm going to go 2011. Okay. Wasn't it split off? Yeah. How did I say that? You said they forked, or it split from iPython. Spun off from iPython. Spun off from iPython.
Starting point is 00:33:46 Spun off. Okay. Yeah, 2011. We'll go there. 2011. Well, you were so close. It was 2001. 2001, wow.
Starting point is 00:33:57 Yeah, Space Odyssey. Been a minute. Yeah. Oh, that's crazy. Well, so one thing that I saw people talking about in those articles, and I still hear people saying now, is that it's easy, easy-ish for non-programmers. So I listen to a couple of data science-type podcasts, whatever,
Starting point is 00:34:14 just for exposure. And that's something that they talk about all the time. They do not consider themselves programmers. Oh, but they do a little bit of Python for data sanitization and making their graphs and that's how they think about it they don't care about inheritance or classes or any of that stuff i've been to machine learning talks where like the uh i remember one in particular uh down at georgia tech the guy who was giving the presentation i forget forget where he worked. His job had something to do with astronomy.
Starting point is 00:34:49 I don't remember who he worked for. And he didn't consider himself a software developer or a programmer, but yet he had written some code that it would look at all of the, the, these various pictures that they were getting from the, the telescopes and using some machine learning libraries, he would classify what type of, um, uh, galaxy that,
Starting point is 00:35:19 that it was in the picture. And I'm like, but you're not a program. Yeah. But what, but you're not, but you're not a programmer, but yet but you're not but you're not a programmer but yet you wrote this machine learning code that like is automatically class okay fine
Starting point is 00:35:30 you're not a program i don't care what you call yourself but i think maybe you wrote some code maybe you could call yourself whatever we talked about this we talked about the state of octoverse they said there was a growing number of people using github that didn't consider themselves programmers which sounded absurd at the time, but when you start talking about this, maybe it's not so crazy. Yeah, I think maybe it's just where we have gotten
Starting point is 00:35:56 to as well with just the maturity of the tools and the languages and frameworks and libraries and whatnot to where you can tools and the languages and frameworks and libraries and whatnot to where, you know, you can have like your primary job, whatever it might be, you know, like medical, like, you know, you could be a doctor or something like, and yet, you know, you could stitch
Starting point is 00:36:19 together some code to help you do your job, right? And in fact, like, I think I, there was like a talk that another machine learning talk that I can't remember now though, but I mean the same way, like I'm not a carpenter by trade. Right. But the tools and the availability to get the things that I need to go build a project at home, I can easily go do. And I can, you know, maybe,
Starting point is 00:36:48 maybe a car, you know, a tradesman might look at whatever my project is and think like, Oh, that's crap. But you know, all my friends and family might look at it and it's like, it's,
Starting point is 00:36:57 it's 90% gets the job done, whatever, you know, and that's, and that's good enough. Right. Yeah. Yep.
Starting point is 00:37:05 Yeah. I think that's a really good point, too. And I think part of that is that Python is very much like batteries included type of framework where JavaScript has its roots in the web. And part of the requirements for JavaScript was that it had to be really lightweight and small. So if you look at the JavaScript library, you know, what's available to you, just vanilla JS in a web browser. It's like 150 functions. You know, it's very small. It didn't have support for real classes.
Starting point is 00:37:30 And half of those functions stink and nobody uses them, right? They're terrible. DOM manipulation and all sorts of stuff. And that's tiny. And you think about how many functions that Python has built in. Like, namespace after namespace after namespace of stuff built in. I was looking at a
Starting point is 00:37:46 Python file the other day that had probably a dozen imports, and I was trying to figure out if any of them were third-party, and none of them were. They were all just various pieces, you know, OS, math, whatever. And that's really powerful for someone who could just Google. Like, say, if you're a hobbyist, you want to do some home automation, right? You can go
Starting point is 00:38:02 and look at, you can do C Sharp on a controller, and, okay, this is what a namespace look at, you can do C Sharp on a controller. And okay, this is what a namespace is. Okay, now this is what a class is. Now you need to have a main method. Let's tell you about that. Or you can do Python. It's like one plus one is valid code.
Starting point is 00:38:13 Right. One line, let's say like one is much more approachable and I can Google it and I don't have to mess with, you know, NuGet or packages or restoring, you know, none of that stuff. I can just kind of set my own important. Once I import on my computer once it's just available from there on after. So I've got an environment that's just ready for me to work in. There's some downsides to that too.
Starting point is 00:38:33 Sure. But it's very beginner friendly. You know what I like about it in that regard, just what you said. If you go to the command line, if you have, if you have Python installed, you can type in Python and the code that you see somewhere, like you said, an import, right?
Starting point is 00:38:50 Like if you need, if you're importing from OS or whatever, if you're trying to get environment variables, you can type that right there in the REPL import OS. And then the next line, you could say, uh, OS dot environ and, and put in the environment variable name that you want and it will access it. Right. Like, so you don't have to go through the entire rigmarole of, you know, installing, uh, you know, uh, like it, I don't, I don't want to pick on it, but like.net core, right. You don't have to install.net Core and then compile a bunch of stuff and all that right like you could just start
Starting point is 00:39:27 actually writing some code and getting results out immediately you like the fact that it has a REPL which we've defined before in the past but it's been a while so a read eval print loop right but there so then you love Perl
Starting point is 00:39:43 nobody loves Perl nobody loves pearl what you know what the first there's going to be somebody that starts listening on this episode this would be the first one and they're gonna get mad because they're gonna be like hey i pay my family or you know i get paid for doing pearl like we're not making fun you're listening to coding blocks dot pl right yeah i but i am not a pearl fan so you can do great stuff with it but uh yeah i mean you'll have a lot more opportunities in your future if you switch over to python now and i don't think there's anything you can do in pearl that you can't do in python so sorry for making you give us a one-star review right well i mean you know you you talk about like from the start though like why python right like why did it become so popular and and you know back in those early time frames
Starting point is 00:40:31 where python was becoming a thing though pearl was pretty popular during the during those times and i kind of i kind of feel like pearl shot itself in the foot with Pearl six or the soon to come out Pearl six, where we go to object oriented. Oh wait, no, no, no. It's going to be delayed,
Starting point is 00:40:51 but it's coming out. Don't worry. It's coming out. It'll eventually come out. I realize it's still not out yet, but keep using profile. Pearl six is coming. Wait for it.
Starting point is 00:40:59 It's going to be amazing. Hold on. I know I haven't released it yet, but it's coming. Right. Just wait. Like wait like i it do you remember like waiting like that forever like it seemed like it was like did it ever get released is this like uh change the name okay we're just we're just gonna change the name to something else so we can just release this thing and move on with our lives riku is the new name. R-A-K-U. Oh, right. Okay. Yeah.
Starting point is 00:41:35 Well, the next bullet that you have here that goes in line with what you said already is the depth is there when you want it, right? Like, if there's a function you need in Python, it probably exists. Like, and it's probably part of the core stuff that you already have installed which is really impressive like i as somebody that's sort of new to it now like the string functions that are available for it are just amazing like like everything as a matter of fact my tip of the week is is just a regular string thing in python that blew my mind of how easy it was to do. So, yeah, it's just there's so much already baked into it. That's actually my number two reason, by the way. So, Mariah said there's two reasons that I think Python is winning compared to other languages,
Starting point is 00:42:19 and one is community. And the community, I think, is why ultimately this is my theory, you know, so don't uh don't hate everybody else uh my theory is that python beat out similar languages like ruby lua pearl they were out of time because they had a strong community and because it was just good enough i think any of those languages potentially could have won this war and we'd be talking about them today i think i think absolutely it would have been Perl if not for Perl 6. Yeah. I mean, CPAN was a
Starting point is 00:42:47 big deal at the time, man. It was so easy to just go and find other libraries that were available and just browse for them. You could literally go browse the CPAN website to see what else is out there. Yeah, that was a killer feature that could have killed Python potentially.
Starting point is 00:43:04 That could have been enough reason there. I mean, CPAN was way ahead of like an NPM or like a Nougat or any other kind of package management system. It was way ahead of its time. And you could just go browse it and see what was there. Python would have definitely won out, I think. Or not Python. I meant Perl. I think would have been a much bigger deal, but I think Perl 6 killed
Starting point is 00:43:30 it. Inadvertently. Yeah, I believe it. So I feel like that's what kind of got it halfway there. And the other half is the standard library. So with me asking why Python, I think for me there's always been a subtext there that says, why not just use JavaScript? They're so similar.
Starting point is 00:43:46 They feel similar. They're both easy to use. Like, all the good things that you say about Python, you can say about JavaScript. Ooh, except that standard library. Right. It's just not there. And I think that ties back to JavaScript's, you know, things on the root. And I think that JavaScript maybe would have been a different story if it had started out on a server or started out on a computer.
Starting point is 00:44:05 Well, let's not pretend like JavaScript's not a big deal, though. Oh, yeah, it's huge. It's huge. Yeah, but it is surprising that Python is just sort of, I don't know, it feels like it's sort of taken a big jump here in the past couple of years, which is surprising. Because JavaScript has grown hugely, right? Like I'd say, I'd say these are probably the two languages that most people will gravitate towards if they're, it's, I think you said script kitty earlier, right? Outlaw. My guess is people that aren't classically trained in computer science, it's probably
Starting point is 00:44:42 one of these two languages is where they're going right they're either doing javascript or they're doing python even if you are classically trained in computer science i think that these days you're being taught a lot of python totally totally and and there's nothing wrong with it like it's it's actually really good in terms of at least my experience with it i'm sure joe what, what's your take on it? There it is. It's the seal of approval. Those are the words of the show from Alan Underwood. Python, it's actually pretty good.
Starting point is 00:45:12 Yeah, right? Yeah, it's always been bill-wethering to me. It's like these languages, JavaScript and Python, they look very similar. They behave very similar. They both have kind of things you can do on the server. And there's nothing mathematical that I'm aware of in Python that's any different of things you can do on the server and there's nothing mathematical that I'm aware of in Python that's any different. But JavaScript can run on a browser.
Starting point is 00:45:29 So in my mind, I'm like, okay, one's got a clear advantage over the other. JavaScript's going to eat Python. Python's going to be dead. So a couple years ago, I think I said, look, my bet's on JavaScript for the future. Nothing's going to touch it. Somehow freaking Python touched it. And I've been trying to understand ever since why the heck Python caught up to javascript right but i think it's really those two things i think
Starting point is 00:45:51 the standard library is huge and i think the community behind it is huge and has been huge for a long time i i definitely come at it from my own bias bias that are in my own bios uh but my own bias which is you like, I think that it was just the machine learning is like a big, big, huge reason why Python grew in popularity, because there's so many resources out there that if you know, if you're doing anything, machine learning that Python is what you're going to use for it. And, you know, it's such a big deal now. I mean, like, look at all the efforts in recent years into like self-driving cars, for example. I mean, so I guess, yeah, I guess what I'm saying is, you know, your Tesla is running Python.
Starting point is 00:46:39 Probably is. Hip install autopilot. Another thing that's big about it, like, and we've talked about this with dot net as as people that love some c sharp like we all got excited excited when dot net core became a thing right because it was cross-platform it ran on linux it ran on windows it ran on mac it ran everywhere python's been doing that for a while right so So that cross-platform thing is huge. You write, it goes back to that abstraction that Outlaw, you mentioned a little while ago, is do you write a shell script and put it on Linux and roll with that knowing that it's only
Starting point is 00:47:23 going to work on Linux? It's not going to work on your Windows box. It's not going to work on your Mac as well either. Or do you just write a Python script that has that big standard library so you can do JSON manipulation if you want. You can do all kinds of things. It's got XML libraries. You can do all that. Try and write some XML garbage in Shell.
Starting point is 00:47:45 Right? You can do all that. Try and write some XML garbage in shell, right? I would know. Like people start telling you, oh, well, there's this sed command that looks like it was written on some sort of foreign planet. Totally plug that in. It'll work. Or you can write something that actually is readable in a Python script. And, oh, by the way, all you got to do to run it is type in Python and then the name of the file, and it'll run, right? So it's like, yeah, you got this cross-platform thing that has this amazing set of libraries that you can do things with pretty easily.
Starting point is 00:48:16 Yeah. Web browser is still a problem, and mobile. I'm not aware of any, like, mobile app native frameworks that you can build with Python. I think you're talking about Java or C Sharp. Not C Sharp, sorry. Well, C Sharp too. But JavaScript or like Objective-C Swift type stuff.
Starting point is 00:48:35 Right. So I don't know that it really has a foothold in mobile. No, but what it does is the server interactions, right? You can set up your API servers or whatever, and that's all in Python, but then the actual application itself that's talking to it is going to be something else. And maybe there's something to be said for focus, too.
Starting point is 00:48:54 If I type in learn Python, like someone's going to say open up a REPL or open up whatever and start typing. If I type in learn JavaScript, it's like, well, okay, wait, are we talking Node? Are we talking browser? Because it's two totally different paths. So it's a's a big community yes but it's also kind of split you know what i hadn't even thought about that that's you know yeah man this goes back to our whole java versus c sharp stuff back in the day like one of the reasons i always like c sharp was
Starting point is 00:49:21 there was sort of like this predefined path if you you want to start up a Java project, it's, are you doing spring? Are you doing spring boot? Are you doing this? Are you doing that? Which one of these 50 tools are you going to use with Python? It's like, you're going to use pip, right? And you're going to use this set of tools. Just go do it.
Starting point is 00:49:43 JavaScript is almost turned into the Java of that kind of stuff, right? Like what package manager are you going to use? What thing are you going to use to bundle up your things? Is it going to be Webpack? Are you going to use Grunt? Are you going to use Gulp, right? Like it's almost like information overload where as like what you said, start learning Python. And there's just kind of like an easy path to getting going.
Starting point is 00:50:09 Yeah, you choose JavaScript. Okay, let's go web. Okay, fine. Angular, React, or, you know, whatever else. Vue. Okay, fine. We do an NPM. Nobody use NPM.
Starting point is 00:50:19 Use MPX. No, wait, sorry. NPM fixer stuff. Now you can use NPM again. Yeah, it's crazy. It's crazy. Yeah, sorry. NPM fixer stuff. Now you can use NPM again. Yeah, it's crazy. It's crazy. Yeah, man. Today's episode of Coding Box is sponsored by Datadog,
Starting point is 00:50:29 the monitoring and security platform for end-to-end visibility into your Java applications. Datadog provides out-of-the-box customizable dashboards, actionable alerts, distributed tracing, and an always-on low-overhead Java code profiler for your production environment all in one place. Ha! I set you guys up. Okay, so while it's totally true that you can use Datadog to monitor your Java applications, because of course, why wouldn't you?
Starting point is 00:50:58 Literally, Datadog's everywhere. There's not a place where they aren't. So, yeah, if you want to expose your JMX metrics, you know, Datadog has plugins and support that you could, like, add in to, you know, use them to monitor your applications. But we're talking about Python, guys. Why are you bringing up Java? Like, what are you doing, man? Listen, pip install Datadog. How easy is that? How awesome is that?
Starting point is 00:51:30 Like, it just perfect fits right into this show topic. Pip install Datadog. You can monitor your Python applications using Datadog. Because, of course you can. Name something, name a technology stack where Datadog isn't. And, oh, by the way, not only do they have these platforms, of course, they have amazing documentation to go with it with these APIs. But we've had Datadog as a sponsor for years. And the more and more
Starting point is 00:52:01 we dig in and learn and everything about what they have, I mean, it just, it never fails to amaze me what a thought leader they are in this space and how they have articles for everything. So I was curious about Python because, you know, that's what we're talking about. Of course, they have articles available on tracing and monitoring your Python applications using Datadog and like how you can collect and customize and centralize those logs and tracing asynchronous code through Datadog. Of course, they do. Of course, they do. Yeah. And so that's the reasons why as a developer, I love Datadog. But also, it's kind of an easy sell to your boss because what I like from a business perspective is I know if my app is up and running.
Starting point is 00:52:51 And I don't just mean up or down. I mean, are the individual pieces working? Is there anything that's on the verge of falling over? I can go and look and create my own dashboard and set this stuff up so I know how things are doing. So if someone asks me, how are things going? I can give a great answer. And if something looks bad, I can get to what that problem is really fast. And I just think that's really powerful. That's excellent. Hey, and Datadog has support for over 400 technologies and automatic instrumentation for popular frameworks. You can start monitoring your Java applications at Python
Starting point is 00:53:26 alongside the rest of your stack in minutes. That's right. Start your free Datadog free trial to start monitoring in real time. Listeners of this podcast will receive a free t-shirt once you install the agent and create one dashboard.
Starting point is 00:53:41 That's right. And if you go to datadoghq.com slash codingblocks, you can get right. And if you go to datadoghq.com slash coding blocks, you can get started. And that was datadoghq.com slash coding blocks. So, you know, what was interesting is when you brought this topic up, I started going, wait a second, I need to look back at that stack overflow survey, right? Where does Python live in terms of pay? And it was kind of right there in the middle of everything. Like it was, it was neither the highest paid nor the lowest. I want to say in the U S it was right in the middle of the pack and in the middle of the pack minute was like 120,000 a year. Um, and, and when I say in the middle of the pack,
Starting point is 00:54:25 like almost everything's falling right there between 130, probably between 110 and 130 is most of them. And it was right there at 120. So it was good. Yeah. It's there with C++. I mean, yeah, it's a great company. It's above JavaScript.
Starting point is 00:54:42 I think part of that may be my first inclination is like, whoa, it's in the middle, it's not at the top, like, ooh. But no, it's really, I think part of it's because there's probably a lot of beginners in there. And so if you look at experience levels, that would probably be different. So it's not really a great comparison, but it does show you that like,
Starting point is 00:54:56 hey, it's hanging in there for sure. Yeah, and this was out of close to 8,000 surveys. So yeah, man, it pays well um then the next thing and this is what i thought was way more interesting is you remember the section of the most loved dreaded and and uh wanted languages it is the third most loved language that's's nice. That's really good. Yeah. Like, and,
Starting point is 00:55:27 and one thing to keep in mind here is not only is it the third most loved, it's one of the most popular programming languages around. So there's a lot of people using it and they still really enjoy it. And that's a big thing. Yeah. What about rust? I mean, nobody uses,
Starting point is 00:55:44 but Oh, well there, and nobody uses it, but everybody loves it. Right. There's five people that develop with Rust, and they love it. Yeah, I mean, that was the thing, too. You get paid more to develop in Ruby, but you don't enjoy it. You do it reluctantly.
Starting point is 00:56:00 You're not happy about it. It's so weird to me. I don't get it. If you've ever messed with Ruby, I actually really like Ruby. What I did not like with Ruby was the dependency management stuff, which is probably why everybody hates it. Yeah. There's a, there's a whole,
Starting point is 00:56:14 uh, I got curious and over here on the side, I was, I was doing some Googling of like Ruby versus Python. And there's a, a very interesting Reddit post from like, why is Python more popular from than Ruby from two years ago? And I included the link over there in the show notes and I'll include it in the show notes as well in the resources we'd like section. But, you know, there was some like
Starting point is 00:56:38 interesting discussion that was happening in there. And one of the people who was like okay here's here's my experience from uh you know writing in both of them for a living and you know his answer was like it kind of reminded me of why like the reasoning that you've said of why you liked dot net better than java right like because you were like you know in dot net like hey there's this prescribed way of doing things and you know you go down that path and boom, it's done. And in Java, it's like, Hey, here's 18 different things. And you can go Google and figure out like, which one's the way to do it. And everybody's going to have their holy war of like, you know, do you use Maven or whatever, you know? And, and, you know, so now you got to figure out like, okay, well, how do I stitch all this stuff together? And his answer, like some of so now you got to figure out like, okay, well, how do I stitch all this stuff
Starting point is 00:57:25 together? And his answer, like some of his comment, this person's comments in here were similar to that, where he, well, I say, I keep saying he, but it could be a she, I don't know. The person says that, you know, you pretty much always know where, where the code lives. Let me read it exactly. You pretty much always know exactly where the code lives. Let me read it exactly. You pretty much always know exactly where the code lives. Python always has a focus on the one obvious way to do something. That generally means that developer will converge on that one obvious way. Ruby would rather give you a whole bunch of reasonable looking ways to do something and let you choose.
Starting point is 00:58:03 Right? reasonable looking ways to do something and let you choose. Right. But now again, this is just that one person's, you know, opinion on it. So, you know, you're, there might be some Ruby event evangelist listening that would totally
Starting point is 00:58:15 disagree with that statement, but yeah, it just reminded me of like similar things that you'd said in the past about.net versus Java. Yeah. Yeah. And the focus is interesting. And I thought that people in that same article mentioned like the past about.NET versus Java. Yeah, and the focus is interesting. I saw people in that same article mentioned academia and, of course, data science.
Starting point is 00:58:29 It's funny they mentioned focus on data science. It's funny to hear them say, well, Python is focused on data science, but Ruby is only focused on the web. I'm like, wait. Well, web's pretty big, yo. A little. Well, some of them were actually saying that Ruby is getting pigeonholed into just being a web-led tool. You know, like, you know, which isn't fair. I mean, you know, we use Ruby every day.
Starting point is 00:58:56 Did you know that? Nope. I think I did. Yeah. Like, I have some Ruby code that maintains our Slack. Oh, nice. Yeah. I mean, look, I've done some Ruby stuff that was really interesting with one of the popular Kubernetes libraries.
Starting point is 00:59:18 And I cannot think of the name of it right now, but it's part of the CNCF, and it's what does all the messaging within Kubernetes. And again, I cannot think of the name of it for the life of me right now, but it's part of the CNCF and it's what does all the messaging within Kubernetes. Again, I cannot think of the name for the life of me right now. But it's a big one. I'm going to go look it up real quick. It's something that's in the control plane? Are you talking about? Yeah.
Starting point is 00:59:40 It is. Like the Kube system? No, not etcd. Graduated project. Fluent D. It is. They're like the, uh, like the cube system. No, not etcd. Ah, graduated project. Oh yeah. It's fluent. D fluent.
Starting point is 00:59:50 Oh, okay. Yeah. It's, and what's interesting about it is it's a way of shipping messages from, you know, from one place to another. And,
Starting point is 00:59:59 and Kubernetes uses it underneath the covers to, to basically like, uh, you know, one of the things that we've mentioned in the past that we liked about Kubernetes is there's like a standardized way of getting all your logs out of your containers and stuff. And it uses Fluentd. So I've actually done some development with Ruby with Fluentd. And the biggest pain in the butt was dependencies. Like I've never run into that with Python. Python was really easy. Hey, I need to
Starting point is 01:00:25 pip install something. I'll tell it what version everything's good, right? It sort of bakes in anything it needs. Ruby, oh my God, you put in a dependency. You better know what its dependencies are and what its dependencies are because you'll start getting into this just nasty realm of nothing works. And the only way to find out is to crawl all the way to the realm of nothing works. And the only way to find out is to crawl all the way to the bottom of that hole. And it was brutal. Um,
Starting point is 01:00:52 and honestly, I think things like that push people away from languages really quick. If you have an awful experience and you've only been in it for a little while, you know, it's like, wait a second, it shouldn't be this hard.
Starting point is 01:01:06 I thought you could just import a single constant or variable. You can import a single function. You know, it's, it seems like it just, uh, you can grab like a little slice and then whatever slice it needs on, you know, it's all seems very consistent. I don't know how Ruby works, but, uh, I was, I definitely did like that about, uh, about Python. I think node kind of picked up a few, few tips from there too. You mean doing like a, a from yes yeah yep yep and then uh one other thing that i had on here and this goes back
Starting point is 01:01:34 also to what outlaw had said is if you're into machine learning it's kind of hard to even really want to look at any other language out there because like i mean just go go on to udemy and and search for machine learning yeah you will be flooded with python like you know there yes there are ml.net libraries for for dot net core or c sharp or whatever but but if you go searching for how to do machine learning, every course that you're going to see on the web is going to be learn ML with Python. You know, we'll show you how. And there's tons of libraries. There's PyTorch.
Starting point is 01:02:16 There's, and I don't even know that these are machine learning things, but there's NumPy. There's Pandas. There's all kinds of stuff. But it all sort of, it goes in that world, right? Yeah, they belong in that world. But specific to the machine learning, if you were to start with PyTorch, then you'd have TensorFlow and Psychic Learn.
Starting point is 01:02:33 Okay, so in the Python world, and focusing on machine learning, you are going to need to know other libraries like NumPy and Pandas. And you're going to need to understand data frames. And you might use Matplotlib. But I would say that if you wanted to get into machine learning, definitely just start with Psychic Learn.
Starting point is 01:03:01 They've got some great documentation. They've got a flow chart thing with it's not really i don't even know if it's really a flow chart i'll see if i can find it i think we've talked about this before but that just tells you like uh depending on what kind of um problem you want to solve and like how much data do you have like it'll walk you through like hey here's the type of algorithm you should probably consider using right and and you know it might not i i don't know that i would say psychic learn for production purposes necessarily because uh my last recollection of it was that um it it won't take advantage of GPUs. And if you were like doing real production worthy
Starting point is 01:03:48 machine learning, then you want to be able to take advantage of GPUs. But from a learning perspective, then you can get a feel for what a different algorithm is, when you would want to use it, and why one is different than the other. And, you know, scikit-learn would be good enough for that purpose. So a good foundational way to get rolling. Yeah. And I'll see if I can find that real quick and I'll share it with you real quick. Hold on. Cool. This episode is brought to you by Datastacks. Now, if you've done curbside pickup for a major retail store, if you've ever checked Pinterest
Starting point is 01:04:23 or watched a movie on Netflix, then you're already a Cassandra user. Why not make something amazing with Cassandra yourself? DataStacks Astra does all the heavy lifting of managing your infrastructure, serverless scaling, operations, and creating data access APIs so that you can focus on the code that matters to you. Yeah, so Astra automatically provides standard developer-friendly APIs like REST, GraphQL, schemeless JSON documents, even our native CQL query language. It's the easy button for a scale-out, always-on database-as-a-service that spans the globe. And that's crazy. I love easy buttons, and I also love databases and services that spans the globe. And that's crazy. I love easy buttons and I also love databases and services that span the globe. And we got a tour of this product and I can tell you, I cannot imagine an easier way to
Starting point is 01:05:13 get started with Cassandra and Astra. I mean, it's just fantastic. Documentation is great. Everything that you want to do is there, but they also have a nice way of kind of guiding you through the getting started process. So I'm really looking forward to diving in and spending some more time there and really getting to learn more about Cassandra and Astra here. Yeah. And it couldn't be easier. Within minutes, you can sign up, no credit cards necessary. You can get up to a five gig free Cassandra instance. You don't have to worry about,
Starting point is 01:05:46 Hey, how am I going to set up this, uh, Cassandra cluster? Like how do I do the install or how do I operate this? How do I scale my cluster? None of that. They're going to take care of all of that for you. You get to focus on the parts that matter to you. Like Alan said, all the APIs that you are going to need or want are available to you. It can scale elastically, but Hey, check this out. This part's really cool. Multi-cloud multi-tenant right on dedicated cluster. So if you want it on AWS, you want it on Azure, you want it on Google cloud platform, wherever you want your Cassandra to be data stacks is there for you. Hey, and you know, one other thing that I really loved about Datastacks is not only are they experts at running Cassandra, but the changes that
Starting point is 01:06:34 they are making that are helping out the Cassandra product as a whole, they give back to the community. So not only do you have the experts there that are leading the way, they are also helping support people that are running that out there on their own. So, you know, if you want to get started on any cloud in five minutes or less, go to datastacks.com slash coding blocks, sign up today and get a free $300 credit with a promo code, CodingBlocks. Yeah, and that's Datastacks, which is spelled Datastacks.com Datastacks.com Datastacks.com
Starting point is 01:07:14 slash CodingBlocks. Sign up today and get that $300 credit when you use that promo code CodingBlocks. Alright, hey, hey, hey, it's that time for me to ask you to please reave please reave all of the things.
Starting point is 01:07:31 Oh man, see, this is why I don't do the bake. And if you just help me out, I'll just stop right now. If you just go to codingblocks.net slash review, click the links, type it in some words, make sure to smash that five star
Starting point is 01:07:44 review, and i'll leave you alone uh yeah and thank you for reading yes uh all right well uh how about um i i well let me ask you guys a question first, and this will dictate which direction we go. What do you get when you cross a vampire with a snowman? It's got to be red. I don't know. I don't know. Frostbite.
Starting point is 01:08:19 Get out of here. So that was from Mike RG. Yep, yep. I figured. Yeah, yeah. It makes sense, right? It's awesome. So now we head into my favorite portion of the show, Survey Says.
Starting point is 01:08:37 All right. So a few episodes back, we asked – oh, this was actually a question that somebody, one of the listeners gave in on Slack, I think it was, and I don't remember who it was now. But the question was, how many bits or data type could your annual salary fit in in whole dollars? And you got to pick the smallest, you know, byte size or data type that matches. So your choices were one bit, which is Boolean. Uh, wait, you can make money with this coding stuff or eight bits or one bite. I made a webpage for a friend one time or 16 bits or short. I'm an intern, or at least I get paid like one. Or it's a 16 bits and it's an unsigned short. I'm just getting started in my career. Or it's 17 bits. I like my company. Or it's 18 bits.
Starting point is 01:09:36 My company likes me. Or 19 bits. My company really, really likes me, or 20 plus bits, I run my company, or maybe it's some qubits. My salary is in a state of flux, or it's string because I only get paid in thank you messages, or it's negative numbers. Who needs to pay you for having fun? I pay for everything I use to write my open source project. Or memory addresses because buffer overflow attacks are how hackers like to make money. All right. So let's see. This is episode 47.
Starting point is 01:10:18 No, this is not episode 47. Oh, okay. This is episode 152. That survey was from episode 147. So 152, it would be Joe's turn to go first. All right. Qubits with 25%. Qubits, 25%.
Starting point is 01:10:36 Yep. State of full. I like how he didn't even have to think. He was just like, boom. There's my answer with confidence. Qubits, 25%. Alan? Well, yeah, because if I'm wrong, I'm just going to change it.
Starting point is 01:10:49 There you go. Makes sense. I'm going to observe it differently. You know what I'm saying? Yeah. It's in a state of flux. That's right. You know what I hate is I have no idea what these numbers amount to because I didn't go look at any of it.
Starting point is 01:11:03 So I'm going to say maximum number of like, you know, like if I just said, Hey, give me like the largest number for an eight bit. You, you can't admit like right off the top of your head. Tell me what the largest number would be for eight bit.
Starting point is 01:11:18 Isn't kidding, man. If you throw it out there, like any of those, any of these, I was giving you a hard time, like 16 bits. Yeah. That's what I'm saying. I'm completely failing. Yeah. Yeah. there are like any of those any of these i was giving you a hard time like 16 bits yeah yeah
Starting point is 01:11:25 that's what i'm saying i'm completely failing yeah yeah i don't expect you to know those max numbers off the top of your head why do you think i chose that's how i end up with qubits all right well i'm gonna go with 18 bits because i like the my my company likes me. So we'll go there and, and I will say 33%. Alan, 33% true to himself with his optimistic ways, picks 18 bits and Joe ever-changing mathemachicken, goes with some Q bits at 25%. Do we want to count what his range was first? His range was? Yeah, you want to give it to me? What is 18 bits?
Starting point is 01:12:20 Well, 17 bits is 131,000. 18 is 262. Okay.1 262 it's pretty good pretty darn good yeah but you're both wrong so it doesn't matter okay that stinks yeah they in the unsigned short no no no thankfully thankfully not um The 17 bits was the number one answer. And, yeah, 16 bits unsigned short, though. That was third place. Okay. So, you know, weren't too far away.
Starting point is 01:12:58 What was the percentage on the 17? 17 was 48% of the vote. 18 bits was number two. Oh, wow. Yeah. All right. Hey, man. Dang.
Starting point is 01:13:10 People like to buy their company. That's good. Now, unfortunately, some of the participants in the survey are paid in qubits, and that was the fourth place answer. So, yeah, that's awkward. If you're getting paid in Bitcoin, that's probably about the equivalent, right? Like one day you're eating rice and beans, and the next day it's the finest steak on the planet. And right now it would be one of those days. Right.
Starting point is 01:13:44 Man, at the time of recording, it's getting close to 50 000 per bitcoin that is a lot of cheese dust yeah that is a lot of cheese dust yeah well uh yeah i mean you could invest in it if you wanted to i don't know like i i feel uncomfortable giving that kind of advice, but I would say that if I had to give you any kind of advice, I would say that you should date a JavaScript developer because they always promise to call back. That one is from SuperGoodDave. It was actually a tweet that he shared from our friends at Netlify. I like that one a whole lot.
Starting point is 01:14:28 I like that from the company Netlify Twitter handle, they had time to share this awesome joke. That's great. And of course, promise is capitalized in the joke to just add to its hilarity. I like that. All right. So, you know, for this episode survey, I thought that it would be relevant to like ask, well, hey, what's your favorite Python feature?
Starting point is 01:14:55 And so your choices are all the ML libraries or the Jupyter Notebook support or pip install everything I need, or the virtual environments are the best. We haven't even talked about that yet. Or I require a lot of matrix multiplication, or it's so easy to visualize data. Or lastly, it's not Java. I had to pick one. And so I decided to pick on Java for a minute. This episode of Coding Blocks is sponsored by Linode. Simplify your infrastructure and cut your cloud bills in half with Linode's Linux virtual machines. Develop, deploy, and scale your modern applications faster and easier.
Starting point is 01:15:49 Whether you're developing a personal project or managing larger workloads, you deserve simple, affordable, and accessible cloud computing solutions. You can get started today on Linode with a free $100 credit for listeners of CodingBlocks so you can find the details at linode.com slash codingblocks. And Linode has data centers all around the world with the same simple and consistent pricing regardless of the location. And I'll tell you, so I think I mentioned a few times that I set up Kubernetes clusters. At this point on Linode, I have created and destroyed several Kubernetes clusters
Starting point is 01:16:24 because it's so fast and so easy. And I don't think I mentioned earlier that you can do shared servers, which really is great if you're trying to stretch out that $100 free credit. And so I don't know how little I've spent. It's been crazy just what I've done with so many different computers and configurations and multiple nodes and um some with like really cheap commodity machines and some like with uh fewer nodes and much bigger machines and i'm just trying to experiment there and it's been a lot of fun and uh most of the time i just do shared machines because i'm just kind of playing around and having some fun so that's a great way to uh to really stretch those dollars and of course you have the option to have your single tenant machines
Starting point is 01:17:01 so you can avoid those noisy neighbors and it's just been such a great experience and so easy to set up and they just give you the here you go this is what you paste into your cube context file and there you go now you're set up ready to go and just done it's great experience yeah so one of the other things that i love about linode is just their their management platform so if you're going in and you log into your console, it's super easy to spin up a Linode instance. Like you choose your machine type, you choose what software you want on there, and boom, the thing launches.
Starting point is 01:17:35 And if you need to shut it down or restart it or do anything like that, you have access to all that in a really easy to use management console. Yeah, I mean, we've been using it for years. I don't even remember how long we've been using it now, you have access to all that in a really easy-to-use management console. Yeah. I mean, we've been using it for years. I don't even remember how long we've been using it now. But you can find out for yourself just how easy it is.
Starting point is 01:17:53 See why we've been using it forever. Choose the data center that's nearest to you. You can receive 24-7, 365-day human support with no tiers or handoffs, regardless of your plan size. You can choose shared and dedicated compute instances, or you can use your a hundred dollars in credit on S3 compatible object storage, managed Kubernetes, and a whole bunch more. If it runs on Linux, it runs on Linode. Visit linode.com slash coding blocks and click on the create free account button to get started. Again, that's l-i-n-o-d-e.com slash coding blocks. You know, so we'll get back into the Python thing. But you know, I just had like this one
Starting point is 01:18:40 one thought, though, because we were talking about Bitcoin and investing in general. It got me thinking that I started investing in stocks, mainly beef, chicken, and vegetable. I'm going to be the next bullionaire. Ouch.
Starting point is 01:19:00 Ouch. Yes. Thank you, Jim. We've got one for everything tonight. Yes. That's awesome. That is good. Oh, my gosh.
Starting point is 01:19:17 We went along. So one of the reasons that's frequently cited in a lot of articles that we looked at was productivity. And so we wanted to spend a moment talking about what it was that made Python productive. And of course, one of the things we talked about earlier was package managers. And so I went and looked, and we're getting close to 300,000 packages on
Starting point is 01:19:35 PyPy. Which is really quite good. Nuget has 243. I looked at CPAN, actually. It had like 250-ish or so. This was comparable. And I should note, too, like that number doesn't mean better, right? Especially, you know, if you can imagine the size of these packages can range very wildly. So a package could be just a few lines of Python or maybe it's huge like Pandas.
Starting point is 01:20:00 Node has 1 million, though. So it's still crushing. You said 243 NuGet packages? Thousand, sorry. Okay, 243,000. 243. Yeah, I was like, I am missing something. You know what?
Starting point is 01:20:17 It probably was 243 before.NET Core came out and everything went package-based. Now it's 243,000. That's right. All right, so we're saying Python has 300,000 and.NET now has 243,000. Yep. You know, not that powerful. That's not like dramatically bigger.
Starting point is 01:20:41 So you hear a lot of people say, well, PyPy is awesome. I mean, it is, but the size of it is comparable to other languages. And Node just blows out of the water. But you never know with something like that. We kind of talked about it with GitHub too. Maybe there's some free code camp thing where you create your first Node package and it's really popular. And so there's a million and one Hello World packages up there. Although, you hit it on it earlier, though, Joe, with Node,
Starting point is 01:21:08 because the actual JavaScript language itself doesn't have a ton of, I hate to say useful, but it doesn't have a lot of additional features. Like, there's NPM packages out there that just do things like left pad yeah or or right pad and it's like that's what the entire package is whereas in python that's built into the language you don't need that extra cruft in a package to install i remember the uh I remember Alan's favorite meetup that we ever went to, the presentation. And in that presentation, they were showing an Angular node package that the guy created for a calendaring system. I knew you were talking about that meetup. That was mad.
Starting point is 01:22:04 See, I just got a little bit hot thinking about it. That was like the biggest waste of my life. So, in other words, I know the buttons to press. You know, not to harp on the 243 packages for Nougat, and it was 243, not 243,000. You know, prior to.NET Core, I would bet you that 200 of those were different versions of Apache Log4Net. No. So just for fun, so Alan's point about standard library, I just thought, I was like, you know what?
Starting point is 01:22:42 I wonder if people have created packages for things that even exist already in JavaScript. So I just looked up uppercase, and there were several that were literally all the packages is uppercase, which is literally a function of the language. So I was like, oh, what about title casing? So I'd seen title casing, and we would capitalize the first letter or word or whatever.
Starting point is 01:23:00 And so I looked, and Python has a.title method on all strings, or on the string class, so it's got it built in the library. There are 85 libraries with title case. And if you look, some of those, like, if you search for upcase, actually that's how I got started on it, there's like 30 of those, or sorry, six of those that do the same type of thing. So there's like almost 90 packages right there
Starting point is 01:23:20 just for a single method that already exists in Python. Yeah. So that's pretty interesting yeah all right so i got all i got all hot bothered there for a minute sorry so maybe if you were to like divide the if you were to say like okay there's a million plus uh node packages but maybe like a bunch of duplication there, so maybe only a third of them are actually necessary or worth having or unique, and so now
Starting point is 01:23:52 you're back in similar ballpark of PyPy and Nougat. Yeah, totally. I don't know if anyone's done any real deep analysis on it, but if you were going to do some deep analysis on it, you'd probably be using Python. You want to do a sentiment analysis on the description?
Starting point is 01:24:15 Yeah, it's probably built into the standard library. So I looked up several different combinations. It was like, hey, what are the top 10 packages or projects in python and um like i found one here that is apparently not very good because it's missing some really major obvious ones but uh we'll have some links to some of those or you can just google yourself and like say like top 10 python packages but like you'll see numpy you'll see pandas which is like lets you kind of deal with data and tables in interesting ways. And it's really good. All the machine learning stuff, TensorFlow. But there's also big things like Django and Flask that I'm not seeing listed in this, which is just crazy to me.
Starting point is 01:24:54 Well, it's because those aren't packages, right? Those are frameworks. Oh, yeah. I guess. Yeah. I didn't think about it. Good point. Really good point.
Starting point is 01:25:04 So circling back to that the the psychic learn conversation we were having before uh oh right i just so i included a link and i'll i'll have this in the resources with link section but there's this um psychic learn has a like an algorithm cheat sheet and if you've never seen it hold on pause pause i know for everybody else listening it sounds like you're saying psychic like read your palm type thing it's psy kit like science kit just just for anybody else that's trying to look this up after the fact uh we're not doing palm reading this is science kit side kit that's gonna make the whole Ouija board part of the conversation awkward. Right?
Starting point is 01:25:46 A little bit. A little bit. Yeah. So Scikit-learn has an algorithm cheat sheet. And if you've never seen it, it's pretty cool. So the title of the page is choosing the right estimator. But the idea is you could go to this page and you look at it and you would think like, oh, hey, it's just a picture, but it's really not. It's actually interactive. So you start and it's like, okay, well, how much data do you have? Are you trying to predict something or are you trying
Starting point is 01:26:17 to label something? And then it'll like walk you into like a whole group of algorithm types. And then you can, you know, based on the amount of data you have, you might say like, Oh, Hey, you should use this particular library.
Starting point is 01:26:33 Right. And you could actually click into it and it'll take you straight to the psychic learn documentation for that particular algorithm. Yeah. I was going to say to you, like if you are an existing programmer, you've got a couple of years of some experience in you,
Starting point is 01:26:49 and you're just looking for something to do that's fun on a Saturday afternoon or something, and you want to learn some Python, you can just Google top 10 Python libraries. Pick one at random and work through a tutorial. There's some really cool ones, like LibRosa will do sentiment analysis, speech analysis.
Starting point is 01:27:06 There's a bunch of stuff for drawing with pictures there's a movie library that's like what you kind of cut frames out and stitch together movies and stuff like it seems like you can really have a lot of just fun programming with Python so I pick a popular pick a popular package and just go for it cool
Starting point is 01:27:22 yeah one of the things so you know you were talking about the fact that they didn't mention like Django and Flask and all those. So that was one of the things that when I was getting into Python that I think is why a lot of companies pick Python is because there's a lot of really powerful things that have been built for it. So I think I had mentioned maybe on a previous episode, I know at least in Slack, I had talked with some people about task runners. So in.NET, there's a really popular library for running background tasks. It's called Hangfire. And one of the problems with it is the licensing, right? Like if you go use the free license, then you basically might have to open source the rest of your code unless you go with the commercial license, all that. And Java has them, but there's similar type situations
Starting point is 01:28:22 and they may not be fully baked. There's one in Python called Celery that is fully baked. Like it's really nice. You can basically go in there, set up a Redis or RabbitMQ type queue for handling your tasks. And they have a UI built on top of it. They have all kinds of ways that you can set up the scheduling. You can set up the tasks. You can have them triggered. You can do callbacks.
Starting point is 01:28:51 You can do asynchronous. Like it's really powerful stuff. And then same thing with like Django and Flask, right? You want a full blown web application. You got these and they're really popular. They've been around for a while. There's a huge community around them. Like there are just some really well done, fully baked, fully polished frameworks and projects out there that you can just use because the, the community has been around for so long that they've been polishing these
Starting point is 01:29:26 things for a decade or longer. And, and that is really powerful to be able to start making something quickly that, that you don't have to put a whole lot of work behind. I like that. Hey, one, one thing to just kind of close in the loop here on something. Cause like it, I was pretty sure that we had talked about that. Hey, one thing, too, just kind of closing the loop here on something.
Starting point is 01:29:45 Because I was pretty sure that we had talked about that psychic learn algorithm cheat sheet before. And we had back in episode 92. It was a tip of the week. That's interesting. Yeah, I thought it sounded familiar. I don't know how you remember this stuff, man. I really don't. how you remember this stuff, man. I really don't. For reals.
Starting point is 01:30:08 That was 60 episodes ago, dude. And it sounded familiar. Well, I mean, yeah, because I spent so much time just diving into that particular subject. So I'm like, I'm pretty sure we talked about, I've talked about this before. So, you know, I don't know. I get excited about a subject and I'll share stuff that I'm learning or
Starting point is 01:30:30 reading about it. Don't judge me. It's been that long ago though. Cause I, I remember when you were like deep diving the, the ML stuff, like episode 90, like that 92,
Starting point is 01:30:44 that's, that's been a minute. Uh, yeah, yeah. Time flies. Yeah. And that wasn't even like near, that wasn't even the beginning of that, uh, you know, subject matter, deep dive kind of exploration. Ooh, I like what we got here.
Starting point is 01:31:01 Now, now we're going to get on the dark side of this subject here. Yeah. So we've been talking good about Python all episode. And I feel like I could do a good spot. Like, okay, so now I understand why anyone would use it. I understand why. One of the things I like about it is basically the power and productivity type stuff in the libraries. And why so many people are using it.
Starting point is 01:31:25 To me, the answer is basically the built-in super powerful standard library. All the other good things I said, of course, too. And the community, which is just constantly churning out just great stuff for programmers and other people. So, that's all good. And here's the stuff that sucks.
Starting point is 01:31:43 The thing that I hate about this is like, I'm going to let you, I'm going to let you, let me Kanye this. I'm going to let you go on. But what are the things that you have here listed in the suck section? I'm like, wait a minute. No, that's like one of my favorite things. But, you know, go on. Yeah, I know.
Starting point is 01:32:01 I know what you're looking at. What's right? Yeah, you know, I said it very dramatically, but really a lot of things aren't anything necessarily terrible about Python. Like I mentioned performance. It's a dynamic language. I mean, it's interpreted. It's got all the downsides that go along with that.
Starting point is 01:32:21 So, yeah, it's not going to perform as fast as, you know, something that you've done natively like a Go or a Rust or a C or C++ type thing. Memory, too, it's got overhead for keeping that kind of interpreter around in memory. The upside is you've got the business speed. You can get things done faster. More readable and attainable. And let's be honest, compute's cheap comparatively nowadays,
Starting point is 01:32:40 right? Yeah, you probably don't care. That's probably not your problem. So along with that on language i'll just hit the language things first so uh late binding typing you know that interpret uh interpreters it stinks when you type some stuff and it's runs good and then you hit some typo that you did three weeks ago that you just never managed to crawl into that if statement and it's like oh yeah i must have missed that replace i didn't know it the pilot language is going to find that immediately.
Starting point is 01:33:05 Yeah. So what you're saying is there needs to be a type script for Python. Is that your next project? Is that what we're? You know, they've built in the optional typing system that makes releasing the PyDoc stuff is really easy to see. So if you're working with modern libraries, they pretty much tell you the types that are necessary and that your IDE will, you know, underline and squiggle for you if it's a problem. But a lot of the older libraries and a lot of the really good libraries are kind of came up from Python too. And so they'll do things like they'll take an argument and it could be like one of 20 things like pandas is really good slash bad about this, where it's like, did you give pandas an array or, you know, a list,
Starting point is 01:33:44 you can give it a numpy array you can give it I don't know probably a number it'll probably work you probably give it a CSV it'll figure it out you can give it something like a table dictionary yeah fine who cares it'll have like one thing that takes like a million different types of
Starting point is 01:33:59 arguments and then the return type changes too which is really bizarre to me I still think of like functions take in a certain number of arguments and returns a certain type python's like oh no no i'm just gonna turn a different type based on what you pass me and like you give me a list i'll return you a list you give me a lumpy array i'll turn to return your lumpy array like who cares and that uh is was initially very frustrating because i'm like i just like just tell me what you want and i'll get it to you in that format and it's like that just just i got you fam uh so i'm learning to roll with it you know i'm still working on it every day but it's cool okay i gotta ask you a question because
Starting point is 01:34:35 i don't see it in your list here but it's sort of along the lines of what you just said you know you can return more than one type out of a function what are your thoughts on that like it makes me actually physically ill you don't like tuples yeah like you just you can return comma whatever yeah a tuple you can like you return whatever you want man like it doesn't have to be just a return variable it could be can just put 20 of them together if you wanted. It doesn't matter. I dig it. And Kotlin has kind of still been on it.
Starting point is 01:35:12 But that's not even limited to Python, though. Python isn't the only language that you could do that in, but I do like it. Okay, so I guess the difference is, if you were going to do that in.NET, you would either have to create a type which wraps those values that you plan on returning, or you'd have to return a dictionary or something like that, right? That's not what I'm saying in Python. In Python, you can return 1, true, a string, comma. Yeah, but you don't have to do that with.NET, though.
Starting point is 01:35:44 It doesn't have to be a defined type. You could just return. Oh, you could do a tuple. Yeah. Or name tuple. It doesn't have to be named, though, necessarily. Yeah. But just the shape of it is defined.
Starting point is 01:35:58 It's ridiculous. But at least you can look at it in C Sharp, but it'll tell you, like, hey, I'm returning you some stuff. Get ready for it. Right. But in the later versions of C sharp, it'll tell you like, Hey, I'm returning you some stuff, you know, get ready for it. Right. But, but, but in like in the later versions of C sharp though, you don't, it doesn't even have to be the tuple though. Right?
Starting point is 01:36:10 Like you could just parentheses, like return this common, you know, var one comma var two comma var three. Right? Like a dynamic is what you're talking about. So your return type, you would say like, you know, parentheses and, and, you know, something like that. And you can give it a name. And I thought that got translated to a tuple, a named tuple.
Starting point is 01:36:31 Underneath the covers. But I still don't know that it's a named tuple, though. You may not have to name it. Look, I don't like it. That's what I'm getting at. I don't like it. If you want to return more than one thing, then you should probably create an object or a class that has those values in it and then return an instance of that thing so that people can actually make heads or tails of it. Yeah. I mean, I totally
Starting point is 01:36:59 hear you. And that's where the named tuple comes in. That's why I'm trying to make that distinction because there's, there's the positional value, which is what I believe the default is. Because the named tuple is where the value, it's a key value pair that's coming back, right? Am I wrong on that? If I remember right? And in Python, it's going to be positional. And that's the thing that you don't like. And that's the point you're making is that you should return back something to where you know that this dot first name and this dot last name,
Starting point is 01:37:33 not, oh, the first name was returned first and the last name was returned second. Yeah, I don't like it. At one point, I was like, oh, I can return multiple things here oh no no no I'm not gonna do that but like I had to stop myself from using it so so the thing is is that like a Puritan like you know if you were if you were to I'm sure like everything in like every uncle Bob book or post that he's ever written like he would absolutely agree with you strong type all the things and and whatever but there is something nice and simple to be said for like for those times where it's like just some you know uh internal call that you don't plan to
Starting point is 01:38:20 make it you know external or whatever to where you don't have to like muddy up your type – your namespace with all these other types just because you want to – What is wrong with you over there, man? Come on. I can't even get through my thought. Wrong pipe. Sorry, man. I think we killed Alan. That's it.
Starting point is 01:38:46 Shows up. Can't breathe. At any rate, though, the point I'm trying to make before I was so rudely interrupted, though, was that you don't necessarily have to, like, add in, like, 15 additional types. Because, I mean, we've talked about, like, DTO madness that can happen, right? And that's what you're describing is like when you want to return back these multiple things, you might just create a simple DTO that represents what it is and then it does get kind of messy because now it's like, okay, well
Starting point is 01:39:14 you have this thing versus this anonymous type that you could do and then like the... Actually, I think that's what it is. It's an anonymous type that I was thinking of, not named tuple. Is that what the technical name for it was in C Sharp 7? I what it is. It's an anonymous type that I was thinking of, not named tuple. Is that what the technical name for it was in C Sharp? I looked it up. It does map to a tuple, and it'll give names by default, like item one, item two.
Starting point is 01:39:32 So you can get your result and then do dot item. So if you went to parentheses, int, int, int, it'll be whatever you save the result of, dot item one, dot item two, dot item three to reference them. Or you can optionally give them a name, and it'll be a name tuple. The difference is it's strongly typed. So the types are specified and that's why it's not dynamic. And so it maintains everything. It's just some syntax
Starting point is 01:39:54 sugar there that makes it a little bit easier. And tuple is basically a generic class that wraps those types and so it keeps everything above board. Honestly, I have to agree with Alan though when he said hup, hup, h he said so just had to get that all right tough crowd tough crowd uh trying to die up over here i don't know if you're trying you're doing a pretty good job but you know like one of the things that you mentioned though was
Starting point is 01:40:19 that um you can't you you know you introduced some typo like two weeks ago and you don't notice it until today. I could have sworn I went looking for it and at least on my install I didn't see it. I couldn't find it. I remember Perl had a dash C where you could just run your command you could just
Starting point is 01:40:39 compile it to see if it was going to run. I could have sworn that Python had a similar thing, but when I looked for dash C, it was like, no, that was like to pass in a, a program as a string. Yeah. I've seen it as like PI cache files, like Piscy when you run stuff up. I don't know if it's maybe does some stuff.
Starting point is 01:40:55 Okay. That was the, okay. So I was going to bring that up too, because you mentioned the, you know, wanting to, to compile things.
Starting point is 01:41:02 And there was, you know, this whole, I found the stack Overflow answer, and they were talking about that, where the Python gets compiled into CPython, and it is the PyC files. Compile code is usually stored in a PyC file.
Starting point is 01:41:15 Okay, so that's what you end up running. Yeah, but that doesn't mean that it's actually doing compile time checks and all that, right? It's just the interpreted code that's been turned into bytecode, I guess. Yeah, I never understood that because my understanding is like interpreting basically goes as it sees the line. It will go do the thing. And so I don't know how that works.
Starting point is 01:41:36 I've definitely seen the PyCatch file, so I know it's doing some stuff. But I've also had some places where I had a variable that was misnamed that I didn't realize until I hit it. Right. I don't know. All right. So continue with why it sucks. I want to see more. Well, yeah, I mean, web is a problem for it. So, you know, you can't run it in a browser like you can with JavaScript, really.
Starting point is 01:41:59 But most languages, every language except for JavaScript and the few that work well with WebGL now. So that is getting kind of moot. But mobile is another problem. So if you put all your energy into Python and then you go try to do something on the front end or mobile, you're going to be learning another language. Although we would be remiss if we didn't mention Pythonista that you could play with Python on your iOS device, which I'm pretty sure that was also another tip of the week
Starting point is 01:42:33 that we've done in the past. Heck yeah. It is kind of interesting to me that C Sharp is ahead of Python in that world of being on mobile and being on it's pretty weird yeah like that's kind of surprising because python's been around since 90 something well is it though because i mean you have uh like a big corporation who has a heavy investment in c-sharp that would make the investment so that C sharp could be
Starting point is 01:43:05 on those mobile platforms, you know, since you could use it to, uh, to write code for this mobile platform. So I don't know, it kind of makes sense. That's a good point.
Starting point is 01:43:12 Who's the big company backing Python these days? Yeah, that's a good point. Yeah. Um, so here's where outlaws could beat me up. Uh, probably rightfully so.
Starting point is 01:43:24 There's some, Oh no, not quite. There's one thing before that. Legacy problems. Python has had a long history. And because of some various kind of, I don't want to say stumbles, but some changes in evolution along the way, it's led to a couple problems. The most famous being probably the differences between Python 2 and 3, where there was a big split.
Starting point is 01:43:44 And a lot of people didn't make that transition very quickly. Even though Python 2 isn't supported anymore, there's still a lot of stuff out there running it. Even though Python 3 and libraries and stuff are really pushing you out of there very slowly. You start with Python 2 and they're like, this isn't supported and we hate you.
Starting point is 01:44:01 Yeah. It was walking a fine line where it was almost it was walking a fine line where it was almost Python's Perl 6. Right. And Python 3 is great. Python 2, probably fine.
Starting point is 01:44:15 I haven't really spent any real time with it though. I did find it. We did talk about Pythonista in the past. It was episode 88 and it was a tip that uh joe recursion joe had shared with us yeah that's cool um so yeah the truth of the thing i am really not qualified to go into the i've heard unicode it's like part of the big reason but there's also a ton of language changes that kind of happened that made it so you just couldn't easily run python 2 stuff in Python 3.
Starting point is 01:44:46 Wait a minute. We have to start being qualified to talk about these things that we talk about on the show? Nah, nah. It'll be fine. I like how people were so determined to stay on Python 2 that they came up with libraries like future or futures, whatever you call it, so you could have functions and functionality
Starting point is 01:45:01 from Python 3 that you could run in Python 2 by importing a library that kind of mapped back. It was just kind of funny that it was so hard to move up from. And as part of that, part of Python versioning stuff, here's where Alice is going to beat me up. There's a thing that I don't love in that Python, kind of by default, most languages you kind of install the runtime or the compiler and you do your thing. Python has such a big, hard problem with that, that you can find two different code bases or two different projects you're working on. One's Python 2 and
Starting point is 01:45:32 Python 3. And you cannot just use the latest version, Python 3, to run both, which is something you can do a lot of times with C Sharp World or Java or something. If you have a Java 7 app and a Java 11 app, you can just install Java 11 and it's probably going to do just fine with both. Python does not have the problem.
Starting point is 01:45:49 That's why I'm frustrated with the way that the problem has basically been solved in this environment or mitigated, which is with VN for virtual environments. Okay, you're wrong. All right. Tell me why. Because, okay, okay, I think you're coming from the virtual environment thing from a, from one perspective,
Starting point is 01:46:17 and from your perspective, I don't know, maybe that's fair, but it's probably not fair. but maybe, but probably not. But, but really you should think of it this way. So the, the beauty of the virtual environments is that, and you could do the same thing with like Node, for example, right? Like, you know, where you don't necessarily want to install requirements globally, right? You might have a project that where you want specific versions of something,
Starting point is 01:46:52 right? And you want to, you want to be able to like work on that code and not worry about changing the, the versions of your requirements on that specific code base. And if you installed your packages, if you did a pip install and, you know, whatever you, whatever thing you install, a pip install flask or whatever, uh, you know, you don't want to install it globally. And because then how would you deal with like multiple versions of that particular package? Right. And so you have to go out of your way and know to,
Starting point is 01:47:29 to install something globally. You have to pass a special flag. Otherwise it just goes right into your folder. So that's the difference, right? Is it that if you do a node install, you have to do, you have to specify like a dash G for,
Starting point is 01:47:41 to make it global. Whereas otherwise it's going to be local. And and a pip install is going to work the opposite way, right? Like pip install is going to be by default, global. But if you set up a virtual environment, then you can work inside of that. But the beauty of that is that then like all your, know same with like every node project right you then have uh your your code base locked into like here's the versions and now i can very easily hand it off to you and you can very easily recreate that environment and better yet we can have you know endless number of projects that each have their own dependencies and, and one isn't polluting the
Starting point is 01:48:28 other in terms of its requirements. And when we decide to like, you know, update, uh, our latest game, you know, our Python, the dependencies in our latest game, we can install those in a new virtual environment and see in, in test, like, Hey, does this new version of the library, does it break my, my code or, you know, whatever changes I got, like you can, you can do those things independently. So I, I think you're coming at the whole virtual environment thing from the wrong angle. Cause the virtual environment is definitely not a what's wrong with Python. It's a what's incredible about Python. No, no. So I, i have experience with this not good experience uh i couldn't even get it to work on my mac like installing the stuff properly like and i don't know if it was a problem with xcode version that was on there or what but it was always going back to an issue with mac
Starting point is 01:49:21 and the virtual environment so i never could get it to work. So to me, virtual environments were dead. I'd rather do it all on Docker, which is what I do anyways, because it gets you basically the same thing that you're talking about. And I didn't have to worry about these global dependencies on my Mac not working out with it.
Starting point is 01:49:40 I guarantee you, if you and I connected, we could spend 10 minutes together and we could sort out that issue on the Mac because I've done this on Macs. It works fine on Macs. It's not it's not like it works fine on Linux and doesn and it's fine in all of them. And, you know, now, I mean, just any kind of dev tools on Mac kind of get like in a gray area because of its need on X tools. But here's what's super cool about it is that so you get that X tools version that, you know, in there. But then once you're in that virtual environment, you can upgrade to a different version of Python if you wanted to, or pip install whatever you want. I do that in Docker too. So why not just use Docker? Well, okay, but we're not talking about Docker.
Starting point is 01:50:30 This is why Python is awesome, not why Docker is awesome. You should listen to episode 153, why Docker is awesome. 81, actually. So I'll tell you. So virtual environments, yeah. So i like the sandbox environment true but how many times have i gone and checked out a project and and like uh oh it requires uh python i don't know three four is probably good you know okay i need to set up a virtual environment wait
Starting point is 01:50:59 but i want to set up to be on the same version that you're on oh but your repository doesn't specify the version that it needs to be so i'm going to set up to be on the same version that you're on. Oh, but your repository doesn't specify the version that it needs to be. So I'm going to set up a new virtual environment. And I guess I'm just going to guess what Python version you wanted me to use. So even though we have a sandbox environment that lets me run the exact same version as you, keeps our stuff in sync and is guaranteed to work, you didn't bother to tell me what it is because nobody in freaking Python tells you anything about their dang dependencies. Well, that's the particular
Starting point is 01:51:26 author of whatever library or code base you're looking at. Shame on them for not documenting. That's like 90% of all the projects that you do. How many times have you looked at the article and they're like, hey, yeah, start typing. You're like, wait a second. It says I don't have pandas when I tried to run your example.
Starting point is 01:51:41 It's not 90% of the project. It's 99% of every project in every language. Nobody ever documents all of their dependencies in their specific versions. You tell me one, like, let's say C Sharp project, for example, where you went and you named out the specific.NET version that you were using, all four quads of the semantic versioning that you were using, nobody ever does that kind of thing.
Starting point is 01:52:08 You're lucky if you get a hint. So in a Python world, you might say like, hey, it's Python 2. I swear, I want to reach through this microphone and strangle you. You mentioned Docker one more time. Who thought Outlaw would be arguing against Docker? I'm not arguing against docker but I mean
Starting point is 01:52:27 but the conversation isn't so sure yeah I mean to Alan's point yeah you could obviously solve
Starting point is 01:52:32 this this goes away with docker because like you know but but that's not the point here though
Starting point is 01:52:37 we're talking about we're talking about like trying to work within a python world and if somebody
Starting point is 01:52:42 like doesn't do a good job of documenting communicating what the requirements are then that's on them but that's you know trying to work within a Python world. And if somebody like doesn't do a good job of documenting, communicating what the requirements are, then that's on them. But that's, you know,
Starting point is 01:52:53 most every project in every language has the same kind of problem. So I wouldn't fault Python for that. Come on, man. It's on, it's on them in Python a lot, because if I click the link on the article, say, go get the code,
Starting point is 01:53:01 it takes you to get hub repository, NPM package right there. There's that, there's the file, the, uh, the package Jasonson right there has all the dependencies same with c sharp it's got all the dependencies out there in the code in github i go look at the python github repo and it's just a single file if there's even a github repo because it's probably just a blog article then it's because python's so powerful you can do so much in a single file you can do so much in a single notebook but oh man you know what oh there's no license file because it's not actually in github it's only in the article oh they failed to mention that i needed pykit and pandas and it only works on python 3.6 which
Starting point is 01:53:34 they didn't mention i had to kind of guess that and so yeah i can set up a virtual environment but i gotta guess the mumbo jumbo magic stuff that is needed to get there because i don't have all that stuff installed in my virtual environment. I had to guess what they wanted. Yeah. I mean, said another way, what you can do is you could just, uh,
Starting point is 01:53:50 have your Python script where you say like from pandas, uh, blah, blah, blah, or import pandas as PD. But, um,
Starting point is 01:53:59 and, and, and in that it will never be clear what the, what the version is. But that's why like as a, uh, a, what would you call it, a convention, that you could set up a requirements.txt file and you can list out, like, hey, here's the version. Here's the library I want and the version of it. And now I can just pip install and point pip. I think it's like pip install dash R and then pass in the requirements.
Starting point is 01:54:26 Text file. And it, you know, it will install all those things. Hopefully you're doing this in a virtual environment. So installs in a virtual environment, but, but it still doesn't tell you which version of Python to use.
Starting point is 01:54:38 No. So, so that's the rub. So yeah, you know, and that's where it's like, you know, typically you would hope like they would at least give you a hint about V2 versus V3 of Python.
Starting point is 01:54:49 And maybe you get another point release version 2 in case you gave us like 3.6. But, I mean, we're just as guilty about that same type of thing even in a Kotlin or a.NET C Sharp project, we don't specify like, hey, this is a C Sharp 7 project. Maybe it's listed in a solution file or project file.
Starting point is 01:55:20 Yeah. So I would say with Java or something it's in the palm file. But I'll say so for those, you know, those are kind of different because of the backwards compatibility. If I go look at some random Python package, it's like, okay, yeah, great. Here's the code you need to run and it'll do your thing. And so you just copy paste it and run it. And it's like, oh, Pandas isn't installed. And so, you know, you go look at it.
Starting point is 01:55:40 If you're not familiar with the language, you're like, hey, I got this error about something named Pandas. It's like, well, duh, you're a Python developer. What do you mean you don't have pandas already installed? Well, you told me to use a virtual environment, so I've got a clean slate. So it's just kind of weird. There's some expectations, I think, from some articles. And I think that probably comes from the background of
Starting point is 01:55:57 this kind of either Jupyter notebook-y kind of way of thinking about things or these single files or these tools that people just expect you to have. But they also expect you to expect to use virtual environment which is a clean slate so it's like which is it and which is frustrating to me and i'm kind of learning to just install freaking pandas with every virtual environment i set up but it's just frustrating to me well okay i mean two two points there number one is that like i i really don't think you're being fair here because on the one hand you're like oh i totally love't think you're being fair here. Because on the one hand, you're like, oh, I totally love how, you know, it's like JavaScript.
Starting point is 01:56:29 It's kind of loosey-goosey. Like, I can get away with some stuff. And I love that about it. But why isn't it more typed, strongly typed like these other languages and everything's like uber-defined? And it's like, wait a minute. You don't give that – you don't complain about JavaScript about not specifying which version of JavaScript. Like, have you ever seen a JavaScript file where it was like, hey, this is ECMAScript 2015? Well, I don't even know because it just works.
Starting point is 01:56:56 Yeah, but I don't know. Maybe you're running like Netscape Navigator and you try to run like a newer version of JavaScript. And of course, it's not going to work. So I don't know. Maybe it doesn't. But then JavaScript doesn't move as fast. Like Python has like F strings for 3.6. 3.9 has got some cool type stuff that made it a lot easier.
Starting point is 01:57:13 So it moves fast and it's not backwards compatible. Well, one other point that I wanted to make about the virtual environment file, though. It's not that you're starting with a clean slate. I mean, it's been a minute since I looked at it. But as I recall, what that is doing is when you create the virtual environment, it's basically taking like, hey, this is what you have globally available. And then it makes that it uses that as the base for the virtual environment. So like if you had a pandas globally available, then in that virtual environment, you would start with it as well. Oh, I hate that too. Okay.
Starting point is 01:57:50 I'm just being a jerk. I hate – look, I could hate anything. Yeah, you can. And you know what? Shame on me for trying to stop you from hating on Python. That is my bad. And, yeah. Sorry. So, Coding sorry so coding blocks is over it's no more we're going back to uh coding blocks.java yeah.cotland.kt yeah sure we can do
Starting point is 01:58:16 that yeah yeah so anyway so yeah so virtual environments are great. They are fantastic. It just sucks that you need them. I can't believe that's going to be the takeaway. No, I can't. No, that's good. All right, so let's move on. I'm kidding, I'm kidding. We have OSX, which isn't even a thing now. It's macOS.
Starting point is 01:58:37 So what's up with this thing? macOS, for a long time, I don't know about now, but it came bundled with a version of Python that was old. And so a lot of new developers would go and try to run stuff. And, oh, the version of my Mac already has Python. Oh, but it doesn't work. I need to upgrade it. And you go upgrade the version of Python on your computer and everything dies.
Starting point is 01:58:56 Everything's dead. It's all terrible. All these existing tools and utilities that rely on a specific version of Python don't have it anymore. This is all the more reason why you use the virtual environment. Yeah, but if I'm just learning, getting started, you don't have it anymore this is all the more reason why you use the virtual environment yeah but i don't want to if i'm just learning getting started like you don't want to have like the you know like learn how to code and python the first thing you you know run into is uh is setting up a virtual environment this is this is the thing that i was trying to point out though is that like you you start out with like a python 2 7 on mac os and you create that virtual environment you could upgrade python
Starting point is 01:59:27 to like a 3638 whatever you wanted whatever you needed if that's what you want to do yeah you can but like how like stack overflow question for like how do i unscrew my mac is like voted up a million times because a million people have done it, you know? How do I unscrew my Mac? He's not wrong. Is there a buy a PC answer in there? I'm sure there's somebody trolling it, like buy a PC, right? He is not wrong. Yeah, so, you know, the trick is like on OS X, what you want to do is install Python 3,
Starting point is 01:59:59 but you're going to type Python 3 and pip 3, and that's fine. Now on Windows, you're going to install Python 3, but it's going to be called Python. Don't type Python 3 and pip 3, and that's fine. Now, on Windows, you install Python 3, but it's going to be called Python. Don't type Python 3. If you wanted to make any kind of complaints about the virtual environment thing, then I can't believe that Windows versus any other POSIX OS isn't going to be the complaint. Oh, I mean, I can complain about that too. Okay, let's hear it. I can complain about that too okay let's hear about anything but uh yeah so i mean because that that is the different like that is the the nuisance in my in
Starting point is 02:00:33 my mind like but i mean i get it i don't necessarily have a good answer for it but you know it's like a different uh way that you're going to activate the virtual environment yeah and you know we've seen the problems of sharing stuff too. Like, um, was the global assembly cache, the GAC for C sharp. It was great.
Starting point is 02:00:49 You know, invention say it all sorts of, you know, space and loading times and things over with shell share libraries. But oh man, if you had a GAC problem, you have a problem. Ever had a problem.
Starting point is 02:01:00 Right. And guess what they did with.net core. They were like, Hey, you know what? Everything has its own little virtual environment. Based on whatever the directory is, that's where all of its stuff is. All of its dependencies are there.
Starting point is 02:01:12 I didn't have to know about it. It's in the form because it's... He didn't have to unscrew his back with.NET Core, right? I love it all right so the python community is not happy with us and and i'm definitely uh you know not winning any browning points with them for trying to defend it and uh so i just want to say to the python community i apologize that i was not a good uh uh you know steward of the of the language and uh you know oh well no i think i mean like i'm being totally it's like one of these is like i know there's things about the language and
Starting point is 02:01:59 environment and ecosystem that are the way they are for really good reasons and they're not going to change and I'm going to bang on them anyway. Right. Yeah, I agree. I'm with you there. Instincts, yes, the way it is. But they're also, you know, here I'll be hypocritical again. So I was just talking about how it's unfortunate Python 3 hasn't been more backwards compatible
Starting point is 02:02:23 and Microsoft has been and that's been really great, and Java has been, and that's really great for a lot of reasons. Unfortunately, there are some older language features that haven't aged very well, and Python just needs to get rid of them. Fix that junk. Like self in classes. Oh, yeah, I'm not a fan.
Starting point is 02:02:41 Yeah, every class method, you've got to pass self is the first argument. PyCharm will pop that in for you, which is really great. But I lost hours when I first was learning Python because why on earth would you do that? So you just skipped it and then nothing worked? Well, yeah, I was just like, here, I'm following some script, which someone has a tutorial on that is just a single file and there's no GitHub repo for it. I'm like, I'm going gonna put this thing in a class because i'm a programmer and
Starting point is 02:03:08 then oh my gosh so you know at the time i figured out oh well apparently you got to pass this self method even if you don't use it uh otherwise uh otherwise nothing works so that was kind of frustrating and it was like okay well now i'm gonna move it to a sub folder so i can get the clear stuff
Starting point is 02:03:23 on my top level and hey that's weird i can't import it now from a sub level but if it works fine if i go in there that's because i needed some weird init file that's it could be empty and that's fine and yeah so there's just some like stuff like that that was frustrating for me that you don't hit in the tutorials the getting started because they tend to do these like one line two line or one file two single file right yeah there's definitely some quirks about it and and and some of those quirks like if all you're doing is like some stuff in notebooks and just exploring data for example you'll never you'll never never see it you'll likely never see it or you know unless you're doing some complicated notebooks hey so this this next thing you got here i think you got a typo in it. Yeah, pep80.
Starting point is 02:04:05 Yeah. Yeah. So pep's, you know, good things. You know, I like consistency. And one thing I complain about a lot with Python is actually inconsistency. Like you'll see two different projects. Sometimes someone will have uppercase for files. Someone will have lowercase. Sometimes people will erase the vowels.
Starting point is 02:04:21 Sometimes they'll camelcase. Sometimes they'll underscore. Sometimes they'll, you know'll no case at all. And then PEP 8. It's not PEP 8. It's just got some controversial stuff in there. But for the most part, it's good. It's just really the line width, I think, is the main thing.
Starting point is 02:04:37 And, of course, the spacing. It's ridiculous. The line width is so short. But it reads nice, you know? So it's hard to kind of complain about seeing a file like that. But when you're writing a file and you're like, you're kidding me, 80? I can't get a string. You know, I can't do Hello World.
Starting point is 02:04:54 But, I mean, like, if we've learned nothing from Uncle Bob, shouldn't it point out that, like, if you needed to go that deep, that, like, you're doing something wrong. Like, maybe you're dot chaining too much, right? Like wasn't that one of the anti-patterns? Or I got a sentence. Right. That's the thing right there, what he just said.
Starting point is 02:05:13 If you have a long output, it's like, it's too long. And I'm like, really? I got a wide monitor and it's like two inches and it's like my, and it's like my auto linter is bumping into the next line. I'm like, nah. Nah. No, there were times that I definitely got mad about it, and I almost went in and modified the rules behind the scenes. I was like, I don't want that line on my screen right there. I'm actually really mad about it.
Starting point is 02:05:43 Pep8.Allen. Seriously. Like, no.p8 legit like this is this is stupid what's what's right here is stupid i'm gonna i'm gonna give a more realistic version of this yeah but yeah i mean the 80 character thing though that's always been like what we were supposed to do like right i mean like I remember being taught that you had 10, 24 by seven 68 monitors. Is that what we're talking about? I think any of the four by three monitors, you know, that, that was, that was the rule. So, I mean, like, but okay. So, so let's take the flip side. Let's say that it wasn't going to be 80. Like, what would it be? Because I, I've been in code bases that the three of us have worked in together. Like not necessarily as like we were the only authors,
Starting point is 02:06:28 but like, you know, for, for our day job kind of stuff, like we were in it and there would be times where it's like, you know, you, you,
Starting point is 02:06:36 you could definitely see who had the ultra wide monitors and who didn't because there'd be developers who would like, you know, write code. And it would be like, would like, you know, write code and it would be like you're at character 3482 still on the same line. And you're like, okay, that's fine until I want to like look at something on a laptop screen. And now I don't have that ultra wide monitor and it's really annoying to have to scroll, scroll, scroll to the right in order to see it. Or maybe I want to have multiple files open. Like maybe I do have an ultra-wide monitor and I want to have like three or four files open up next to each other
Starting point is 02:07:12 so that I can see them on it. And then it's still annoying to have, you know, really wide files or, you know, line lengths. And sometimes you're like, okay, you know, there might be situations where you want an exception, like your sentence example that you gave that goes past the 80 characters. Okay. And you're like, okay know there might be such situations where you want an exception like your sentence example that you gave that goes past the 80 characters okay you're like okay fine how wide so what what would be the limit then 120 at least 120 so all of this is for 40 extra characters absolutely okay yeah also you know um doing the twitch streaming i do shrink monitor down to 1080p.
Starting point is 02:07:47 And then a lot of times I'll increase the font just to make it more readable. And then sometimes I do the left file and the right file. And so it's nice to have thinner widths. And also, I'm one of those people that would totally do a long font. And I'll tell you, though, C Sharp, man, there's none of those, like, those link method signatures that you can even fit in 80 lines is to see what the method returns. That thing would go off the side of your screen. Yeah. But even,
Starting point is 02:08:09 even in those though, like I still would like carry it down. I would, I would, yeah, I would do like a, a dot where dot select dot filter, you know, but all of those would be on a different line.
Starting point is 02:08:21 So I, I will back up why that character length annoys me so much though it's not just you it's quite a popular complaint well well if you're following the pep8 thing if you're doing something like a string format it won't let you put the sentence down at the same level as the other one like if you if you had your quote didn't start until character 60 on that line it wants your next line to start at character 60 so so it's like it exacerbates the problem right like because of its strict formatting requirements, it won't let you bring the next sentence down and move it over to where it'll fit. It wants to cram it there towards the end, so you've only got 20 more characters to do again.
Starting point is 02:09:13 Well, maybe you should be thinking about supporting internationalization, and you should have your strings in a file, and then you're just reading those in, and then this problem goes away. That's actually not a bad idea. That's what I'm going to do. I'm going to start creating separate files for all my log statements. And I'm just going to load them up. There you go. There you go. Like, academia is like, hey, we love Python because it's literally just print hello world.
Starting point is 02:09:36 But first, you've got to set up your virtual environment. So here's, you know, 20 minutes on that. And now you've got to make sure you get that string out to a resources file. Otherwise, you're going to break that line limit. And now you've got to unscrew sure you get that string out to a resources file, otherwise you're going to break that line limit. And now you've got to unscrew your Mac because you tried to do that virtual environment. Yeah, because don't code with Python 2 anymore, and that's what's installed.
Starting point is 02:09:54 Because if you type in Python, you don't know which version you're in because you don't know which OS actually defaults it to 2 or 3. And if you're doing your pip install, you don't know if you're doing pip pip install you don't need you don't know if you're doing pip install or pip3 install yeah yeah yeah yeah so yeah python is awesome and that's the takeaway yeah we talked like hour and a half about all the good stuff so you know i definitely
Starting point is 02:10:18 you know i'm going to continue on with it and even if i didn't have to work with it i would i would do that but i want to point out that i at least and no one else has added didn't have to work with it, I would, I would do that. But I want to do want to point out that I, at least no one else has added, didn't complain about white space. I actually liked the white space of it. I'm fine with it now. Well, you kind of,
Starting point is 02:10:34 the two of you just kind of had your complaint with the pep a conversation though, with like, yeah, it'd be exacerbated when like the next line has to start at link line. No, no, that's linting.
Starting point is 02:10:43 That's not got anything to do with white space. That's got to do with its stupid linting rules. I've had errors because something like I would be moving code around, whatever, jostling stuff, and I would have something indented or not indented that I didn't intend to. And so if something weird would happen, I wouldn't realize that I made a mistake. So that's been frustrating, but it's far less often than I thought it would. You have a bit of code that runs when you didn't intend it to because your function ended early.
Starting point is 02:11:12 Yeah. And you didn't realize it. You're like, wait, what? I've definitely done that. Why did that for loop just run? Right. And you're sitting there scratching your head like, my logic's sound? And the IDEs will kind of auto- auto indent sometimes and kind of help you out
Starting point is 02:11:27 a little bit but sometimes they'll actually do too much like you'll just be moving some things around and like not realize that something got in there that you didn't even do oh i've had pie charm mess me up a few times with that it's usually really good but it has definitely messed me up but i will say i do like the uncluttered feel of not having curly braces and stuff all over the place. It actually is a little bit freeing. Yeah. But you missed the semicolon. I do miss the semicolon.
Starting point is 02:11:57 I was joking. There are times that it really bothers me. Yeah. And I'm trying to do like a really long horizontal line to just get that stuff out of my face. I don't care about it. I really miss those semicolons. When you were talking about that white space thing and get messed up, I was thinking of just plain old like a Jupyter notebook thing. Because that's where it's like I'll have something and I'm like, you know what?
Starting point is 02:12:15 I should really make this into a function. Let me define it, you know, defunction. And then like maybe a line gets forgotten in terms of indenting it and then it tries to just run that on its own i'm like wait i know i know why we're all fine with the white space though because we have been damaged by yaml at this point i think for me though like uh it's backwards because my experience with Python came before my experience with YAML. And so maybe my acceptance of YAML, I was like, fine, I've already been broken and beaten down by Python. So, yeah, I get it.
Starting point is 02:13:01 Stupid white space, whatever. YAML is damaging. But, but yeah so i guess with that i mean whatever python whatever it's good i don't care anymore uh it's been so long talking about things we like the only thing in virtual environments is the only thing we disagreed on yeah and that one hurt that one really hurt they're great though i don't know man they're really not that's fun're great, though. I don't know, man. They're really not. That's fine.
Starting point is 02:13:27 I don't have a better way to solve it. I will tell you this. Docker! My God, you do. Docker. Here we go again. I told you, Alan. I'm going to reach through this microphone.
Starting point is 02:13:39 Nobody wants to work in Docker. Listen. Listen. I think with everything with the pandemic like it's just really gotten to us all you know and like i know that even i just the other day i told my suitcases there would be no air travel again this year and now i'm dealing with emotional baggage Thank you, Mike RG. Very nice. All right.
Starting point is 02:14:12 So with that, we'll have some resources that we like. There'll be a lot of links in there. And, you know, maybe after listening to this, you'll like Python. Maybe not. I don't care. And with that, we'll head into Alan's favorite portion of the show. It's the tip of the week. All right. So this one's actually really simple.
Starting point is 02:14:30 So being as how we're talking about Python, this is one of the things that I love about Python. last character in a string in C sharp or JavaScript or anything, it's usually a substring call or a sub call or a right or what like there's, there's just, there's usually like you have to Google it, right? In Python, if you want that last character in the string, you could actually take the string variable and then in brackets, just put minus one and it'll get you the last character in the string you could actually take the string variable and then in brackets just put minus one and it'll get you the last character of the string right like there's there's no call that you have to remember you can just get the index of it and it's those types of features that are just really cool to me like when i actually had to go find this because i think i was looking for a trailing slash or something. Just minus one, boom, done. So, yeah, just simple little features like that are the reason why Python is so much
Starting point is 02:15:32 fun to work in. So that was mine. Do I go here? Yeah, sure. All right. So, yeah, Python listen dictionaries are my favorite things about language. So I just thought of my tip. So, you know, I've been doing some Twitch streaming.
Starting point is 02:15:50 I've been talking about it a few times. Put it on the calendar and stuff like that. Well, guess who else has been streaming? That's right, folks. You can go to this alpha. Because I think Alan mentioned it. He did already. So if you go to twitch.tv slash Alan underscore coding blocks. Oh, look at me.
Starting point is 02:16:11 Yeah, I was on there for all of a few minutes. That's right. Well, hey, more to come. You can go hit that follow button and whatever he is on, it'll send you that notification. And we've got that Outlaw underscore coding blocks. And you should go follow them and encourage them to raid me when they're done
Starting point is 02:16:28 so they're much more entertaining than I am but I need that raid you know what I'm saying I need that raid money I think we've already discovered like from the last episode that I won't do raids anymore because it totally messed me up it turned out it wasn't what I thought it was going to be
Starting point is 02:16:44 yeah we had some issues It totally messed me up. It turned out it wasn't what I thought it was going to be. Yeah, we had some issues. I also left my camera on for a couple hours while I went and got food one night. It was sharing my desktop, too. It just happened to be kind of like a weird article that I had clicked from Hackenews and just left up for hours. This person who died. So, yeah, awkward. Yeah. But yeah, Alan underscore coding box. Ella underscore died. So, yeah, awkward. Yeah. But yeah, Alan underscore coding box,
Starting point is 02:17:07 LL underscore coding box, all sorts of goodness. Cool. All right. So, I can't remember. There was somebody, I'll find it, and I'll include it in the show notes. There was somebody that hit me up with a tip of the week where the, um, the premise was that there was a package that you could add into get so that you could do a, um, like a get
Starting point is 02:17:36 and then type in cheat sheet and it would automatically boom, show you all the stuff. And I thought, well, that was pretty cool. But what I super liked was that if you work and play in a Google Cloud platform type of world, the G Cloud command has that built into it. So you can type in G Cloud space cheat dash sheet, and it will, boom, spit out a cheat sheet of information for you like hey this is how you could do this for example or how you could do that for example um it was a little bit the output was a little bit more verbose than the get one uh but you know still neat that like right there from the command line you can uh get a cheat sheet of information. So, and I apologize that I can't find the,
Starting point is 02:18:29 who gave me the get tip idea, but I will be sure to include that in the, in the show notes. Very cool. So, yeah. All right. Well,
Starting point is 02:18:39 you know, we hope you've enjoyed this, you know, episode of like why you should probably stay away from Python. And oh, wait, no, I'm sorry. Why Python is popular. And subscribe to us in case somebody like just, you know, passed you a link or whatever. You can subscribe to us.
Starting point is 02:18:58 You can find us on every podcast platform that has ever been invented or ever will be invented. But just in case if you found one that we're not on, let us know. And yeah, you know, Alan has updated this helpful link. So you could go to www.codingblocks.net slash review and leave us a review. We greatly appreciate it. You know, it really does mean a lot to us every time we read those reviews. And we've had some where people will send us reviews via email or on Slack or whatever. And like, it just really means a lot to us when we hear the ways that, you know, we have helped others in their careers, you know, in whatever small ways we, that we might've helped by listening to this rambling you know, it really means a lot to us to hear that.
Starting point is 02:19:53 Yeah, that's excellent. And while you're up there at coding blocks.net, if you haven't looked before, we have amazing show notes. We do have some examples, discussions, all kinds of things. And if you are looking for somewhere to send some feedback or you have some questions, we do have an amazing Slack community. If you're not a member of it,
Starting point is 02:20:14 you can go to coding blocks.net slash Slack and sign yourself up and be in there with, you know, many, many, many like-minded individuals. And I was just in the Python chat. I figured what I should have done ahead of time
Starting point is 02:20:30 is gone and tried out my arguments there and had them beat me up. So I would be prepared for Outlaw beating me down over virtual env. Make sure to follow us on Twitter, at CodingBlast, or head over to CodingBlast.net and find all our social links at the top of the page.

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