2008-12-28

Focus on the Prejudice

Recently, the evangelical group Focus on the Family was promoting a certain book, The Christmas Sweater, written by Glenn Beck. In a nutshell, at least from what I can gather from the Amazon summary and other news reports, it's a book about Christmas, God, family values, and redemption. One that seems to be quite popular, and one that seems to be in line with what Focus on the Family might promote.

Unfortunately, it was "outed" that the author, Glenn Beck, was in fact Mormon (gasp). From Beck's web site here, which ultimately leads to the story at Mormon Times, an anti-Mormon group posted a release to Christian News Wire calling Mormonism a cult, saying they were not Christian, and condemning Focus on the Family for not calling attention to the "differences" between Mormonism and Christianity, and therefore implying that Beck is a Christian and promoting the "false religion".

Focus is headquartered not far from here, and I have heard of Mormons who have been denied working there because of their insistence on their employees being Christian and their rejection of the Church of Jesus Christ of Latter-day Saints as a Christian church. (Might as well "out" myself here as well; I've heard these reports first-hand from members of my own congregation, being a Latter-day Saint myself.) So I suppose this can only be seen as "corrective" action on their part. It's still fairly disappointing, for apparently it reveals them as being more focused on their prejudice against a religion they don't agree with than the message being promoted.

I think the news wire release contains a couple of particularly damning points of these anti-Mormons that I found particularly interesting, in the one paragraph in which they actually reference Mr. Beck.

While Glenn's social views are compatible with many Christian views, his beliefs in Mormonism are not. Clearly, Mormonism is a cult. The CitizenLink story does not mention Beck's Mormon faith, however, the story makes it look as if Beck is a Christian who believes in the essential doctrines of the faith.

I underlined the things that stood out to me. Why do I find these parts so interesting? Well, first off, they fail to take into account that these social views are influenced by the very religion they're attempting to discredit. Likewise, if the story accurately reported on Beck's views (at least as presented in the particular book), and the results of the story are a set of views that "look like the essential doctrines of the faith", well, then, it stands to reason that Beck's beliefs are comparable to "the essential doctrines of the faith".

Are Mormons Christian? We steadfastly believe so. The name of the church — The Church of Jesus Christ of Latter-day Saints — directly names Jesus Christ, and we study the Old and New Testaments as sacred books of scripture. The subtitle of the "controversial" book of scripture, the Book of Mormon, is "Another Testament of Jesus Christ". Our weekly sacrament service, as the name implies, centers around the partaking of the sacrament, in memory of the Savior and his sacrifice for us in body and blood. We pray in the name of Jesus Christ. "And we talk of Christ, we rejoice in Christ, we preach of Christ, we prophesy of Christ, and we write according to our prophecies, that our children may know to what source they may look for a remission of their sins." So from a very simple definition of Christian — a disciple of Jesus Christ — we certainly seem to pass. But for a more scholarly discussion and research, there exists The Foundation for Apologetic Information and Research, which has collected several articles, talks, and responses to the "you're not Christian" accusation.

In the meantime, I'll continue to follow Christ according to the dictates of my own conscious, love my neighbor, be honest and true to my fellow men, and do my best to be a good husband and a father. If someone thinks that makes me or the church that teaches these principles un-Christian, despite evidences to the contrary, I suppose that's the price of discipleship, but in the end, I'll let God be my judge.

I do have to wonder how Focus on the Family managed to promote this book in the first place. From what I can tell, it didn't seem like Glenn Beck had been hiding his religious affiliation before now, so a very simple bit of fact-checking by Focus's PR department would've revealed this "inconvenient truth" well in advance. Perhaps it was a moment of weakness where they were focused more on the message than the specific religion of the author.

2008-12-19

Don't miss it 'til it's gone

When I was growing up, "humidity" was one of those things that was considered an undesirable thing. It made heat hotter and cold colder. It turned days that were just "warm" into miserable, muggy, don't-want-to-move days.

When I first moved to Denver, one of the things I enjoyed was the lack of humidity in this essentially desert climate. Hot summer days were bearable with just a fan. Opening a window was a viable option. Clothes could actually drip-dry. Even my naturally oily and acne-ridden skin started to clear up for the first time in my life.

When my dad got us a deal on a new furnace for our home (he was working in the industry at the time, so it was a good time to buy), I was somewhat bemused as to the existance of the option of a "whole-house humidifier". Why on earth would you want to add humidity to your house? My wife, on the other hand, a Utah native (where they also have a fairly dry climate) and owner of naturally dry skin, was very excited by this attachment, though.

After a couple seasons, I've gotten to understand this concept. The winter can get very dry, especially with the heater running as much as it does to keep the interior of the house above freezing. The extremely dry air ends up being very uncomfortable — it feels like you're living in a desert. Plus, there's an awful lot of static electricity that builds up in everything. The humidifier helps to make it more comfortable. It also makes it feel a little warmer, and it has the nice side effect of lowering static potential.

This winter has been especially bad. The power outlet attached to the furnace is dead. This outlet is powered by the furnace, so that it's on when the fan is on and off when it's off. So the humidifier hasn't had any power. I hadn't made getting that repaired a priority.

Then I noticed the problems. First, my shoulders would itch terribly. Yes, I, the one with the oily skin, had to start putting greasy gel on my shoulders to moisturize them after my shower in the morning. Then, my throat felt sore, the dry, parched sore of eating sand for two weeks. No matter how much water I drank, it always felt dry, and I would wake up in the morning feeling like it was on fire.

Then my oldest son started having the same throat issues. And my youngest was having trouble breathing at night. My wife broke out the portable cool mist humidifier, and that helped the toddler immediately.

That pretty much decided my course of action. Last night, when I got home from work, I ran an extension cord from a working power outlet to the humidifier. Since we run the fan full-time, it doesn't need to switch on and off, so that wasn't a concern. (That's a trick my dad taught me — if you set the "Fan" switch on your thermostat from "Auto" to "On", it runs the fan continuously instead of just when the heater or A/C is running. This keeps the air in the house circulating and at an even temperature, so you don't have the upstairs at 75° and the main floor at 65° and the furnace still burning fuel because the thermostat set at 70° is on the main floor. You do have to clean the air filter more often, but ours are the metal kind you vacuum out and reuse instead of disposable.)

I then had to run to Home Depot to get a new pad for the humidifier, since the old one from last year was scaly and wouldn't hold water (they're only $12 and typically last a winter season). Switched it on and set the humidity level to 20% (the markings have a recommended level based on outside temperature, but I've found that a constant 20% works ok, even if it means the windows occasionally show a layer of condensation on the really really cold days), checked for leaks, and closed it up.

Already, I can tell a difference. I woke up this morning and my throat didn't feel like it was full of sand.

Still, if you had told me a decade ago, before I had moved to Denver, that I would be voluntarily adding humidity to my own home, I would've laughed in your face.

Interesting side note: before we got air conditioning, we would cool our home with evaporative cooling fans. They actually work on the same general principle as the humidifier — a pump pumps water into a pad, and a fan blows across it. The cooling comes from the water evaporating. They actually work quite well in this climate, where water actually evaporates. I hadn't ever seen them before, which isn't surprising, since I had lived in places where it was more common to see water spontaneously condense out of the oversaturated air than evaporate into it.

2008-12-17

I CAN HAS LOLCODE?

One of the guys in my office showed me a list of "If Programming Languages were Religions". I'm sure I had seen it before, years ago, but it had been updated to include some more recent languages. It was pretty good (I was even able to chuckle at the inclusion of my own religion in there, whose reference was surprisingly tasteful).

One that took us both by surprise was "LOLCODE". I forget to what religion it was compared, but we had to look it up, to see if it was as bad as it sounded.

It is.

Observe the following code samples, starting with, of course, the ubiquitous "Hello World":

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE
HAI
CAN HAS STDIO?
PLZ OPEN FILE "LOLCATS.TXT"?
   AWSUM THX
      VISIBLE FILE
   O NOES
      INVISIBLE "ERROR!"
KTHXBYE
HAI
CAN HAS STDIO?
I HAS A VAR
GIMMEH VAR
IZ VAR BIGGER THAN 10?
   YARLY
      BTW this is true
      VISIBLE "BIG NUMBER!"
   NOWAI
      BTW this is false
      VISIBLE "LITTLE NUMBER!"
   KTHX
KTHXBYE

You can read more about it at LOLCODE.COM. Or don't. ;)

School Zones are for Losers

I drive the speed limit. When I see a speed limit sign, I moderate my speed to that number, and I set my cruise control. It's not out of any sense of moral superiority (although I will admit such thoughts do cross my mind when someone starts riding my bumper in an effort to push me above the legal limit); it's simply because I've received two speeding tickets in my lifetime, and I've decided that is plenty. Even if the chances of being pulled over for going a mile or two or five over the posted limit are remote, I've just decided it's not worth any added stress.

Does that mean I sometimes get to my destination later than someone else who might push the pedal down a little further? Sure. I've seen plenty of people speed by me and get rewarded for their transgression by getting through a street light that turns red after they pass but before I do. I've also seen plenty of people speed by me and get caught by street lights or traffic and end up no further ahead for their efforts.

Some people seem to take offense at being forced to follow the speed limit, though. Aside from the aforementioned tailgater who will follow dangerously close when I'm traveling the speed limit (usually when the limit drops or, for some reason, is posted slower than what one would think is necessary for a particular road), is this situation that I encounter each morning:

Traveling left to right (in this picture), I enter a school zone, which at the time of day is almost always active (lights flashing). I approach this intersection after making a left turn on a light from another main street, and it seems the lights are timed such that, after making that left turn and traveling to this point, I nearly always am stopped at this red light (often behind a long line of cars — there are probably about 10 car lengths between the start of the school zone and the light). Shortly after the intersection (just a few yards) is a rather large "Speed Limit 40" sign — however, this is not the end of the school zone, as evidenced by the (much smaller) "End School Zone" several yards beyond it (and the corresponding "Begin School Zone" for the traffic in the other direction at the same point). I have to wonder if the large "Speed Limit 40" sign was placed there with the intent to confuse people and entice them to accelerate to 40mph early — but that's the conspiracy theorist in me thinking.

As I approach the 25mph blinking school zone sign, slowing down is not usually a problem, as, as I've noted, there is usually a long line of stopped cars waiting for the light. Even if there are no cars or the light is green, I can typically slow to 25 without incident, although people in the left lane rarely slow completely to that speed. (I'm always in the right lane, as at the next intersection beyond this, I need to make a right, usually as well as a long line of people that would make trying to push in from the left lane difficult [but not beyond what some people will do to try and save a few seconds].)

