It’s not a rebate … stupid


I just read an article about a new tax rebate program. The only problem is it really is not a tax rebate at all, except in name. Let me run through the article and show you what I mean (or at least the salient parts).

With unprecedented speed and cooperation, Congress and the White House forged a deal Thursday to begin rushing tax rebates of $600 to $1,200 to most tax filers by spring, hoping they will spend the money just as quickly and jolt the ailing economy to life.

Sounds good so far. If you are a tax filer, you must be a tax payer, right? Let’s read on.

Individual taxpayers would get up to $600 in rebates, working couples $1,200 and those with children an additional $300 per child under the agreement. In a key concession to Democrats, 35 million families who make at least $3,000 but don’t pay taxes would get $300 rebates.

Okay, so people who paid nothing into the system will get a rebate? I thought you had to actually participate for something to be called a rebate. Better go check Merriam Websters.

Main Entry:

2re·bate Listen to the pronunciation of 2rebate

Pronunciation:

ˈrē-ˌbāt

Function:

noun

Date:

1656

: a return of a part of a payment

Seems Webster had the same dumb idea I had. Stupid man did not realize that a rebate is simply a payment, not a return of part of a payment. Either that or politicians don’t understand the meaning of words. I am serious here. Not knowing the meaning of rebate is just like not knowing the meaning of the word is. Oh, sorry. I guess there are some people that do not know the meaning of the word is. My bad.

The bill will go straight to the House floor next week and on to the Senate, where some Democrats hope to add elements such as extending unemployment benefits for workers whose benefits have run out.

A rebate? Right! Try collecting a rebate for a product you never bought. I think they call it "jail time".

Indeed, many Democrats, such as Ways and Means Committee Chairman Charles Rangel, D-N.Y., and Edward Kennedy of Massachusetts, the liberal lion of the Senate, were deeply unhappy that Pelosi agreed to jettison that proposal in late-stage talks, as well as plans to increase food stamp payments.

I can see the confusion here. It is because tax rebate and food stamp payments sound so much alike.

"I do not understand, and cannot accept, the resistance of President Bush and Republican leaders to including an extension of unemployment benefits for those who are without work through no fault of their own," Rangel said.

Maybe they understand the meaning of the word "rebate"? I also wonder if Rangel is not for extending unemployment benefits for those who lost jobs through "fault of their own".

Now, please do not misunderstand me. I am not balking at sending tax relief or even incentives to those not paying taxes. Well, I might balk at that, but it is not my point in this article.

I, instead, want to illustrate a major problem with our government and that is the fact that you can tack anything onto a bill. Need a pet project passed, like building a new, useless government building in your state? Tack it on an education bill, as no President wants to be accused of starving children. Need fish atlases for your rivers? Tack it on a health bill, as no President wants to be accused of denying children health care. It’s real simple: pork has a lot of fat, so you should eliminate it from your diet. 😉

I also have an issue with calling this a tax rebate. Why? Words have meaning. Okay, so some cannot properly conjugate the verb "to be", but the rest of us can.

It is unlikely anyone is going to call this an incentive to spend money (which it is), as rebate sounds so much fairer than incentive (or perhaps even entitlement). But, then, rebate can get you into trouble, as well. After all, aren’t many rebates there because you overpaid for your merchandise?

Peace and Grace,
Greg

Advertisements

Mapping with MapQuest, part 2


Okay, so this is not a direct extension of the last article on the MapQuest API. It is, instead, a further adventure on my journey. In this post, I am going to talk about drawing stuff on the map, along with a few other juicy topics.

In our application, we show triangles on the map to indicate locations where a vehicle reported in. The head of the triangle points in the direction of the bearing of the vehicle. This was a major undertaking, in many ways, as I had not worked with Trig functions in ages. Thanks to Kevin Spencer (another MVP) for the hand hold here. The theory is pretty simple, once you work with it.

I had first thought about graphics for the arrows, which we had done in previous mapping adventures, but this presented a few issues, no matter how you sliced it.

Option 1: I could create 16 graphics, one each for N, NNW, NW, WNW, W, etc. and calculate which one to use. This was not completely accurate, but fairly easy to place. In the end, there were two big negatives here. First, I would have to create the 16 graphics in each color the person could choose (current 216, for the 216 web colors). Second, there is no concept of opacity in graphics for the MapQuest API, so I could not alter graphic color easily by track, which was a requirement on the old system.

Option 2: Use GDI+ to alter the graphic according to angle. This would require only one graphic. The problems here are many fold. First, I cannot overlay the graphic myself, as the API does not allow overlays in this manner (graphics only added by path). Second, while the .NET GDI+ piece would create the new graphic, I end up with 260 graphics per color. Automated, yes, but still a lot of clutter. Finally, I still have the opacity issue.

So I determined I would use the polygon overlay and draw the arrow on the screen. To do this, you have to first convert your bearing (in degrees) to radians.

direction = ((bearing) / (180/Math.PI));

Next, you have to calculate X and Y using sine and cosine. Length here is the length of the line (if at 0 degrees) in fraction of a degree. For my head of my arrows, I am using .001371624705923663 as the length, but this is also dependent on zoom, which I still have to figure out.

latPosition1 = latitude + (length * Math.cos(bearing));
longPosition1 = longitude + (length * Math.sin(bearing));

So far, so good. To get the other two bearings, I change the length to length/3 and the bearing to bearing + 120 or bearing – 120. I then rerun the calculations above on the new values. This creates a polygon. Each of the lat/long points is then added to the MQLatLongCollection I call shapePoints. The entire thing looks like this.

var triangle = new MQPolygonOverlay();
triangle.setFillColor(fillColor);
triangle.setFillColorAlpha(fillColorAlpha);
triangle.setColor(lineColor);
triangle.setColorAlpha(lineColorAlpha);
triangle.setBorderWidth(lineWidth);
var shapePoints = new MQLatLngCollection();

latPosition1 = latitude + (length * Math.cos((direction) / (180/Math.PI)));
longPosition1 = longitude + (length * Math.sin((direction) / (180/Math.PI)));   
shapePoints.add(new MQLatLng(latPosition1, longPosition1));

latPosition2 = latitude + (length/3 * Math.cos(((direction + 120) / (180/Math.PI))));
longPosition2 = longitude + (length/3 * Math.sin(((direction + 120) / (180/Math.PI))));
shapePoints.add(new MQLatLng(latPosition2, longPosition2));

latPosition3 = latitude + (length/3 * Math.cos(((direction – 120) / (180/Math.PI))));
longPosition3 = longitude + (length/3 * Math.sin(((direction – 120) / (180/Math.PI))));
shapePoints.add(new MQLatLng(latPosition3, longPosition3));

triangle.setShapePoints(shapePoints);
overlay.add(triangle);

After completing this, I took a look at the Microsoft Virtual Earth SDK. One of the tools is an interactive SDK demo, which shows you both what it is doing and how to do it. I compare this to the MapQuest SDK, which has guidebooks (for some features), very few samples, and class documentation (autogenerated from the source) and I am underwhelmed by MapQuest’s offering in many ways. I also have Google maps to examine, which is somewhere between the two. If I were a developer, I would rank the APIs this way:

  1. Microsoft Live Virtual Earth Map SDK
  2. Google Maps SDK
  3. MapQuest Advantage API

Even with Microsoft and Google, I would still have to figure out the Trig. 🙂

Peace and Grace,
Greg

.NET Framework Source Code Available


Back in November, Scott Guthrie announced that the .NET Team would make the .NET Source Code available so you can debug into the .NET Framework source. During the final Beta (or RC?), this was available. Now it is available for RTM.

Scott Guthrie has blogged it with a short example and Shawn Burke tells how to set it up. This is a wonderful addition to help you debug applications. Just don’t find too many problems in the source, okay! 🙂

Peace and Grace,
Greg

Questions for Creationists


I have been spending some time on YouTube lately, examining a wide variety of videos. In my clicking through, I found this interesting video which one commenter claimed "everyone who answers to these questions will not actually believe creationists/ID nonsense." In this post, I am keeping the words "evolutionist" and "creationist" in quotes, as I do not believe one necessarily has to be black (evolutionist) or white (creationist) on this issue.

First, I find there is not ample evidence for evolution as a "holistic" science (ie, one that explains everything). I certainly think "evolution is fact" as there are ample portions of evolutionary science (what "creationists" might term "micro-evolution") that are true to a high degree of certainty, but there are also many portions of evolutionary theory that have "proof" that is more philosophical in nature than evidentiary. There is nothing wrong with philosophical exercises, but they are not science.

On the other hand, I do not find any credible evidence that the earth is only 12,000 years old, although many "evolutionists" have tried to rope me with that straw man argument.

With both points in mind, I am probably not the type of person Knowntje wants answering these questions, as I am going to reason through this exercise more than the caricature he has in mind. But I find this an interesting exercise, so let’s go for it.

NOTE: The following is not intended to be a scientific treatise. I have purposefully stated things in simple terms. Considering the lack of proper scientific jargon and phrasing in Knowntje‘s post, I feel this is fair. If you don’t, then find another playground.

1. Explain how the evolution process works, according to the theory of evolution.

Assuming a modern interpretation, evolution is a process in which genetic changes bring about changes in form. Over long periods of time (equilibrium), there are no changes, but occasionally a portion of a group gets "separated from the pack" and is subjected to environmental stimuli that cause enough change to form a new species (punctuation). The beings that survive are those who are best fitted to their environment, whatever "best fit" means at the time; others perish.

This follows Darwin’s beliefs, overall, although Darwin’s initial theory focused on small, imperceptible changes over long periods of time. When the evidence went counter to this belief, Gould & Eldredge "amended the theory" with their own hypothesis called punctuated equilibrium (the "modern" explanation above).

The fact that evolution has changed hypotheses over time has caused many "creationists" to criticize evolution, but it is proper for anyone who has contrary evidence to rework his thinking. To do otherwise leads to neurosis or psychosis.

2. The Big Bang is part of the theory of evolution. Explain to me why this statement is false.

Evolution, while impossible without a starting point (Universe or life) does not deal with origins.

3. Evolution goes against the second law of thermodynamics. Explain to me why this statement is false.

The second law of thermodynamics states that, in a closed system, entropy increases, leading from order to chaos. Evolution shows decrease in entropy, an increase in order, and new information being created. This would be contrary to the second law of thermodynamics, if earth were a closed system. It is not. It would be reasonable to debate whether there is enough energy entering the open system (earth) to account for the decrease in entropy. This is, of course, a gross oversimplification.

4. What would you consider to be a transitional form? Would, for example, a creature with both bird traits and reptile traits be a transitional form? Why or why not?

Assuming a spherical cow … This is a loaded question. Yes, a creature with both bird and reptile traits would be a transitional form, if one considers creatures like archaeopteryx.

Also explain why Kirk Cameron’s Crocaduck example would actually debunk the theory of evolution?

The Crocaduck would neither support or debunk evolution, when examined objectively. After all, we have Duckbilled Platypuses, which have both avian traits and mammalian traits. Bearing this in mind, I assume you mean "supposing a duck had a crockaduck as a child"? That would go contrary to the idea that evolution is accomplished over numerous small changes rather than some type of happy accident.

5. Evolution states that life forms came to their now-a-days complex form due to random chance and long periods of time. Is this statement correct or incorrect and explain why?

The statement is, overall, true, but you are most likely looking at two portions to trap the unwitting "creationist". The first portion is the word "random" indicating that life is like a roulette wheel, which objective people would never state. Although the evolutionary process is random when viewed from a certain height, close examination shows there are forces that can remove the randomness when examined closer. That is, at least, the theory.

The second is "long periods of time" which is overall correct, but modern theory (Eldredge & Gould) suggests that life spend more time in stasis and that "actual" evolution occurs over relatively short periods of time (thousands of years). This theory is called punctuated equilibrium.

6. Evolution is the science that deals with the origins of life. Is this statement correct or incorrect?

Not at all, but we have already covered this. The origins of life are necessary to have evolution, but evolution itself examines processes after life begins.

7. When we look at living bacteria under a microscope we basically look at the same lifeform as the common ancestor of all living organisms. Is this statement correct or incorrect?

The truth is neither of us know what the common ancestor looked like. We know what some speculate it might have looked like, but we have no empirical evidence they are correct. Let me go further on this one.

We do know that one of the earliest forms of life was cyanobacteria. We can examine fossilized stromatolites and get a good clue of what early cyanobacteria looked like.

We can assume that there is an even simpler form of life. A bit further than cyanobacteria, we can hypothesize some form of proto-bacteria. Even farther up, we can hypothesize a common ancestor for both archaea and bacteria.

Your question, however, is whether or not early bacteria would appear like today’s bacteria. The answer is both yes and no, depending on the bacteria you are examining. Would it appear like the earliest prokaryote (or other) life form? This is a wonderful guessing game that neither of us can answer objectively.

8. The skeleton of the famous Neanderthal man was actually the skeleton of an old man with arthritis. Is this correct or incorrect?

Scientifically, there is evidence that some of the Neanderthal remains found were from individuals who had arthritis, or at least symptoms like modern arthritis. So at least part of your question is correct.

Was it a homo sapien who had arthritis? The skeleton does not appear to be homo sapien, so I would say no. I have not read about any genetic findings on the remains, which would seal the matter. It is unlikely I will, as genetic material does not generally survive as well as fossilized bone matter.

9. If we look at the growth of the population, around 4400 years ago, there would have only been a few people on the earth. This falls in line with the biblical account, yet if man has been here for a million years, the entire earth would have been filled by trillions of people. Therefore man could not have been here more than a couple of thousand of years. Explain why this is a false argument?

On a purely logical basis, it assumes  linear progression and survivability rates similar to what we see today. It also ignores that massive plagues, like the medieval black plague, are likely to have happened prior to the advent of writing.

10. Where did the theory of the big bang come from?

Initially, the name "Big Bang" was a derogatory term coined by Hoyle, who believed in a static universe. He was not alone in this viewpoint, as even Einstein added a "fudge factor" to his General Theory of Relativity. But, I digress.

What are the supposed evidences that show the big bang theory to be true from our point of view.

The most compelling, for me, is the Cosmic Microwave Background Radiation (CMB), which was predicted in the first half of the last century and discovered by accident. In particular, it is slight inconsistencies that point to inflation, what George Smoot labeled "wrinkles" in his book. These "wrinkles" were predicted as necessary evidence to support the theory. More recently, WMaP has provided even clearer pictures that convince me the Universe is roughly 13.7 billion years old, give or take a percent.

11. Evolution cannot account for irreducibly complex organs like the eye, because of the mousetrap principle. If you take out one part, it cannot function at all. Therefore, it must have come into existence at once. Explain why this statement is false and how evolution, at least on paper, could account for an organ like the eye.

Almost anything one can imagine can be made more simple or more complex. In the case of the eye, we have simple lenses in some marine life that need little more than shaping to become a more functional eye. The most interesting, from a ironic point of view, is the example where a mousetrap evolution is laid out.

The problem with the eye example is it is most often used as a gotcha rather than an evidential argument. Michael Behe, the one who popularized "irreducible complexity" focuses primarily on biochemistry than structure, where there are far more complex processes involved. Is this an open and shut case for creation? Of course not, but it is an area where ID and evolution land on fairly level ground, as many "scientists" become "philosophers" when examining pathways that produce complex organs.

12. In simple terms, the big bang theory states, first there was nothing which exploded and became everything. Explain why this is false?

Actually, the statement is only false in layman’s terms, as you find many noted Cosmologists calling a condition in which there is no time, space or matter nothing. As long as one uses this definition, the statement is, in essence, true.

