Collective memory (was: Good code patterns in Python)
peter at engcorp.com
Mon Jul 7 05:03:05 CEST 2003
Michael Sparks wrote:
> > One really funny problem was when I guy reformatted his Python code,
> > around 15K lines of it, and basically unindented *ALL* of the code to
> > column 1. It was the only recoverable copy of the code too.
> > He had to read the entire program line by line to recreate the logic.
> I changed all the permissions in /etc once by accident as well. (to 777
> IIRC) This quite spectacularly busted my system, and that took a long
> while to sort out. At the time that was probably a similar number of lines
> affected by a pretty stupid simple action.
> What's the moral? Backup regularly and often and especially before doing
> something that touches a significant amount of stuff.
Actually, the moral is "use a revision control system". Anyone not doing
so should not be programming professionally.(*)
*) I speak as someone who programmed professionally without using a good
revision control system, for a while, and made some serious mistakes
as a result. Backups are *not* sufficient, but merely a slight step
up from doing nothing at all.
More information about the Python-list