Hacker News new | ask | show | jobs
by throwaway2016a 3157 days ago
Earlier in my career we moved to Ruby over PHP because Ruby was "cool" and PHP was not. Now it is interesting to see them lumped in the same group. Incidentally, PHP has improved greatly because of the rivalry with Ruby because the competition inspired PHP and PHP Frameworks to step up their game in the early 2000s / 2010s.

Python's continued popularity surprises me. While I like Python and it is good for data science I don't understand why people use it for websites. The PHP and Ruby ecosystems are far more mature if you consider ease of use and if you are going for performance, Go and Java based frameworks are better. Even in the data world, I kind of like R over Python.

I'm also glad to see Javascript highly ranked. I was under the impression that Node.js in particular was going the way of PHP and Ruby. But personally I like working with Node.

Edit: I wonder how much of this is due to popularity too. PHP is insanely widely used. Which attracts more entry level coders than a language that is broadly used for specialty / high performance / niche languages.

6 comments

> Python's continued popularity surprises me. While I like Python and it is good for data science I don't understand why people use it for websites. The PHP and Ruby ecosystems are far more mature

My guess is a big part of it is Python’s “one right, preferably obvious way to do it” principle.

Rails does this “convention over configuration” thing which really means “anything could come from anywhere”. View not rendering? Literally anything could be going wrong anywhere in your stack. Some convention somewhere is tripping you up.

The “one right way” principle in Python mitigates this chaos. You can at least reason about what’s “pythony” when you’re thinking about it. It helps that the ecosystem is smaller too.

The Ruby community, and JavaScript to an even greater degree, are more focused on individual preferences, which vary greatly. So you have to wonder... is this a “modern”, transpiling, framework-thinking JavaScript developer, or a functional, small is beautiful, package-oriented one? Or something else entirely?

Python wins because they value consistency over the bleeding edge of architecture innovation. This is consequently also why they lose.

> Python wins because they value consistency over the bleeding edge of architecture innovation. This is consequently also why they lose.

That is an awesome quote about Python. I might borrow it. Thank you for that.

> While I like Python and it is good for data science I don't understand why people use it for websites.

This is the reason, actually. Python is NOT ONLY GOOD FOR WEBSITES.

In fact, the only thing that have stopped python for total global domination is to be poor for mobile apps.

Do not underestimate the power of make a "full stack development" with just one language.

> Do not underestimate the power of make a "full stack development" with just one language.

unfortunately we already have that language and to use it you need to transpile... It will always be Ryby/js, py/js, php/js until web assembly becomes a thing I guess.

And this explain why JS is "sucesfully".
> Python is NOT ONLY GOOD FOR WEBSITES.

PHP, Ruby, Node.js all have excellent tooling for making command line applications as well as websites. While none of them have focused much on having a GUI, projects do exist.

Ruby in particular is very widely used as a system automation language.

But not as strong as with python. And certainly PHP/Node is biased heavily for web-apps. Python is a bit more broad.
I thought Ruby is/was mostly known for the Rail framework.

I know that both Chef and Puppet are written in Ruby, but is there any particular reason why Ruby is better as configuration management/system automation language?

> Python's continued popularity surprises me. While I like Python and it is good for data science I don't understand why people use it for websites. The PHP and Ruby ecosystems are far more mature if you consider ease of use and if you are going for performance, Go and Java based frameworks are better. Even in the data world, I kind of like R over Python.

Python is very easy to use and often targeted towards non-programmers. You'll find a lot of tutorials online that don't require any previous knowledge of programming, different to other languages. At the same time, Python is popular with many full-time programmers which gives you the feeling that you learn a professional language very easily.

I personally think it's nice for scripts that only run once or need to be adapted continuously, which is often the case in data analysis. I switched from R to Python, I found function naming in R so confusing that I constantly had to Google basics even after years of using it.

> Python is very easy to use and often targeted towards non-programmers.

Maybe that is my problem is I am coming at it as someone who knew 10 programming languages before even looking at Python. But my wife is trying to learn Python right now and she's not a code (she's an biomedical engineer) and I can't say her experience learning it has gone any smoother than it would have with some of the other languages.

> I switched from R to Python

R suffers from the same problem as PHP. The standard library is too large, does too much, and grew organically. So you have things like inconsistant naming. I do agree that is horribly frustrating about R.

Python and Ruby are very similar in most respects, they have pretty similar availability of easy web frameworks, and Python's been around a bit longer and has more chance of being something any given organisation is already using. If you were choosing purely for web dev then maybe Ruby would have a slight edge, but if someone in the company already uses Python for a sysadmin script or a data science project then that's probably enough to tip the scales.
Django is at least as mature as any Ruby web framework and more performant besides.
> Django is at least as mature as any Ruby web framework and more performant besides.

I've only worked on one Django project and I inherited it from another team so it could be because the coders on it originally were no good but my experience with Django was the opposite. You're milage may vary, maybe I'll give it another shot someday.

This is not the impression I had when I was developing with it, but that was 3 years ago so I might need to revisit at some point.

I see python good for quick dev though, so if I do re-visit I'll probably use something lighter like Flask.

Completely agree with your comment, I remember a time where Laravel's goal was to catch up with RoR. Both these frameworks are a pleasure to work with as opposed to Django in my opinion.