Prior to time and space (and matter), there was an infinitesimal ball of extremely hot radiation. As time began, this "ball" expanded, or exploded, at first extremely rapidly (inflation) and then settled down to the pace we see today (or roughly so, as it turns out Einstein’s "fudge factor" may have been correct after all, as our Universe appears to be speeding up … but I digress again). As this ball cooled, we gained matter. Matter eventually coalesced into stars and galaxies, some of which were too big and imploded then exploded, flinging heavier elements throughout the Universe. Some of these bits of heavy matter eventually were pulled together and formed what we now know as earth.

Yes, this is an extreme oversimplification of the Universe, but it works for this post.

13. The big bang was an explosion of matter within empty space. Explain why this is a false statement.

Because there was nothing which exploded and became everything. 🙂

In a less sarcastic tone? One needs space to have empty space.

14. The age of the earth, 4.6 billion years old, is based on the theory of evolution. Explain why this is false.

I think we have already covered this enough times, don’t you? As a sidenote, I have never seen a "creationist" who stated anything remotely similar to this, although I am certain there is someone, somewhere, who has.

15. Tell me to what biblical kinds does this animal belong? (picture below) And explain why you think this.

biblicalKinds 

Looked at objectively, it neither strengthens or weakens either "side" of the argument if someone cannot "type" this creature. If one attempted to "type" this creature, it would most likely be a Lamarckian exercise anyway.

16. Evolution explains that humans came from apes. Explain why this statement is false.

According to evolutionary theory, man and apes both evolved from a common ancestor. Man did not evolve from apes.

17. A creationist argument sometimes used is “if man evolved from apes, then why didn’t the reign of apes end?” Why aren’t apes still evolving into humans? Explain why this is a false argument.

Well, assuming that man did evolve from apes, which we had previously shown to be false 🙂 …

You actually have multiple questions here. The first question (reign of apes end) is provably false, according to the theory, which states that members of a group separate, are subject to environmental (and other) factors, and then evolve into new species (over time). The members of the group that do not separate and are not subject to the factors do not evolve, or at least do not evolve down the same pathway. Some creatures may not evolve at all, or at least not to the extent where ancient and modern forms are noticeably different when examining fossilized remains.

The second question is a valid question. It, unfortunately, is not a scientific question, at least not at present. Why? Because we cannot observe whether or not apes are still evolving. Supposing evolution is true (tautology), we know what it looks like over long periods of time. We have no clue what it looks like over short distances of time, except that it deals with genetics. What we observe today as a change in eye color may, in fact, be an evolutionary step … or not.

18. Are the terms micro and macro evolution terms that were created by creationists or are these terms commonly used by evolutionists?

Questions like this, or rather thinking like this, is the reason "creationists" view "evolutionists" with disdain, and visa versa. Whether the terms were created by "creationists" or not is a red herring question and best used to design a straw man. This is much like when "creationists" state "you cannot prove that" and "evolutionists" state "science does not prove things". The "evolutionist" believes he has trumped the "creationist" simply because he did not state "you have not shown that to a high degree of certainty" or similar. But the "creationist", in this case (provided, of course, he is not a "leave your brain at the door" type), probably understands certainty.

What the "creationist" is attempting to do is label things so he can set up a clear delineation, in his mind, between that which has been shown to be true with a high degree of certainty and that which has not. He is also focused on those things that most challenge his worldview. On the other side of the fence, you find "evolutionists" doing the same thing about religion. In the end, both sides are stating some truths, but they are wrapped up in a caricature of what the other side is … or believes.

19. If you agree that microevolution can occur, can you tell me how many microevolutions can occur within a kind?

The answer is one … two … three … crunch. Three! Sigh. The world may never know.

I am certain some of you get this. 🙂

20. What is the genetic barrier that prevents animals from macroevolving through the process of microevoultion into another kind? And can you give me some evidences of this genetic barrier?

There is no genetic barrier that prevents animals of one kind from becoming another kind, but the lack of a genetic barrier does not mean there are not forces that effectively resist evolutionary change. It is possible that some of these forces may be strong enough to provide a "barrier".

There is evidence that DNA resists changes, at least in more complex animals. Since the early 80s, we have been aware that some of what we commonly term "junk DNA" serves as a correction mechanism. We have further evidence that more of the "junk" serves a purpose than we thought in the 80s, giving rise to the possibility that there is far less that is actually "junk" than we think. It is also possible that very little of our DNA is junk. Yet, many "evolutionists" ignore the scientific evidence that more and more of the junk is being shown to have a purpose, just like some of the vestigial organs have been shown to have a purpose.

DNA is not so much a barrier to changing kinds as it is a barrier to positive genetic mutations, both "micro" and "macro". But both the "creationist" and "evolutionist" would agree that evolutionary processes are quite improbable (yeah, I stole that from Dawkins).

We have experimental evidence, in fruit flies, that purposeful genetic mutations will often reverse themselves over many generation, unless continued "pressure" is applied to maintain the mutation. We do not have much in the way of experimental or observational evidence on humans, however, to determine if DNA could be a barrier against a human evolving into another kind over long periods of time. There are numerous reasons for this:

  1. Humans generations are much longer than fruit flies and we have not been investigating this type of science long enough to observe (or experiment)
  2. There is a greater question of ethics when experimenting on humans
  3. We have not identified all sources of outside pressure that are being applied, nor can we guarantee our control will not be under the same pressures

