Ask HN: Python gaining popularity
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.
Any special reason or everybody is just going with the flow or am I missing something?
95 comments
[ 3.0 ms ] story [ 146 ms ] threadIn the mainstream, I definitely have seen a trend where people moving past PHP, or designer types new to web programming, pick either Ruby or Python, and between Ruby and Python, Python is gaining ground.
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.
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.
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.
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.
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 :)
Notice the lack of reg exs - no grep or cut. Its also far shorter than the equivalent python session. You'd know that if you spent about 10 seconds on wikipedia, but im happy to reproduce. There are object pipeline shells on unix but many of the projects are dead.
Of course it has many drawbacks too - Closed source, off-putting syntax for some people, dependency on .net - but it's quite impossible to find an equivalent on linux (python doesn't even come close for scripting and piping stuff), and i find myself missing it sometimes.
Just because there is still more COBOL code running in the "real world" than there is C# code doesn't mean C# is 'radical'.
Plus HackerNews readers are likely to be less concerned with what people used 5 years ago when they started the projects that are big today (e.g. Java etc.) they're more interested in what people are using _NOW_ to make the projects that will be big tomorrow (e.g. Python)
http://python.org/about/success/
http://python.about.com/od/gettingstarted/ss/whatispython_3....
I'd say your prof is pretty myopic.
Of the success stories, I particularly like this email about Python on NYSE from 2003:
http://code.activestate.com/lists/python-list/%3COF78FB9C74....
Ruby and PHP are direct descendants of Perl (which is still going). Ruby merged Perl with Smalltalk, roughly, and PHP merged Perl with a box of hammers (nevermind that not all problems involve nails), while removing a number of "hard" features in Perl, like first-class functions and closures.
Python is not on the C++/Java timeline, either, coming from ABC and others.
JavaScript is a descendant of Scheme (with C-like syntax).
Scala/Lift is not popular enough to really deserve mention among the rest of this bunch of languages, all the rest of which have been extraordinarily popular and used by millions of programmers.
http://news.ycombinator.com/item?id=1749696
I interpreted the OP as trying to portray the progression of the "popular framework." I mean, the original Ask HN question was about what they see a lot of people choosing. I didn't like how this chart was portraying it as Ruby vs. Python.
My point is that it used to be PHP, Perl or Java and I think a lot of Java people have moved into Ruby, Python, Scala, etc... Meanwhile, there are still tons of people using PHP (unlike the OP's portrayal that that has stopped somehow). The question marks is to indicate that I don't know what's happened with Perl. I don't know if people still use it for web programming or not.
I totally get how it could be hard to read. What is interesting is that it got voted up until you called it nonsensical and then it got voted down to 1 again. That means some people got it and agreed and some people didn't (which is totally understandable).
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.
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.
(I will not go into Ruby's disadvantages nor direct language comparison because I don't want this thread to devolve into a language flamewar.)
"import flight" indeed.
That was all long before Google started to aggressively adopt it.
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.
Python 19,381 jobs http://www.indeed.com/jobs?q=python&l=
Django 1,057 jobs 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= 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.
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.
Also, if you follow my links you'll see that the subjects of the comparison originally came from a poll.
If Python on Skates took off tomorrow, every startup would start using it ...
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.
I am always amazed when I find that Python has a library for _X_ whenever I need it... and not just some project on github, a stable project that's in a mature release, and flexable enough to be used in any setting/framework/etc.
http://code.google.com/p/appengine-jruby/wiki/GettingStarted
I am big fan of Tornado - tornadoweb.org
Almost free hosting by google appengine is not bad either!
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.
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.
Back then, there wasn't one obvious place to start with web app development with Python. Frameworks existed, sure, but there were too many and none were as good as rails. Django changed that, arguably helped along by Guido's pronouncement as the "official" way to go.
Trying to remember some examples that I didn't like. The ORM mapper was ugly, and I think the templating system is really inflexible - like you can not use it isolated from Django, or it couldn't do "inheritance", or something like that.
The ORM is Django's most powerful component, IMO. The syntax can look a bit off-putting at first (the double underscore stuff) but it's amazing how productive it can be at the sort of queries that make up the bulk of any web app. I guess maybe it's an acquired taste.
Inheritance is a key concept of the template system, and one of its most useful features.
You absolutely can use the template system outside of Django, but it's not available as a separate package so you still end up with the rest of Django is a dependency - definitely not ideal. Jinja is a very neat rewrite of Django's template system that is available as a separate package.
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.
At some time I decided to give it a try and wasn't disappointed.
http://weblog.rubyonrails.org/2008/4/11/rails-premieres-on-g....
I'm sure Bitbucket would probably show a slightly different breakdown of language use by it's customers. Anyone have links for that?
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
(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.)
Rake is exactly like Make, except better. It retains Make's simplicity while providing all of Make's power in a turing-complete language that allows me to do whatever I want.
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.
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.
http://www.indeed.com/jobtrends?q=python,ruby,java&l=...
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