If You Listen to Liberals About Education, You Are a Bad Person

Earlier today I saw a link to an article by Allison Benedikt titled If You Send Your Kid to Private School, You Are a Bad Person. With a catchy title like that, I couldn't resist following the link in order to read what the author had to say about parenthood.

Before I continue, I should point out two important facts: 1) my children's formative years were spent in a mixture of both public and private education, and 2) at the time that Ms. Benedikt published her editorial piece, neither of her children were old enough for school, so any of her admittedly-judgmental opinions were made from the relative safety of someone who has never had to face the harsh realities about the topics which she was discussing. Ms. Benedikt's self-admitted ignorance at the hands of public educators provides little evidentiary support for her thesis statement, and unfortunately she is too blinded by her own hubris to realize it. No - it is not the well-meaning parents of children in private school who are bad people, it is self-righteous and judgmental people like her who are bad people.

I vehemently disagree with Ms. Benedikt's overall premise; it is not the parents who have realized that public education is a failing system who are ruining one of our nation's most-essential institutions – our present educational system is ruining itself. Most parents with school-age children are all-too-aware that public education is depriving their children of knowledge that is necessary to succeed academically. A perfect example is when the overly-vocal and seldom-intelligent actor Matt Damon abandoned his idealistic rhetoric demanding public education for everyone else and placed his own children in private schools. At some point in the not-too-distant future, Ms. Benedikt will be faced with the choice of whether to sacrifice her own children for the sake of her principles, or to choose what is best for her children based on her maternal instincts.

I also passionately object to anyone who insists that I should not turn my back on any failing system and subject my children to a negative environment in the hopes that the system will improve for future generations. My children are not a social experiment, nor am I willing to gamble with their lives. I do not care if Ms. Benedikt and her ilk intend to fix the schools of the future if the methods to achieve those goals cheat my children in the present.

By the way, each of my three children started in public school until my wife and I realized how poorly they were being educated. After three failed attempts with public schools, we moved each child into private school for their primary education to give them a better foundation, and then we returned them to public schools for secondary education. This system helped each of our children immensely, all of whom have now graduated college and embarked on successful careers.

Without getting deeper into an unintentional political rant, this private versus public school debate illustrates much of what is wrong with most socialistic policies; many "public" institutions fail because they become so weighed down by unnecessary bureaucracy that they can barely serve their primary purpose. Public education is not failing because parents are pulling their children out; public education is failing because we do not pay our educators enough, and we do not provide adequate resources for our schools. While it is true that our taxpayer dollars are simply not paying enough to take care of all society's educational expenses, we also have a system that is so top-heavy with needless bureaucrats and inundated with policies which occupy entirely too much time. As a result, our nation is not seeing a sufficient return on investment. What's more, the measures that the Department of Education has implemented to standardize education and hold teachers accountable for their results have been complete failures.

But that being said, here are a few of my grievances with the various excuses that I have personally heard from public educators:

  • Overheard from public teachers: "We cannot be expected to teach your children everything; parents need to be involved, too." I whole-heartedly agree with this statement - parents MUST be involved in their children's education; this should always mean that parents are involved in their children's studies at home, and this might mean that parents should volunteer at their children's schools if that is possible. But I have seen this statement used as a cop-out by far too many public school teachers who wasted our children's valuable classroom time with unnecessary endeavors and sent our children home with a mountain of homework after receiving no classroom instruction, thereby leaving the parents as the sole educators. If this is to be the case, then why do we need teachers? Why shouldn't I just homeschool my children and dispense with the transportation to and from school so my children can meet with a disengaged educator?
  • Overheard from public teachers: "We cannot be expected to personalize education for your child." The implication here is that your child is left to fend for himself or herself academically. This is a classic example for one of the primary causes of public education's many failures: people are individuals, and everyone learns differently. In our society we are REQUIRED to accept everyone's individuality – it's what we call DIVERSITY. It doesn't matter what color skin you have, whether you are a man or woman, which religious beliefs you embrace or reject, etc. Everyone is a distinct person, and we must accept their uniqueness – which SHOULD include each child's learning style. But apparently our societal adoption of tolerance and diversity does not extend to public school educators, who appear to have adopted "sink or swim" and "one size fits all" attitudes toward individualism. How barbaric and antiquated can these "teachers" be?

I'll get off my soapbox now, but I'd like to discuss one final point – as I mentioned earlier, Ms. Benedikt's children are not yet old enough to attend school, which prevents me from taking any of her self-righteous drivel seriously. In my opinion, her lack of personal experience in this matter disqualifies her from passing judgment on parents who actually have to decide what is best for their children; close-minded and emotionally detached fools with no personal stake in this debate should be ineligible to weigh in on the issue.

