Browsing the archives for the howto tag.

Web Server’s Variables

Diagnostics, Software Development, Web Development

Here’s another diagnostic tool for web developers: The Web Server’s Variables.  Constantly there are problems with communications or wondering what has been sent by the user’s website to the server and you sometimes wonder what variables might be useful for our programs.  However, I’ve never been too impressed with Google’s responses when looking for matches between Javascript and VBScript comparison between the two, or useful posts for that fact.  Anyway, before I start rambling about the lack of these kinds of posts, let’s get to the post.

As you may already know, I’m a big XML fan for building information blocks that can be used by my applications or communicating between applications.  So, I’ll be building XML blocks based on the variable name as the tags and the value inside.

VBScript – Server Variables

dim ResponseString
For Each ThisServerVar In Request.ServerVariables
       ResponseString = ResponseString + "<" + ThisServerVar + ">" + _
                                         Request.ServerVariables(ThisServerVar) + _
                                         "</" + ThisServerVar + ">"
Next

Javascript – Server Variables

var responseString = "";
for(var i=1; i<=Request.ServerVariables.Count(); i++)
{
   strKeyName = Request.ServerVariables.Key(i);
   strKeyValue = Request.ServerVariables.Item(strKeyName);
   responseString += "<" + strKeyName + ">" + strKeyValue + "</" + strKeyName + ">";
}

Now I can’t tell you where you will need to use this functionality.  But, it is a good diagnostic tool that can be very helpful from time to time when you’re just poking around trying to determine your communications.  Most of the time, you’ll know the exact server variable you’re looking to use.  But sometimes, when you’re programming in 6+ languages in a single week, you’re likely to forget the exact syntax and it’s nice to have something like this to reference.

Enjoy!

Please feel free to post any comments that others may find useful or even something I could use to update this entry.

2 Comments

The CC (Courtesy Copy) Field in Emails

General Observation
Bubba Teeth Pacifier

Has an excuse.

I’ve been plagued by people failing to understand the use of the CC or Courtesy Copy (sometimes called “Carbon Copy”) Field in emails since people realized they could put things into two different fields. I mean, this is a pretty simple concept to use this field. The Courtesy Copy is basically that: A Courtesy.

Setup:
John – Co-Worker #1
Arthur – Co-Worker #2

A Good Example

Your writing an email to John answering a question that he asked earlier in the day. You got part of that answer from Arthur and put it together with your knowledge of the question. As a courtesy, you put your answer to John together and put John’s email address in the TO field, of course, because that’s who you are sending the information. In addition, you CC Arthur in case you misunderstood what he explained to you. Also, it lets Arthur keep a copy of that email for future reference to that answer. But the main reason you used the CC field is because Arthur does NOT need to read it, it’s just information he contributed and he knows what he said. He could easily just copy this to his CC Folder in Outlook, or whatever email reader with rules ability he chose, and not need to read it ever. Who knows, you may need it again to explain it to someone else.

That’s a good way to use your CC Field. Now for a Bad Example.

A Bad Example

Your writing an email to John again, this time you’re talking about several items in a project that he and Arthur are assigned. You include action items that John needs to complete. However, during the writing you decide to mention in the email, “Arthur, Could you follow up with John on step number 13?”. You have already put Arthur in the CC field again because you want the whole team to know what’s going on with your other teammates.

Problem with Bad Example

Problem is, now that you’ve actually asked Arthur to do something, you should have moved his name into the TO field. I have received too many emails that were generated through a REPLY TO ALL action where I was in the CC Field only to be asked to do something. However, because I have a rule that automatically moves emails where “I am in the CC Field” to my “CC Folder” I may not see it. Also, I’m simply not going to lower myself to accommodate the ill educated. I think it’s far more effective if you do end up not reading something and have to tell that individual, “I was in the CC Field, so I don’t read Courtesy Copies until the weekend when I have time. Because that’s what it’s there for, not when you are talking directly to me. That’s what the TO Field is for.”

Conclusion:

Can’t we all just get along? Let’s use our email fields properly and our communications can be more effective for it!

3 Comments