Do's and Don'ts

grinder on 2002-02-11T17:46:11

Here is a list of Do's and Don'ts for enlightened program development.

  • First off, when the usual person in charge of backups takes Friday off, do not forget to insert a tape into the DLT tape drive so that Friday's files get backed up.

  • Do not work on a new version of an production script by running cp `which important-script` . rather, rename it to something else.

  • Do not use cp in a different session window to copy output datafiles from said script from one directory to another, simply because the second directory happens to be accessible from a Samba share so that you can import the data into Excel.

  • Do not get confused about which window you are in and re-run the cp command using !cp, thereby reinitialising the contents of your updated script back to how it was before you started hacking on it two days ago.

  • Do alias cp to cp -i. It's not just for root!

  • Do print out the script on hard-copy from time to time, even if it was Friday midday, because at least then you don't lose quite as much work.

  • Do get a better version of vi than Solaris' shi^Wbraindead implementation. At least one that creates ~backup files.

  • Do know how to touch-type, so that at least rekeying 12 pages of Perl code doesn't take so long, even if that is a meagre consolation.

Man I hate when that happens.


No Backups

vek on 2002-02-11T18:26:43

I've made a similar mistake myself. I forgot to commit my latest changes to CVS on a friday night before I went home. Monday morning in a pre-caffeine haze I decided it would be a good idea to save a config file. No problem there I hear you cry. Well I also decided it would be a good idea to name the config file the same name as my program. I can't really say why I did that only that the next words out of my mouth were "oh fuck". Not to worry I thought, a quick call to my sysadmin should solve that because he'll have the backup from Friday night right? Wrong. "Oh, for some reason the backups on that box haven't worked since last Wednesday" - was the reply I received from said sysadmin.

I think I nearly cried :)

zsh

koschei on 2002-02-12T02:43:04

Nice thing about zsh's ! completion is that (I think by default, or at least by option) it just completes the line for you - it doesn't just execute it. So you can then check it was what you wanted or edit it as needed.