The script worked when you wrote it. Eight months later it fails at line 12 with a message about a missing attribute, because the library it depends on changed and your code was never touched. Finished programming work does not sit still; it lives inside an environment that keeps moving, and caring for it means a small amount of attention at predictable intervals rather than a rescue mission once a year.
Write down what it needs to run
The single most protective act is a requirements file with pinned versions, committed next to the code. Without it, a fresh install six months later pulls whatever is current and your program is running on software you have never tested. With it, you can rebuild the exact environment, and you can see precisely what changed when you choose to update.
Add the Python version too, in the README or a small config file. The version is part of the dependency, and forgetting it is a common reason a two-year-old project refuses to start on a new machine.
A maintenance rhythm instead of a panic
Pick a frequency and stick to it: quarterly is enough for a hobby tool, monthly for anything someone else relies on. On each pass, do the same short round of checks.
- Run the program on a known input and confirm the output still matches what you expect.
- Install updates in a copy of the environment, run the checks again, then keep or discard the update.
- Read any warnings the program prints; deprecation notices are early invitations to fix something.
- Confirm the data source still exists — a URL, an export format, a folder path.
- Note the date and result somewhere, so next time you know where you left off.
Protect the copy that works
Before any change, keep a copy of the working version. A folder of dated archives, or a tagged commit if you use version control, means an experiment that goes wrong costs you minutes instead of an evening. The rule is simple: never modify the only working copy on a day when you also need it to work.
Back up anything the program generates and cannot regenerate, and back up the data files that are awkward to recreate. Code is usually recoverable from memory; a carefully cleaned input file is not.
Keep the documentation honest
A README that describes a version you no longer have is worse than none, because it sends you down a path that ends in confusion. When you change how the program is started, or what it expects, update the first ten lines of the README in the same sitting. That is the part people read.
Record the one thing you always forget: the exact command, the working directory, the environment activation step. Future you will be grateful for a two-line example that actually runs.
Retire it deliberately
Not every project deserves indefinite care. When a tool no longer earns its maintenance time, archive it: a final commit, a note saying it is retired and why, and a copy in cold storage. Retiring on purpose is cleaner than letting it rot until something breaks and you cannot tell whether it matters.
Care for finished work is mostly small and boring, and that is the point. Ten minutes a quarter keeps a useful program useful, and leaves your attention for the next thing you want to build.