You Know You're From Arizona When...

Note: A friend had reposted the following list on the Internet... I love these kinds of lists, because they always provide you with a chance to laugh at your surroundings in a way that only someone with intimate knowledge of the area can appreciate.

You Know You're From Arizona When...

  1. You can say "Hohokam" and no one thinks you're making it up.
  2. You no longer associate rivers or bridges with water.
  3. You know that a "swamp cooler" is not a happy hour drink.
  4. You can contemplate a high temperature of 120 degrees as "not all that bad, after all it's a dry heat."
  5. You have learned to expertly maneuver your vehicle under any traffic conditions using only two fingers; a skill usually learned initially in July.
  6. You know that you can make sun tea outside faster than instant tea in your microwave.
  7. You have to run your air conditioner in the middle of winter so that you can use your fireplace.
  8. The water coming from the "cold" tap is hotter than that from the hot" tap.
  9. You can correctly pronounce the following words: "Saguaro", "Tempe", "Gila Bend", "San Xavier del Bac", "Canyon de Chelly", "Mogollon Rim", "Cholla", and "Tlaquepacque", "Ajo".
  10. It's noon on a weekday in July, kids are on summer vacation, and not one single person is moving on the streets.
  11. Hot air balloons can't fly because the air outside is hotter than the air inside.
  12. You buy salsa by the gallon.
  13. Your Christmas decorations include a half a yard of sand and 100 paper bags.
  14. You think a red light is merely a suggestion.
  15. All of your out-of-state friends start to visit after October but clear out come the end of April.
  16. You think someone driving while wearing oven mitts is clever.
  17. Most of the restaurants in your town have the first name "El" or "Los."
  18. You think six tons of crushed rock makes a beautiful yard.
  19. You can say 115 degrees without fainting.
  20. Vehicles with open windows have the right-of-way in the summer.
  21. People break out coats when the temperature drops below 70.
  22. The pool can be warmer than you are.
  23. Most people will not drink tap water unless they are under dire conditions.
  24. Monday Night Football starts at 7:00 instead of 9:00.
  25. You realize Valley Fever isn't a disco dance.
  26. People with black cars or have black upholstery in their car are automatically assumed to be from out-of-state or nuts.
  27. You know better than to get into a car/truck with leather seats if you're wearing shorts.
  28. Announcements for Fourth of July events always end with "in case of monsoon..."
  29. You have to explain to out-of-staters why there is no daylight savings time.
  30. When someone asks how far you live from a location, it's always in terms of minutes/hours, not miles.
  31. Your biggest bicycle wreck fear is, "What if I get knocked out and end up lying on the pavement and cook to death?"
  32. You can say "haboob" without giggling.
  33. You realize that asphalt has a liquid state.

Ah, so true, so true... ;-)

Connecting the Windows Phone 8 Emulator to Web API Applications on a Local Computer

I've been playing around with Web API a lot recently, and I've found that it's a really powerful and elegant way to create internet-based applications. After writing several server-side Web API applications, I thought that it would be fun to write a Windows Phone 8 application that used Web API to communicate with one of my server-side applications.

I was using the Visual Studio 2013 Preview to write my Web API application, and by default Visual Studio 2012 and later use IIS Express for the development web server on http://localhost with a random port. With this in mind, I thought that it would be trivial to create a Windows Phone 8 application that would be able to send HTTP GET requests to http://localhost to download data. This seemed like an easy thing to do, but it turned out to be considerably more difficult than I had assumed, so I thought that I would dedicate a blog post to getting this scenario to work.

I should point out that I stumbled across the following article while I was getting my environment up and working, but that article had a few steps that didn't apply to my environment, and there were a few things that were required for my environment that were missing from the article:

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj684580.aspx

In addition, there were a few things that I needed that might not apply to everyone, and I'll try to point those out as I go along.

System Requirements for Windows Phone SDK 8.0

First things first, you need to make sure that you have a physical computer that meets the system requirements for the Windows Phone 8 SDK that are posted at the following URL:

http://www.microsoft.com/en-us/download/details.aspx?id=35471

