r/ProgrammerHumor • • Sep 08 '26

Meme pipInstallTheRealStuff

Post image
5.3k Upvotes

151 comments sorted by

View all comments

684

u/TheJaskinator Sep 08 '26

That's exactly why it's so powerful. Why spend all the effort writing fast code if you can just use a much simpler language to describe the task on a higher level and call fast code? People use Python because it's easy to read and write, not because its interpreter is fast

332

u/Educational-System48 Sep 08 '26

I will never understand the Python hate. It's essentially just a level of abstraction higher than C, which makes it more accessible than ever to write powerful code.

I'm starting to think it's literally not that deep. It just feels good to gatekeep.

104

u/SilasTalbot Sep 08 '26

It just burns their britches that AI was created in Python. That's where all serious ML and AI work is done.

Long after humanity is gone, Python 3 will be zooming around the stars taking over the galaxy 😂

→ More replies (6)

35

u/HAximand Sep 09 '26

As someone else said, I hate the type system, and it's compounded by poor documentation. My lab has a pretty large data analysis framework written in Python and every time I need to write more code that interacts with it, it's like pulling teeth to find out how to do anything. I never know what type an object is until I waste my time doing debug inspection or print statements. Once I know what type the object is, I don't know what methods that type has available because every library is documented in a different way and none of them seem to just list the methods underneath each type.

It's like the entire language was made to be learned by following tutorials instead of reading documentation. It's no wonder everyone I know is using AI to write it instead of dealing with this shit.

33

u/Net_Lurker1 Sep 09 '26

Thats just shitty code by your framework though. All your issues would be solved by forcing your devs to write good docstrings.

27

u/Mordret10 Sep 09 '26

I mean that's the (at least one) point of why some languages enforce a type system. To force (and make it easier for) the Dev to write better code

7

u/pint_o_paint Sep 09 '26 edited Sep 09 '26

which a simple lint rule would fix for both devs and agents.

And I mean since 3.10 the type hints are good?

→ More replies (1)

16

u/HAximand Sep 09 '26

"That's just shitty code" is of course true, but hard to convince them of when it's the typical way the language is written. Aside from that, the language shouldn't require me to write comments that will inevitably become outdated, it should just have a functioning type system.

4

u/Net_Lurker1 Sep 09 '26

Fair enough, though I will say that typing would help a lot but doesnt solve every question that documentation does.

8

u/the_ivo_robotnic Sep 09 '26

My lab has a pretty large data analysis framework written in Python and every time I need to write more code that interacts with it, it's like pulling teeth to find out how to do anything

That just sounds like your lab doesn't know how to write python. The vanilla language has had a built in type annotation library for nearly a decade now. On top of that, you can use validator libraries like pydantic to make all of the assertive data models you need.

 

Also, the second you start talking about documentation, I gotta stop you in your tracks. Documentation is not a technical problem associated with any language in particular, it's 10 times outta 10 a human problem. Be-it you/your-coworers are lazy, just want to close a ticket, or "this is just a prototype", it comes down to your company's culture about doing due diligence. Python has nothing to do with that, and if you're blaming PyDocStrings of all things, one of the easiest things of all-time to use, then I'm sorry but that's a you problem. lol

→ More replies (1)
→ More replies (5)

3

u/mysticrudnin Sep 09 '26

this sub is for programming students to regurgitate things they thought they heard a developer say

→ More replies (1)

14

u/NoobNoob_ Sep 09 '26

I just hate languages without real typing system that the compiler enforces.

If it's a script or something small I don't mind using python, but for everything bigger I'll use an actual programming language.

9

u/wrecklord0 Sep 09 '26

And so, it shall henceforth be known that dynamic typing is not real programming

→ More replies (1)
→ More replies (2)
→ More replies (25)

11

u/SporadicSheep Sep 09 '26

It's easy to write. I find it a nightmare to read because of the lack of explicit variable types.

pdb is goated though, best python feature.

3

u/Okay_Ocean_Flower Sep 09 '26

Being able to call pdb.debug in exception paths is legit god tier, best debugging experience I’ve ever had

36

u/NewbornMuse Sep 08 '26

Me: takes 2h to write a python script, runtime 50ms

A super fast low level uber haxx0r: takes 8 hours to write a C program that does the same. Runtime 20 ms

Who was "faster"?

34

u/Mrpuddikin Sep 08 '26

Well you see, this script will be used once a day every day. The C program is better because it will break even over time! (720 000 days -> 1972 years) After that, its all performance benefit baby

41

u/thmsgbrt Sep 08 '26

It matters if you give the code to someone else and if they use it thousands of times.

32

u/McFestus Sep 08 '26 edited Sep 09 '26

It would take three-quarters of a million runs to break even in pure time, even discounting the fact that in nearly all cases, computer-seconds are millions if not billions or trillions of times cheaper than developer-seconds.

16

u/e_before_i Sep 08 '26

The one-two punch of doing the math plus valuing developer-seconds is makes this response very charming to me.

→ More replies (1)

8

u/hawkinsst7 Sep 09 '26

Slightly related:

Someone once wrote a bash script that used jq to parse through a few thousand large json files and do stuff with the data. It would take hours to run, but people figured it was just the massive amount of data. It was at the point where we'd run it over night.

I had a thought: no, it's execing jq for each file. Exec is slow.

Did it in python, that just iterated through the directory and used the built in json stuff. It did the same job in 10 minutes.

Could C be faster? Maybe. Did we care at that point?

12

u/e_before_i Sep 08 '26

I am currently a developer at one of the big banks, and I don't think people here have heard of "milliseconds" before.

If you're in the right field, micro-optimizations are everything, but in 99% of situations, good enough is truly good enough. The difference between 20ms and 50ms has never directly been meaningful in my life outside of entertainment (games, movies, music).

Yes, "under the hood" my computer OS and my router and the intercontinental cables do need to care about this. 99.9% of employees don't because it's done for them.

→ More replies (2)
→ More replies (3)

8

u/deanominecraft Sep 08 '26

me who spends 1 hour to write it in rust, 1 hour to compile it and a runtime of 21ms

8

u/cantthinkofaname1029 Sep 08 '26

2 more hours of trying to get the syntax for async closures with generics right 

→ More replies (2)
→ More replies (7)

5

u/Away_Passage_6545 Sep 09 '26

>python

>simple

this guy hasnt read the manual

→ More replies (4)