Matt Woodward's posterous

Matt Woodward's posterous

Matthew Woodward  //  * CFML, Grails, and Java Developer
* Principal IT Specialist, US Senate
* Open BlueDragon Steering Committee Member
* All-Around Geek

Jan 21 / 10:10am

Email Account Zero Achieved

In my "Email is Broken" post I outlined a game plan for getting myself out of the business of managing email. This morning I took a big first step in achieving email account zero, which is not only inbox zero but also means I don't have any email stored in folders in my email account.

Going back through my old email folders was pretty eye-opening. I had thousands of messages dating back to 2006, so for the most part I took the "if you haven't looked at it since you can't remember you don't need it" approach and deleted large swaths of email with reckless abandon. I at least scanned each folder to see if anything jumped out at me but (surprise!) it was all outdated crap.

I did have email folders for "Accounts," "Servers," and "Serial Numbers" that took a bit more attention since they had information in them I didn't want to lose. For those folders I looked at each email and moved the information to the following places:

  • If it was something like a server name, IP address, etc. I made sure it was in our server wiki on FogBugz
  • If it was login information for an application, I put that information in KeepassX
  • If it was a software serial number for server software (meaning not a personal serial number just for me) I made sure it was in our serial number wiki in FogBugz
  • If it was a software serial number for an individual license for me personally, I put it in a Tomboy note for serial numbers
  • If it was an email containing at attachment I wanted to save, I saved it to my local hard drive in a logically named directory
  • If there was email in my inbox that was only sitting there as a "to do" reminder, I put it in a "to do" note in Tomboy

Also I have one particular application that sends out a lot of alerts that contain important information, but that typically someone other than me has to do something about, so I took myself off that distribution list. The info is all saved in log files anyway so I can always trace it back that way if there is something I need to look at.

And with that I have zero email in my account, I'm much better organized, and I'm not relying on email as a filing cabinet. Email wasn't designed for that so it's no wonder it sucks at it.

Much more ahead but this big step eliminates a lot of what Scott Hanselman calls "psychic weight" I was feeling related to my email.

Next up is adventures with StatusNet and stopping treating email as IM.

Filed under  //  Productivity  
Jan 19 / 9:39pm

Email is a Broken Communication Medium. Here's What I'm Doing About It.

I had many, many, many thoughts today on why email is a completely broken communication medium in the workplace, both in terms of its effectiveness as a communication tool and in terms of the horrendous unproductive time suck it can so easily become.

For example, when there are issues with production systems high-speed, high-volume email threads between co-workers should not be the primary means of communicating. Generating a horrendous amount of noise and distraction in a crisis is pretty much the last thing you want to do, and certainly reading and replying to emails about a problem should not make up 90% of the time spent solving the problem.

Furthermore, in a lot of organizations email is seen as something it's not, namely a synchronous, instantaneous medium. Email is not IM. Email isn't a ringing phone that someone has to answer right away. We need to stop thinking of it that way.

