I find it works well to make small cleanups to a file or a function whenever you're already in the file to work on a feature or bug.
Leave the code a little bit better than you found it.
Tiny, incremental improvements add up.
And like you pointed out, code ghost can remain in a project long after it's no longer being used for anything. It's a great feeling when you can safely delete a bunch of old code and make the codebase smaller.
One of the biggest pitfalls of this approach is you end up with refactoring commits mixed with feature commits.
It takes discipline, organization, and understanding to put all of your refactoring first, then all of your feature, then more refactoring if you feel so inclined.
A 'driven' software engineer with a passion for cars and tabletop games. Get it, driven? Because cars and... Okay, I'll stick to writing code instead of puns. 🏁
Leave the code a little bit better than you found it.
Excellent way of going about it, just be mindful of changing too much and falling into the deep "Well I should just clean up this thing real quick... And that thing... Then these things..." pit. 🕳️
Kim Arnett [she/her] leads the mobile team at Deque Systems, bringing expertise in iOS development and a strong focus on accessibility, user experience, and team dynamics.
I find it works well to make small cleanups to a file or a function whenever you're already in the file to work on a feature or bug.
Leave the code a little bit better than you found it.
Tiny, incremental improvements add up.
And like you pointed out, code ghost can remain in a project long after it's no longer being used for anything. It's a great feeling when you can safely delete a bunch of old code and make the codebase smaller.
One of the biggest pitfalls of this approach is you end up with refactoring commits mixed with feature commits.
It takes discipline, organization, and understanding to put all of your refactoring first, then all of your feature, then more refactoring if you feel so inclined.
Excellent way of going about it, just be mindful of changing too much and falling into the deep "Well I should just clean up this thing real quick... And that thing... Then these things..." pit. 🕳️
Yes, I prefer development to be iterated, recursive development leads to issues :)
Shoutout to @ben for his scout rule shoutout :D
dev.to/ben/the-boy-scout-rule-is-n...