Hacker News new | ask | show | jobs
by wwwtyro 5004 days ago
I work in both camps, and I always felt it was the web developers that were better about moving on to 3. Scientists in general are loathe to risk breaking well-tested code for the sake of new features. In my research group, in fact, we've just barely moved on to 2.7 from 2.4! I doubt there will be any motivation at all for moving to 3 any time soon.
2 comments

I doubt that web developers are better about it, my reasoning follows:

The #1 Python web framework, Django, is a bit ahead of the curve but still hasn't released a major version that supports 3. Django's huge ecosystem of addons are not going to catch up for some time after that. And users are not going to develop green-field Django apps on Python 3 until some time after that. So the timeline for serious use of Python 3 with Django should still be counted in years, which means that the majority of Python web development will not be done with Python 3 for a while. (If Flask and Werkzeug had been out ahead of this issue, it could have eaten up even more of Django's market share, but it looks like it will actually be behind in adopting Python 3). I don't think any of the Zope frameworks or ZODB, etc. support 3. And I think between those three you probably have most of Python web development accounted for.

Pyramid, Bottle, Tornado and CherryPy DO support Python 3 but aren't nearly as widely used. App Engine needs a new runtime and that could be years. I don't think that Web2py or web.py have released versions which support Python 3, though both probably have something in the works.

Since web development is so heavily framework-driven, the majority of web development on Python is not going to move on to 3 until Django and Flask ecosystems move over, or everyone switches to Pyramid.

And due to the requirement for backward compatibility, Python 3 features will not be widely used for a while (suppose you make a widely used extension, you are not going to lock out people using 2.7, this means you are using the common denominator of features and supplying Python 2 implementations for the stuff you are using from new Python 3 libraries).

I would contrast this with the very large number of general Python libraries which already support Python 3. So I think the Python web development world is well behind the rest of the Python world.

It's a mess but I think that Python 3's improvements are worth not straitjacketing the future of the language into the decisions made in 2.

At KyivPy#8 I heard about new lightweight framework supporting Python3 - wheezy.web. But as you said it is not a mainstream among web-developers.

I think the most popular Django apps will move to Python 3 as a lot of people are interested in it. Time show us how Django with Python3 support will change the current situation.

Research software typically have a very small user base and can quickly become out-of-date, so there's no great incentives for current software packages to upgrade. But I'm talking about the developer community of scientific Python, not the user community. The developer community includes such things as numpy, scipy, matplotlib, etc. are pretty much Python 3 compatible. This makes it easy for new scientific projects to jump on board with Python 3.
Yeah, a lot of research software in academia is written by grad students with no formal CS education who're just interested in completing their dissertation and graduating. After they've graduated and left, the codebase just languishes until the next grad student comes along, who spends a couple months trying to figure out all the spaghetti code and ridiculous hacks used by the previous student to complete their thesis in the fastest time possible. After this process repeats itself 3 or 4 times, the codebase is pretty much useless and has to be thrown out.
> a lot of research software in academia is written by grad students with no formal CS education

Are you sure? Because that sounds like an complete oxymoron. You probably may have meant something else. Would you like to clarify on why grad students lack formal CS education?

Yes, I'm sure. I'm referring to scientific software - that is, software written in fields such as biology, chemistry, physics, and (non-computer) engineering. There are many grad students and professors in these areas who write software for their research that have no formal background in CS.
OK - I think I'm surprised to know that those fields do write software more than anything. Thanks for the clarification.
I wouldn't say they write software more than anything. I would say that there's a steadily increasing amount of time and energy invested into writing software, and very poor coding practices are used because of their lack of a formal grounding in CS and their short-term focus on obtaining the results necessary to publish their next paper and/or obtain their graduate degree.
Yes, in those fields we literally "do write software more than anything" [else we do]. That is, most of what we're doing is writing software. So the fact that there's no formal training is a huge waste.
A member of my family is a post-doc here at Stanford doing cutting-edge genetic research on cancer in one of the brand new bazillion-dollar buildings that just opened. I write code for everything; I'll probably be writing code to brush my teeth for me someday, so I've offered to teach him to program. He doesn't show much interest. He says that there is only one member of his research team who can code--the PI--and he only knows Perl ("which is what they used in his bioinformatics program"). But, "He doesn't really write code anymore."

I don't know why I'm always surprised to hear this. You'd think I'd learn. I recently asked him if his research didn't require a lot of gene sequencing and analysis of the sequences and if that wasn't pretty computationally demanding. "Oh, yeah, sure it is. That's why we outsource it."