Monday, December 02, 2002

New look for my blog

After something in the BlogSpot or Blogger software caused my blog to lose its archive links, the search feature, and some other features, I decided to just ditch the old template/look and picked this new one. The new look has a couple of useful features, including the ability for you to choose whether to open links in a new window as well as to increase/decrease the font size. Better still, the new template/look is better suited to the larger amount of text typical in my blog entries. Hope it meets favor. I'm open to feedback.

Update: After some comments against the first updated version's changing colors (something it came built-in with and I couldn't control without changing a lot of code), I just decided to change templates. One thing I notice with this one, and perhaps it was an issue in the old one as well, is that it doesn't show the list of archive links for Netscape users. That's too bad. I've reported it to the blogger folks for them to track down. In the meantime, Netscape users can find a list of the links at http://www.systemanage.com/cff/myblogarchives.cfm.

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.