Skip to content

Comment on How to Prepare for Refactoring in Python?

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.