My New Year’s Resolution

Saturday, January 1st, 2011

In 2011 my New Year’s resolution is to do more things the easy way, even if it takes longer the first time. I am going to stop using brute force to solve problems. In particular:

  • I am finally going to memorize how one redirects both stderr and stdout to the same stream. (2>&1 |)
  • I am going to learn the sed? trick my advisor showed me 20 years ago for repeating a command from the shell history while substituting one word for another, instead of just using the arrow key to backup to and erase the string. (^string1^string2^ or !!:s/string1/string2/ or for global substitution, not just the first occurrence !!:gs/string1/string2/)
  • I am going to increase my regex fu and use regular expressions consistently instead of just editing 20 lines of copy and paste code. (This would be easier if every editor didn’t have subtly different syntax.)
  • I am going to use Python to automate repetitive tasks.