There is also plain ol' technical debt: Code that is overengeneered, unstructured or hacky because, when you wrote it, you were still exploring the problem space.
Now that you have a better idea of what problem to solve and how to solve it, you can restructure the code to be more concise and overall more efficient in reaching your goal.
I think it's advisable to clean up your code like that before publishing, just like it's advisable to clean up your git commits before pushing a merge request.
Now that you have a better idea of what problem to solve and how to solve it, you can restructure the code to be more concise and overall more efficient in reaching your goal.
I think it's advisable to clean up your code like that before publishing, just like it's advisable to clean up your git commits before pushing a merge request.