Here is an annotated copy of the system requirements list at the time that I wrote this blog:

  • Supported Operating Systems:
  • Operating System Type:
    • Windows 8 64-bit (x64) client versions
    • Note: You cannot use Windows 8 32-bit (x86) client versions
  • Hardware:
    • 6.5 GB of free hard disk space
    • 4 GB RAM
    • 64-bit (x64) CPU
  • Windows Phone 8 Emulator:
    • Windows 8 Pro edition or greater
    • Requires a processor that supports Second Level Address Translation (SLAT)
    • Note: The Windows Phone 8 Emulator runs in Hyper-V, so you cannot use a Hyper-V virtual machine for the host computer where you install the Windows Phone 8 SDK
  • Additional Notes:
    • If your computer meets the hardware and operating system requirements, but does not meet the requirements for the Windows Phone 8 Emulator, the Windows Phone SDK 8.0 will install and run. However, the Windows Phone 8 Emulator will not function and you will not be able to deploy or test apps on the Windows Phone 8 Emulator.

You Cannot use "Localhost" for Testing

The first time that I launched my Web API application and tried to connect to it from the Windows Phone 8 Emulator (WP8E), I used "http://localhost" as the domain where my Web API application was hosted. This was a silly mistake on my part; the WP8E runs in Hyper-V, and the WP8E believes that it is a separate computing device than your host computer, so using "http://localhost" in the WP8E meant that it was trying to browse to itself, not the host machine. (Duh.)

Your Host Computer Must Not Use IPSEC

My computer was joined to a domain, and our domain uses IP Security (IPSEC) for obvious reasons. That being said, the Windows Phone 8 Emulator is not going to use IPSEC to connect to the host machine, so I needed to find a way around IPSEC.

Our IT department allows us to make a domain-joined machine as a boundary machine to get past this problem, but I decided to set up a new, physical machine from scratch for my development testing.

Verify that the Windows Phone Emulator Internal Switch Exists

After you install the Windows Phone 8 SDK with the Windows Phone 8 Emulator (WP8E), you will have a new virtual machine in Hyper-V with a name like "Emulator WVGA 512MB"; this is the actual WP8E instance.

You should also have a new virtual switch named "Windows Phone Emulator Internal Switch" in the Hyper-V Virtual Switch Manager; WP8E will use this virtual switch to communicate with your host machine. (This virtual switch was missing on one of the systems where I was doing some testing, so I had to add it manually.)

Disable Windows Firewall on your Host Computer

Since the Hyper-V machine for the Windows Phone 8 Emulator (WP8E) and IIS Express will be communicating over your network, you will need to make sure that the Windows Firewall is not blocking the communication. I attempted to add an exception for IIS Express to the Windows Firewall, but that did not seem to have any effect - I had to actually disable the Windows Firewall on my development machine to get my environment working. (Note that it is entirely possible that I needed to configure something else in my Windows Firewall settings in order to allow my environment to work without disabling Windows Firewall, but I couldn't find it, and it was far easier in the short term to just disable Windows Firewall for the time being.)

Verify the Internal IP Address of your Windows Phone 8 Emulator

It's entirely possible that the Windows Phone 8 Emulator (WP8E) always uses a 169.254.nnn.nnn IP address on the "Windows Phone Emulator Internal Switch", but I needed to make sure which IP address range to use when configuring IIS Express.

The way that I chose to do this was to drop the following code inside my WP8E application and I stepped through it in a debugger to tell me the IP addresses that WP8E had assigned for each network interface:

var hostnames = Windows.Networking.Connectivity.NetworkInformation.GetHostNames();
foreach (var hn in hostnames)
{
    if (hn.IPInformation != null)
    {
        string ipAddress = hn.DisplayName;
    }
}

I had two IP addresses for the WP8E: one in the 192.168.nnn.nnn IP address range, and another the 169.254.nnn.nnn IP address range. Once I verified that one of my IP addresses was in the 169.254.nnn.nnn range, I was able to pick an IP address in that range for IIS Express.

Add an Internal IP Address to IIS Express for your Web API Application

Once you have verified the IP address range that the Windows Phone 8 Emulator (WP8E) is using, you can either pick a random IP address within that range to use with IIS Express, or you can use the default IP address for the Windows Phone Emulator Internal Switch. To verify the default IP address, you would need to open a command prompt and run ipconfig, then look for the Internal Ethernet Port Windows Phone Emulator Internal Switch:

C:\>ipconfig

Windows IP Configuration

Ethernet adapter vEthernet (Internal Ethernet Port Windows Phone Emulator
Internal Switch
):

   Connection-specific DNS Suffix . :
   Link-local IPv6 Address . . . . . : fe80::81d3:c1c7:307b:d732%11
   IPv4 Address. . . . . . . . . . . : 169.254.80.80
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :

Ethernet adapter vEthernet (Intel(R) 82579LM Gigabit Network Connection
Virtual Switch):

   Connection-specific DNS Suffix . :
   Link-local IPv6 Address . . . . . : fe80::3569:3387:bb3f:583b%8
   IPv4 Address. . . . . . . . . . . : 192.168.1.72
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1

C:\>

If you decide to use a custom IP address in the range that your Windows Phone 8 Emulator is using, you would need to enter that IP address in the IPv4 TCP/IP settings for the Internal Ethernet Port Windows Phone Emulator Internal Switch:

(Click the image to expand it.)

Once you have the IP address that you intend to use, you will need to add that to your IIS Express settings. There are two easy ways to do this, both of which require administrative privileges on your system:

Method #1: Use AppCmd from an elevated command prompt

Open an elevated command prompt session by right-clicking the Command Prompt icon and choosing Run as administrator, then enter the following commands:

cd "%ProgramFiles%\IIS Express"

appcmd.exe set config -section:system.applicationHost/sites /+"[name='WebApplication1'].bindings.[protocol='http',bindingInformation='169.254.21.12:80:']" /commit:apphost

Where WebApplication1 is the name of your Web API application and 169.254.21.12 is the IP address that you chose for your testing.

Method #2: Manually edit ApplicationHost.config

Open Windows Notepad as an administrator, and open the "ApplicationHost.config" file for IIS Express for editing. By default this file should be located at "%UserProfile%\Documents\IISExpress\config\ApplicationHost.config".

Locate the code for the website of your Web API application; this should resemble something like the following, where WebApplication1 is the name of your Web API application:

<site name="WebApplication1" id="1" serverAutoStart="true">
    <application path="/">
        <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebApplication1" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation=":54321:localhost" />
    </bindings>
</site>

Copy the existing binding and paste it below the original entry, then change the binding to resemble the following example, where 169.254.21.12 is the IP address that you chose for your testing:

<site name="WebApplication1" id="1" serverAutoStart="true">
    <application path="/">
        <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebApplication1" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation=":54321:localhost" />
        <binding protocol="http" bindingInformation="169.254.21.12:80:" />
    </bindings>
</site>

Save the file and close Windows Notepad.

Specify the Internal IP Address of your Web API Application in your Windows Phone 8 Application

Once you have configured IIS Express to use an internal IP address, you need to specify that IP address for your Windows Phone 8 application. The following example shows what this might look like:

public void LoadData()
{
    if (this.IsDataLoaded == false)
    {
        this.Items.Clear();
        WebClient webClient = new WebClient();
        webClient.Headers["Accept"] = "application/json";
        webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webClient_DownloadStringCompleted);
        webClient.DownloadStringAsync(new Uri(@"http://169.254.21.12/api/TodoList"));
    }
}

