

Ask HN: Python gaining popularity - ashitvora

These days I see a lot of startup using Python. Earlier it used to be PHP, then came era of Ruby (mainly because of Ruby on Rails) and now it is Python.<p>Any special reason or everybody is just going with the flow or am I missing something?
======
FraaJad
When RoR was all the rage (the one-true-rage even!) couple of years back,
there were a lot of people in the Python world, who were concerned that Ruby
might steal the thunder from Python.

Python people attacked this "problem" in multiple ways. One was the emergence
of competing frameworks like Django and Pylons. The other was to work hard on
other product lifecycle stories. Some of which were influenced by what was
gaining traction elsewhere (automated deployments, TDD). But, some new things
also took flight in the Python world, like WSGI, which inspired similar
endeavours (Rack, Plack/Perl).

Also, Python has better overall ecosystem. You want libraries for obscure (say
HVAC) protocol, you have a better chance of finding it in Python, than in
Ruby.

I think more developers relate to "don't be too clever" attitude taken by
python than admitted among this crowd.

While RoR was busy redefining the entire Ruby ecosystem in it's own image,
Python people were busy building stuff that were truly framework agnostic. Eg:
Paste, WSGI, SQLAlchemy, Various templating languages like Jinja2, Mako.

Today, it is very easy choose from _many_ competing python frameworks without
drinking any one brand of kool-aid.

~~~
vineetm
+1 Python stands tall with its rich library, for a relatively recent convert
from java to python it was nice to see such vast applicability of a language
and also the support it enjoys outside the typical commercial / "web" worlds.

------
Kaizyn
Basically, you're seeing just as much Python as ever. However, because
Rubyists aren't making such a spectacle of themselves, you don't hear as much
about Ruby/Rails as you used to. And what you do hear doesn't get as much
traction as it used to because after several years of ruby news the community
has grown more tired of it.

~~~
shadowsun7
I think you're right on this one. The idea that Python is suddenly
experiencing a reemergence doesn't feel right to me - it makes more sense to
talk about this trend in terms of relative activity.

Note: I use and love Python, and I'm doing my startup in Python, but I'll
admit that I don't know much about the Ruby community. I will say, however,
that we decided early on not to use RoR because of its scaling issues.

~~~
binomial
Subtle trolling.

~~~
shadowsun7
Was that a self-referential comment? I'm not sure how you're contributing to
the discussion here.

~~~
binomial
Oops, I did not realize that you are the same person who I had replied to till
later. Well, I'll assume you aren't trolling then, but realize that many
shared the sentiment for good reason (the comment was at 5 points
surprisingly, before I made the last, very stupid reply). The reason would be
that there have been thousands of wasted programmer hours due to discussions
initiated by someone saying "rails can't scale", when they obviously don't
know what they're talking about, so it does come off as trollish.

It became a something many said because of Twitter's scaling problems, which
is probably how you heard about it. But later, it became clear and commonly
accepted among the community that Twitter's scaling problems did not stem from
rails itself, but other parts of its infrastructure. Saying "rails doesn't
scale" really doesn't make too much sense, because scaling the application
layer is arguably the easiest part of scaling: essentially you add more app
servers, and load balance between them. The hard part is scaling the database
etc.

In Twitter, at first they had a lot of issues because the queuing software
they wrote wasn't great for their workloads and was pretty slow. And there are
a ton of other moving parts as well in the application and the team must have
kept hitting walls in all the various parts. They may have even had some rails
issues at some point, but that's a far cry from saying it can't scale.

And anyways, if you want to keep it light weight, I'd use one of the smaller
Ruby frameworks. You really can't go wrong with Sinatra.

~~~
shadowsun7
Welcome to HN, binomial. You can assume that we're not trolling (most of the
time). Thank you for the clarification.

------
enko
I think that "bad technology" can kill a startup, but slightly different
variations of good technology don't have much effect. Choose what you
know/like best. And Ruby and Python are both in this latter category.

I think it's just that Ruby enjoyed a brief surge of hype which pushed it to
the forefront of the startup founders' mind; this has now ebbed a bit and
Python use rises up to its natural level.

I wonder if Ruby will come back a bit, though. There hasn't been much hype,
but in the last few months the Ruby community has really gone for broke, with
rails 3, ruby 1.9.2, rvm reaching maturity and bundler to handle dependencies.
Things are changing so fast I think the magnitude of the changes haven't sunk
in for most people but it's a whole new environment and really impressive IMO.

