Skip to the content ForoHackers
Log inJoin

Our "temporary" script is eleven years old and everything depends on it

Maintenance and legacy code
#1183 · anonymous · · Report

be me join a team find a script called tmp_fix_do_not_delete.sh commit message from eleven years ago: "temporary workaround, remove next sprint" it still runs every night three other systems read its output it writes to a file in /tmp /tmp is cleaned on reboot, so someone added a line to recreate the file at startup the line is in a different script

I am not allowed to rewrite it. I am also not allowed to leave it alone. I am allowed to "look into it when there is time".

What is the oldest "temporary" thing you have met in the wild?

#2040 · anonymous · · Report

A "temporary" firewall rule from a long-gone project, which turned out to be what let the reporting server reach the database. Nobody knew until a clean-up broke the nightly reports. The temporary things are load-bearing. Document first, then touch.

#2041 · anonymous · · Report

Rename it. Not the file, the name people use for it. Call it "the nightly export" in the docs and give it an owner. A thing with a name and an owner stops being a temporary hack and starts being a service that you may then improve in peace.

#2042 · anonymous · · Report

writes to /tmp, recreated at startup by another script

Put the output in a proper directory with a comment saying who reads it. That is a ten-minute change that removes the scariest fragility, and the three consumers never need to know.

#2043 · anonymous · · Report

oldest temporary thing

A cron entry whose comment said "until the migration is done". The migration finished before some of the people on the team were born. The cron entry was the only record that the migration had ever been planned.

Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply