7 ms·
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?
- wahnfrieden 16y agoA 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.
- smoody 16y agoI thought javascript/node.js is the new hotness. It's so hard to keep up with the latest trends!
- code_duck 16y agoIt's still kind of for early adopters, trendsetters and those who like to live on the edge. It's not well known outside of places like this. In 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.
- jb55 16y agoJust 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 16y agoPowershell? hahaha!
- nailer 16y agoWell 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 16y agoIt 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 16y agoWell, 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 http://prog21.dadgum.com/74.html.
- fauigerzigerk 16y agoIf 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.
- staunch 16y ago/-> Ruby on Rails C++ -> Java -> Perl -> PHP -> \--> Python
- po 16y agoC++ --> Java --> Java \--> Ruby on Rails \--> Python/Django,etc… \--> Javascript/Node.js/Sammy, etc… \--> Scala/Lift PHP ----------------> (still going…) Perl -----> (???)
- SwellJoe 16y agoThis is kind of nonsensical. 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.
- scalyweb 16y agoI read this as the progression of the poster's use of languages and not a table of heritage.
- vaksel 16y agoI think the main reason is because Google uses Python, so many of the top programmers learn it.
- chc 16y agoThis is the real reason AFAICT. Anybody who tries to pin it on Python's obvious superiority to Ruby is just not paying attention. They're not the same, but not so different that one has a clear advantage over another in most people's minds.
- swolchok 16y agoSpeaking as a Python person who recently had to dig through a Ruby project, I can see why people like Ruby and RoR (lack of explicit return statements make your code look functional, lack of parens makes your code look minimal, it's nice to have "unless"), but it is not for me. (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.)
- chc 16y agoOh, absolutely. I'm much the same, only leaning toward Ruby's side. What I mean is that the differences are very much matters of taste — they both have warts, but neither so glaring that it makes the language obviously worse. To an impartial observer (i.e. sonebody who is looking from outside and hasn't "bought into" either language or its philosophy), they look very similar, because they are.
- beambot 16y agoPersonally, 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 16y agoAnything is better than Matlab.
- carbon8 16y agoSince 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 http://news.ycombinator.com/item?id=805931). I did the same again 3 months ago (http://news.ycombinator.com/item?id=1459119 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 16y agoWait, 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 16y agoPractical 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 16y agoDjango 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.
- atomical 16y agoCould 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 16y agoI'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 ...
- FraaJad 16y agoWhen 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 16y ago+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.
- barnaby 16y agoWow that's a really well thought out answer, I totally agree. 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.
- Kilimanjaro 16y agoI started using Python because of Google AppEngine.
- rtra 16y agoYeah. I wish heroku offered more than 5MB on its' freebie plan.
- waleedka 16y agoSame here. I learned Python out of curiosity, but started using it for real work only after the Google App Engine launched. I hear similar anecdotes from others as well.
- znt 16y agoSame here, but then I learned that there're projects focused on running Ruby on AppEngine. http://code.google.com/p/appengine-jruby/wiki/GettingStarted http://code.google.com/p/appengine-jruby/wiki/GettingStarted
- Tichy 16y agoWhat's the status, though? Last time I looked (several months ago), sloooow startup time was a real problem for that approach.
- SriniK 16y agoPesonally, 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!
- RobertL 16y agoPython rules.
- Kaizyn 16y agoBasically, 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 16y agoI 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 16y agoSubtle trolling.
- shadowsun7 16y agoWas that a self-referential comment? I'm not sure how you're contributing to the discussion here.
- binomial 16y agoI was trying to see to it that people don't respond to the trolling as if it were a real question. If it was a real question, perhaps the person needs to do some research.
- binomial 16y agoOops, 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.
- enko 16y agoI 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 16y agoAs 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 16y agoI 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 16y agoAny comments on the experience? Anything you like more/less in Python/Ruby?
- aberkowitz 16y agoThere 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 16y agoOr the readability.
- clyfe 16y agohttp://github.com/languages http://github.com/languages
- scalyweb 16y agoThanks 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-github 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?
- ashleyw 16y agoDefinitely. GitHub is the de-facto home for rubyists, so it's no surprise to me that it's the most popular language there.
- simonw 16y agoGitHub 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 16y agoAnd also C, Bourne Shell & Perl because git depends on them.
- nivertech 16y ago4 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 16y agoIt 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.)
- FooBarWidget 16y agoRuby has good support for system scripting as well. Heck, it has great support for system scripting; I've switch from shell scripting to Ruby and never looked back since. String manipulation and piping are extremely easy to do in Ruby, in my opinion more so than in Python because of e.g. language support for regular expressions. Python requires regexps to be constructed from strings, unfortunately. 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.
- ideamonk 16y agoMany 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/ 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.
- sunqiang 16y agohttp://stackoverflow.com/questions/tagged/python http://stackoverflow.com/questions/tagged/python http://stackoverflow.com/questions/tagged/ruby 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 16y agoThe 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=&relative=1 http://www.indeed.com/jobtrends?q=python,ruby,java&l=...
- aaronblohowiak 16y agoAlso, 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=
- inovica 16y agoI 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
- jpspeno 16y agoIt's the whitespace. It makes the code more beautiful, and that does matter.