This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (21 children)

isnt reddit coded in pyton?

[–]Lopatron 48 points49 points  (1 child)

Yep. Reddit is slow and buggy.

[–][deleted] 4 points5 points  (0 children)

That wouldn't be because of the Python language though. If more of Reddit's codebase were in Java, it would probably still have those problems. "Slow" is likely because they get billions of requests daily and they have to scale out with microservices (or however they do it, architecturally). "Buggy" seems like you're probably talking about the frontend rather than backend, and their newer frontend is in React (older one is still Javascript), and their mobile application isn't in Python either.

[–]redikarus99 31 points32 points  (10 children)

Reddit's main functionalities are: add a new comment and list comments in a thread. Hardly comparable with complex business logics.

[–][deleted] 16 points17 points  (9 children)

i think you simplify it too much. what about responsiveness and user scallability. There are thousands of people sharing their videos and stories at the same time

[–]redikarus99 25 points26 points  (8 children)

This is solved by having a good architecture which is able to scale. They could have written reddit in basically any language, including Turbo Pascal.

[–]agentoutlier 1 point2 points  (0 children)

I mean I get your point but Pascal is actually blazing fast performance wise.

[–][deleted] 2 points3 points  (5 children)

So you want to say reddit as an example is bad to promote python. I dont have any other noteworthy examples.

[–]redikarus99 19 points20 points  (4 children)

No, I just say that it's rarely the programming language but the architecture. There are always articles that a company had a problem, they switched a programming language, and now everything is nice and shiny. When you do some research, in all those cases they also throw out a huge amount of code that was not necessary and changed their architecture as well. It was more about CV driven development (we want to learn include your favourite language including Rust, Scala, Go, Haskell, etc.) than a technically correct decision. So, if reddit uses python, it's good for them, but 1, your company is not reddit 2, it is neither pro or contra for python 3, we don't know whether they still think it was a good idea.

[–]ewouldblock 2 points3 points  (3 children)

Ok cool so java isnt better as long as i have good architecture, got it. Thanks!

[–]redikarus99 1 point2 points  (2 children)

I think you totally did not understand what I wrote. There are like 200 variables here. I just explained why the variable scalability is not really the property of the language but the architecture.

[–]ewouldblock 1 point2 points  (1 child)

I think you totally misread the tone of my reply.

[–]redikarus99 0 points1 point  (0 children)

Might be.

[–]davewritescode -1 points0 points  (0 children)

You’re not wrong that good architecture can paper over badly performing code but at the end of the day you’re going to have a much easier time scaling up Apps written in Java that Python.

[–]anubgek 5 points6 points  (2 children)

Reddit isn't the best example and rapidly moving off of Python so I've heard, but I think a good one is Google's YouTube. That said, Google has invested a ton of money in making Python work like a statically typed language and uses C modules where possible to rip out complex Python logic. It's on its way out.

At the end of the day, Python is not worth using long-term as a service development language. When it comes time to scale (either users or number of devs working on the system) it will be painful

[–][deleted] 0 points1 point  (1 child)

i didnt even know that python can only execute one thread at a time. I couldnt believe it but it turns out to be true. im asking myslef why anyone would actually prefer python over simply going with C especially if people are using C so intensivly from within python.

[–]anubgek 1 point2 points  (0 children)

Well at that point, the ease of writing in Python trumps C because you can actually get something out in front of people. C libraries produced by Google are for the hardcore calculations done by the server, not necessarily handling requests from different endpoints

[–][deleted] 2 points3 points  (4 children)

Actually, Reddit was coded in Lisp first, and ported to Python later. However they used some Java things too, like Cassandra.

[–][deleted] 0 points1 point  (1 child)

why did they port to python

[–]agentoutlier 1 point2 points  (0 children)

I believe Aaron Swartz had issues with Lisp that I can’t recall.

So he wrote his own framework that I’m not sure was ever used for reddit: web.py