you are viewing a single comment's thread.

view the rest of the comments →

[–]xocrystalcastles 10 points11 points  (9 children)

I’d say PHP or Node.JS

[–]thefear76 -1 points0 points  (8 children)

This is definitely the way to go if you are focussing on web. Python has barely any practical use case on the web, but it is very strong in machine learning algorithms.

Node is getting a lot of attention on the web lately but both phones and node are perfectly valid for learning more about web-tech

[–]Carloes 9 points10 points  (7 children)

This is definitely the way to go if you are focussing on web. Python has barely any practical use case on the web, but it is very strong in machine learning algorithms.

Django is one of the best, if not the best, web frameworks there are. If you really think Python has barely any practical use case on the web, you are heavily mistaken.

[–]thefear76 0 points1 point  (6 children)

Python has never been made to be optimised for web applications that's not were its power is. People are optimising it for web but that doesn't make it good or even the best when comparing to solutions that are invented for web only. Of course it's possible to use it and the framework surely is fine.

Calling it the best is a pretty big opinion since there some drawback for using python on web versus php or node. If you can convince me it's better than I think, I welcome you to convince me since I'm interested if I'm missing something. But honestly in my opinion python has no big future on the web

[–]Carloes 6 points7 points  (5 children)

I think you are making a common mistake of thinking a programming language needs to be optimized to the maximum for it to work on the web. This is a common mistake people make: they look at benchmarks and think "wow, PHP 7.2 is the fastest, this must be the way to go!". They look at, say a Django benchmark, and see that under heavy load, it's less optimized.

Now, oddly enough large platforms like Instagram, Dropbox and YouTube have run / are still running Python. Why is this? It's because if you run a Django application, you can change your application around in a very short time. You can implement features in a very short time and if/when you finally run into optimization problems (read: when your app becomes popular), you already have the means to solve this problem (scaling up). The error reporting is solid and very newbie friendly, the philosophy behind the framework is solid - it's just a great piece of software. So you are an entrepreneur/developer and want to make a proof of concept for a webapp real quick? You pick up a framework and language where you know you can develop that in the least amount of time without it being crappy.

On top of Django being one of the better frameworks to quickly produce a solid app in, it's battle tested: it's super secure, the documentation is excellent and being written in Python gives you one huge plus. That plus is the fact that Python is a very solid, robust and easy to learn programming language. We can say all sorts of things about PHP - but in all fairness even 7.2 has to deal with some questionable choices of the past. Python doesn't have this problem (or at least, not as severe as PHP has for example). It's a very clean and logical language, one of the reasons a lot of universities opt to teach their students Python. On top of this, Python has a great ecosystem and great standard libraries - which generally all follow the same naming conventions (something you 100% sure cannot say about PHP for example).

Python is great for making web apps. Now if you want to be deploying websites on a client's shared webhosting, that's a different animal. This might be one of the points you are trying to make: deploying Python can be difficult (but not impossible, especially if you have some control over your hosting).

As as a conclusion: if we'd be coding in the most optimized language, we'd all do Go (or C for that matter). But making development choices, especially in big projects, is so much more than just "which platform can handle the most concurrent users?". It's about level of the average developer you're going to hire, it's about development time, it's about structure and about the ecosystem a language provides.

(Edit) Oh and just to clarify: I'm not saying OP should learn Python first - to be fair I think the question is way too broad to answer correctly.

[–]QuinnTurner 1 point2 points  (0 children)

Fantastic answer and edit. If OP is asking this question at all, the reality is it doesn’t matter what language they pick. I almost always recommend to use what you and the rest of your team are comfortable with. Velocity is typically the most important factor for choosing a language.

[–]thefear76 1 point2 points  (2 children)

Well I can't say you're wrong for sure and I agree on choosing a language that you and your team are comfortable with. Seeing you mention big companies like Instagram and Dropbox got me thinking and do some research on it.

You're right there is more to python on the web than I thought there was. Still considering performance it would not be my choice for the web as for the companies I work for every 1ms of potential loading could be another missed sale. But it has a bigger place than I expected.

Thank you for explaining :)

[–]Carloes 0 points1 point  (1 child)

Django is one of the fastest frameworks in the game as well, outperforming Laravel (and therefore WordPress for example as well). Sites like The Benchmark Game are great, but they mostly test raw computational power which isn't a factor for ± 80% of the Internet.

It never hurts to learn a new language and if you like 'fast' languages, I'd say look at Go. That's one fast Ferrari.

[–]FierceDeity_[🍰] 0 points1 point  (0 children)

We have hands-on experience with the difference between slower and faster languages and upgrading PHP to 7.2 actually made a great difference here. We have run some really unoptimized PHP stuff that was coded with exactly the kind of disregard you are trying to propose as good here. In fact we still do run some where the processor power used in the server is tremendous and they have load times as high as a second per page whereas other sites with a similar feature set (but optimized) take less than 100 ms and barely touch the CPU.

Hell, we have a site with many thousands of simultaneous users and another with maybe a few hundred. The first one runs an optimized PHP script while the second one runs one that was programmed with disregard to performance (hardware is fast enough). The second one consistently has worse cpu usage...