What is more common is, after being stopped by the red light, when the light turns green, people will "forget" that they're in a school zone and begin accelerating. I'll get up to 25 and set my cruise control, as people in front pull ahead and people on my left pass me by.

What happens here more often than not is the person behind me will ride my bumper for a while, usually about halfway between the "Speed Limit 40" sign and the "End School Zone" sign. They will then lose patience and speed around me. If they've waited too long (i.e. I've reached the "End School Zone" and started accelerating to 40 myself), they will then slam on the gas to get around me.

And what do they get for their efforts? Well, I've yet to see a cop there in this, my third year of driving this route in the morning, so not even the chance of a ticket. But it does put them in front of me (although pulling away isn't possible — remember the line of people turning right at the next intersection ahead that I mentioned earlier?), and I guess that's all that matters. *sigh*

2008-12-06

Bandwidth for November

Another month, another bandwidth analysis.

The total bandwidth for November was 23,648MB down, 3,843MB up, 27,492MB total. The total bandwidth consumed for November was actually less than that for October by nearly 11GB.

This actually surprised me quite a bit. With the extremely graphic-heavy redesign of the Xbox dashboard, and with what I thought was a lot of videos and demos downloaded over the month, I would have expected a lot more usage. I even watched a couple episodes of South Park streamed from their web site. Sure, I haven't started downloading motion pictures yet, but I haven't exactly been conservative with my internet usage, either.