Now, one might argue that #3 is precisely how evolution works, which is true. But, the types of outside pressure I am talking about here are things like nutrition. For example, the western culture has a higher genetic predisposition to breast cancer. We can show this through markers in DNA. Asian cultures have a much lower predisposition. When you bring Asians to America and subject them to our diet they have higher incidents of cancer, but you also begin to see higher incidences of the genetic markers for breast cancer.

The question is if nutrition, kept in stasis (ie, we keep eating really bad as a society) can continue to morph DNA in some positive way that improves survivability. The evidence, by in large, is contrary to this position, as a good number of those who have these types of mutations simply die. Those who survive rarely pass on any traits, much less positive traits, as most treatment options either render one sterile or alter the DNA passed on to their children in a negative manner (mom survives, the children die).

Is it theoretically possible, however, that some type of outside force could create enough positive genetic changes to push a species over the brink into another kind (ie, unable to breed with the original species)? Certainly. But, once again, we are entering philosophical, not scientific ground.

21. What evidence would you need to convince yourself that evolution and the Big Bang are true?

I think there is ample evidence that the Big Bang is true. So, let’s push that one aside. As for evolution, I agree that there is evidence of evolution in the form of adaptation. Darwin’s finches is a great example, so I think we need to get to the question of "changes in kind" or something along those lines. There are many other examples, so it is not evolution I have a problem with.

What evidence do I require? Well, first, I would like to see science on many of the issues that are philosophically bandied about as "science". I would like to see experiments that show that positive mutations can stack up to create new kinds and then explain how these pathways can be traversed without human intervention. The common counter is "we have that proof already", but we don’t. We have a lot of philosophical musings masquerading as science (the "proven on paper" exercises), but little substance. And, I do not blame scientists for not having these answers; I just blame "scientists" for accusing anyone who sees their arguments as philosophical as some form of delusional being or as a moron. I think people can be rational and disregard philosophy in a lab coat.

What is even more annoying is many processes, primarily in origins, have but one or two steps out of thousands completed. And, in many, if not most cases, the steps taken are not even complete steps. Yet, the fact these steps have been "completed" is enough for some to state the entire pathway is true beyond all reasonable doubt.

Let me use a metaphor or analogy: If one takes a single step across a field, it is plausible, rational and sane to believe he can complete the entire journey across a wide field. In fact, barring some known factor that would likely impede his progress, like a landmine, it would be irrational to assume he would not make it. The same is not necessarily true if the journey is across a frozen field and the man is in his undergarments. If we further suppose there is a frozen river in the middle of the field, it becomes less plausible he will make it. And, if we add a condition where the field is in two sections, one at the top of a cliff, it becomes true to a high degree of certainty that the man in his undergarments will succumb to the weather before he makes it.

When I look at many evolutionary pathways, we have taken one step, but have neither mapped out the journey, nor made an assessment of our clothing. Yet, the fact one step has been made has those supporting the man sure he will make it. If the field is, in fact, flat with proper weather conditions and proper clothing, this is a rational thought. As it stands, we cannot state whether or not the thought is rational or irrational.

Yet, in this arena, we have proponents from both sides examining the bumps the other must traverse and claiming victory. In reality, neither has the right to that claim.

In the end, however, even a completed map, with proper evidence backing up each step, does not eliminate the possibility of God. It eliminates the possibility of some types of God, of course, but not all types. It also makes God, if He exists, an unnecessary component to life.

22. If you stumbled on irrefutable evidence for evolution and the Big Bang, which was undeniable would you, first of all, accept it?

As I have no problem with evolution, at some levels, nor the Big Bang, I have to focus on evolution as a process that explains all life (ie, the God versus science debate).

As a Christian, if there were irrefutable evidence that all life could be accounted for by the evolutionary process, meaning (per my analogy) the map of the field had been completed, I was properly dressed, and I was physically capable of completing the journey, I would have to accept that as fact. Sculpturally speaking, Jesus is stated to have said he was "The Truth". If He is The Truth and the evolutionary process is irrefutable, I would have to either a) accept evolution as God’s method or b) He was lying.

I continually examine my belief systems and re-examine the evidence that backs them up. It is not scientific evidence, but science can neither prove nor disprove God anyway. In fact, science falls short in many arenas. This is not saying science is bad, by any means, as I am an adherent of science. It is simply stating science does not have all of the answers.

And how would this impact your life and views of life and the Universe?

I cannot say with any certainty any more than you could say, with certainty, how your life would change if provided irrefutable evidence that there is a God. We can both imagine what we think we might do, but there is no way to be certain.

Epilogue

Now, for my two cents on the questions. Some of these questions are valid to determine if one knows what he is talking about. I agree with Knowntje that one should know something about what he is criticizing, at least if he wants to be taken seriously. Many of the questions do nothing to examine whether the poster knows what he is talking about and enter into ground where Knowntje appears to be setting a trap rather than asking questions that focus on knowledge, or lack thereof.

I believe in God. I have evidence to back up my belief. It is not, on the whole, scientific, but science cannot do much in the realm of the supernatural, as it is naturalistic in focus. This is not a criticism, as I think science should be grounded in the natural. There are a great many other things both you, and I, believe that are not scientific in nature.

I am also a skeptic, in many ways. I question anyone who is zealous about his particular worldview, even those whom I generally agree with. Even more importantly, I question anyone who has a dog in a particular hunt, meaning, in general, a material interest. If someone is hawking vitamins, his theory that they solve all diseases is questionable.

