Your first idea is probably bad 👎
Software is an evolving entity, not a finished product. You need to edit your code to improve.
Posts that deal with the subject of refactoring, or shows an example of a refactoring process.
(The book Refactoring is one of the books that shaped me.)