Where 169.254.21.12 is the IP address that you chose for your testing.

Configure Proxy Settings in your Internet Options to Bypass the Proxy for your Internal IP Address

It is essential that you configure your proxy settings so that the IP address of your Web API application will be considered an internal network address; otherwise all of the requests from the Windows Phone 8 Emulator (WP8E) will attempt to locate your Web API application on the Internet, which will fail.

The WP8E will use the proxy settings from your Windows Internet options, which are the same settings that are used by Internet Explorer. This means that you can either set your proxy settings through the Windows Control Panel by using the Internet Options feature, or you can use Internet Explorer's Tools -> Internet Options menus.

Once you have the Internet Options dialog open, click the Connections tab, then click the LAN settings button.

There are a few ways that you can specify your IP address as internal:

Method #1: Specify your proxy server, then click the Advanced button and add your internal IP address to the list of exceptions:

Method #2: If you do not need actual Internet access during your testing, you can specify "localhost" as the proxy server, then click the Advanced button and add your internal IP address to the list of exceptions:

Method #3: Specify your internal IP address as the proxy server; it isn't really a proxy server, of course, but this will keep the requests internal.

Launch IIS Express as an Administrator

In order for IIS Express to register a binding with HTTP.SYS on an IP address other than 127.0.0.1, you need to run IIS Express using an elevated session. There are two easy ways to do this:

Method #1: Launch IIS Express from Visual Studio as an administrator

Start Visual Studio as an administrator by right-clicking the Visual Studio icon and choosing Run as administrator. Once Visual Studio has opened, you can open your Web API project and hit F5 to launch IIS Express.

Method #2: Launch IIS Express from an elevated command prompt

Open an elevated command prompt session by right-clicking the Command Prompt icon and choosing Run as administrator, then enter the following commands:

cd "%ProgramFiles%\IIS Express"

iisexpress.exe /site:WebApplication1

Where WebApplication1 is the name of your Web API application.

In Closing

As I pointed out in my opening statements for this blog, getting the Windows Phone 8 Emulator to communicate with a Web API application on the same computer was not as easy as I would have thought, but all of the steps made sense once I had all of the disparate technologies working together.

