|
|
Subscribe / Log in / New account

Python 3 at Facebook

Python 3 at Facebook

Posted Jul 2, 2018 22:55 UTC (Mon) by starchip (guest, #125445)
Parent article: Python 3 at Facebook

OK. I understand the issues that Jason had to confront and I sincerely congratulate him for conquering each one such that the goal was reached.

However, if the goal was incorrect, would we be congratulating his strategy?
No - we would not. The fact that a strategy works does NOT show that the goal was correct, which is what this article is implying.

I mean that it is implying that the goal was correct. It provides no evidence that it was/is correct it just assumes that readers will accept that it was/is.
This is an argument that has been around for thousands of years. It is called; "The end justifies the means". mmm. Does it? What justifies the end?
Ahhh - maybe that was the first infinite loop humans encountered.

What Jason has is an extremely bad overall Company strategy regarding IT infrastructure that he had to fight against. He did and he won. Gratz Jason.
Yet you have not won.
Has that strategy changed? Will there be another Jason fighting for Python4 at Facebook? Or maybe Java 3524466? Will that person be called Jason1?

If the overall strategy is wrong and the ability to change that strategy is unavailable or difficult, then that is what needs to be fixed. Not sneaking in a migration from languagewhateverversion into languagewhateverversionplus1. Jason has fixed the symptoms - not the disease. The disease is still there. Or tell me that it isn't.

I am uninterested in "how to fool your company into doing the right thing". I am very interested in "how your company can do the right thing".

Again I would like to record my admiration for the struggle that Jason went through and succeeded in. Myself, Jason and far too many others have done this before.
Let's not have to do it again.


to post comments

Python 3 at Facebook

Posted Jul 3, 2018 0:29 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link] (7 responses)

> What Jason has is an extremely bad overall Company strategy regarding IT infrastructure that he had to fight against.
Bad strategy? Why?

Py2 works. It's better than Py3. It's generally faster than Py3. It's stable. It's going to be supported until at least 2027.

Now convince me why people need to convert to Py3 religion. Is it going to lead to significant savings? (nope) Perhaps it's going to make people more productive? (nope) Does it solve long-standing architectural issues? (nope, see GIL)

So what are the business reasons for the migration?

Python 3 at Facebook

Posted Jul 3, 2018 11:18 UTC (Tue) by anselm (subscriber, #2796) [Link] (3 responses)

At least the speed argument seems to no longer apply. From the article:

The developers simply ran 2to3 on the code and fixed a few things that it complained about. When they ran the resulting code, they found it was 40% faster and used half the memory. This points to a persistent myth that Fried has heard: Python 3 is slower than Python 2. That may have been true for earlier releases of Python 3, but it is definitely not true now, he said.

It's reasonably easy to imagine scenarios where that would be an important factor.

Python 3 at Facebook

Posted Jul 3, 2018 17:55 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link] (2 responses)

It can go either way. Py3 in general used to be slower than Py2: https://stackoverflow.com/questions/37052139/string-perfo... or https://www.raspberrypi.org/forums/viewtopic.php?t=183829 It's getting better, but it's still not that great.

I did several migrations and sometimes we actually got significant speed improvements. Not because of 2->3 switch itself, but because people went through the codebase and fixed stuff like the use of .items() instead of .iteritems().

Python 3 at Facebook

Posted Jul 4, 2018 0:32 UTC (Wed) by anselm (subscriber, #2796) [Link]

It probably depends on the use case but there has been considerable optimisation work done in recent Python versions (the web pages you cited mostly talk about Python 3.4, which from an optimisataion POV is ancient history). There will be even more improvement in the future but we're now at a point where a fear of performance regressions compared to Python 2.7 shouldn't keep one from moving to Python 3.6 or 3.7.

Python 3 at Facebook

Posted Jul 4, 2018 5:23 UTC (Wed) by daniel (guest, #3181) [Link]

Python2 and Python3 are both pathetically slow, because efficiency is not ingrained in the project culture. But they are better than Bash, that is the best I can say about that. Python stewards consciously choose to pigeonhole Python as a scripting language for no discernible reason. My advice for language learners these days: start with Python to get the idea, then move on quickly to Go.

Python 3 at Facebook

Posted Jul 8, 2018 11:03 UTC (Sun) by morksigens (guest, #92681) [Link] (1 responses)

I find your anti-Python-3 posts quite silly and bitter. I develop in Python 3 day to day and can't wait to drop Python 2 support everywhere. Python 3 has 10 years of language evolution in it, 2.x has not. It's many small nice things that add up. Also, regarding speed: https://hackernoon.com/which-is-the-fastest-version-of-py....

Python 3 at Facebook

Posted Jul 8, 2018 23:02 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link]

> I find your anti-Python-3 posts quite silly and bitter.
I suppose it's the best argument Py3 advocates have. I proposed a simple exercise - try to convince me with objective facts why Py3 switch is warranted.

> I develop in Python 3 day to day and can't wait to drop Python 2 support everywhere.
I have it on good authority that KoolAid also tastes fine.

> Python 3 has 10 years of language evolution in it, 2.x has not.
In other words: "Python 2.7, being a great improvement on its successor, has managed to skip 10 years of language devolution".

> Also, regarding speed

Let me quote:
"Python 3.7 is 1.19x faster than Python 2.7, but the only Python 3.x release to beat the Python 2.7 benchmark I ran. The speed.python.org benchmark shows similar results."

So Python _only_ _now_ has caught up with Py2.7. And that only barely.

Py3.7 had been released quite literally a couple of weeks ago and it is not supported by RHEL or Debian Stable, so I wouldn't be able to use it for at least couple more years.

Python 3 at Facebook

Posted Jul 11, 2018 12:16 UTC (Wed) by mathewcohle (guest, #118622) [Link]

One strict business reason might be the hiring of new developers: I've encountered that people shrug when hear that the code base is in Py2.7

Python 3 at Facebook

Posted Jul 3, 2018 8:50 UTC (Tue) by farnz (subscriber, #17727) [Link]

Facebook's strategy is that migrations like Python 2 to Python 3 have to be engineer-led. Somebody has to step up, do the work, and convince the rest of the company that that work is of value, otherwise it does not happen. The idea is that if it's not of value, nobody will do it, and if it is of value, someone like Jason will step up and do the work.

Jason didn't have to fight the company strategy - it's just that somebody had to be first, and lead the rest of the company in a better direction. Changing the company direction is easy for an individual engineer at Facebook; just do the work and get your peers to agree that it's of value.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds