Sun, 30 Mar 2008

The immunological argument against immigration

Here in Small Town, Illinois, we don't see much of the illegal-immigration crisis aside from an occasional Spanish name in the newspaper's police column, usually someone arrested for drunken driving or domestic violence. Immigrant crime isn't even a big issue in the large nearby cities.

But while my wife and I were discussing the recent news about vaccines and autism (apparently John McCain linked the two recently) we stumbled across an argument in favor of strict immigration control: these people pouring over the border haven't had their shots and some of them are likely to be carrying God-knows-what infection that's been practically eradicated in America. For us and our children, that's a compelling reason to support closing our southern border. It also seems to be a compelling reason to keep kids away from government programs that service the children of illegal immigrants, such as Head Start.

UPDATE: a measles outbreak in San Diego by way of an unvaccinated 7-year-old child who brought it from Switzerland.

My theory of dystopian fiction

There's a current crop of apocalyptic movies: "I Am Legend," "Children of Men," "28 Days Later," "Doomsday" to mention a few. It seems to me that when done well, they're echoes of our own spiritual dystopia.

Man was created by God and was living the life he was meant to live until a catastrophe hit and wiped out life as we knew it. It wasn't the usual trigger you find in dystopian stories, a virus, an asteroid or a nuclear war; it was a mysterious crisis (well, sin, to call it by its common name) in the human heart that wrecked our lives and drove us from our homes, and led to millenia of suffering and death.

Any good dystopian fiction will examine our real-life fall (the original fall and our tragic personal falls) and try to provide an explanation of this dystopian life in which we "do not understand our own actions; for we do not do what we want, but we do the very thing we hate."

Sat, 29 Mar 2008

Earth Hour is a 'psychological plague'

Have you heard this crap about businesses, maybe even entire cities, turning off their lights for an hour to "lower carbon emissions"? The global psychosis is scheduled to hit tonight at 8-9pm local time. Here's the best writing I've found on the subject:

I never get tired of looking at this photograph. It never fails to fill me with wonder and awe at the ingenuity of my species who, against all the odds, have carved these glorious man-made islands of light out of the primordial blackness. Whenever I am heavy of heart, I open up this photograph and stare at it to remind me that, somewhere, there is light and life.

With each passing day I become more convinced that the 'green' movement is actually a millenarian psychosis; a mental and spiritual sickness borne, perhaps, from some degree of civilisational exhaustion. Not just a belief that the end of the world is nigh, but an active desire to bring it about. And soon. Ours is not the first age to witness such pandemics of madness but, in the Middle Ages at least, there was the excuse of a near-universal poverty. In such a state of interminable plight, despair may not be the wisest response but it is at least an understandable one.

Read the whole thing. What do you want to bet that folks who leave their lights on tonight will be attacked here and there around the world?

UPDATE: not much Earth Hour action here in Small Town, Illinois. The neighbors across the street have their house lights off but the streetlamp attached to their garage is still on.

Howard Dean endorses John McCain

As Howard Dean, chairman of the Democratic National Committee, said in his endorsement of John Kerry in 2004,

"The real issue is this: Who would you rather have in charge of the defense of the United States of America, a group of people who never served a day overseas in their life, or a guy who served his country honorably and has three Purple Hearts and a Silver Star on the battlefields of Vietnam?"

Gee, John McCain's military honors include the Silver Star, the Bronze Star, the Legion of Merit, the Purple Heart, and the Distinguished Flying Cross, and he saw a bit more action in Vietnam than John Kerry did.

Hat tip: Jake Tapper

Fri, 28 Mar 2008

Fun with Mathematica

Once you get used to writing things in the Mathematica language, all sorts of fun things become possible. This morning I printed a set of small two-sided Mexican flags that we'll wrap around toothpicks, glue together and stick into Krispy Kreme doughnuts tonight:

TableForm[
  Partition[
    Table[
      Framed[
        CountryData["Mexico", "Flag"]
      ],
      {24}
    ],
    2
  ],
  TableSpacing -> {Automatic, 2}
]

and I just solved a little regular expression problem posed by my boss:

> What's the regex for matching a three digit version number?
>
> Valid examples (where 'x' is an integer > 0)
> x
> x.
> x.x
> x.x.
> x.x.x

Howzabout -

In[19]:= strings = {"6", "6.", "6.0", "6.0.", "6.0.1"}
Out[19]= {"6", "6.", "6.0", "6.0.", "6.0.1"}

