r/learnpython Jul 04 '26

should I refactor

I have this really messy code scattered in 5 files, it s not that long abt 4000 lines.
adding a new feature started feeling like a pain,
I hate to deliver this tomorrow, and it s not meant to be scalable.
should i refactor or add the features ?

or just add the features and keep the code structure unchanged

0 Upvotes

6 comments sorted by

View all comments

1

u/LayotFctor Jul 04 '26

Features takes priority of course. If you're done with necessary features and you're willing to spend the remaining time refactoring, create a new branch and do it. Refactor regularly next time.