Have fun! ;-]


Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/

Thinking Backwards about the Environment

I mentioned to my wife the other day that the question of ecological conservatism is backwards from a political perspective.

The typical definition of Liberals versus Conservatives is that "Liberals" (who are often called "Progressives") are rushing forward in the name of what they think is progress (sometimes foolishly) while "Conservatives" are fighting hard to preserve what is already there (sometimes like a stick in the mud; just as stubbornly and just as stupidly).

These two points of view will often fight vehemently against the other on issues simply because they feel that they "have to disagree," and not because they actually disagree. Preserving the planet is one such example - I think that most of the arguments that I hear from one side or the other are more often about disagreeing with the opposing position than about the actual issue.

But here's where it gets really strange: when it comes to saving the planet, somehow it is the "Liberals" who want to conserve, and it is the "Conservatives" who are rushing forward in the name of progress (often foolishly) and irrevocably damaging the planet.

But there's an interesting wrinkle in this debate that is often overlooked within the church: many Christians are Conservatives, and as such they join their fellow Conservatives when it comes to fighting issues like ecology. But according to Scripture, Christians have been charged with taking care of the environment, so they should really be trying their best to preserve the planet. So why do most church-goers seem to be fighting against environmentalism?

As I mentioned initially, this whole situation is inexplicably backwards; it just doesn't make sense to me.

I'll get off my soapbox now...

Saints or Sinners / Snacks or Snafus

Over the past few years I have sat quietly and watched a lot of people argue across myriad political issues on Facebook. There are people who love portions of our government and its policies, while others detest them. The current scandal-of-the-day is that some see Manning and Snowden as heroes, while others consider them traitors.

I have tried my best to keep my silence, because the last thing that anyone needs is another person adding their opinions to a cyber-sphere that is already saturated by divisiveness, ignorance, and paranoia. But eventually an issue arises where I simply cannot remain silent; sometimes our government has unquestionably gone too far.

With all the dangers and terrors in this world from which we need protection, how is it possible that German Kinder Eggs must be banned by the Federal Hazardous Substances Act?

Somehow I am sure that Communists are to blame. ;-)

Why Does Expression Web 4 Want to Modify My PHP.INI File?

As you may have seen in my previous blog posts, I tend to use several of Microsoft's various editors when I am working on web projects: Visual Studio, WebMatrix, and even FrontPage on occasion. But every once in a while I also use FrontPage's successor: Expression Web 4.

Expression Web 4 and PHP

One of the great features about Expression Web was that it contained support for local PHP development before WebMatrix and IIS Express had entered the picture, and it was pretty easy to configure; all that you needed to do was to enter the path to your PHP executable in the Expression Web's Application Options, which you will find under Expression Web's Tools menu:

All that being said, I was working on a PHP project in Expression Web 4 recently, and when I clicked the button to preview my page in a browser, the following error message appeared:

"The php.ini file is not configured correctly. Would you like Expression Web to configure this file?"

I had not seen this error before, and it was a little unnerving to me because I had spent a lot of time customizing my PHP.ini file and I didn't want Expression Web (or any other application) making a bunch of unknown changes to my PHP.ini file.

That being said, I was curious what would happen if I answered Yes to that question. With that in mind, I tested several scenarios, and I thought the results of my experiments would make a great blog.

Expression Web 4 and PHP.INI Scenario Testing

First of all, clicking the No button for the PHP configuration dialog box listed above will not break anything, and Expression Web 4 will still open your web page for testing with PHP in the Expression Development Server (which is basically the ASP.NET "Cassini" development server).

If you click the More Information link in the PHP configuration dialog box, that will take you to the following page in the Expression Web help file:

Previewing a PHP page
http://msdn.microsoft.com/library/cc294950(v=expression.40).aspx

When I clicked the Yes button in the PHP configuration dialog box, Expression Web 4 made a few changes to my INI file that it deemed necessary for local development, and I tested three different scenarios which I will document here:

Scenario #1:

Starting with a PHP.ini file that was created when I installed PHP 5.4 through the Web Platform Installer (WebPI), I only noticed one directive in the PHP.ini file that was changed by Expression Web 4:

display_errors=On

(Note: This directive was originally set to "Off".)

And I only noticed one directive in the PHP.ini file that was added:

cgi.force_redirect=0

Scenario #2:

I ran a script that crawled through my full PHP.ini file which reset every "On" value to "Off" (and vice-versa), and then it reset every "0" value to "1" (and vice-versa). After those changes were completed, Expression Web 4 added only modified the following two directives in the file:

display_errors=On