~~~
FlemishBeeCycle
As a person who uses Ruby as their primary language, I regularly take a look
at Python, hoping that something really draws me in - but nothing ever does.
Not because I have an issue with Python, but rather because it's just too
similar to Ruby (or Ruby too similar to Python, take your pick). I feel that
my time would be better spent learning a language that will expand my mind
more.

~~~
stesch
I used Ruby and switched to Python. Most of the answers to my questions got
answered with links to Python solutions and code.

At some time I decided to give it a try and wasn't disappointed.

~~~
FlemishBeeCycle
Any comments on the experience? Anything you like more/less in Python/Ruby?

------
smoody
I thought javascript/node.js is the new hotness. It's so hard to keep up with
the latest trends!

~~~
jb55
Just recently one of my college professors said Python was not a 'production
level' language. I just came back from an internship where they wouldn't even
install Python on the server and told me to use 'Powershell' instead. The
majority of the world is still running mostly on Java and C#, let alone
something as 'radical' such as Python or node.js. It's amazing the amount of
resistance I came up against in the 'real world' of things which seemed so
common place here on hacker news or reddit.

It's possible I just live in the wrong area and I'm going to the wrong
schools, but that has been my experience so far.

~~~
alextingle
Powershell? hahaha!

~~~
nailer
Well it's probably the best modern shell (since it's objects being piped, you
don't need regexs everywhere like currrent gen unix shells), but it really
depends if he was attempting something command-linish or not.

~~~
fauigerzigerk
It may be the best modern shell if you like OO and if you can tell me what's
the difference to, say, an interactive Python session.

I think the most flexible kind of interfacing between independent apps will
always be text based. It makes no sense to impose some typed object model onto
those interfaces. That just causes more dependencies which is exactly what you
want to avoid for that type of integration.

~~~
Raphael_Amiard
Well, first, the object-orientedness of powershell is just one more layer. You
can work on a text-based basis in powershell, just send out strings :P

On the other hand, this very feature of powershell is amazingly powerfull, and
allows you to lay out some things fare more logically than you could/would do
in a text based shell, not to mention purely interface with more complex
applications written in .net flawlessly (like doing a small GUI for your
script in five seconds for example).

When you work with text, you're basically reinventing parsing at every pipe,
and that, too makes no sense at all, for certain applications.

EDIT: What you said just reminded me of something on dadgum
<http://prog21.dadgum.com/74.html>.

~~~
fauigerzigerk
If all programs I'm connecting are .NET based and hence share a common type
system, why would I need a shell script at all? I don't see the point of
inventing yet another programming language for that purpose. I could just as
well use any existing .NET based language to do the same thing.

Apart from that, the power of the Unix shell isn't primarily the shell
scripting language itself. It is the design of the programs it connects. You
need small programs that do one thing. Windows software isn't built like that
(neither is Java software by the way), so it doesn't matter much what the
quality of the shell is I think.

~~~
Raphael_Amiard
>If all programs I'm connecting are .NET based and hence share a common type
system

Well to set it apart from C#/F#, Powershell is dynamically typed, so you don't
have to bother with the types of your objects.

To set it apart from Ironpython/ruby, or any other dynamic languages on the
CLR, Powershell is made to be a __shell scripting language __. It means that
tasks common in system administration are made to be simplified, that command
to deal with the filesystem, processes, services and anything else on the
system are builtins, and that it interacts very well with other apps, all
things that are definitely __not __true with python or ruby. ipython brings
you an inch closer, but with powershell you have the full thing.

> Apart from that, the power of the Unix shell isn't primarily the shell
> scripting language itself. It is the design of the programs it connects. You
> need small programs that do one thing.

Well those programs (grep, awk, sed, cat, and many others) are __meant __to be
used in a shell environnement. With powershell, most if not all of the utility
of those commands is replicated in equivalent commands. Those are not binary
executables, but built-ins commands. But you can add new ones very easily, by
coding them in powershell itself and adding them to your environnement in a
way that has been thought out for that very purpose. I see no diminution in
power, quite the contrary.

But i see no real interrest in preaching to somebody who has already made up
his mind. All i can say is, if you have the occasion to try it extensively,
you really might change your mind on the subject :)

------
carbon8
Since you are comparing it to PHP and Ruby, it appears that your comment
refers to their use in web development. I can't say much about the broader use
of the languages, but here is some perspective regarding the web development
side.

