Sodoku SQL Solution

In case this blog hasn’t been meeting its geekiness quota, I present the following. Ken (who deserves to be better known in the blogosphere and elsewhere) wrote a Haskell program to solve Sodoku with a single SQL query:

SELECT * FROM values AS aaaa, values AS aaab, values AS aaba, values AS aabb, values AS aabc, values AS aaca, values AS abab, values AS abba, values AS abbb, values AS abbc, values AS abcb, values AS abcc, values AS acba, values AS acbc, values AS acca, values AS accc, values AS baaa, values AS baac, values AS babb, values AS babc, values AS bacb, values AS bacc, values AS bbba, values AS bbbc, values AS bcaa, values AS bcab, values AS bcba, values AS bcbb, values AS bcca, values AS bccc, values AS caaa, values AS caac, values AS caba, values AS cabc, values AS cbaa, values AS cbab, values AS cbba, values AS cbbb, values AS cbbc, values AS cbcb, values AS ccac, values AS ccba, values AS ccbb, values AS ccbc, values AS cccb, values AS cccc WHERE aaaa.v <> 3 AND aaaa.v <> 9 AND aaaa.v <> baaa.v AND aaaa.v <> 4 AND aaaa.v <> bcaa.v AND aaaa.v <> caaa.v AND aaaa.v <> cbaa.v AND aaaa.v <> 8 AND 3 <> 9 AND 3 <> baaa.v AND 3 <> 4 AND 3 <> bcaa.v AND 3 …

(edited for brevity)

Hospital Thoughts

Hospital CEO Paul Levy is seeking responses to some remarkably frank comments on competition in the hospital industry:

…Please remember that health care is not like other industries, in which companies are rewarded in the marketplace for being the high-quality, low-cost provider. That situation does not yet exist in the health care system. So, am I better off being a industry leader with regard to that approach, or am I better off biding my time and continuing to follow the traditional path until there is a real sign of change in the marketplace?

As I’ve written before, this kind of openness is refreshing and potentially a brilliant business strategy. (It may continue to be so even once every one is doing it.)

Paul’s comments and receptivity to feedback remind me of my numerous concerns about Children’s Hospital Boston, which, as far as I know, has no analogous public forum. I’ve sent in comment cards, but they may just drop into a black hole.

Two principal complaints about Children’s Hospital: television and food. There are TVs everywhere, including in the waiting rooms. They are always on, even if no one is watching them. On one occasion, we were the only ones in the waiting room. When we attempted to turn the TV off, the staff told us we couldn’t. When we went in examination rooms and our daughter was unhappy, the first response by the medical staff was often to turn on a TV.

Our daughter (just over two years old) has never watched TV, and doesn’t find it comforting. Research indicates that TV is not good for young kids, and especially not infants:

Babies are glued to television sets these days, with 40 percent of 3-month- olds and 90 percent of 2-year-olds regularly watching TV, according to a University of Washington study released Monday.

…”While appropriate television viewing at the right age can be helpful for both children and parents, excessive viewing before age 3 has been shown to be associated with problems of attention control, aggressive behavior and poor cognitive development,” Frederick Zimmerman, the UW study’s lead author, said in a news release….

The American Academy of Pediatrics recommends no television for children younger than 2, and only one to two hours a day of quality programming for older children.

Recently, we had to stay over in the hospital for a night. There were no private rooms available, so we requested at least not to be stuck in a room where the TV would always be on. They looked at us like we were from Mars. (In the end, our roommate’s TV was always on. The three month old patient didn’t care, but his private nurse wanted to watch TV.)

Why is a pediatric healthcare facility encouraging TV for infants?

The food complaint is similar: so much of the hospital food provided for children is high in fat, refined sugar, white flour, and artificial ingredients. I was looking for a fruit-juice popsicle for our daughter (what she eats at home), and the only options the hospital could offer had high glucose corn syrup as the first ingredient after water. Again, this is not rocket science — these are not appropriate foods for one- and two-year old children.

I realize in both cases (TV and food), the hospital is just mirroring popular culture in an attempt to provide familiarity for most kids, but I wish they would at least provide an option for those families whose kids don’t watch TV and eat a high-sugar diet.

Introducing the Taft Hill Neighborhood Association

This is the first link to the Taft Hill Neighborhood Association.

Probably only of interest if you live on or near Taft Hill Park/Terrace in Roslindale, Massachusetts, but I’ve got to get it out there somehow.

This was also my first experience with the Google Maps API. It took about two minutes to figure out, except that the syntax to display a “hybrid mode” map was not trivial to find. For the record, it turns out the answer was:

map.setCenter(new GLatLng(latitude, longitude), zoom, G_HYBRID_MAP);

Let’s see how long it takes for my new email address to start receiving spam.

Religion, Secularism, and Mystery

To follow up on my early post Christopher Hitchens v. God, Jonah at the Frontal Cortex has some insightful comments on religion and secularism. The money quote:

When people like Dawkins attack wimpy agnostics or moderate believers, they forget that many atheists aren’t uber-rationalists. They carry around tarot cards, not The Selfish Gene.

Jonah also makes a good point that science and religion may not have irreconcilable differences:

It’s important to note that science isn’t necessarily in conflict with our need to believe in some sort of mystery. Modern science, after all, has discovered some of the craziest ideas around, from the principles of quantum physics to the fact that our head holds a trillion cells trafficking in minor jolts of electricity. These ideas are both materialist and mysterious, since they hint at a universe that exceeds the current capacities of our imagination. What Hamlet said to Horatio is still true.

This sort of analysis seems to me far more nuanced and interesting than that advanced by what I’ll call the “vulgar atheists” — Dawkins, Hitchens, Dennett, et al.

The Modern Day Curse of Being Adam

…is the number of calls you receive from cell phones sitting in pockets and purses.