The original text is a recent hot post from Hacker News:
Inherited the worst code and tech team I’ve ever seen, what to do?
The translation is reproduced from: https://v2ex.com/t/881625
I had to find a strategy to solve this development team’s problem, not directly manage the team. The status quo is as follows.
This code generates over $20 million in revenue annually
runs on PHP
Have been developing directly in production for 12 years, without source control (all this index-new_2021-test-john_v2.php).
Not using composer or any dependency management. Both are require_once.
don’t use any framework
Routing management is completely rewritten in NGInX (NGInX configuration is about 10,000 lines).
Over the years, only code has been piled up, and no code has been deleted. I think this is because it is too risky to delete things directly in production environment.
The database structure is also a mess, no migrations, etc. When adding a column, due to the large amount of data, they will create a new table and then use join.
The same goes for JS and CSS. Multiple versions of jQuery fight each other, depending on which page you’re on, even on the same page.
Of course there is no MVC pattern, or whatever. There is no template library. This is the PHP2003 style.
In many places I see files like Controller making curl requests to it’s own rest API (via domain name, not localhost) for oauth authorization, etc. Just to get a menu item or product list…
No caching (but there is memcached, but only for Session…)
There are 3 people in the team, allprimary development. One background, one foreground, one iOS/android. The resistance to reform is huge.
Productivity is understandably poor. There are so many messes that there is no way to do anything new.
The business units have fairly aggressive planning because management and headquarters don’t really understand these code barriers. And after COVID, budgets are really tight.
I know there should be a complete rewrite, but how do I choose?
Original address: https://news.ycombinator.com/item?id=32883596
#years #PHP #code #version #control #generating #million #annual #revenue #News Fast Delivery