Comment on How to Prepare for Refactoring in Python?Comments−rajacombinator5yBig fan of the two you mentioned. A couple more to add would be:- Use black to format your code. No exceptions.- Very modular code.- Tests, although this costs time of course. Focus on meaningful rather than trivial ones if needed.- Write comments explaining reasoning for particularly dense pieces of logic.If you practice most of the above, hard to see where you can go wrong.
Comments
Big fan of the two you mentioned. A couple more to add would be:
- Use black to format your code. No exceptions.
- Very modular code.
- Tests, although this costs time of course. Focus on meaningful rather than trivial ones if needed.
- Write comments explaining reasoning for particularly dense pieces of logic.
If you practice most of the above, hard to see where you can go wrong.