This whole article is in essence comparing Django to Rails and not Python to Ruby.
Recently I spoke with Jacob Kaplan Moss in Pycon India, we had a great discussion wherein he appreciated the Rails philosophy much for its fast innovation. He even said that Django has in fact taken a lot of good things from the Rails world + other web frameworks too.
I agree that - Django development philosophy + community is somewhat conservative, slow in adopting and trying newer things.
But both are excellent frameworks. Use the right tool for the right job!
But the title is misleading - it should have been Ruby web vs Python web Patterns.
Yes, very little of what he said applies to anything but the Django side of Python. Compared to say, the numeric side of Python where I'm constantly seeing rapid innovation these days (Numba, Scikits.*, Numba, Pandas, GPU Runtimes, etc).
Yes that was my point. Its only the web part of Python.
The numeric side of Python projects like - Scipy, Numpy and other projects like Cython, iPython have constantly blown my mind every-time I speak to some physicist and mathematician. Many of the greatest minds are using Python tools in scientific computing and its constantly delivering innovation with contributions coming across the globe.
I was interested in the piece until he used the unnecessarily value-laden term "afraid of change". He could have said "wary of change" or something even less judgemental.
He also exaggerates the differences to make a point and comes over as a little too fan-boyish on the whole matter.
I do think there's a core of truth in the observation but he glosses over times where the Rails Team's attitude to change has caused genuine pain to the community as well as times where innovation has come from the Python web-framework community.
"This is pretty interesting if you love new things, love change, and love playing around with stuff. If you don’t and hate the idea of breaking changes, you maybe are better suited with the Python way. But don’t be afraid of breaking changes."
Pythonistas apparently don't like new stuff, change, or hacking around with things. How could anyone with any knowledge of both Ruby and Python write something like that in seriousness?
>Pythonistas apparently don't like new stuff, change, or hacking around with things. How could anyone with any knowledge of both Ruby and Python write something like that in seriousness?
Because he has seen it in the wild, and is evident in the long term behaviour of the two communities?
Pythonistas might like change and new stuff in the things they program WITH python or in other aspects of their lives, but they don't seem to appreciate it as much in their language, libraries and frameworks. Surely not as much as Ruby guys do.
See the quote from the Python core developer above: "We're a conservative community by nature - we generally don't like blazing trails when it comes to language design."
Nuances matter, and being cautious in respect to change is not the same (at all) as being afraid of it. I love Python and don't mind refactoring code from time to time if I perceive a benefit from doing it.
I think the "conservative" feeling comes from the fact that there's no immediate need to rush into Python3. Many changes were backported to version 2 and it has been a useful and dependable language for many years. So we have a good situation in which we can take our time to refactor the code and make the final transition when we feel it's ready.
On the other hand, the OP conflates changes in the language with changes in the applications built with it, which is an error. The Python community is very happy using the language in projects with cutting edge features and uses. You have to look further than just Django, at Scipy or Biopython in order to see that. In that respect the community is more eager of change than the one surrounding Ruby, which is mainly oriented to web development.
This meshes well with the article posted here yesterday written by one of the python core developers.
Nick Coghlan on the future of python[1]:
> We're a conservative community by nature - we generally don't like blazing trails when it comes to language design. Instead, we're happy to let others rush ahead, letting them figure out where the pitfalls are, while we see what we can learn from their experience and integrate into Python's syntax, standard libraries, or the Python Package Index.
I think this is one of the main reasons the scientific community seems to use python more than ruby. I work for a scientific computing company that uses python and and almost none of our clients are even considering the move to python3.
...isn't the fact that Python's ecosystem being not so web-app-centric, with lots of libraries being design of any use, not specifically in web-apps (think classic desktop apps, scientific computing...), automatically leads to a slower release cycle, and the whole dependency web slows things down and keeps them stable?
...isn't it that web and mobile tech is moving at a faster pace than most other software (don't think this is good thing though...), and the whole Ruby ecosystem being web-centric stimulates the kind of mentality that keeps people wired and always upgrading, refactoring?
It's obvious that there's more in the Python world than web-frameworks ...but not so obvious that it's more in the Ruby world than Rails (not saying that it REALLY isn't, just the outside look of a pythonista)...
It is telling that he only mentions web frameworks and leaves out what is arguably the most important Python library: NumPy. That alone tells me he doesn't truly understand the whole Python ecosystem and, therefor, it's culture.
But I would agree that, in general, the Pythonistas I've interacted with are, in general, a bit more conservative (not afraid of change, just more willing to weigh the cost of change for its benefits) and rubyists are a bit less conservative (not jumping every time you say "squirrel"), but these differences are, in the end, quite small in the grand scheme of things.
>It is telling that he only mentions web frameworks and leaves out what is arguably the most important Python library: NumPy. That alone tells me he doesn't truly understand the whole Python ecosystem and, therefor, it's culture.
"Most important" for who? I've used Python since 1999, and have never used, had a need for, or even installed NumPy.
It's mainly important in the scientific community, not to most enterprise, startup and independent python developers out there.
Good developers move around. I may have done scientific computing a few years ago and be on "web startup" now, or vice versa... And being able to move around and still use the tools you love is F AWESOME, let me tell you!
...but the side effect is that when moving around and keeping the same tools, you tend to also bring one mindset from one area to another, so a bunch of pythonistas hacking on a new web framework may have brought with them small pieces of mindsets from the desktop apps world, systems an ops or even scientific computing, and this is GOOD, IMHO, though it may make certain rhythms of development seem "out of tune" with the speedy "jump and run towards the newest squirrel" style of learning or development...
The smartest people I know, use tools incredibly well. They make amazing things with Ruby. They make amazing things with Python. They make amazing things in other languages. I'm blessed to know all of them.
None of them would share the opinion in this article, either by the offender, or the "reflector" on the differences.
I don't mean to be harsh. This article taught me nothing. It just spoke about one's interpretation, preference and using such a position to create a difference between us and them.
Pontificating on perceived differences fuels ignorance, intolerance, and more. These kinds of wars of fanatical religious interpretation are neither productive, unifying or helpful.
No language+framework will make you a superhero. Customers and users don't care what the hell we code in. Developers are a little selfish perhaps, when when we focus more on optimizing our own development experience, and hallucinating that there may be some "trickle down" effect to users being delighted, amazed and empowered because we automated yet another thing in our development stack.
No language+framework will make up for one's inability to find and connect with a need that customers have and would pay for, or tolerate being sold over to advertisers.
Most tools are pretty capable, most all have pretty have capable frameworks.
>The smartest people I know, use tools incredibly well. They make amazing things with Ruby. They make amazing things with Python. They make amazing things in other languages. I'm blessed to know all of them. None of them would share the opinion in this article, either by the offender, or the "reflector" on the differences.
Well, then you don't know the right people, because lots of Python and Ruby devs would agree with the premise of the article. I've seen it stated lots of time from Ruby devs (including top dogs) and you can find quotes from Python devs too with the exact same opinion (Ruby: new, changes, Python: stability, conservative change).
>No language+framework will make you a superhero. Customers and users don't care what the hell we code in.
No, be we do.
Also isn't this "no language+framework will make you a superhero" counter to the whole "beating the averages" and "blurb language" idea?
All other things being equal, a better language/framework WILL give you a competitive advantage.
Yes, the Python / Django community has a strong emphasis on backward compatibility - don't break things unless you have a very good reason. It works, and it works well, particularly in business where the app itself isn't the business.
I can understand wanting the cutting edge when the app is your business, when you eat, sleep, and breathe it, and your bottom line is tied to the app. But when you are just trying to get the work of the enterprise done, consistently, day after day, you don't want your tools to break just because you need the latest security updates, or would like to take advantage of new framework features.
This is something like comparing Gentoo to Debian. I've run both as enterprise servers. Today I use Debian, and won't use anything else, for fairly obvious reasons.
You will have to excuse the author for not being up on Python 3 developments, since that's not his world. That is actually proceeding very well, and is getting very close to critical mass. For the bulk of new development, I could switch to it today, particularly with the release of 3.3. In fact, once I'm sure that 3.3 is stable (a couple point releases), I will probably begin using it.
Django is not ready for python 3.x right now. The support for 3.x is in "beta" right now. I hope when the final 3.x support is released, a lot of more traction is going on towards 3.x . The current state is pretty bad :(.
My use of python in the enterprise is way bigger than the Django world.
That said, it's not that bad, even with Django. I think you over-estimate the current state of affairs. Six will be bundled with Django 1.5. By 1.6, I am confident that Django will be 3/2 compatible. Until then - I'm not hurting by running 2.7. Seriously, it's just not a problem. No angst.
GVR said to expect a five year migration. We are four years in. Major projects like NumPy have had support for a while. Pyramid supports it. Django has good enough support that library authors can start migrating their changes. Python 3.3 took out a major source of 2/3 conflict by putting u"" strings back. It would not surprise me to see a lot of newly updated code be 2.7/3.3 or greater as a result, but it will hasten the conversions.
All in all, with a year left in the migration path, I'd say we are doing OK. The VM is in good shape for production use and the libraries are coming along well.
I think the biggest danger is all the hand-wringing about how everything has gone wrong, who didn't read the fine-print to start.
A question I have is how the duck can a language like C# introduce TONS of changes from 1.0 to 5.0, including major syntactic, semantic and library features, and still be widely adopted, whereas Python has to have a "five year migration" for what are essentially some minor language changes.
They were not minor changes, though they might appear to be so from the outside looking in. The unicode changes alone are significant enough to require a significant refactoring of existing code - due to the monkeying around that was required to properly deal with Unicode in 2.x.
I'm still reading the article, but as a Rubyist who only knows a bit of Python, my impression is that the comparison of 1.8 vs 1.9 to Py2 vs Py3 is kind of unfair to Python... 1.9 wasn't THAT big a change in most respects, only a few backwards incompatible changes I recall, whereas my impression is Py3 has some pretty big changes in more substantial ways, including but not limited to syntax (Ruby 1,9's only syntax changes that come to mind were the JSON-style hashes and the stabby-lambda syntax, neither of which broke old syntax).
That's not that important except that it's the crux of his argument that Python is more conservative, so can anyone who knows both better expand on how substantial the changes were for an existing codebase in Python vs Ruby?
It also seems if Django still can't work on Py3, that's a huge deal breaker for many, as Rails has been able to use 1.9 since... I dunno, early 2.x?
While I think the author mischaracterizes the Python community as "afraid of change", there is a strong point in how rapidly the Ruby community--including really big projects like Rails--adopt the latest language release versus similarly large Python projects still not adopting Py3k after 3.5 years.
When working with anything Ruby-based, I hardly ever have to wonder whether or not Package X runs on the latest Ruby. With Python, it's been a somewhat default expectation with any given Package X that it won't run on anything greater than 2.7.
This is rather disappointing because there's so much to like about Python3, and I think it'd be much nicer to know that the community was supporting the latest releases by keeping great software up-to-date with the language.
> Does this mean that Django is ready to use with Python 3? Not yet!
Yes, there are devs/companies embracing python 3, but not enough :( . As I said in my article a few people think it would be better to throw python 3 away. I don't understand why.
Most developers I know are upset about the amount of unnecessary work that porting their code to Python 3 causes, and vent that justified frustration (or just don't port). A few are upset over the direction Python seems to be going in.
I don't know very many who would classify their opinion objectively as "we think it would be better to throw Python 3 away".
There's a vocal part of the Python community, myself included[1], who sees a lot of great tools out there and thinks, "Come on, already! It's been more three years!"
While I've used both, I prefer Python. But big, important community packages like Django still not being on Python3 after three+ years is really frustrating.
EDIT: [1] -- um ... okay, nobody knows who I am, so I'm not a vocal part of the community. More of a silent, frustrated observer.
I read the post as him implying the tantrum was being thrown on the behalf of the people who don't want to switch, rather than people like you who do want to switch.
I'm not really sure that this explains it at all. For one, there are sites similar to isitruby19.com - such as onpython3yet.com. What seems more likely to me is that python 3 was not as compelling of an upgrade until recently since a lot of stuff was back ported to 2.7. I don't know as much about ruby 1.9, but it is also seems possible that python 3 was simply more disruptive of a change.
Is there anybody with insight into both camps who could care to comment the relative amount of working need to port a major ruby library like rails from 1.8 to 1.9 compared to porting a major python library like numpy or django from 2.7 to 3.0.
The negativity over Python3 has stretched my patience with the community, even though I truly love the language. I'm not looking for my day-to-day language to change on a daily basis, but I don't want it to stagnate into Java, either. I feel like there is a large camp in the community who would prefer that.
I've been a Ruby (Rails) developer for about 4-5 years now, I guess. After a job change about a year ago, I've been thrown around to various different projects--I was mostly doing Sinatra stuff until earlier this year, but about four months ago I started working with Python (2.7).
I'll say right off the bat: I don't think my experience is really enough to judge an entire community on. I also feel pretty strongly--as I've read a bunch of articles on Python from a number of perspectives while learning about it--that there are a variety of perspectives within the Python community, some more conservative, some less. In fact, it may be harder to characterize the Python community with a broad brush than the Ruby community (although I live in Japan, and meeting some of the old-school Japanese Ruby coders shifts your perspective a lot...but that's another story).
What I will say, however, is that there are aspects of the community that correspond very much to the stereotypes. More to the point, there are folks who use the talking points within the Python community as an excuse for really foolish practices.
For example, I work with a developer who insists that you should do your damnedest to use nothing outside of the standard Python library. So he ends up writing his own web framework from scratch (!) rather than using Django, or anything really--we are on raw webob/webapp2. This has something to do with, in his words, "There should be one-- and preferably only one --obvious way to do it."
He will also turn code into long blocks of if/else statements because he insists this is easier to grasp; and Python code should be readable..."Explicit is better than implicit. Simple is better than complex." Etc. etc.
The Ruby community has its own normative qualities, I won't deny (I...kinda agree with Zed Shaw: http://learncodethehardway.org/blog/AUG_19_2012.html). But my experience roughly corresponds to the original article's perspective: Ruby, as a community, tends to have a more forward thinking, "break it and fix it quick" perspective. And as far as Rails at least, testing is entrenched, which I think is a good thing. Generally speaking, experimentation is good, and conservatism can get stuffed.
I don't think Python is a bad language. But I personally think having these philosophical statements like "the Zen of Python" and "Pythonic" and whatnot is actually poisonous to the community as a whole. It promotes a certain type of dogmatic thinking that I think is really harmful--even if the ideas expressed are correct! It becomes easy for bad programmers (or good ones who haven't had their ass kicked in a while) to fall back on when they don't feel like challenging themselves.
Also, this is kind of neither here nor there but functional programming paradigms in Python suck. Well, maybe 3.x is better, I haven't really checked it out in depth yet...
(Edit: sorry that last bit about functional programming in Python was a cheap shot, with no bearing on the conversation at hand...)
As someone who spends close to 40 hours a week hammering out Python, I can't agree with your friend on much of this. Particularly the "standard lib only" philosophy.
Python has such a huge ecosystem of external modules that you're completely missing out on by being silly enough to go standard-lib-only. In fact, a number of external packages are much better than what is found in the stdlib (requests vs httplib/urllib/urllib2, anyone?).
My overarching point is: There are people with bad habits/behaviors in all communities. There are also people who love staying cutting edge in Python (I do, bring on the change). The stereotypes are awful, at best, and stuff like the Zen of Python is interpreted differently by each individual (ie: your friend's interpretation is much different than mine).
As an addendum, these Python vs. Ruby articles really are a waste of time. The two languages and communities are very strong. Spend some time reading some Ruby and Python, poke around, and pick which one you like better. They're both going to be than OK for most cases. It really just comes down to personal preference, and which community you feel like you can hire from more easily.
...and stuff like the Zen of Python is interpreted differently by each individual (ie: your friend's interpretation is much different than mine).
And this is exactly my point about why having the Zen of Python is problematic: it is not in any way definitive, but it is treated as though it is. Meanwhile you have folks like the guy I work with, and folks like you, supposedly in the same community. But your ways of thinking and working couldn't be more different.
Even though I love Ruby (and actually, lately I've been wanting to be in a Clojure shop...) I want to work in a Python shop just to get the bad taste out of my mouth from this gig...
As an addendum, these Python vs. Ruby articles really are a waste of time.
Well, I agree and I disagree. If they turn into stupid flamewars then yes, they are a waste of time. But I like hearing opinions like yours, which I wouldn't have been exposed to outside of this kind of a post.
"And this is exactly my point about why having the Zen of Python is problematic: it is not in any way definitive, but it is treated as though it is."
What does that even mean?
Not having 'one way' of doing things is a good thing. People program in different ways. Not everyone is the same. Its ok, don't panic.
I've encountered countless 'you're doing it wrong' messages from the rails community; or 'that's not idomatic ruby'.
Simple example, naming your files: MyClassName.rb instead of my_class_name.rb; I've never yet encountered a python guy who's hassled me for naming my python files differently. I've yet to meet a single ruby developer who hasn't commented on it.
...but you know what, that's ok too. I don't mind; these are different communities, and they have different outlooks.
I'm really not sure what point you're trying to make, but the point I'm making is: these are different tools, and the communities for them have different priorities.
Why do we need to rank them and say there's something 'wrong' with the community of one compared to the other?
The python vs ruby debate is unnecessarily divisive flame bait in almost all circumstances.
Sorry, I guess I didn't express my point well. What I'm trying to say is that it is problematic for a community to have these kinds of overarching statements about their communal philosophy, when that communal philosophy is not, in fact, shared by all members of the community in a consistent way.
This results in one person saying one thing that means one thing, and another saying something completely different, but both are pointing to the same set of "first principles" as their guide. In my opinion, this is problematic.
Not having 'one way' of doing things is a good thing.
I absolutely agree. But that's not a very Pythonic way to think about things: "There should be one--and preferably only one--obvious way to do it." (See what I'm saying?)
Listen, I'm not trying to talk shit about the Python community, or claim the Ruby community is a consistent exemplar of the best in programming language community behavior--if anything, the norms in the community merely fit my personality better. And I acknowledged in my original post that the Ruby community errs on the side of normativism to a fault at times: this is something it would appear you've experienced. In fact, I don't really want to be identified as a member of this community or that one, in the end I want to be viewed as a developer who considers the tools he is using from a more expansive perspective.
I'm merely pointing out my observations as a developer, with (as it so happens), a lot of recent experience in Ruby, who is starting to program Python. I think the Python community, insofar as there are a group of people who identify as a part of the Python community, could benefit from some outside perspective. Outside perspective is good sometimes, right?
I know absolutely nothing about Ruby, is it as useful outside of the web framework as python is? I have come to use python a lot for different programming needs and as a test before I turn to something like C/C++ any more.
I have been able to use Python as a middle ground. A place that I can go and work to make web tools, but also go offline to solve little problems that bug me.
Is this something that is equally easy in Ruby? I mean, if I was going to go to the web strictly, I can see comparing the two as apples to apples, but that's not why I use Python...
I've used Ruby as a sysadmin tool a lot--actually, it replaced Perl (sniff) for me in that role. So I think it's generally pretty useful. But I can't speak to its application to, say, writing games, or applications using an OS's windowing systems, or scientific applications--all areas where I believe Python has a lot more traction. I know you can do that stuff with Ruby, but I don't know how it compares, as far as maturity of the libraries in those areas.
>I know absolutely nothing about Ruby, is it as useful outside of the web framework as python is?
Ruby is used a lot for sysadmin, systems management stuff (more than Python, surprisingly, because of good tooling). It's also used for stuff like iOS development (RubyMotion), and general purpose scripting.
That said, _is_ there anything of importance happening "outside of the web" nowadays?
_is_ there anything of importance happening "outside of the web" nowadays?
Seriously???
You can't swing a cat without hitting someone singing the praises of "Big Data". We're at a point where machine learning is moving from academia out into "real world" in a major way. Statistics, data analysis and simulation is playing a more and more significant role in more and more fields every day. Both GIS and BIM, while still pretty niche, are growing rapidly in importance in their respective fields. I could go on all day. I'd almost (but not quite) say web frameworks is least important or interesting thing happening these days.
It's really the contrast between these two comments that drove me to Python. Many things are possible with the web, yet I'm more interested in Machine Learning and development of applications for phones/computers/adruino/etc. So I gotta say that Python seems like the tool for me. I also love C and C++ so that might say a little more about what I like...
Yeah, I mean, I've been reading a lot, and watching talks from conferences and whatnot online, so it's pretty clear to me that this person does not represent the Python community. I've definitely learned some things about programming from my time so far in Python: there are some really smart folks using it (and writing it). And I think calling the Python community "conservative" doesn't it enough credit, on the whole.
But I've also read a lot of stupid arguments in threads about what is "Pythonic" or not...so it's not just one idiot.
They are both pretty enjoyable languages. Every now and then I find myself missing one Python feature when I develop in Ruby (and vice-versa), but overall I would recommend both of them equally to someone who wants to get started in web development.
Recently I spoke with Jacob Kaplan Moss in Pycon India, we had a great discussion wherein he appreciated the Rails philosophy much for its fast innovation. He even said that Django has in fact taken a lot of good things from the Rails world + other web frameworks too.
I agree that - Django development philosophy + community is somewhat conservative, slow in adopting and trying newer things.
But both are excellent frameworks. Use the right tool for the right job!
But the title is misleading - it should have been Ruby web vs Python web Patterns.