2008-12-05

PropertyInfo.PropertyType - is it Nullable?

Here's what I learned in school today.

I extended an object in our product with some nullable data types (something that, maddeningly, the previous programmers seemed to have an aversion to using, preferring instead to passing around "magic numbers" to represent null values — nice work, guys). Unfortunately, it bombed in one screen that used reflection to take objects and make datasets out of them.

The offending section of code looked like this:

PropertyInfo[] pInfo = myType.GetProperties();
for (int i = 0; i < pInfo.Length; i++) {
    DataColumn dCol = new DataColumn();
    dCol.ColumnName = pInfo[i].Name;
    dCol.DataType = pInfo[i].PropertyType;
    resultTable.Columns.Add(dCol);
}

The error thrown was that datasets don't support the "System.Nullable" type. Well, technically, they do, in that everything is nullable in a dataset, but that's beside the point. The solution is, I need, when building this dataset, to see if the type is Nullable, and if so, use the underlying type instead. No problem, right?

Not if you happen upon this post by the user "OregonGhost" on StackOverflow.com. He may not have invented the solution, I don't know; I just know that after searching for a bit, his post was the first answer I actually found to my question.

My code now looks like this:

PropertyInfo[] pInfo = myType.GetProperties();
for (int i = 0; i < pInfo.Length; i++) {
    DataColumn dCol = new DataColumn();
    dCol.ColumnName = pInfo[i].Name;
    Type dataType = pInfo[i].PropertyType;
    if (dataType.IsGenericType && dataType.GetGenericTypeDefinition() == typeof(System.Nullable<>)) {
        dataType = System.Nullable.GetUnderlyingType(dataType);
    }
    dCol.DataType = dataType;
    resultTable.Columns.Add(dCol);
}

And it works.

2008-12-02

Try...Catch in WinForms Main() method not Catching

Had a really bizarre and annoying error. I had a .Net WinForms app that started with a code block like this:

[STAThread]
static void Main() {
   try {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      Application.Run(new MDIFormMain());
   } catch (Exception ex) {
      using (FormShowException showException = new FormShowException()) {
         showException.Display(ex);
      }
      Application.Restart();
   }
}

The only problem was, after one exception caused a restart (which had a side-effect of detaching the debugger), every other exception would throw a standard .Net "unhandled exception" box. Huh?

The right combination of Google search terms finally brought me to this page. Yes, apparently the above construct is fine running in a debugger, but not so much in stand-alone.

The solution, as described on the referenced page, is instead of using try...catch, bind to the Application.ThreadException event (which works both with and without a debugger attached), like so:

[STAThread]
static void Main() {
   Application.EnableVisualStyles();
   Application.SetCompatibleTextRenderingDefault(false);
   Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
   Application.Run(new MDIFormMain());
}
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) {
   using (FormShowException showException = new FormShowException()) {
      showException.Display(e.Exception);
   }
   Application.Restart();
}

Very simple fix for a very aggravating little problem. Thank you, Craig Andera.