Archive for Productivity

Changing how I handle emails

This past week was pretty hectic:
- On Monday, I flew up to Kirkland and back to catch up with the Webmaster Central team.
- On Tuesday, I drove up into San Francisco for a Web 2.0 dinner
- On Thursday, I hosted a visitor from Italy.
- On Friday, I ate Buck’s in Woodside for the first time.
- On Saturday, I spoke at WordCamp. I’ll check with Google PR to make sure they’re okay if I put up the PowerPoint. In the mean time, Stephanie Booth live-blogged it.

I also managed to talk to folks on my team and get work done, but I didn’t have a lot of spare time (e.g. to blog about some of the stuff above). When I looked back over the week, my biggest time sink was email. Handling email is getting to be the largest fraction of my time.

I’ve tried all kinds of tricks to reduce the email load:
- I archive any mailing list that I don’t really need in my inbox.
- I try to check email fewer times during the day.
- I write replies to emails, then save them as drafts for a while before replying, so I don’t get stuck in a cycle of replying, getting a response, and quickly emailing again.

This week (with a little prodding from a friend), I realized that it’s still not working. I’m barely keeping my head above water, email-wise. I need a different approach. I can see a couple options:

1. Go “lossy.” Let a few emails drop on the floor. I’m already doing this from time to time, like when someone emails out of the blue asking for an interview or something that would take too long.
2. For emails from outside Google, shard the workload and ask for help.

I’ll probably do both, to some degree. If you’re emailing me from outside Google and expect a personal reply, you might want to lower your expectations going forward. If I can reclaim some of the time that I spend on email, that will let me spend more time with my webspam team, my wife, and blogging about random stuff. :)

Comments (45)

A quick tutorial on screen

Suppose you want to run a program persistently (even if a terminal window closes, for example). For that, you might use the nohup command. But what if you want to start a command-line session on one computer and then go home and resume that session? For something like that, you’ll want to use screen. Screen is also really handy because you can have multiple shells running in one terminal window.

Here’s the basics of how to use screen on a Linux/Ubuntu machine. First, create a session:

screen -S sessionname

It’s good to choose a descriptive session name. For example, before I switched to using Gmail I used mutt. So I would often start a session with the command “screen -S mutt” in one terminal window. If I went home, I could attach to that session from home, so I never needed to start-up or shutdown mutt.

You can easily have 10 interactive shells (numbered from 0 to 9) open in one terminal window. When you start a new session, you’ll be in shell 0. To create a new shell, hold down the “Control” key, press and release the ‘a’ key, and then type the letter ‘c’. I’ll write this as:

To create a new interactive shell, press Control-a c

Switching between shells is easy too.

To switch between shells, press Control-a # where # is the number of the shell. For example, to switch to shell number 1, press Control-a 1

VoilĂ ! Now you can easily run 10 different shells in one terminal window! But what about if you want to go home and attach to a session from home? Use something like ssh to get on your work machine. Then here’s the command:

screen -d -R sessionname will resume a session that you started in a different location.

Technically this command is doing some special things. If you started the session somewhere else, the “-d” option will “detach” it at the other location, and “-R” will reattach your current terminal window to the session. If sessionname hasn’t been created, it will create the session for you. So the command above will migrate a session to your current window and disable the session at other locations. That’s usually what you want.

To exit a session, it’s easiest to exit all the shells in the session. If you want some more info on screen:

Control-a ? will give help inside of screen.
Typing “man screen” at a Linux command-line will show more help on screen.
There are web pages with more info on screen.

Update: If you want to know more about screen, see my post about .screenrc.

Comments (24)

Three solid Gmail productivity tips

If you’re a techie person, email is essential but it’s hard to stay on top of all of it. If you use Gmail and Firefox, here’s a few tips to get email under control.

The first tip is remedial: keep most mailing list emails out of your inbox. I already prune as much of my Gmail inbox email as I can. I subscribe to a bunch of mailing lists, but add filters like “If the email is to some-mailinglist, skip the inbox.” That way it doesn’t clutter my inbox (which is my to-do list), but it still gets indexed so that I can search for it later.

