3 ms·
> Uprading the codebase from python 2.7 to 3.X definitely only pays (the bill) in the long run. It doesn't even pay the long term bills. If future development
by speedplane 7y ago
> Uprading the codebase from python 2.7 to 3.X definitely only pays (the bill) in the long run.
It doesn't even pay the long term bills. If future development necessitates the use of Python 3, it is far easier and more maintainable to put the existing app into a Python 2 Docker container, and build any new stuff in Python 3 container. If they have to talk to each other, they can do so using standard inter process communication techniques.
You are underestimating the amount of work it takes to rewrite a large app. History is littered with examples of rewrites taking down entire products and companies. There are almost always better solutions.
- tutfbhuf 7y agoWhen we talk about rewrites I absolutely agree. As for example there have been many attempts in the financial sector to rewrite million lines of COBOL code running on mainframes for decades. Many of those attempts failed and they probably will run COBOL indefinitely / until the code isn't useful anymore. To throw away the entire code base and start from scratch in a completely different and non compatible language, isn't a smart idea in many cases, agreed. But we don't talk about a rewrite. One very obvious difference is, that you are able to migrate slowly, by writing python code that runs on both python 2 and 3. It's possible to slowly increase the percentage of python 3 compatible code in your codebase until it reaches 100%. Many huge code bases have been successfully migrated this way, and there is no obvious reason to me against such an slow migration, again except you want to shutdown your company in 2020 anyway.