Sure, email is delivered more or less instantly, but the habit that I (and I'm sure others) fall into, particularly if you get an alert sound or some other indication every time you receive an email, is checking the old inbox as a Pavlovian reflex.

Rather than merely flapping my gums with an "email sucks" rant, I'm finally annoyed enough with the problem and convinced about how bad it is on numerous levels (some companies think it's so bad they're banning email entirely) that I'm going to do something about it. Doing something--anything at all--is better than doing nothing, so here's what I came up with so far.

First, I installed StatusNet on a server so my co-workers and I can pilot it. To me that's pretty much "problem solved" for a lot of issues but I'm sure some folks will take some convincing. That's understandable, but I'm remaining optimistic for the moment. (My colleagues and I have about a gazillion ideas on just how counter-productive and horrible email is as well as how StatusNet will be used and some of the problems it'll solve, so I should have more to say about that as we put our lofty theories into practice.)

Second, I am adopting the following rules for my work email:

  1. Inbox Zero. No almosts. No exceptions. Zero means zero. Included in this is not using my inbox as a to-do list, something of which I am horribly guilty.
  2. No folders or saved email. No exceptions. If something in an email is important enough to save, it must be saved somewhere appropriate for the specific type of information, be that a wiki page, Keepass, a good old-fashioned browser bookmark, or whatever. My email account will no longer be used as a filing cabinet.
  3. I will not check my email every time I hear my phone buzz. I will add a hopefully not-too-offensive note to my email signature explaining that if something is urgent and requires a reply any sooner than 1 hour minmum, people should contact me via IM or phone. (There may be some issues with the defintion of "urgent" during the adjustment period but I think this is a good starting place.)

Throw some Pomodoro Technique into the mix and I'll probably be so productive my hair will catch on fire.

I'd be interested in hearing your experiences with this. How do you treat and handle email? Have you tried to break the email habit? If so, what worked and what didn't?

When I look back at a day like today and the amount of actual work accomplished is such a small percentage of the 14+ hours I spent furiously working on issues, that's a clear indication something is drastically wrong. Even if some of what I outline above fails it's better than the status quo, because the status quo is failing miserably.

Filed under  //  Productivity  
Aug 12 / 4:28am

File Manipulation on Windows Servers from Linux

This is more of a handy tip than anything earth-shattering, but yesterday I was faced with the task of grabbing all files with a particular extension from a nested directory structure, moving them all into a single directory, and renaming them with a different extension. I also had to be careful to preserve the original timestamp of the file.

The files reside on a Windows server, and needless to say the thought of remoting into the Windows server and spending the afternoon drilling into nested directories, sorting by file type, and manually moving and renaming the files didn't appeal to me.

One of the great things about Linux is how powerful the shell is. Let me preface this with saying I'm not a DOS expert, so maybe there's a way to do this in DOS (or PowerShell, which I've never tried), but I knew I could probably accomplish this entire task in a couple of commands in a bash shell.

Step 1 was to mount the Windows server drive:

sudo mount -t cifs //server.dns.or.ip/sharename /mount/point -o user=username,password=password

Note that "/mount/point" is the local directory where you want to mount the share. I tend to use something like /media/servername-driveletter because mounting everything in /media is easy to remember, and on some distros this will also cause the drive to show up on your desktop (though this doesn't happen on Kubuntu).

With the drive mounted, I navigated to the top level of the (rather nasty) nested directory structure and ran the following:

find ./ -name "*.fileextension" | xargs -i mv {} /mount/point/destinationdirectory

What this does is traverses the directory structure, finds all the files with the file extension I needed to move, and pipes that into the move command. The "xargs -i mv {}" bit basically says "get your arguments for the command you're about to execute from the standard input (which is the list of file names kicked off by the find command) and replace {} with the data from standard input." Then of course /mount/point/destinationdirectory is the directory into which I want to move the files.

A note if you want to use copy (cp) instead of move (mv)--this does NOT retain the original timestamp. The cp command has a -p option that preserves the original timestamp, but this did not work for me when I was mapped to a Windows share. Apparently this is because I'm executing the command as one user on Linux and that user doesn't have permission to change the timestamp on the Windows side. If you were logged in with the same user name on both sides maybe this would work, but I didn't try it.

So with step one completed, I just needed to rename all the files with a new file extension, or in my case I was actually just removing a second file extension since the files were named in the format "filename.ext1.ext2" and I just wanted to remove the ".ext2" part.

After navigating to the directory into which I moved all my files, that was another one-liner in the terminal:

rename -v 's/\.ext2$//' *.ext2

The rename command in bash allows for the renaming of multiple files using Perl regular expressions as the criteria for the rename operation. In this case I just wanted to lop off the .ext2 bit, and apply that to all files with the .ext2 extension. The -v option is for "verbose" so I could watch what it was doing while it did it, and if you're nervous about what might happen, you can use the -n option to have it show you what it would do with your command but not actually do it.

So a bit of research and help from a Linux guru friend, and the drudgery of file moving and renaming was reduced to two commands in a bash shell. With some clever piping I probably could have even done this in one line.

I suppose my point with all of this is when I'm faced with little tasks such as this one, I try to take the time (unless I asbolutely can't) to find a way to accomplish the task elegantly and in a way I can use again, as opposed to blindly saying "there goes the afternoon," shutting off my brain, and dragging files around in a GUI. Not only does this make me more productive, but I learn something in the process, and it's something I can use and alter time and again in the future to make boring tasks a lot less work.

Comments

There is a pretty easy way to do this in Windows using pure GUI (and there are ways to do this in DOS as well.)

If you're ever in a situation where you've got to use the Windows GUI, then just do a Windows "Search..." (right-click on folder, choose "Search...") and use the extension as the filter.

It will then return every match in that directory tree. You can then select all the files, right-click and select "Cut".

Last, just paste them into the directory you want.

I've used this technique to quickly clean up .tmp files from a folder and occasionally to remove all the .svn folders from a directory.

The danager of mounting samba/cifs shares with the username and the password on the commandline is that during the mount operation the process listing will show the mount command AND show the username and password just as its written on the CLI. Not a huge risk, but worth noting that on a multiuser system any other user that does a process listing can intentionally or accidentally read the credentials.

@Dan--thanks for the Windows tip. That covers the move part at least, and I assume there's some relatively easy file rename command in DOS that would keep you from having to do the file renaming file by file.

@Steven--good point; I guess I wouldn't want to be in a situation where someone I didn't trust had access to the system ;-), but that's definitely worth pointing out. If you're doing this from a Linux server that may have multiple people with access, you'll want to be aware of this.

FYI, the xargs command uses the environment variable space to communicate the file list from the find command. If the paths are long, or there are more than X files, xargs will blow up because it has exceeded the maximum allowed environment storage. A better choice is to use the -exec switch on your find command.

Here's an awesome reference of find goodness:

http://www.athabascau.ca/html/depts/compserv/webunit/HOWTO/find.htm

I guarantee there's a pile of useful stuff find can do that Windows GUI search cannot.

Thanks Jason--good info. So much Linux to learn, so little time. ;-)

Filed under  //  GNU/Linux   Productivity   Professional Development