The B2B software company I have started 2 years ago, had to hire programmers fresh out of college initially because we couldn’t afford to hire experienced ones. My business has now taken off and we’re making a good amount of money, but our code base is a huge mess. There are certain parts of the code that everyone is afraid of touching and most of the code base has no documentation or test cases apart from generally being super messy.
I realise that to scale my business further, I will need to fix this problem. I have hired 3-4 experienced developers now but they are finding it difficult to get familiarised with the code fast because of these problems. A good number of my initial hires are still around with my company, but they haven’t really improved much in terms of the quality of the code that they produce. I want your advice on the following points:
The task of refactoring the whole code base feels like a really daunting task. I could break it into chunks and do it over a period of time but I want to ensure that we don’t fall into this same situation again. How do I do this?
How do I train my junior devs to write higher quality code without having to myself review every code change?
How do I establish a culture of code ownership in the company? Currently, everyone just implements whatever requirements come their way in the manner that will enable them to meet deadlines, and totally forget about refactoring it later on.
What are the best hiring practices to follow so that code quality is ensured?
If it helps: my technology stack is Django (python) on the backend and Angular on the front-end. We have a monolithic application structure and a single code repository.
Thanks in advance everyone.