What does this have to do with "evolution"? There are a great many for whom "evolution" has become their religion. This is not to say that, for many, Christianity is a religion, but one expect a theological system to be religion, not a science.

I also firmly believe that "science" should be available for debate when it enters the arena of philosophy. Unfortunately, some believe it is a sacred cow that should not be questioned, except in a scientific way. If "science" is playing in the field, how can a reasonable person expect the "creationist" to remain in the house. It is an unfair binding on one participant and, paradoxically, the participant who has been declared the loser before the fight even begins. When we allow "science" to wax on philosophically, but tell "creationists" they must only play with "science" as science, we are being both unfair and hypocritical.

Good science will stand. Bad science will ultimately fall. As there are far too many zealots on the "evolutionary" side, it makes me wonder how much of it is bad science. As mentioned in the text, I have no problem with evolution, as a science. I have a problem with it as a philosophical system … and that is where I see much of the "science".

Peace and Grace,
Greg

Bill Gates on Vista?


Bill Gates was recently interviewed by the Gizmodo crew at the Consumer Electronics Show. Here is what he had to say about one of his products. Is it Vista?

Interviewer: What would you say, in the last five years … what one product would you say you wished you would have polished a little more?

Bill Gates: Ask me after we ship the next version of Windows. (laughs) Then I’ll be more open to give you a blunt answer.