-and-

cgi.force_redirect=0

Scenario #3:

If I removed everything from my PHP.ini file and I restarted my testing with a completely blank PHP.ini file, Expression Web 4 only added the following lines to the file:

[php]
cgi.force_redirect=0

More Information

So in the end, Expression Web 4 made very few changes to my PHP.INI file despite the ominous-sounding dialog that I listed earlier; just the same, it's always a good idea to back up your PHP.INI file before you let any application make changes to it. (This way you can compare the resulting files after any changes have been made and restore settings if necessary.)

Additional information about the two directives which Expression Web 4 modified can be found on the PHP website at the following URLs:

By the way - as of the writing of this blog, Expression Web 4 with Service Pack 2 is available as free download from Microsoft at the following URL:

Microsoft Expression Web 4 (Free Version)
http://www.microsoft.com/downloads/details.aspx?FamilyID=00e6f791-6450-4894-9b3a-2f5b58617a38

Free stuff is always nice. ;-]


Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/

What's New in IIS 8.5?

Microsoft released the Windows 8.1 Preview on June 26, but some of the articles that the IIS team was working on for IIS 8.5 needed a little more work before we published them. That being said, those articles were published on IIS.net earlier today, and here is a quick preview of those articles and the new features in IIS 8.5 which they describe:

  • Dynamic Website Activation in IIS 8.5
    This feature allows IIS to scale to an even larger set of websites than before by only loading websites after an HTTP request has been received; this significantly reduces the startup time and initial resource allocation for IIS, and it prevents resources from being unnecessarily consumed for websites that are accessed infrequently.
  • Enhanced Logging for IIS 8.5
    IIS now provides built-in functionality for adding custom logging fields to your W3C log files that are populated with values that are from request headers, response headers, or server variables. This functionality allows you to log a great deal of custom information about each HTTP request; for example, you could include the information an HTTP header like X-Forwarded-For, which would allow you to decode the request path through all firewalls/proxies, or you could insert information from a custom module into a server variable and have IIS add that information directly to your logs.
  • Idle Worker Process Page-Out in IIS 8.5
    In previous versions of IIS, inactive worker processes were terminated when they reached their recycle interval, but IIS 8.5 allows you to configure your application pools so that inactive worker processes are swapped out to the page file; since IIS can restore a suspended worker process into service much faster than starting up a new worker process, this functionality significantly improves the user experience when a request is received for a suspended application.
  • Logging to Event Tracing for Windows in IIS 8.5
    IIS 8.5 expands the logging capabilities for HTTP events to include Event Tracing for Windows (ETW); this functionality allows you monitor your IIS events in real-time, which can be extremely useful for troubleshooting and debugging/developing applications.

For examples of these technologies in action, you can watch one of the following presentations:

Special thanks go to Gary Ericson for putting together and publishing these articles on IIS.net, and a big round of thanks to the IIS team for adding all of these new features!

