February 22nd, 2008

Gmail Spam folder Web Clips revisited

Hey, check it out! The funny Gmail Web Clips phenomenon I blogged about a couple years ago was the subject of a recent entry in the Official Gmail Blog.

Yes, at Google, went through the same steps I did, when I first saw “Spam Hashbrown Bake” at the top of my gmail window:

1. disbelief: Is that really a context-sensitive ad for Spam-related products, appearing at the top of my Spam folder view? Maybe it’s just a funny coincidence.

2. confirmation: [refresh page a couple times] Hey, it’s another recipe involving Spam, and another one! There’s something funny going on here!

3. research: Ms. Schneider one-upped me on this one. When I encountered this Spam folder Easter egg, all I had available to me was the Gmail help system (which seemed to imply that this context-sensitive Web Clip thing should not be happening). She has the benefit of being a Google insider, so she actually went and talked with a Gmail Product Manager about it.

Here’s what Ms. Schneider found out, regarding the origin of the Spam recipe Web Clips:

At first I was told that these recipes “were placed there by elves when we weren’t looking” (real cute), but Keith, one of Gmail’s Product Managers, eventually divulged the real story. Turns out that when they came up with the idea for Web Clips, they didn’t think it made sense to show these RSS feeds and ads in the spam folder. After all, these clips should be useful and fun, but spam (of the email variety) is neither of these things. Not knowing what to put here, Keith searched for “spam recipes” and decided to make a feed out of the results. As he said, “it was just one of those late night ideas” — probably a consequence of too many said [sic] energy drinks.

One thing that she may not have noticed, though, is that a similar behavior occurs when viewing your Trash folder in Gmail. guess she didn’t notice (or just didn’t mention) that the Trash folder also has trash-related Web Clips (see screenshot in my original blog entry about this).

It was nice to finally read an explanation about this mysterious Gmail behavior, after all this time. I didn’t even have to seek out the explanation–it came to me in a feed! :)

October 5th, 2007

Buy a new printer, or buy more ink?

Epson CX5000v All-In-One (printer/scanner/copier) (320×256) vs

I think it’s time for me to buy a decent printer. I’ve been using cheap printers for years, and it’s getting old.

For several years, this was my routine:

  1. Buy a new cheap inkjet printer for ~$30
  2. Use it until it completely ran out of ink
  3. Look up the cost of ink cartridges (about $50 for color + black)
  4. Whine to my friends and family about how buying ink costs more than buying a printer
  5. Throw the printer away
  6. Lather, Rinse, Repeat

Eventually, I found out that the ink cartridges that come with printers are not nearly as regular ink cartridges that one would buy to replace them. I also kept feeling guilty about throwing away printers that still worked– mainly because it’s bad for the environment (I’ve since learned that there is a designated place at the county landfill for computer hardware. I didn’t know about it back then, though. Not that it matters, throwing it away is still throwing it away, even if they’re just handling the trash differently.).

A few years ago, I got a Dell J740 printer, bundled with my Canon PowerShot S50 digital camera, as part of a very hot deal. The printer was not top-of-the-line, by any means, but it was much better than the $30 ones I had been using previously, and actually printed photos very well.

Unfortunately, when I ran out of ink, I could still not justify spending about $75 for replacement ink cartridges. It was actually a Lexmark under the hood, but it was branded by Dell, and had modifications that made it so Lexmark ink cartridges would not fit properly. So, pricing on the ink cartridges was controlled exclusively by Dell. I didn’t throw this printer away, though, because it really was great for printing photos. I kept it, in the hopes that eventually I could find a good deal on Dell ink cartridges.

However, I never really bothered looking for Dell ink cartridge deals, because I ended up buying another, similar, printer around that time. I was a fanatical Target clearance deal seeker at the time, and, with the help of the Target Clearance Deals thread on Fatwallet, picked up an Hewlett-Packard (HP) DeskJet 3820 for pretty cheap. It was the only one they had left at my Target store, and it happened to also be an open-box returned item. I think I figured out why it had been returned, later on.

