Ask HN: Inherited the worst code and tech team I have ever seen. How to fix it?
Just finished the project like that.<p>The website was terrible. Mixed encodings which messed everything up. all the routing in htaccess going to hundreds separate files. PHP 5.4, no version control and pretty much everything wrong that could be.<p>Company had a hot potato that was generating quite a few milion pounds. They actually didn&#x27;t had a programmer for a year, but because of pandemic fortunately old one decided to come back.<p>I had quite a lot of trust from owners as I developed two other side projects with them already, in crazy times. they knew they had to invest in technology or die and they said they want to do that.<p>We had to start from scratch, there was nothing salvageable there and files where 100k lines long with no explanation which one is run anywhere. I wanted to replace piece by piece, but because db structure and encoding, I really couldn&#x27;t find a way. whatever we would end up with, wouldn&#x27;t be decent thing, it would just be a frankenstein that then would have to be rewritten again ( although drastically better ).<p>I told owners how much it takes to develop similar project and said that this is not estimate as no one would know how long it will take ( they tried to redevelop this twice and didn&#x27;t manage to ).<p>The project struggled with a lot of issues. The other developer couldn&#x27;t really contribute anything even that I tried to pull him to new code. He ended up taking over product owner job on my advice as he was actually really useful to company, just not as coder. We couldn&#x27;t find anyone to work even that we paid pretty well and allowed people from any place in the world. We found two developers which were pretty skilled, but seriously didn&#x27;t do anything. I often deal with that, but in such a small project it&#x27;s just killing any productivity, including mine.<p>We managed to publish the project with large delay. It ended up being super rushed, but we generally managed to sort out most of the issues quite quickly.<p>We failed on one thing though. SEO. Even that the site increased in all the stats in webmaster tools, the reindexing wasn&#x27;t kicking in 5 months later. We hired SEO agency, but frankly they didn&#x27;t help anything. The issue had nothing to do with new site. Just we were in google bad graces with previous site and google just ignored our new links while removing old ones. I knew that will be the case with new site, but the benefits should drastically out-weight the cons.<p>At this stage company literally refused to pay me my shares and some money they did owe me ( they were broke waiting for new round of funding so I gave them a bit of leeway ). I had to stop working and I am suing them now.<p>The moral of the story is:<p>- Everything will take way longer than you expect.<p>You cannot divide and conquer such a large project. Any amount of planning outside of basic one will be just a waste of time as no one will be aware of all the features, some features are lacking and some are just plainly stupid. Any scope will change thousand times. Rewriting partially is way better, but it wasn&#x27;t possible in my case.<p>- Business will say they want to invest the money, but they don&#x27;t understand tech.<p>All the time, the solution to too slow progress was hiring more devs. Man hours are almost never a solution. Time is way more important investment. There also have to be contingency, as something will go wrong. In my case SEO issue will be solved, but it might take 3, 6 or 12 months, in which time the business will have to loose some sales.<p>- Communication with business is very hard.<p>At this same time, you need to explain the stuff will go wrong ( unless you have unlimited amount of time and resources ) and will be delayed. In this same time you want them to invest money in it. Frankly I failed on that the most. What I would make very clear now, is that those issues are caused by lack of investment over the years.<p>- Only go to it with good team.<p>I managed to build a very good team at the end, but it took a lot of bad apples to get there that wasted a lot of my time. People had the skills, but half of them tried to rewrite every piece of code not developing anything useful and the other half did just not do anything for weeks.<p>My view on that is: Unless business understand the need to change, have the money and time to do it, and you have a good team, don&#x27;t do it. Seems like you are 0 to 4.<p>Some businesses cannot be saved. It&#x27;s their fault they didn&#x27;t invest any money over the years and if you want to do tech, you need to have tech people in management or on board seats.