(One quick note in closing: functionality similar to IIS 8.5's Enhanced Logging was available in the past by installing separate modules, but IIS 8.5 now makes this functionality available out-of-the-box.)


Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/

The Eye of the Beholder

I have a very easy measuring scale for determining what I consider art: "If I Can Do It, It's Not Art." This may not seem like a complex rule to live by; but when you consider it, it's rather profound. There are a lot of people who will pass off their work as art even though it is actually a bunch of junk.

I have been to a lot of art museums because - I actually like art. But I have witnessed a lot of pieces that are not art; they are elaborate hoaxes by conmen who rebrand their particular style of garbage construction as creative genius.

For example, when I went to the the Neue Pinakothek in Munich, Germany, one of the paintings hanging on the wall was a large canvas where the artist had painted a once-inch red dot in the center of the canvas. This was titled "Red Object #2," or maybe "Red Object #3..." I can't really remember. The point being that this painting was obviously part of a whole study the artist had done on... red objects. Of course I'm looking at this creation and I'm thinking, "I can do that; I could have done that with a crayon."

I've gone to the Seattle Art Museum several times, and I find it absolutely amazing what some people consider 'art'. Now don't get me wrong, there are some amazing pieces of artwork inside the Seattle Art Museum. But there was one canvas where the artist had simply painted an already white canvas with the color white. That's it - just white paint; nothing else. Once again I'm thinking, "I can do that."

At a different museum that I went to in Germany, the Lenbachhaus, it was very evident that an artist had stood at the end of several canvases that were lying on the ground and simply threw buckets of red paint at them. Once again, I can do that - it's not art.

I realize that the perception of art is subjective, and there is a lot of truth to the statement that "Beauty is in the Eye of the Beholder." But I always fall back on my personal standard that if it's something that I can do, it's not really art - it's just what people pass off as art. (For an example of how I think most modern artists come up with their ideas, you need to watch the movie The Wheeler Dealers with James Garner and see how the character Stanislas creates his artwork.)

Another perfect example of the ways in which we think about art can be typified by an experience that I had when I visited the Kimbell Art Museum in Fort Worth, Texas. The museum was presenting an exhibition on impressionism, and I'm a big fan for many of the classical French impressionists: Renoir, Monet, etc. During my visit I entered one of the rooms, and there was an enormous painting by Gauguin hanging on the wall. I'm not a big fan of his artwork; however, I at least consider it art because I can't do what he does.

But as I analyzed this particular painting, I was thinking to myself, "I just don't get it; he only used four colors." I started to think about this painting based on my personal scale; I could have done this, so it can't be art. I (embarrassingly) spent several minutes studying this piece, and I tried hard to determine what it was about this painting that other people can see and I must be missing.

It's like the story of The Emperor's New Clothes; at some point you begin to worry what's wrong with you. If everybody else can see it and you can't, perhaps it's a character flaw. Maybe you're just not cultured enough. And this was the mindset that I had while I was wasting away my afternoon studying that single piece of art.

After I had been standing there for 5 to 10 minutes, a ten-year-old boy entered the room with his mother in tow. He took one look at the painting, laughed, and exclaimed loudly, "That's crap!", and then he walked off.

At that point I realized that I had been duped. I learned that I needed to stick to my instincts and measure every piece by my personal standard that if I can do it, it's not art. This philosophy actually helped me enjoy the rest of the day at the museum. I could walk into a room, I could look at a Renoir and say, "Now that's a piece of art." Or I could look at another Gauguin and say, "That's crap."

IntelliSense for jQuery in WebMatrix

I recently had the opportunity to take a day-long class about jQuery from the good folks at Wintellect. The class went great, and I wrote all of my code for the class in WebMatrix. You might recall from my previous blogs that I am a big fan of WebMatrix, but at first there was one thing that was missing from WebMatrix's arsenal of cool features; in order for WebMatrix to really be useful as an editor for jQuery, I really wanted to have IntelliSense support for jQuery. Thankfully, even though IntelliSense support for jQuery is not built-in, adding IntelliSense for jQuery is extremely easy, and I thought that would make a great subject for today's blog.

To start things off, let's take a look at a jQuery sample that is little more than a Hello World sample:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>jQuery Test Page</title>
    </head>
    <body>
        <script src="http://ajax.microsoft.com/ajax/jQuery/jquery-2.0.0.min.js" type="text/javascript"></script>
        <script>
        $(function() {
           $("#bar").text($("#foo").text());
           $("#foo").text("This is some custom text");
        });
</script> <h1 id="foo">This is the first line</h1> <h2 id="bar">This is the second line</h2> </body> </html>

This example does very little: it loads the jQuery library from Microsoft's AJAX Content Delivery Network (CDN), and it uses jQuery to replace the text in a couple of HTML tags. (The example isn't really important - getting IntelliSense to work is the topic du jour.) This sample would look like the following illustration if you opened it in WebMatrix 3:

jQuery in WebMatrix

When you are using a JavaScript library for which there is no built-in support, Microsoft's developer tools allow you to add IntelliSense support by adding Reference Directives to your page, and the files that you would use for your reference directives are available at the same Microsoft CDN where you can get the jQuery library:

http://www.asp.net/ajaxlibrary/cdn.ashx

In order to use IntelliSense for jQuery, you need to download the appropriate jquery-n.n.n-vsdoc.js file for the version of jQuery that you are using and store that in your website. For example, if you are using jQuery version 2.0.0, you would add a script reference to the CDN path for http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.0.min.js, and you would download the http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.0-vsdoc.js file for your website.

Like many developers, I usually add a folder named scripts in the root of my website, and this is where I will typically store the jquery-n.n.n-vsdoc.js file that I am using. Once you have added the appropriate jquery-n.n.n-vsdoc.js file to your website, all that you need to do is add the appropriate reference directive to your script, as I demonstrate in the highlighted section of the following code sample:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>jQuery Test Page</title>
    </head>
    <body>
        <script src="http://ajax.microsoft.com/ajax/jQuery/jquery-2.0.0.min.js" type="text/javascript"></script>
        <script>
        /// <reference path="scripts/jquery-2.0.0-vsdoc.js" />
        $(function() {
           $("#bar").text($("#foo").text());
           $("#foo").text("This is some custom text");
        });