Once you’ve done the first tip, you probably still end up with a lot of email. How can you prioritize the most important emails, such as the emails from people that you work closely with? Here’s how:

  1. Install Firefox and Greasemonkey. If you’re a techie, odds are you already have both of these running.
  2. Go to this page and click on the “Saved Searches” link to install a Greasemonkey script that augments Gmail with persistent searches. This script was written by Mihai Parparita, a Google engineer who actually works on Google Reader, not Gmail.
  3. Go into Gmail and you’ll see a new sidebar with several example searches. It looks like this:
    Persistent searches sidebar
    To run a saved search, just click on the search you want to run in the sidebar. Click on “Edit Searches” and add a new search for the team of people you work with.

How do you add a new search? It’s easy. Imagine that you work at Example.com and you work with a team of three people: Alice, Bob, and Carol. This search would find emails from any of those people that are still in your inbox and that are directly to you:

to:me AND label:inbox AND (from:alice@example.com OR from:bob@example.com OR from:carol@example.com)

So let’s click on “Edit Searches” in the sidebar and add this new search. Here’s what you’ll see:

Persistent searches user interface

Under the text “Create a new persistent search” fill in the “Label” field with something like “My team” and in the “Query” field, add a query like the one I mentioned, then click “Save Changes.” If you want, you can move your new saved search up to the top of the priority list (the script comes with a few default searches).

Now when you’re facing a bunch of email in your Gmail inbox, you can click on the “My team” link and you’ll see the most important emails that you need to respond to first. You can add quite a lot of people, too. :)

There are all sorts of other tricks you can do with labels and persistent searches. You could make a persistent search for different groups of people at work, or a search for email from your family.

Here’s one last tip. Suppose you work at Example.com and you get a mix of email from inside Example.com and from outside. You want to exclude any outside email (that is, any email that’s not from example.com). From the inbox, click on “Create a filter”. In the From: field, enter the rule -example.com . Then click “Next Step” and create a new label called “outside” and click to create the filter. After creating the filter and label, you can do queries like “to:me AND -label:outside AND label:inbox”. Now you easily can jump back and forth between handling internal and external email.

By the way, big props to the Gmail team for making a great web email product, the Firefox folks for making a great browser for Gmail plus the rest of the web, Aaron Boodman for his Greasemonkey script, and Mihai Parparita for his persistent searches script (Aaron and Mihai both work at Google). Oh, and I guess thanks also to the Google Code and open source team for offering the free source-code project hosting that Mihai is using for his scripts. All of these projects help a ton of people in day-to-day life and generate massive positive karma. :)

Okay, anybody else want to offer their best email/Gmail productivity tip?

Update: Paul Buchheit, one of the original architects of Gmail, dropped me a nice note to refine one of the tips above. Here’s the refinement, quoted with his permission:

Gmail query syntax is pretty flexible. You can rewrite
(from:alice@example.com OR from:bob@example.com OR from:carol@example.com)
as
from:(alice|bob|carol)@example.com

I learn something new every day. Thanks Paul! :)

Comments (41)

How to fetch a url with curl or wget silently

Cron jobs need quiet operation; if a command generates output, you’ll get an email from cron with the command output. So if you want to fetch a file silently with wget or curl, use a command like this:

curl –silent –output output_filename http://example.com/urltofetch.html

wget –quiet –output-document output_filename http://example.com/urltofetch.html

There are shorter versions of these options, but using the verbose options will make code or cron jobs easier to understand if you come back to them. Be aware that urls with “&” in them can confuse wget at least, so depending on your shell (bash, csh, tcsh), you may need to put single or double quotes around the url.

Comments (19)

Productivity tip: make “howto” files

I picked up a good trick from Russ Taylor in grad school. He kept a “howto” directory, and any time he ended up doing a bit of research to find out how to do something, he’d document it in a tiny file in a howto directory. I picked up the habit, and in my personal howto directory at Google I now have 1750+ little files. They can be as simple as how to do a gnuplot with dates or how to restart a particular web server, or they can be as long as you like. In the worst case, just take the command you lovingly constructed and just copy and paste it into a text file. For example, I’ve got a file called “extract-tar-files-to-stdout” with one line:

tar -xOf freedb-complete-20040908.tar | grep DTITLE | less

These days, I’m trying to train myself to throw my how-to files up on the web instead.

Comments (45)

Next entries » · « Previous entries