Re:Ask HN: product doing very well but growing technical deb...
by codewright on Sunday November 18, 2012 @02:12PM
(#4801253)
I have a fair amount of experience dealing with this, as a contractor, full-time employee, and CTO. My background is even predominantly Python (used to do Django back in the 1.0-1.2 days).
The best advice I can give you is to do it step by step and don't let yourself get overwhelmed. It's just work. Just do the work. Here are some steps to take:
1. Start cleaning up and commenting the code. Start using a linter. Don't attempt to refactor aggressively here. Don't refactor at all. Just surface details for now.
2. Start adding unit and functional tests. If you have an API, test against it. As much coverage as possible.
3. Start refactoring, breaking things, then fixing the tests.
4. Repeat #3 until it's a clean codebase. This is the point at which you'd start looking at performance and coupling too.
The best advice I can give you is to do it step by step and don't let yourself get overwhelmed. It's just work. Just do the work. Here are some steps to take:
1. Start cleaning up and commenting the code. Start using a linter. Don't attempt to refactor aggressively here. Don't refactor at all. Just surface details for now.
2. Start adding unit and functional tests. If you have an API, test against it. As much coverage as possible.
3. Start refactoring, breaking things, then fixing the tests.
4. Repeat #3 until it's a clean codebase. This is the point at which you'd start looking at performance and coupling too.
A little bit at a time and don't get overwhelmed.
I'll send the consultancy invoice tomorrow.