A little over a year ago I compared the jobs available for PHP, Django and
Rails (<http://news.ycombinator.com/item?id=805931>). I did the same again 3
months ago (<http://news.ycombinator.com/item?id=1459119>). A quick glance now
shows the same trend and ratios (eg, simply hired has 20,125 PHP jobs, a 25%
increase in 3 months; 5,334 Rails jobs, a 39% increase in 3 months; and 1,153
Django jobs, a 25% increase in 3 months).

TL;DR: PHP, Django and Rails jobs are all on the rise, there are vastly more
PHP jobs than either Rails or Django jobs and there are many more Rails jobs
than Django jobs, and this applies to startups, too.

~~~
barnaby
Wait, that makes no sense. Why compare a language like PHP with a framework
like Rails or Django. Shouldn't you compare CakePHP, Symfony, or Zend, instead
of PHP? Or compare PHP against Python and Ruby?

~~~
stevenwei
Practical considerations I would assume: Django dominates the large majority
of Python jobs, while Rails dominates the large majority of Ruby jobs out
there. PHP has a much more divided split.

~~~
fauigerzigerk
Django does not dominate Python jobs at all. Just look at this:

Python 19,381 jobs
[http://www.indeed.com/jobs?q=python&l=](http://www.indeed.com/jobs?q=python&l=)

Django 1,057 jobs
[http://www.indeed.com/jobs?q=Django&l=](http://www.indeed.com/jobs?q=Django&l=)

Django doesn't even dominate Python web related jobs if you accept "Python
JavaScript" as a proxy for Python web related jobs:
[http://www.indeed.com/jobs?q=Python+Javascript&l=](http://www.indeed.com/jobs?q=Python+Javascript&l=)
gives you 4,671 jobs. Granted for many of them Python is not the main skill
asked for.

Python is used by sysadmins and by scientists and even in financial services
combined with C++. The combination of Python and C++ is requested 7,165 times.
Compare that with "PHP C++" 3,051, "Ruby C++" 2,277, "Java C++" 25,675 and "C#
C++" 13,045.

So Python has become a language that is very broadly used in all kinds of
development jobs.

~~~
carbon8
_Django does not dominate Python jobs at all._

We are discussing web development jobs in this particular thread.

 _Django doesn't even dominate Python web related jobs_

Yes, it does. SimplyHired: Django 1168, Pylons 143, TurboGears 18, Zope 96,
web.py 5.

 _"Python JavaScript"...Granted for many of them Python is not the main skill
asked for_

Exactly the problem with that approach. It's relatively common to list a bunch
of languages including Javascript, Ruby and Python in desired experience for
any non-MS web development job, but pretty uncommon to list specific
frameworks unless that's what the job is for.

~~~
fauigerzigerk
That Django dominates among Python web frameworks is undisputed. But you can't
just count all Python web dev jobs towards Django even though it isn't
mentioned in most of the adverts. Many employers might not care about the
framework or leave that to the developer they hire.

------
wahnfrieden
A large part of it is that Django is maturing and gaining traction as a great
alternative to frameworks like Rails. Many of the complaints of Rails, such as
extensive magic and monkeypatching, are less of a problem with Django, so to
many it's a fresh breath of air.

------
SriniK
Pesonally, I like Python because it is simple, oo, lot simpler to debug and
goes well with javascript/json(utf-8 by default).

I am big fan of Tornado - tornadoweb.org

Almost free hosting by google appengine is not bad either!

------
nivertech
4 reasons, why Python more popular than Ruby:

1\. Google App Engine

2\. Good webdev ecosystem (Django,etc.)

3\. Science/Engineering and Machine Learning libraries - replacement to Matlab

4\. Good support for system scripting

~~~
gjm11
It seems immensely unlikely that Python is more popular than Ruby because it
has a good web development ecosystem, given that the one thing everyone knows
about Ruby is that _it_ has a good web development ecosystem.

(Note that this applies even if, contrary to conventional wisdom, Rails is
really no good at all; and even if Django is spectacularly good. As long as
"everyone knows" that Rails is a superb web development framework, Python is
not going to be more popular than Ruby for having a good web development
framework. For the avoidance of doubt, I have no particular view on the merits
of RoR and Django; I haven't used either.)

------
Kilimanjaro
I started using Python because of Google AppEngine.

~~~
znt
Same here, but then I learned that there're projects focused on running Ruby
on AppEngine.

<http://code.google.com/p/appengine-jruby/wiki/GettingStarted>

~~~
Tichy
What's the status, though? Last time I looked (several months ago), sloooow
startup time was a real problem for that approach.

------
vaksel
I think the main reason is because Google uses Python, so many of the top
programmers learn it.

~~~
beambot
Personally, I attribute its use (at least in science / engineering) to the
numpy, scipy, matplotlib combo. It makes prototyping fast, flexible, and
rivals (surpasses IMO) Matlab.

~~~
daniel02216
Anything is better than Matlab.

~~~
hugh3
Spoken like someone who hasn't written nearly enough Fortran.

~~~
trustfundbaby
.. or COBOL

------
staunch

                                      /-> Ruby on Rails
        C++ -> Java -> Perl -> PHP -> 
                                      \--> Python

~~~
julian37
What is this diagram supposed to mean? Apparently it's not "X evolved from Y"
as, say, Perl is not derived from Java. It also can't be "X was popular (for
web applications) after Y" as surely Perl was more popular prior to Java and
C++ was never really popular in this area (and continues to be popular in
others). "X is superior to Y" would be comparing apples to oranges. What am I
missing?

~~~
po
I think he's trying to show the progression of the popular consensus of "the
new web framework". Either that or he's showing what he thinks is the average
developer's progression through frameworks.

My alternate one is showing what I think is the popular consensus of which
framework to use. It branches out at the end because we don't have consensus
yet.

~~~
julian37
Yours is more like it, but I think there's little point in including C++ in
the lot. It hasn't ever really been used for web application development, at
least not nearly to the same extent as the other languages in the original
diagram.

By the time the Internet took off in the early 90s, Perl was already around
and much more popular for this purpose.

If you're going for rather exotic languages (in the context of web application
development) I think it would make more sense to include Common Lisp.

~~~
AndyKelley
Apparently okcupid is coded in C++, and they're proud of that fact. It blows
my mind.

------
aberkowitz
There is something about Python that everybody likes, whether it's the syntax,
functional programming features, NumPy or one of the other numerous libraries.
This quiet support allows Python to remain potent while fads die down.

~~~
AndyKelley
Or the readability.

------
inovica
I think what you must be referring to is the adoption of Python for web-based
startups. Python has always been popular in certain industries/niches.

From our perspective we use what we feel is best and we use more than one
language on some of our projects. For example, we have a LOAD of legacy code
in PHP and we use it still quite extensively for some of our sites. We use
Python on some of the same sites for parsing and anything requiring heavy
lifting.

Ultimately - use what you feel is best for the job at hand

------
atomical
Could this be seen as a correction in the market? Is the market reacting to
technologies (i.e. Django and ROR) that are speeding up development times as
well as improving productivity?

~~~
trustfundbaby
I'd like to think this was the case, but I think they're just going with the
hot new thing.

If Python on Skates took off tomorrow, every startup would start using it ...

------
ideamonk
Many reasons from my PoV.

Recently, I could kick off writing Cocoa apps in PyObjC with very little bit
of learning to do. Within a day I feel confident on how to build my app.

I know a few profs who find it easy to train their students in Python and get
them productive within a week. Even if its an electronics course.
<http://pykata.appspot.com/statements/>

Besides prototyping/experimenting in Python is much easier. It was zillions of
options for whatever you wish to do - webapps, scientific computing,
visualization, network apps, interfacing hardware, and what not.

------
clyfe
<http://github.com/languages>

~~~
scalyweb
Thanks for the link and for those that aren't aware Github was written in ROR.
No idea if it is still based on ROR. The Rails repository moved to Github when
Github launched.

[http://weblog.rubyonrails.org/2008/4/11/rails-premieres-
on-g...](http://weblog.rubyonrails.org/2008/4/11/rails-premieres-on-github).

I'm sure Bitbucket would probably show a slightly different breakdown of
language use by it's customers. Anyone have links for that?

~~~
simonw
GitHub is still Rails for the frontend, but they have a fascinating
combination of bits and pieces of Ruby, Erlang, Node.js and even some Python
running the backend.

~~~
draegtun
And also C, Bourne Shell & Perl because _git_ depends on them.

------
sunqiang
<http://stackoverflow.com/questions/tagged/python>
<http://stackoverflow.com/questions/tagged/ruby>

look at the "question tagged" and "Related Tags". maybe ruby is still focus
"too much" on rails, on the other side, python has better overall ecosystem.

------
letflow
The available jobs data suggests that Ruby is growing faster (note that the
absolute numbers are still in favor of python)

[http://www.indeed.com/jobtrends?q=python,ruby,java&l=...](http://www.indeed.com/jobtrends?q=python,ruby,java&l=&relative=1)

~~~
aaronblohowiak
Also, Python's lead is getting larger over time:
[http://www.indeed.com/jobtrends?q=python,ruby&l=](http://www.indeed.com/jobtrends?q=python,ruby&l=)

------
jpspeno
It's the whitespace. It makes the code more beautiful, and that does matter.