</script> <h1 id="foo">This is the first line</h1> <h2 id="bar">This is the second line</h2> </body> </html>

Once you have added the reference directive for your jquery-n.n.n-vsdoc.js file, IntelliSense will begin working for jQuery in WebMatrix, as shown in the following illustration:

jQuery IntelliSense in WebMatrix

In Closing...

One last thing that I would like to mention is that is always a good idea to load JavaScript libraries like jQuery from a CDN, and there are lots of CDNs to choose from. There are some additional steps that you can take to ensure that your website works with jQuery even if the CDN is down, but that subject is outside the scope of this blog. ;-]


Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/

Not that it will make any difference...

I am a big fan of movies; and to be honest, I am mostly a fan of classic movies. I have slowly collected a large number of classic movies over the years from several of my favorite actors/actresses: Cary Grant, Ginger Rogers, Jimmy Stewart, Katharine Hepburn, Errol Flynn, etc., etc., etc.

That being said, I am generally not a big fan of recent movies; more often than not the creative team is too short-sighted, and they frequently fall short of creating a truly great movie. Sometimes the problem is writing, sometimes it's direction, and other times it's the acting. But to be fair, sometimes the problem isn't with any of those contributors - sometimes it's a problem with post-production, and this is why I love to buy "Director's Cuts" for many films. Quite often there is a level of depth that is missing from the movie that was part of the director's original vision, and it makes the movie so much better when you add that detail back.

Here's a case in point: I actually like the movie Far and Away with Tom Cruise and Nicole Kidman. Once you get past their bad Irish accents, the movie is a somewhat-acceptable dramedy.

But there are a few scenes that were cut from the film, and unfortunately the DVDs that have been released have never added those scenes to the media. Without theses scenes, parts of the plot have abnormal jumps in the storyline, and it's too bad that a Director's Cut has never been released.

Here are some examples of what I mean:

  • Near the beginning of the movie was an extended sequence near the piano in the Christie's house where Stephen Chase has a private conversation with Shannon Christie. We see Stephen's character soften a little; we learn that he truly cares for Shannon, and that Stephen is not a complete jerk - he's just an arrogant by-product of elitist class.
  • Likewise there was a hilltop scene in Ireland after Shannon and Joseph Donnelly have left for America where Stephen is emotionally destroyed, and he expresses his sentiments to Daniel Christie. Once again this softens Stephen's character a little, and this adds a great deal of conflict to the movie as a spectator - you want to hate Stephen, and you feel like you should hate Stephen, but now you can't. That was a great piece of filmmaking that should have stayed in the movie because it added so much depth.
  • There was an extended scene later in the movie when Joseph was working for the railroad. The shortened scene that was kept simply shows Joseph in a job with no future, whereas the original scene showed Joseph as near-suicidal; Joseph believed not only that he had lost Shannon for good, but that Shannon might not have survived her gunshot wound. Because of this, Joseph was known as the "Crazy Mick" and sent on all of the dangerous missions - because Joseph no longer cared if he lived. This added a whole new dimension to the scene when Joseph discovers Shannon in Oklahoma, because it wasn't mere coincidence to him, he felt as if he was seeing a ghost.
  • There was a brief scene when Joseph and Shannon first arrive in America where they pass under a bridge and they see scores of homeless Irish living in squalor. Later in the movie this comes full-circle when Joseph and Shannon are tossed out in the streets, because they find themselves living in that same squalor, and we get to see just how far they have fallen.
  • There was another scene after Joseph and Shannon are tossed out in the streets where workers were needed for ditch-digging; Joseph volunteers so that he can earn money for the two of them, yet when he turns around at some point he sees Shannon working beside him digging in the ditch. This scene was extremely important to see how the two of them were truly becoming one unit in their struggles together, and it adds a great deal of depth to the scene later in the movie when Joseph and Shannon attempt to hide in the house they thought was unoccupied.

The last two deleted scenes that I described show the many months that Joseph and Shannon suffered together, instead of the awkward jump in the theatrical release between the scene when Joseph and Shannon were thrown out of their apartment (with Joseph beat to a pulp) and the scene when Joseph is begging to help someone load firewood (with Joseph now healed and exclaiming that they haven't eaten in days). Without that detail, the theatrical release is missing a great deal of its emotional impact.

Unfortunately, none of the scenes that I have described have ever been released on a DVD, so they are somewhat lost to the world. My descriptions of these additional details won't bring them back, and it's too bad that Imagine Films won't release these scenes in some format. If anyone knows Ron Howard, you might want to suggest that he release a 25th Anniversary Edition of Far and Away when that date eventually rolls around, but in the meantime - my lamentations won't make a bit of difference.