In[30]:= StringMatchQ[#, RegularExpression["[0-9](\.([0-9](\.([0-9])?)?)?)?"]] & /@ strings
Out[30]= {True, True, True, True, True}

Thu, 27 Mar 2008

Something like Subsets

This is the first entry in what I'm calling my "list cookbook". When you deal with sets of things, you sometimes need to transform the sets to do something nifty with them. Here's the example that started me off on the cookbook idea.

Summary

Problem

Given a list {a, b, c, d, e}, what Mathematica commands will turn that into {{a}, {a, b}, {a, b, c}, {a, b, c, d}, {a, b, c, d, e}}?

Solution

Thanks to Mike Pilat of Wolfram Research:

In[1]:= list = {a, b, c, d, e}
Out[1]= {a, b, c, d, e}

In[2]:= Reverse[NestList[Most, list, Length[list] - 1]]
Out[2]= {{a}, {a, b}, {a, b, c}, {a, b, c, d}, {a, b, c, d, e}}

Variations

The beauty of Mike's solution is that by tweaking bits of it you can arrive at other possibly useful list transformations. Change Most to Rest and don't Reverse the list and you get:

In[3]:= NestList[Rest, list, Length@list - 1]
Out[3]= {{a, b, c, d, e}, {b, c, d, e}, {c, d, e}, {d, e}, {e}}

Similarly, but Reverse-ing the list before processing it:

In[4]:= NestList[Most, Reverse@list, Length@list - 1]
Out[4]= {{e, d, c, b, a}, {e, d, c, b}, {e, d, c}, {e, d}, {e}}

which is equivalent to swapping Rest for Most and Reverse-ing each element of the resulting list:

In[5]:= Reverse /@ NestList[Rest, list, Length@list - 1]
Out[5]= {{e, d, c, b, a}, {e, d, c, b}, {e, d, c}, {e, d}, {e}}

One more variation:

In[6]:= NestList[Rest, Reverse@list, Length@list - 1]
Out[6]= {{e, d, c, b, a}, {d, c, b, a}, {c, b, a}, {b, a}, {a}}

which is equivalent to:

In[7]:= Reverse /@ NestList[Most, list, Length@list - 1]
Out[7]= {{e, d, c, b, a}, {d, c, b, a}, {c, b, a}, {b, a}, {a}}

Fix vs IntegerPart

I occasionally play around with computational astronomy, and the book on the subject is Paul J. Heafner's Fundamental Ephemeris Computations, which gives routines for working with JPL's high-accuracy planetary ephemerides.

Since Dr Heafner wrote his functions in PowerBASIC, I needed to translate PowerBASIC's FIX function to some Mathematica equivalent this evening. I read over the scanty docs at powerbasic.com and thought it sounded like Mathematica's IntegerPart; checking the docs for IntegerPart I was amazed at the amount of information provided - from basic definitions and explanations to arcane unexpected applications of the function, plus relevant links to related functions and, of course, the magisterial entry at MathWorld - check out that table of fractional-part/integer-part functions! I'm mighty proud of our documentation.

Not just an employee, but also a satisfied customer.

Tue, 25 Mar 2008

Calling all self-neutered nancy boys

Contra this (here's the original artsy-craftsy post), nothing says 'manly' like multiple diaper bags riding in a van full of kids. In fact, what they say is exactly this: "I still have mine, I know how to use them and they clank when I walk - unlike you pathetic vasectomized cowards who faint at the first whiff of baby shit."

Er, pardon me; I have a hell of a cold, I feel like crap and I'm a tad cranky tonight.

Watch this

"Freedom Never Cries": Watch this cool video and John Ondrasik's charity will raise money for Operation Homefront, which supports troops' families.

Mon, 24 Mar 2008

What if?

If she wins the Democratic nomination, can Hillary Clinton name her husband, the former President Clinton, as her vice-presidential candidate? The 22nd amendment to the Constitution doesn't seem to rule it out:

Section 1. No person shall be elected to the office of the President more than twice, and no person who has held the office of President, or acted as President, for more than two years of a term to which some other person was elected President shall be elected to the office of the President more than once. But this article shall not apply to any person holding the office of President when this article was proposed by the Congress, and shall not prevent any person who may be holding the office of President, or acting as President, during the term within which this article becomes operative from holding the office of President or acting as President during the remainder of such term.

Section 2. This article shall be inoperative unless it shall have been ratified as an amendment to the Constitution by the legislatures of three-fourths of the several states within seven years from the date of its submission to the states by the Congress.

Obviously I'm not the first person to think of this.

Sun, 23 Mar 2008

Victimae paschali laudes

Now when he rose early on the first day of the week, he appeared first to Mary Magdalene, from whom he had cast out seven demons. She went and told those who had been with him, as they mourned and wept. But when they heard that he was alive and had been seen by her, they would not believe it.

Apostles: "(Oh reeeeeally?) Tell us, Mary; what did you see on the way? (snicker; nudge nudge wink wink)."

Mary Magdalen, breathless after her run from the tomb: "I saw the tomb of the living Christ and I saw the glory of his rising; angelic witnesses, his burial veil and shroud. Christ my hope is risen and he precedes you into Galilee (get up off yer keisters!). We know that Christ is truly risen from the dead - O victorious King, have mercy on us."

Beware the complete rewrite

Very sound advice from Joel Spolsky on the temptation to chuck all that code and rewrite the whole danged thing. In a word: don't.

Sat, 22 Mar 2008

This is why the word 'gobsmacked' was invented

The Red Army Choir (yes, that Red Army) teams up with a Finnish band, the Leningrad Cowboys, to perform a traditional American tune.

Best drag race EVER!

Bugatti Veyron vs Eurofighter Typhoon: vide.

Clarke quote

I love this quote from a letter Arthur C Clarke sent to Stephen Wolfram on receipt of the latter's brick-like book A New Kind of Science:

As another ruptured postman staggers away from my front door, I am writing to thank you for the amazing volume, which has just arrived.

A bit over the top

Obamamania has jumped the shark, as illustrated in this video. Me, I'm skeptical of the attribution of Godlike qualities to an ordinary corrupt racist Chicago Democrat.

Fri, 21 Mar 2008

Christ the Geek

A cool insight:

[This blog shall] be a forum where I shall discuss the light-bulb moments in my walk with Jesus Christ (because he is, as the creator of the universe, the ultimate geek);

Reminds me of Christ the tekton of Mark 6:3 - a programmer could be considered a tekton. (I suspect the blogger at Professional Geek is a former WRI cow-orker... did you share a corner office with Doug the Mennonite lo! these many years ago?)

Wed, 19 Mar 2008

Homeschooling in California

Mr Culbreath is all over the California homeschooling situation.

Mon, 17 Mar 2008

Angling for a job

Looks like AP journalist Ron Fournier wants to be President Hillary Clinton's press secretary come next January.

Fri, 14 Mar 2008

New Peart

Neil Peart has a new essay, "The Best February Ever", at his website. That guy is one heck of a writer.

Wed, 12 Mar 2008

Whew!

Take a moment with a groove laid down by Sun Ra and his Arkestra, introduced by big-haired David Sanborn in 1990.

That's some hot stuff.

Sun, 09 Mar 2008

Vexillological Mathematica

One of our kids is a budding vexillologist and he greatly enjoys things like this flag page I made with Mathematica. When you move your mouse over a flag the country's name will pop up in a moment, which makes it nice for flag quizzes. Here's how I did it:

Export["/home/billw/flags.html",
  TableForm[Partition[
    Tooltip[Framed[CountryData[#, "Flag"]], CountryData[#, "Name"]]& /@ CountryData[],
    5, 5, 1, " "]]]

The homeschooling Pope

Check this out from B16's address to the European People's Party in March 2006 in which he recognizes the right of parents to educate their children as one of the foundations of a truly human society.

As far as the Catholic Church is concerned, the principal focus of her interventions in the public arena is the protection and promotion of the dignity of the person, and she is thereby consciously drawing particular attention to principles which are not negotiable. Among these the following emerge clearly today:

- protection of life in all its stages, from the first moment of conception until natural death;

- recognition and promotion of the natural structure of the family - as a union between a man and a woman based on marriage - and its defence from attempts to make it juridically equivalent to radically different forms of union which in reality harm it and contribute to its destabilization, obscuring its particular character and its irreplaceable social role;

- the protection of the right of parents to educate their children.

These principles are not truths of faith, even though they receive further light and confirmation from faith; they are inscribed in human nature itself and therefore they are common to all humanity. The Church’s action in promoting them is therefore not confessional in character, but is addressed to all people, prescinding from any religious affiliation they may have. On the contrary, such action is all the more necessary the more these principles are denied or misunderstood, because this constitutes an offence against the truth of the human person, a grave wound inflicted onto justice itself.

Sat, 08 Mar 2008

Happy as a CIAM

This blog taps into something deep within my psyche. I can just about guarantee I'll see a half-dozen of these today as I head into Champaign for groceries. Thanks, I think, Mrs vH.

Fri, 07 Mar 2008

Health insurance explained

Charlie Martin takes a look at health insurance. A valuable read.

Thu, 06 Mar 2008

Real-world Mathematica

Here are some interviews with Mathematica users filmed in various places around the company headquarters in Champaign during last year's Wolfram Technology Conference.

Wed, 05 Mar 2008

Eremitical astronauts

There's some talk about setting up a one-way mission to Mars - a lone astronaut heads there to stay. That simplifies the whole man-to-Mars problem, and it also complicates it: no ordinary person is sane enough to withstand the spiritual and psychological rigors of solitary life on another planet.

That's a job for a person whose life is designed to be lived in isolation and in union with God - Camaldolese or Benedictine hermits, for example. Heck, you could probably get a largish crew of educated and trained Benedictine monks (or Carthusian or Camaldolese, etc.) to do the job and establish the first monastery on another planet. It would at least make a cool premise for a sci-fi novel.