Python Sucks And I LOVE It | Prime Reacts

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
python sucks and why is it recently I was contracted to work on a Discord bot written in Python I'm no pythonista but I partake in some Kool-Aid now and then I know I've told this story a few times but the greatest and easiest way to get karma or whatever the stack Overflow points are called is to literally just ask pythony's the questions honestly it's so good python pythoners pythonistas love it what is more pythonic what is more pythonic a python just so I can ask more questions on stack Overflow but I python both have a lot of features like subpar performance lack of static diving forced indentation and random satantae you can't start you can't start an article like that okay uh you can't peek in an article sentence two okay there's no way the rest of this there's no way the rest of this is gonna be as good these features would normally push me to a more respectable language but this time I did not have a choice python is slow python is slow incredibly it is 195 times slower than C plus plus by some metrics performance wise it lags behind the herd falling below all of the most commonly used languages and being one upped by every new project Julia Mojo Nim etc etc we have python is an interpreted language that is also single threaded by Design the code must be compiled into a platform Independent by code while running by code is like machine code but instead of being executed by the CPU it is executed by The Interpreter once the code is compiled then The Interpreter reads this bytecode uh to translate into machine code nice does python I thought does python must have a jit right actually pythons don't travel and hurt it has a jit doesn't it yeah there's also see it I mean what a great play but this is like also how this is how any of your favorite Dynamic languages work okay you just remember typescript is fake okay for anyone making fun of python you're probably using typescript which gives you the illusion of types on top of a language that doesn't have types okay well not static types I mean there's still types they're still clearly types in the language and they know what the types are they're just not going to tell you what the types are JavaScript types are a lot like taxes in America the government knows but the government expects you to know it also okay that's how it goes and if you don't know it guess what happens you're in trouble okay you better get it correct what are the numerous reasons why python is slow is because of its design since Python compiles and interprets code at runtime it will always be slower than any binary application made in C plus pretty much long as you have a effectively equivalent algorithms I don't believe python was ever meant to be a performance-based language but many problems uh projects attempt to fix python in this regard fair projects like python uh circumvent the language entirely by allowing C constructs to be sprinkled into your python this super set of python composer code to see to increase performance although cython is very interesting project and a feed of engineering it cannot be used to fully replace python Fair uh a somewhat logical conclusion from the analysis of Python's performance is that python sucks yeah after all if something is slow why would you ever want to use it I mean C plus plus is 190 times 195 times faster seems like C plus plus would be the obvious choice it makes no sense to code in the language that produces slow products I think I see where they're about to go with this python is fast while python both of these features I mentioned earlier it's extremely fast in one Regard in fact it's 75 faster than C plus plus when you compare the time needed to develop a solution to a problem where did you get this number okay there's no way I believe any of this okay because first off Pearl is winning okay there's no Universe in which Pearl wins second off there's no universe that I even know what TCL or Rex is lastly there's no way that lisp is on this list because lisp is clearly used to tell other people that you program and list but there's no way okay there's no way this this ain't it this ain't it there's no way I don't believe it I don't believe it uh although Python scripts may not run as quickly as those written in other language they can be developed much more quickly this bar graph displaced the median hours of code needed to create this uh a string processing program taken from this paper I also believe that this this graph was probably created in Python fair this graph was also probably created in Python um you know do I do I feel like maybe there's a little bit of uh you know bias in this graph maybe Tom's a genius absolutely Tom's a genius he does not he writes in Pearl uh my experience I I always take I was tasked with creating a Discord bot entirely in Python I expected that this was going to be slow a bit of a bummer as my most recent project was an interpreter in Rust and I was all about performance code designed in a sexy language rust y [Laughter] oh sorry I uh I won't do that again Karen I understand I get it I can see why you thought that was a negative okay I just really got into it it's just oh gosh it's happening again [Music] my python development experience was limited to a few scripts and some competitive uh programming and the thought of more python failed to excite nevertheless I trudged onward this project soon turned into an eye-opening Journey something that normally would have taken 30 plus minutes in Rust fighting with the borrow Checker I'm still somewhat new and grappling with lifetimes only took me 15 minutes development speed was incredibly faster in Python this project became exhilarating and I found a new love for programming I was able to ship the product extremely fast including time for testing I completed the project so quickly that the client was impressed and gave me a generous bonus it's actually a pretty cool story in the sense that there is something to be said about coming into a new language and being almost immediately productive with it do you know what I mean there is something to be said about that no matter what you feel about python being able to solve something immediately in a language that you don't know is it is a very rewarding feeling uh clients don't give bonuses a clearly fake article maybe uh but like the same thing with Go Go's another one of these things where you can jump into a go program as long as it's not gorilla websockets that only use a single variable names for everything and is completely confusing but long as you don't use that like go is also another one of these languages where you can just jump in and you can do something pretty quick I like that my Discord bot was built in Python was probably slower than anything I could have built in Rust rust has a ton of amazing language features that I could talk about for days and performs on par with C plus so uh did I create a slow product that was doomed to fail no to be frank you cannot notice uh you cannot notice that it is slow I was I was able to build a fully working product in a speedy fashion I loved doing it and the customer loved the product to me this is a w this is the truest W of all programming except for of course the the actual true SW which is to be able to tell people what language you program your projects in but second to that a second lesser-known fact almost equivalent to the Sicilians is love it and have the person who paid you to love it right if you could do those two things you really are a winner okay that's how you're gonna get money uh something like rust wasn't necessary for this use case this kind of project shined a new light on python for me as well as other languages like a go I've heard about Go's ability to ship fast from milky Dev let's go milky the Milkman himself is just making random appearances I love to see this but I never realized why that could be let's see why oh my goodness I but I never realized why that could possibly matter after all I can develop and rust fast enough and when I finish the rust project it'll probably be more performant than the go or python project the Milkman keeps winning he does I was completely blind to the experience of developing in a language that is designed to ship fast this experience has changed my perspective on programming languages and I hope it will change yours too okay so I'm gonna make a really really really really really really hot take I've been thinking about this a lot I think typescript was a mistake I'm even gonna tweet that tweet that right now now let me defend my reason why let me defend my reason why is that with python as you develop python there comes a point in a project where you go this is really hard for me to understand the types everything I'm kind of falling apart maybe a different language should have been chosen now the same effectively happens with JavaScript like you wouldn't build an entire tool or all those things in just JavaScript because eventually not having type definitions and all that it really should just limit the size of the program it really puts a great scope on the program this is what you do it for and this is why you do it it's like this nice scripting language that actually that that is uh good but by adding typescript to it you can now Enterprise it which means that you can now write bigger and larger programs and now you can build all the programs you've ever wanted perhaps in a language that's not good for building those programs and maybe Python's online has Type annotations now you can kind of wrinkle them in here and there but I'm sitting there thinking maybe just maybe it was a mistake this entire time and I had no idea and it was sitting right in front of me I just had this thought right now I know it's because this article this article made me rethink about maybe I have gone wrong maybe just maybe I have gone the wrong way agree with dhh damn it no I retract my statement it makes me potential I know too many developers who are stuck in their ways and refuse to learn or use new languages because they are slow or bad yeah I hate that I hate you shouldn't refuse to use something for that reason I always say that python is fantastic at creating graphs and csvs and it should be definitely used there um people that are trying to make other languages work with uh ml are kind of crazy because clearly all the ml parts are all in C they're all super fast all the not sucky Parts the parts that you don't want to do anyways in another language they're all in Python it's fantastic uh using performance metrics to measure the success of a language is an arbitrary characteristic when deciding on smaller projects python is performant enough for most of the time projects like automation tools data analytics and more can be accomplished in Python and plus you can always see out anything you don't that is critical I do not think we should have developers thinking they are better than others because they program in harder language instead of a baby length okay first off no no remember that is Fact one you can't do this okay Fact one of programming is to be able to tell people that you program in a language okay this article is amazing started off on a high note and is really just emotionally bruising me if that were true the most uh Pious software Engineers would be using APL to develop their front-end Frameworks that is such a naive take and I challenge those individuals to deliver a fully functioning product in the same time frame as a python developer but you must admit the math on it is beautiful this is pure math of beauty and correctness okay can you argue with this can you argue that this is not the most beautiful code you've ever seen in your lifetime probably not okay probably not child in your little baby language python is not the best language for every project and I would not recommend using python for high performance applications or larger projects python strength lies in insufficiency during development rather than a few raw performance or rather than in raw performance I would say I like I actually like that take you're doing a small programming you need to get some done this is why I'm fine with also JavaScript or python like learn one Lucy Goose language and use it when you need to use it you know what I mean attempting to optimize python for Speed leads to disappointment wow and python is designed to be fast to develop in and excels in that regard this is really good thank you Cameron whoever you are Cameron this was very very nice okay this is very very nice uh GitHub LinkedIn email go for it uh I actually like this I like this I think this was a fair take I think this is a good take which is that python is filled with a bunch of crazy features but when it comes to something small something that's easy something that's well defined python could be a quick w we need to just get something done just get it done I think that we've all heard this exact same thing over and over again and so what about Pi threadlock what about threadlock but it's uh let's see but it's so much more fun to spend three days thinking about your type hierarchy than actually doing any work there is something that's really frustrating about I mean I love types I'm a guy that loves types it's the reason why I don't love Elixir is that I don't want to do Elixir because I like types I just like types I'm a type guy I will always be a type guy but I can see the benefit more and more in the sense that why you'd want to use Python for something fast the reason why I'm starting to become more of a python curious person over typescript is that typescript has all this benefits but typescript you can't just distribute typescript right like if you write a little typescript thing to do some do some like basic Transformations do like a little script and you want to give it to someone to go run it you have to be like okay but by the way you can you please make sure that you also have installed the TS no so that way you can run it on node and they're like what the hell's TS node and you're like okay just okay just use Deno right just use the other you know not node oh you don't know what tetto is so Deno is a runtime written in Rust have you heard about Russell's anyways rust is actually a statically typed high performance language that is both the systems language and really a general purpose like and then also the next thing you know you're talking about Python and no one knows what the hell you're talking about because that's just not how it works I'm not saying Python's great either okay because python you're like oh you just need this library and then that Library just just effs your entire system right both suck but I'm not sure which one sucks more I don't know I the name is Docker a again
Info
Channel: ThePrimeTime
Views: 267,205
Rating: undefined out of 5
Keywords: programming, computer, software, software engineer, software engineering, program, development, developing, developer, developers, web design, web developer, web development, programmer humor, humor, memes, software memes, engineer, engineering, Regex, regexs, regexes, netflix, vscode, vscode engineer, vscode plugins, Lenovo, customer service
Id: 8D7FZoQ-z20
Channel Id: undefined
Length: 15min 43sec (943 seconds)
Published: Wed Jul 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.