Archives for July 2007

An unusual email from Amazon

I got an unusual email from Amazon today:

Domino subscription

I’m sure that Domino is a fine magazine, but I told Amazon not to send me anything promotional. So I checked my communication preferences on Amazon. Yup, they’re not supposed to send me any emails like this:

Amazon email preferences

What’s up, Amazon? Ian, tell Amazon folks that they burnt a teeny bit of my goodwill this morning. And that I’m still hoping Amazon implements a couple of these suggestions. ๐Ÿ™‚

I want to do a constructive post, so I’ll add one more Amazon suggestion: provide a way to see the sales rank of a product over time. For example, if someone recommends a photography book, it would be really neat to see if that changes the sales for that book at all.

Update November 19, 2007
:

Someone from Amazon actually contacted me a couple days after this post went live, and I’ve been lax on posting their reply. I’m adding the email that I received (with permission):

Hi Matt —

My colleague Ian McAllister showed me your recent blog posting asking why it was you received an email from Amazon letting you know you were eligible to receive a free 12 month subscription to Domino magazine, even though you had set your Amazon privacy controls to not receive any “promotional” emails.

The email you received was not a promotion. It was a follow up e-mail that we promised we would send to you when you made your purchase. As stated on the site, customers who made qualifying purchases in Amazonโ€™s Home & Garden store would receive an email with instructions letting them know how to opt-in for their free, one-year subscription to Domino.

I hope this answers your question, and thanks very much for your feedback.

–Patty

Patty Smith
Director of Corporate Communications
Amazon.com

On one hand, to a regular user like me, it still felt like a promotional email. On the other hand, I give Amazon props for replying to my blog complaint promptly, and I understand why they didn’t consider the email to be promotional. Now, if I could just convince Amazon to implement some of the tweaks I’d like them to do. ๐Ÿ™‚

Screen power tips: .screenrc

If you’ve read my brief tutorial on screen and want to know more, here are some power user tips:

screen -ls will list the current screen sessions running on a machine.
Control-a Control-a will toggle between your current shell and your previous shell.
Control-a d will detach a session.
Control-a ” will show all the current shells. Use the up/down cursor keys and then press enter to select a shell.

Those commands will help you navigate the windows within a session.

In most Linux terminals, Control-a takes you to the beginning of your line. Suppose you want to keep that behavior? Luckily it’s easy to bind screen’s “escape” key to something other than Control-a. You can modify screen’s settings by creating a ~/.screenrc file in your home directory. Here’s what my .screenrc file looks like:

escape ^Bb # Instead of Control-a, make the escape/command character be Control-b

autodetach on # Autodetach session on hangup instead of terminating screen completely

startup_message off # Turn off the splash screen

defscrollback 30000 # Use a 30000-line scrollback buffer

termcapinfo xterm ti@:te@
# From http://www4.informatik.uni-erlangen.de/~jnweiger/screen-faq.html
# Q: My xterm scrollbar does not work with screen.
# A: The problem is that xterm will not allow scrolling if the alternate text buffer is selected. The standard definitions of the termcap initialize capabilities ti and te switch to and from the alternate text buffer. (The scrollbar also does not work when you start e.g. ‘vi’). You can tell screen not to use these initialisations by adding the line “termcapinfo xterm ti@:te@” to your ~/.screenrc file.

Most of these settings are pretty self-explanatory. Anyway, that’s how I set-up my screen. ๐Ÿ™‚

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.

Udi Manber interview

Eric Enge posted an interesting interview with Udi Manber of Google (Udi is a VP of Engineering at Google). Udi mentions that the goal of personalization is to improve overall search relevance (not to make SEO harder). Udi also talked about trying to make Google’s search algorithms more elegant:

[W]e have projects that their sole purpose is to reduce complexity. A team may go and work for two months on a new simpler sub-algorithm. If it performs the same as the previous algorithm, but it’s simpler, that will be a big win and people are encouraged to do that, and some of the improvements that we are making over time are those kinds of improvements.

It’s also nice to get more backup on the role of humans in Google search quality:

Eric Enge: What about the notion of the role of humans in search? There is another post by Matt Cutts where he talks a little bit about ways that Google is using human input. People can say they don’t want to see a particular site in their results, or they can vote on it if they have a Google Toolbar installed, and that sort of thing. Do you see Google looking for more ways to, scalable ways obviously to take advantage of human input?

Udi Manber: Absolutely. As Matt has said, we have done it from the beginning. If a website points to another website, that’s a signal, that’s a signal from a user and we use that signal. If somebody says they don’t like a particular search result that’s a signal. So, we’ve been using that for a long time, and we are working on new ways of using it.

You might also have seen that Dare Obasanjo attended Google’s Scalability Conference and wrote up an interesting session with Marissa Mayer:

Q: How do they tell if they [Google] have bad results?
A: They have a bunch of watchdog services that track uptime for various servers to make sure a bad one isn’t causing problems. In addition, they have 10,000 human evaluators who are always manually checking the relevance of various results.

At this point, if you think that Google doesn’t try to utilize human feedback in scalable, robust ways then you need to adjust your mental model. ๐Ÿ™‚ See some of the previous discussion for more background.

iPhone user agent

The iPhone launched with this user agent:

Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3

Here’s a tip to find out the user agent for any browser or device that you’re on (e.g. a kiosk at a mall, a different cell phone, or something else that you tinker with):

– Go to Google
– Search for the word phpinfo. If you visit a webserver running the phpinfo() command, the resulting web page will tell you info about the web server, but it will also tell you about your browser’s user agent.
– Look for a page that actually runs phpinfo() instead of documentation about phpinfo(). Usually there’s a few such pages in the top 10. If you’re having trouble finding a phpinfo() page, you can do a more specific search for the words phpinfo http_user_agent.
– Click on the phpinfo() page and near the bottom of the page look for a string called HTTP_USER_AGENT. You’ll see something like this:

phpinfo user agent

Sorry that the picture runs in the right-hand column; I didn’t want to clip or resize the image. I took this picture running Firefox on my Ubuntu Desktop, so that’s the user agent you see. But this tip works with iPhones and almost any other browser that can search on Google.

css.php