The HP printed photos pretty well, but not quite as well as the Dell. The HP ink cartridges could at least be bought from various stores, though, so that became our primary printer for a long time, until just recently. Over the course of its lifetime, though, it did have a few issues, one of which was terminal. So, it’s dead now. I will go into that in more detail in my next entry.

So, I’m looking for a new printer, again. I saw a couple printers on clearance at Target, recently, for pretty cheap:

I was tempted to buy them both, but decided to do some research first. So, I snapped some pictures of them (linked above), so I could look up reviews online, from home. The reviews I found, for both of these printers, were almost all bad. I was still tempted to buy them, because they were dirt cheap and would probably get me by for a while, but I held off on that.

On a subsequent visit to another Target store, I checked out the printers on clearance, and found this one as well:

When I looked that one up, the reviews were much more favorable. But, I couldn’t justify spending $67.98, at the time, so I held off on that, as well.

I decided to do some research on the HP 3820, to see if there was some way I could fix it. I was able to find tons of information about this problem, and various solutions that others had used. I will be posting some more about that in an upcoming entry. For now, you can check out my del.icio.us bookmarks tagged with printers, hp, repair, and diy.

Sooo. At this point, I’m leaning towards buying a slightly better printer than I’ve bought in the past. From all the reviews I’ve read, recently, Epson seems like a good brand to go with.

If you have any suggestions for a quality color printer that prints text and photos well, doesn’t go through ink excessively fast (a common complaint with Lexmarks), and might actually last a long time, please leave a comment below! Extra points if it also functions as a scanner/copier[/fax].

July 5th, 2006

Bash history substitution

Anyone who has had an introductory unix course should know about the bash shell’s “history” command, which gives you a numbered list of commands that you’ve run previously.

You can execute one of those commands again by doing:
$ ![number] (for a particular command you’ve seen on the history list)
or
$ !! (for the previous command/last command in the history list)

One thing that I didn’t learn in any class, but did find out about from a co-worker, several years ago, was history substitution. It’s easy to run the previous command with minor changes, by using a caret-delimited substitution expression. Here’s a very simple example:

view a file:
$ cat spugbrap.txt

then, edit that same file:
$ ^cat^vim^

that gets expanded to (and executed as):
$ vim spugbrap.txt

I’ve used this feature countless times since learning about it, but it always suffered from a limitation: If the pattern you’re trying to match occurs multiple times in the previous commandline, this subtitution method only replaces the first occurrance of it. So, I recently decided to find out how to substitute multiple occurances, since I was sure there had to be an easy way. Here’s one way I found:

watch a couple of tomcat log files continuously:
$ tail -F ~/tomcat/logs/stdout_20060704.log ~/tomcat/logs/stderr_20060704.log

The next day, the log file names are different, because they’re date-based. so I want to change 20060704 to 20060705, and it needs to happen twice because the date occurs twice in that commandline. No problem! Assuming the previously executed command was the “tail” commandline, above, simply enter this:
$ !!:gs/20060704/20060705/

that gets expanded to (and executed as):
$ tail -F ~/tomcat/logs/stdout_20060705.log ~/tomcat/logs/stderr_20060705.log

What if my previous command was long, and I need to make multiple substitutions with multiple strings?

previous command:
$ tail -F stdout_20060704.log stderr_20060704.log host-manager.2006-07-04.log catalina.2006-07-04.log admin.2006-07-04.log localhost.2006-07-04.log manager.2006-07-04.log jakarta_service_20060704.log

to change the dates, which occur in two formats:
$ !!:gs/20060704/20060705/:gs/2006-07-04/2006-07-05/

If the command I want to run (with substitutions) was not the previous command, but some other command that appears in the numbered list from running ‘history’, put the history line number between the exclamation point and the colon:
$ !123:gs/oldstr/replacementstr/

For more information about this, and other bash history manipulation capabilities, check out:
Bash Features - Using History Interactively