Hacker News new | ask | show | jobs
by drfloyd51 6 days ago
To be technical about it, the Python program didn’t match the behavior of the c++ program. ;)

But also technically I think your point still stands. Because rewriting it helped you find a defect in the original. Which did improve performance of the original.

It’s quite interesting the two implementations performance was so close in the end. Do you consider one implementation “better” for non-performance reasons? Maybe one type of dev is easier to find. Or one language is easier to create and maintain correctly behaving programs in your environment?

1 comments

The Python version was far easier to maintain and add features to. We kept it and rewrote other code in Python whenever we did significant work on it. All new back-end code was also written in Python after that.

Hiring devs who already knew Python was not really an option in 1997. But we quickly found that there was not much difference in time to ramp up a C++ developer on our C++ codebase vs. ramping up a developer on Python plus our Python codebase. It was just a matter of finding developers who were happy to learn a language they may or may not have heard of, but had likely never looked into.

Were you around for migration into python 2 or 3?
I was there for migrating to Python 2 and I don't remember much in the way of challenges, but Python 2 wasn't that big of a leap.

I was not there for Python 3, but I was at a larger place that had ~2 million lines of Python 2 code when the migration happened. It was much easier than I had expected. The two key differences from other stories I was hearing was that were a lot of automated tests (nearly 100K of them), and we had someone who was very good at writing parsers. He spent a few weeks automating the changes and getting tests to pass, and the night he ran the final conversion was remarkably clean. We never even used `six`.