Tuesday, November 26, 2002

Managing mailing list messages with folders and rules--solving problems that may keep you from trying it

People often find reading list messages challenging, especially if they've not set up rules and folders for them. Or if they have tried, it's a hassle. In this tip, I'll show how to handle this in Outlook. The steps may reasonably apply to other mail programs.

First, let me set the motivation for bothering (again, once you learn the tricks, it's no bother at all).

If you just let all the mail messages come into your inbox rather than have rules and folders, it gets messy real fast. You may find that a list has a sudden flurry of notes on a topic you don't care about and wish you could "not be bothered", or you may find can't easily identify messages from a particular list because the subject line doesn't say it's from the list. Or it may just be challenging keeping up with a large flow of mail. Wouldn't it be nice to leave the messages from a particular list to tackle all at once (in a dedicated folder). That would also make it easy to see if a question's already been answered?

Some may think folders and rules they don't work well because they can't see them, or they're a hassle to set up. A couple of tricks for working with them are:

1) They don't have to become a black hole where you don't see them unless you look in the folders. The thing is, some people don't see the folders listed all the time, so they fear that by putting the messages in a folder, they'll never see them. You can choose to have all your folders displayed all the time in a panel on the left. In Outlook, choose View>Folder List.
2) They don't have to become one long list of dozens of folders. You can create folders within folders.
3) Indeed, I create a folder of _lists-important and _lists-less important, and then create a folder in either for each list according to its importance to me to keep an eye on. 4) Notice too that I used an underscore in the names so that they show up at the top of the list of folders, just under the inbox. That way, when I return to the main inbox to view email ctrl-shift-i is a shortcut for that), I see the list of list folders right there on the left al the time.
5) Finally, Outlook highlights folders in bold if they have unread messages in them, so it's easy to tell at a glance which have messages to be read.

This really helps me to manage my multiple lists. I'm sure others may have still better ways. I just can imagine that we who use them wonder why folks who don't never bother. I wonder if it's just not being aware of a couple of these small things that make all the difference.

Now, the next step is to get the messages into the folder. It may seem trivial to some, because they know some tricks, but if you don't it can seem a hassle. Here are a couple more tricks for creating folders and rules for lists.

1) Open a message in your mail box that is of the sort you want to put in a folder.
2) Choose File>Move to Folder (ctrl-shift-v), and in that dialogue find your _lists (or _lists-less important) folder, select it. Choose "new" to create a new folder. Select that. Select ok. That will move the message to that folder. You've now created the folder and moved the message to it. Now create a rule for it, but there's a useful trick to make doing that easier.
3) Go to that folder, open the message you just moved. Choose Actions>Create Rule to create a rule for this message to place it in this folder. I recommend creating the rule this way because the "which conditions you want to check" will have the characteristics for this particular message, and "what do you want to do with this message" will already be filled with the name of this folder in the "move messages to folder" message. If you use Tools>Rules Wizard from the main window, you have to type all these in yourself. When creating the rule, just use whatever "which conditions you want to check" option that seems to uniquely identify this list's messages. Look at the choices pre-selected with the values for this message you're looking at. Sometimes a list will show its name in the "from" field, sometimes in the "to" field. The rest of the dialogue is pretty self-explanatory, or you can read the help.

From now on, any messages from the list will go to that folder. Now, the last step is to go grab all the list messages out of your inbox.

1) Go back to the main inbox (ctrl-shift-i). Open the Tools>Find (ctrl-shift-f) to find all the messages that meet whatever criteria you chose for the rule (messages to or from the list, whichever works for that particular list). In the find dialogue, you'll probably want to select the Browse button and choose to disable the "Search subfolders", so it just looks in the inbox and not any subfolders of it (unless that's what you really want).
2) Once you find all the messages, select them all (place the cursor on one of them and use Ctrl-A) and then choose Edit>Move to Folder and move them to the desired folder. It will still have it selected from the earlier step.

Now you've got a folder and rule, moved all the lists messages to that folder, and have the outlook display making it easy to keep an eye on the lists. A great benefit of this approach is that now you can ignore a list for hours, days, or longer as suits your interest, and then when you want to you can easily blow through all the messages at once. Great also for being able to easily look at more recent messages in the folder to see if perhaps a question has already been answered. That alone is a time-saver for you and the list respondents, as it will help eliminate redundant answers.

Monday, November 25, 2002

Ever want to open Studio, Notepad, CF Admin or some other program in a single keystroke in Windows

If you want to open a program like CF Studio or the CF Administrator or just Windows Notepad in a single keystroke, it's remarkably easy. For all my years of experience with Windows I'm surprised I never noticed this before.