You can see the clip here (http://gizmodo.com/342920/holy-crap-did-bill-gates-just-say-windows-sucks).

Peace and Grace,
Greg

MapQuest Tiled Map API and .NET


I blogged last night about whether Microsoft sucks and one of the topics was the documentation present for Microsoft. Whether you realize it or not, Microsoft spends a lot of time creating documentation and samples to make your life easier. Look at the MSDN library, for example. Nearly every method has a bit of sample code to help you learn how to use the method. Add on top the MSDN site and various MS funded and community sites and you have a pretty easy go of foraging the forest to create your applications in less time and actually understand what you are doing.

The same is not completely true for all other products. I have been dinking with the MapQuest Tiled Map API for a bit of time and the documents are a bit below par once you step out of the box, even slightly. The information is there, but perhaps I have been spoiled by examples in MSDN? For Enterprise Customers, like my company, this is not a major issue, as Enterprise Support is excellent. There is also a forum for everyone to ask things, so I am not stating that support is lacking, by any means. I am just a OJT type of guy and would like the docs to give me more information.

Rather than continue to sound like I am whining, I need to get to the point of this entry, which is how to get the tiled map API working in .NET. I am still working on the solution, so this is a work in progress. If anyone comes up with a better solution, I am all ears, especially one that does not require loading another JavaScript file to accomplish proper loading.

The Problem

First, a bit about the company I work for. Microtrak GPS (under the corporation: The Tracking Corporation) is a company that sells GPS tracking products. Behind the scenes, we get GPS messages sent to our company and store them in a database. On the front end, customers log in to a web site and see where their vehicle is (or has been). There are three high level functions of any "mapping" toolkit that we have to use.

  1. Reverse Geocoding – to get addresses for the raw GPS messages
  2. Mapping – Show locations
  3. Geocoding – For users that wish to place their own locations on the map (saved points of interest, like their home)

In our implementation, the executives have fallen in love with the Sat maps (hybrid actually) and the ability to drag a map to see other locations. This provides a bit of challenge, as the Tiled Map Toolkit has some issues out of the box (the primary issue is a browser issue and does not reflect on MapQuest, however).

I will now cover the Reverse Geocode "project" as well as the mapping project, as each requires a bit more information than is presented in the documentation.

Reverse Geocoding

Reverse Geocoding is the process of taking a set of lat/long coordinates and turning them into a meaningful address that humans can understand. After all, very few of us would say, "my address is 36 01.917 N, 86 57.789 W", although that is a correct "address" for me right now, albeit about 10 feet outside the window, but that is a topic for another day.

The MapQuest document for .NET has little information for Reverse Geocoding, however. Specifically:

Advantage API customers who want USA city and state lookup should supply the geocode pool
us_postal. For other countries, contact Technical Support. For details about your server configuration,
refer to “Learning Your Server Configuration” on page 13.

So, I attempt reverse geocoding using the sample application Geocodeit as a code map. It appears I simply have to look at the ReverseGeocode method in the documentation and then make sure I have it set to us_postal.

Find the Exec object in the download (or online) documentation and I find the followign methods:

ReverseGeocode (LatLng ll, LocationCollection lc, System.String mapCovName)
ReverseGeocode (LatLng ll, LocationCollection lc, System.String mapCovName, System.String covName)

Assume now I can simply add the us_postal as the mapCovName and go. So I code this:

using System;
using MQClientInterface;

namespace ReverseGeocodeIt
{
  class SimpleReverseGeocode
  {
    static void Main(string[] args)
    {
      LocationCollection locs = new LocationCollection();

      Exec geocodeClient = new Exec("map.access.mapquest.com", "mq", 80);
      geocodeClient.ClientId = "{Client ID here}";
      geocodeClient.Password = "{Password Here}";
      try
      {
        geocodeClient.ReverseGeocode(new LatLng(36.032102F, -86.962859F), locs, "us_postal");
      }
      catch(MQException ex)
      {
        //Code to display error message
        return;
      }

      if (locs.Size > 0)
      {
        //Get the first one
        GeoAddress loc = (GeoAddress) locs.GetAt(0);
        Console.WriteLine("Address:rn{0}rn{1}, {2}  {3}", loc.Street, loc.City, loc.State, loc.PostalCode);
        Console.Read();
      }
    }
  }
}

But, this one failed. I scoured the document for a clue (and the web for a sample). After attempting for awhile, I contacted tech support. First, we had to make sure my ID was set up. Still failed, so I was told I was missing something, which was the MapCovName (us_postal is a covName). The corrected line is:

geocodeClient.ReverseGeocode(new LatLng(36.032102F, -86.962859F), locs, "navt", "us_postal");

This is actually in the document, but it is not extremely clear. First, you find it in the server configuration XML. It is also located in a table on page 34, under Advanced Geocoding, although there are no samples of using this in code.

CoverageName The name of a geocode pool on the server. Common examples include
tana, navt, and gaz.

In addition, it is unclear how you use this properly, as the code sample on page 35 appears to show navt as a covName, not a mapCovName.

geocodeOptions.CoverageName = "navt";

The Reverse Geocode now works, so I moved it into a class with a factory method on top and I am golden here. The factory is important here, as I still have Pepperwhite as a fallback and may be told to move to Google or MapPoint, etc., in the future. My basic interface, for those wanting to code their own clients, is currently like this (although it needs a bit of a refactor before going live):

public interface IReverseGeocode
{
    double Latitude { get; set; }
    double Longitude { get; set; }

    RGAddress RunReverseGeocode();
    RGAddress RunReverseGeocode(double latitude, double longitude);
}

Getting Tiled Maps to Work

My next problem centers around the Tiled Map API (part of the JavaScript API). I have to use it as the execs want to give customers the ability to drag the map around. I am not convinced it is a requirement, from a user standpoint, but it sure makes things look pretty and makes it easier to market our product. For the marketing aspect alone, it is worth the pain of figuring this one out.

My final goal is to place a Tiled Map (all JavaScript) into a .NET control so I can dynamically change lat/longs and dynamically add Points of Interest (POIs). In my case, POIs are either the asset a unit is attached to (person, vehicle, etc.) or saved locations (my home, my work, etc.). I will also have to add circles for geofences, but that is a topic for another blog entry.

First, start with the basics. I grab code from page 5 of the JavaScript/Tiled Map Developer’s Guide (this is a conglomeration of the two samples)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Quick Map</title>
<!– THE JS INCLUDE Tag that gets Map Toolkit –
Change Key value to one provided on signup –>
<script src="
http://btilelog.access.mapquest.com/tilelog
/transaction?transaction=script&key=YOUR_KEY_HERE&ipr=true&itk=
true&v=5.2.0"
type="text/javascript"</script>
</head>
<body>
<!– The DIV to hold the Map itself –>
<div id="mapWindow" style="width:900px; height:520px;"></div>
<!– Create the base MQTileMap object and pass in the id of
the DIV you
want to hold the map –>
<script language="javascript">
myMap=new MQTileMap(document.getElementById(‘mapWindow’),9,new
MQLatLng(40.0446,-76.4131),"sat");

</script>
</body>
</html>

This works great once I allow redirect from localhost at the Technical Resource Center (trc.mapquest.com). Seems like this one is going to be easy. I then go through and add points of interest and recenter the map, using an altered version of the script on page 8. Everything works.

Next, I place this in a .NET page and the whole things blows chunks.

MapQuesterror

Ouch! Fortunately, I recognize this one as an error in JavaScript that occurs when a "DOM" is not completely loaded before loading methods. Yes, it does work fine in Firefox, for those asking. Opera? Yes. Safari for Windows? Yes. This is a unique Internet Exploder problem. But, I cannot put a "This would work in Firefox" message (like some open source sites), as most of our customers use IE. Yes, I am ripping a bit on Internet Exploder, at least IE 7 (have not tested in IE 6 yet).

The solution is to move to MooTools. Below is the entire code for this simple example, using the DOM ready functionality of MooTools. I will follow with a few pointers.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="map2.aspx.cs" Inherits="map2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript" src="js/mootools.js"></script>
      <script src="http://btilelog.access.mapquest.com/tilelog/transaction?transaction=script&key=YOUR_KEY_HERE&ipr=true&itk=true&v=b2btk&quot;
        type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="mapWindow" style="width: 900px; height: 520px;" >
    </div>
    </div>
    <script language="javascript" type="text/javascript">
        function loadMapQuestMap()
        {
            myMap=new MQTileMap(document.getElementById(‘mapWindow’),9,new MQLatLng(40.0446,-76.4131),"hyb");
        }
            window.addEvent(‘domready’, function(){
              loadMapQuestMap();
            });
    </script>
    </form>
</body>
</html>

Here are some notes that will help you.

  1. The <script> tag that points to mootools must be loaded prior to the <script> tag that points to MapQuest. Flip it and IE blows chunks again.

    MapQuestChunks2

  2. You have to load the DOM ready bits from the download page. Open the page at http://www.mootools.net/download and scroll down to check Window.DomReady. This will also check the Class section, all of the Native section and Element.Event. If you just download the Core (default), you will not get DOM Ready.
  3. You must encapsulate the mapping logic in a function and call that function from the block that adds the domready event as a function.
  4. The domready event can be placed anywhere on the page, rather than just at the bottom. I just placed it here as I was typing at this point. Since the entire DOM has to be loaded prior to the loadMapQuestMap() function being called, it really does not matter if you place this first or last, as long as the placement is legal.

My next task is to place a geofence on the map. The samples in the Dev Guide all use pixel placement, so I am searching to see if I can place a circle on the map using lat/long.

Peace and Grace,
Greg

Does Microsoft Suck?


The title is a bit titillating, but there is a sincere reason for using this particular title. First, I have received different emails and IMs (and tweets) about deficiencies in Microsoft software lately. Second, I have railed on a few products myself. But, I also work with other products and want to give a more balanced assessment of where things stand, in my opinion.

Internet Explorer: Visually, I like what Microsoft has done. Unfortunately, they have some serious underlying problems. I have never seen a browser fail so much out of beta. As my first browser was Lynx, followed by Mosaic when it first became a viable option, this should say something. Recently, it seems to be worse, so I probably need to look at the underlying stack by determine what patches were pushed into my computer. I would imagine at least one had to do with http.sys, as there are some additional symptoms. Overall, IE sucks moderately and is driving me to Firefox.

Windows Live: Lots of great services guys. Lack of stability in many. The Windows IM is my main client. I have friends who are big fans of Trillian, but I find it hard to dump something that works well. I know some may have arguments about something that works better, and I will gladly listen. But don’t try to sell me on "better webcam" or similar features, as I use IM as a communication tool, not a social networking tool. Microsoft can do better on many of the features, but IM works great for me. The search sucks, however, and I still use Google to search Microsoft when I do not find what I am looking for. That is not a good thing guys.

Visual Studio: VS2005 had some glitches that hurt. It was still a very good tool that helped me tremendously with productivity. VS2008 solves most of the problems with VS 2005. I know there are some that have problems, but most of the issues I have run into are well documented. I still see the need for a few patches, but this is a great release.

Expression Web: I should probably expand this to Expression All, but I do not spend much time with the other tools. The currently released version is pretty much a waste of time, at least to someone like me that uses ASP.NET as a programming paradigm. Prior to the release of VS2008, the design surface was worth the price of admission. Now, CSS is the only interesting thing about EW 1. EW 2 should surface in CTP or beta sometime soon (?), so this may change, although the public sites do not mention much that focuses on ASP.NET. Does it suck? No. The feature set is a bit weak and dated, but the CSS bits, as well as design surface (now in VS), are worth something. Why should I say Expression All? Pretty much every tool in the suite is behind the ball, which leads me to …

Development at Microsoft: There is a lot of cool stuff that has come out of Microsoft in the past year or so. The problem is the kewl is way outpacing the tool support. Frankly, I am spending too much time developing to adopt many of the technologies, as the lack of tool support makes it a bit too time consuming to bite. There are some notable exceptions I have bitten on:

  • LINQ: Not as thrilled as I first was, as LINQ does not fit my application well (I will add a caveat in a moment, as I am talking about LINQ as a data access mechanism, which so many of the samples tout). Once they can get it working better across libraries (tiers), and keeping a decent performance profile, I will be more thrilled. Now that I have stated that, let me explain I am talking about LINQ as a data access solution (drag tables on a LINQ surface, etc.). As a means of filtering objects from a variety of sources, however? Damn, LINQ rocks.
  • MVC Framework: I need to try to pull some influence and get on the closed bits for this. While this is partially selfish, I think there are a few things that need to happen to make this a really viable paradigm for the average developer and would love to give feedback.
  • WCF: My only gotcha here is a vendor app that blew up on .NET 3.x a while back. I think I have cured the problem (only testing will tell), so this should resolve.

The rest of it is still too infant for me to pour a huge amount of time in, until I see a reason. I am fairly fond of the WF bits, but I cannot invest in them until I have enough workflow bits. Most of what I am focus on now is process automation which requires little workflow, if any. I also like the WPF stuff, but it offers less to me than some, as I have focused on business logic in libraries for quite some time. Once we truly get WPF/E (meaning, I can easily port all of my XAML from desktop to web), it will make more sense for me to do more than playing. For those not currently separating UI from logic, WPF rocks.

Samples and documentation: I have heard some bitching about this lately. One of the biggest beefs is the fact MS does not properly tier its samples. To this, I completely agree, but there is more to this story.

Over the past week, I have been hacking through the MapQuest Advantage API. In most of the work I am doing, the samples are non-existent. When they are there, I find that they are often wrong or incomplete. The documentation explains quite a bit, but also drops the reader off before they get the problem solved. MapQuest, fortunately, has a great support group, who has helped immensely.

Compare this to Microsoft. Sure, some samples are a bit inane. But the samples, while lacking on best practices, both work and illustrate the concept. In addition, the library documentation explains how things works and even … gasp … has sample code.

To be fair, there are other companies that produce fairly decent documentation and sample code. Oracle and Google come to mind (okay, Sun too). Each of those companies also are not great at tiered samples.

Summary

I still think Microsoft downloads (Silverlight edition) sucks. I also think Microsoft needs to slow down a bit and stabilize products and get better tool support. Don’t stop innovating, of course, but show us you are attempting to make more competent developers rather than focusing on kewl. I believe you can do it. Stop driving me to search your site with a competitor or use a competing browser to actually have a site work.

Peace and Grace,
Greg