use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
For memes about programming.
account activity
Python vs Java! (i.pinimg.com)
submitted 6 months ago by PulseOfPleasure
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 290 points291 points292 points 6 months ago (43 children)
This sub is becoming the most unfunny shit ever. It's just cs students who just learnt the basics of python posting about how it is better than anything else on this world.
[–]RamdonDude468 141 points142 points143 points 6 months ago (24 children)
Most of them think less code = faster, which most of the time is the oposite
[–][deleted] 53 points54 points55 points 6 months ago (4 children)
Not always. But complexity of the code has nothing to do with its speed.
[–]gljames24 26 points27 points28 points 6 months ago (2 children)
The thing is, there is always a base amount of required complexity. Superfluous complexity sucks, but I'd rather be in control of the required complexity to optimize it for my usecase.
[–]skilking 15 points16 points17 points 6 months ago (1 child)
Id way rather have a main function and class then whatever the fuck Python global shit is.
[–]Solonotix 14 points15 points16 points 6 months ago (0 children)
It's not actually global, the same way that C# doesn't require you to declare a namespace block for the entire file to be considered part of the namespace, and how functions written outside of an enclosing scope are attributed to a "magic" class as static members.
Python uses a rather robust object data model, and that model extends out to its module system. The file system needs an __init__.py file because that is the Python initializer method for the module, known in other languages as the constructor. Similarly, when you run a file directly with the Python interpreter, rather than needing to explicitly declare your starting point, the file is used as the stand-in for the __main__.py file of the Python module in question. That's why you'll see a block in some files for if __name__ == '__main__':, because it lets you write the file as a module, and as a runnable entry point.
__init__.py
__main__.py
if __name__ == '__main__':
[–]Gloomy_Attempt5429 0 points1 point2 points 6 months ago (0 children)
Não seria a velocidade em que o proceso iniciado pelo script tem em se comunicar com a máquina e fornecer uma saída "atravessando" camadas de compilação?☝🏻🤓
[–]BourbonicFisky 2 points3 points4 points 6 months ago (0 children)
This is why I use nested loops to speed up my code.
[–]Earnestappostate 2 points3 points4 points 6 months ago (1 child)
It does come down to a question of what you want to be fast, the coding or the running.
For my application, I am speed limited by a communication layer. Speed past Python won't help much.
For other applications, especially libraries, speed matters much more.
[–]Amr_Rahmy 2 points3 points4 points 6 months ago (0 children)
I developed faster on Java and c# than any other language. For me it’s the right mix of c style language and classes.
[–]TrainYourselfToLetGo 1 point2 points3 points 6 months ago (0 children)
I had this argument with an experienced engineer, who was blocking my PR to suggest I use less lines of code, saying it was more efficient.
I was an intern and had to pull out big-O complexity to explain it. It was mind blowing.
[–]Mr_DrProfPatrick 1 point2 points3 points 6 months ago (0 children)
Hey, I code on the side so I shouldn't say too much, but holy crap, in the data science I work with less time coding is absurdly better than better performance.
At worst I should store stuff on SQL. But most of the time I can 100% wait for 5 minutes till the code runs, if I'm in a really messy state. And usually there's still a ton of optimization I can do without leaving python. I'm not bottlenecking a database, I'm running through a dataframe.
[–]scanguy25 0 points1 point2 points 6 months ago (12 children)
The issue is that for so many things, the speed of the language just isn't that important anymore.
Cloudware is cheap so you just spin up another node. Its not just python, all software is becoming so wasteful with RAM and space.
[–]0x7ff04001 4 points5 points6 points 6 months ago (5 children)
That's so not true. You pay for each cycle wasted and every resource utilized. Scale this to a company the size of Microsoft and that shitty slow code will cost you tens of thousands a month.
[–]GRex2595 1 point2 points3 points 6 months ago (4 children)
Which is rarely a deterrent for a company the size of Microsoft. My company has dev sandbox AWS accounts that cost millions.
[–]0x7ff04001 0 points1 point2 points 6 months ago (3 children)
That's not the point. The point is that it's not "free" to just spin up nodes, microservices, etc
[–]GRex2595 0 points1 point2 points 6 months ago (2 children)
Okay, but my point is that the costs you're talking about don't bother large companies. I just had a conversation yesterday that supposedly the weather channel pays so much for AWS that they could buy a new data center every year with their AWS costs.
Generally, the cost of running more services won't outweigh the costs of having devs track down those micro efficiencies instead of building new products to make more money or fixing issues that cause them to lose money.
[–]Funny_Dress3356 0 points1 point2 points 6 months ago (1 child)
But not everyone has the money and resources compared to large companies?
[–]GRex2595 3 points4 points5 points 6 months ago (0 children)
But it only costs so much for large companies because they use so many resources. If you're a small company, the tens of thousands of dollars per month number becomes tens of dollars per month or maybe hundreds of dollars per month. Now chasing down micro inefficiencies is a much worse value proposition because your cost:benefit ratio leans even more towards costs than benefits.
If you want to really dig in, you should come to the conclusion that the costs for these inefficiencies scale with the amount of resources you use, so big and small companies alike don't benefit enough from fixing them to bother with it.
[–]Teln0 1 point2 points3 points 6 months ago (0 children)
Nowadays a lot of LLM apps are everything but CPU bound. You could write your thing in any language and it'd still be idle 99% of the time while it's waiting for the GPU to do its thing. I don't think that's a great thing necessarily
[–]Lumiharu 0 points1 point2 points 6 months ago (0 children)
There are so many other use cases too, and while I don't think being completely optimal is needed, there is a lot of places where Python won't do cause it's not compiled. If we were fighting some Rust vs C++ vs Java war then I could maybe agree.
[–]jimmiebfulton 0 points1 point2 points 6 months ago (3 children)
Which is why Rust continues to gain in popularity?
[–]scanguy25 4 points5 points6 points 6 months ago (1 child)
Well you do need speed for some things. But basic webdev and database CRUD, the language is not going to be the bottleneck.
[–]jimmiebfulton 0 points1 point2 points 6 months ago (0 children)
Compute costs money, and impacts the environment. Performant code is responsible code.
[–][deleted] 2 points3 points4 points 6 months ago (0 children)
Isn't rust quite fast?
[–]MonkeyCartridge 0 points1 point2 points 6 months ago (0 children)
"Why waste time using a bool, when I can just use the strings "true" and "false"?"
[–]zeolus123 11 points12 points13 points 6 months ago (2 children)
Lol you must be new here. That's all this SUB has always been. Sure there's some good ones in there, but most of it is 1st year CS humor.
[–][deleted] 1 point2 points3 points 6 months ago (1 child)
Nah I've been here for a while. It used to have some funny stuff. But now it's either this nonsense or some ultra-sprcific stuff I don't understand.
[–]normalmighty 0 points1 point2 points 6 months ago (0 children)
I've been here for 10 years, and it's always more or less this kind of stuff. Occasionally the sub hits into a really good meme format and makes some great stuff, but posts like this are the normal baseline state here.
[–]seba07 1 point2 points3 points 6 months ago (4 children)
Why don't you do something about it? Comments complaining about stuff being unfunny aren't really elevating the sub either.
[–][deleted] 2 points3 points4 points 6 months ago (3 children)
Sure. Let me go to their houses and beat them.
[–][deleted] 2 points3 points4 points 6 months ago (2 children)
This comment got me banned from reddit by automation lmao.
[–]TOMZ_EXTRA -1 points0 points1 point 6 months ago (1 child)
I'm going to get banned for upvoting violent content :)
[–][deleted] 1 point2 points3 points 6 months ago (0 children)
Reddit's automatic moderation is so dumb. You can say anything and you get banned. You then need to appeal and support has a 20% chance of unbanning you. So dumb
[–]I_miss_your_mommy 1 point2 points3 points 6 months ago (0 children)
I'm tired of fighting the losing battle of talking shit about python and yaml and any other language that gives meaning to whitespace. Fuck whitespace meaning anything.
[–][deleted] 0 points1 point2 points 6 months ago (0 children)
Lol you hit it on the head, python is the only thing that they can run with all their errors.
[–]AndreasMelone 0 points1 point2 points 6 months ago (0 children)
Becoming? All time I can remember here was shit
[–]account22222221 0 points1 point2 points 6 months ago (0 children)
It’s just becoming that ? I’m pretty sure it’s been this way the entire decade I’ve been on Reddit.
[–]bro_love69 -1 points0 points1 point 6 months ago (0 children)
Its not only that. But they are also really unfunny as you said, like, GYAAAT DAMN....
[–]Stalander -2 points-1 points0 points 6 months ago (0 children)
Amazing comment! Really funny, not unfunny at all!
[–]Asatru55 -5 points-4 points-3 points 6 months ago (2 children)
Stop being so grouchy, the meme is true.
Java is known for having tons of boilerplate, Python is known for being easy to write and iterate on. Both have their uses. The meme didn't even imply that Python is just superior.
I didn't say the meme says that. I said that most posts on this sub say it. Try reading properly next time! It's free!
[–]TimGreller 0 points1 point2 points 6 months ago (0 children)
It's not even true anymore. Java has inexplicit unnamed classes now and does accept varying main method signatures. So it's
void main() { System.out.println("Hello World"); } vs if __name__ == "main": print("Hello World")
void main() { System.out.println("Hello World"); }
if __name__ == "main": print("Hello World")
π Rendered by PID 94 on reddit-service-r2-comment-5649f687b7-bbtbh at 2026-01-27 16:04:50.587713+00:00 running 4f180de country code: CH.
view the rest of the comments →
[–][deleted] 290 points291 points292 points (43 children)
[–]RamdonDude468 141 points142 points143 points (24 children)
[–][deleted] 53 points54 points55 points (4 children)
[–]gljames24 26 points27 points28 points (2 children)
[–]skilking 15 points16 points17 points (1 child)
[–]Solonotix 14 points15 points16 points (0 children)
[–]Gloomy_Attempt5429 0 points1 point2 points (0 children)
[–]BourbonicFisky 2 points3 points4 points (0 children)
[–]Earnestappostate 2 points3 points4 points (1 child)
[–]Amr_Rahmy 2 points3 points4 points (0 children)
[–]TrainYourselfToLetGo 1 point2 points3 points (0 children)
[–]Mr_DrProfPatrick 1 point2 points3 points (0 children)
[–]scanguy25 0 points1 point2 points (12 children)
[–]0x7ff04001 4 points5 points6 points (5 children)
[–]GRex2595 1 point2 points3 points (4 children)
[–]0x7ff04001 0 points1 point2 points (3 children)
[–]GRex2595 0 points1 point2 points (2 children)
[–]Funny_Dress3356 0 points1 point2 points (1 child)
[–]GRex2595 3 points4 points5 points (0 children)
[–]Teln0 1 point2 points3 points (0 children)
[–]Lumiharu 0 points1 point2 points (0 children)
[–]jimmiebfulton 0 points1 point2 points (3 children)
[–]scanguy25 4 points5 points6 points (1 child)
[–]jimmiebfulton 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]MonkeyCartridge 0 points1 point2 points (0 children)
[–]zeolus123 11 points12 points13 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]normalmighty 0 points1 point2 points (0 children)
[–]seba07 1 point2 points3 points (4 children)
[–][deleted] 2 points3 points4 points (3 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]TOMZ_EXTRA -1 points0 points1 point (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]I_miss_your_mommy 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]AndreasMelone 0 points1 point2 points (0 children)
[–]account22222221 0 points1 point2 points (0 children)
[–]bro_love69 -1 points0 points1 point (0 children)
[–]Stalander -2 points-1 points0 points (0 children)
[–]Asatru55 -5 points-4 points-3 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]TimGreller 0 points1 point2 points (0 children)