You just need to edit the properties for the shortcut to the program (a shortcut is simply what you choose to run the program on your Start>Programs menu, or your desktop, or in my computer/explorer, etc.). Just right click on the shortcut/icon, choose properties, and in the "shortcut key" field shown, press any desired keystroke combination. It will be reflected in that field (such as "Control + Alt + A" if you press those three at once). Press "ok" and you're set. That easy. Now when you press those keys, the program will open. Cool. (I know that there are jaded folks among you wondering what I'm so excited about, but those who prefer the keyboard over the mouse will revel in this if it's news to you too).

Just notice that it doesn't warn you if you're overwriting another shortcut. Indeed, if you press a shortcut that's already taken, it will simply execute that shortcut, even while the focus is in that field for choosing a new one. (At least CF Studio's own keyboard shortcut tool, under Tools>Customize>Keyboard Shortcuts shows you if a key you're choosing is already assigned to something else).

And these shortcuts seem to work from within any other program (even overriding those set for that program, it seems) which is a two-edged sword.

Specifying HTTP headers in CFHTTPPARAM

If you find yourself needing to "spoof" different headers in a CFHTTP operation, such as to change the referer, accept encoding value, or other header you may know that you need to use CFHTTPPARAM and its available TYPE="CGI" attribute. But you may have challenges using that if you try to simply fill the corresponding NAME Attribute with the name of the equivalent CGI variables that CF exposes.

For instance, the Referer variable in the HTTP header becomes CGI.HTTP_REFERER. You might be lulled into thinking that the appropriate way to override/spoof that with a new value in CFHTTPPARAM would be:

<CFHTTPPARAM TYPE="CGI" NAME="HTTP_REFERER" VALUE="SomeRefererValue" >

but that will not produce the desired result. Indeed, what it will do is cause a CGI.HTTP_HTTP_REFERER variable to be created on the page being called.

So you may easily deduce that you should leave off the HTTP_ in the NAME attribute, and that is correct.

But what about the CGI.HTTP_ACCEPT_ENCODING? This is the value that indicates whether the browser you're simulating (with CFHTTP) should accept GZIP compressed output. (More about that in a later blog to come on doing GZip filtering with CFMX). The point is, if you want to set that on a CFHTTPPARAM and try to it as follows:

<CFHTTPPARAM TYPE="CGI" NAME="ACCEPT_ENCODING" VALUE="gzip,deflate" >

that will still not produce the desired result. It will NOT pass create the specified value. Why not? Because though the docs don't clarify it, you need to specify the header names by their standard actual names as defined in the HTTP standard. In the case of this header, it's accept-encoding, using a dash rather than the underscore that CF uses in the name it converts to.

So how'd I know the correct name to use? It's documented at this W3C page.

But how did I know what to value to use for the VALUE attribute for the accept-encoding? I wanted in the CFHTTP to send the same value that a browser would send, so I looked at what the value was in a a dump of CGI.HTTP_ACCEPT_ENCODING while browsing a page in a regular browser, and "gzip,deflate" was that value.

As a somewhat interesting side note, if you don't override the value this way using CFHTTPPARAM, then the value would be null on a page called by CFHTTP. Again, this will be more important in regard to a later blog entry I'll offer on gzip filtering and setting up tests of that using CFHTTP.

One last comment: you don't need to set the user-agent header using CFHTTPPARAM, though. The CFHTTP tag has a special USERAGENT attribute just for this specific requirement.

Sunday, November 24, 2002

Some interesting Oreilly articles about DW, Flash for developers

I try to make my blog more about new discoveries rather than simply point to others articles, but I came across a couple at the O'Reilly site that seem pretty interesting reading for CF developers wondering (or having to debate folks) about RIA and Flash's place in the big picture of web app development, and another about DW for developers.

The first is a digest of an email conversation between Tim O'Reilly and some of his editors at http://www.oreilly.com/editors/ discussing Rich Internet Apps and Flash MX. Nice to see Tim generally defending the Flash/RIA vision. It doesn't end on the nicest of notes because of who they let have the last word, but overall an interesting read. Also see the comments from readers (just a few so far) at http://www.oreilly.com/cgi-bin/comments.

(Sadly, these links are to generic "editor"and "comments" page and don't incorporate any date, so I suppose in a few weeks they will no longer point to the same article. Here is the Google cached version.)

As for DW for developers, one of the participants in that article, Bruce Epstein, had written "Dreamweaver: A Visual Tool for Serious Web Coders", which while it's about DW 4 and not WMX, it's still rather useful. The first sentences are enticing enough, "With over 20 years of programming experience, I am skeptical of visual Web development environments. Dreamweaver has made me a convert."

I've pointed out before that there are also several articles of that sort about DWMX, and getting into it as a developer who may feel challenged by it compared to Studio/HomeSite, at the MM DesDev site for DWMX. Check those out, too.