True's beaked whale.jpg

Western spotted skunk

Hooded skunk

Yellow-throated Marten

Wolverine

Scientific consensus

February 4th, 2010

In a meta discussion about AGW, Eric Raymond writes about how the term scientific consensus is used in public science debates. He seems to misunderstand it, and think it is an ‘appeal to authority’ type of argument and thus a sign that the party that raises it has no more convincing arguments.

It certainly can be that sort of poor argument, but typically when raised by scientists it is something different. The scientific consensus on a topic is mentioned as a shorthand way of communicating what’s understood by scientists working the field to the public. Scientists are trying to communicate that certain things are known, and that contrary arguments that pick one or two studies and argue that the contrary opinion is *really* true or at least that no consensus exists are misleading. Either the study is part of a technical debate in the field among researchers who all understand and believe the consensus that is being misconstrued or too much weight is being given to the opinion of a rare contrarian.

The contrarians can be further divided into 1) cranks of various sorts and 2) scientists working on a contrary idea who understand that the evidence still favors the consensus but hope to make discoveries that will eventually tip the balance of evidence in favor of their idea. The second scientist will happily talk up his idea if asked about it, but if asked about the consensus will acknowledge that it is currently overall the best explanation.

So scientists will mention the scientific consensus on an issue to the public to ground the discussion with the fundamentals of what is known. With the fundamentals set down, scientists can then explain the details of how things are known, what discussions within the field are about, or discuss contrarians.

Strange land

February 2nd, 2010

The typical Republican answers yes to four of the questions in this survey* (or four out ten answer yes to all these questions, or some mix of the two). And people in the US used to worry about Russians slipping LSD in the water supply.

Question Yes No Not Sure
Should Barack Obama be impeached? 39 32 29
Do you believe Barack Obama was born in the United States? 42 36 22
Do you think Barack Obama is a socialist? 63 21 16
Do you believe Barack Obama wants the terrorists to win? 24 43 33
Do you believe ACORN stole the2008 election? 21 24 55
Do you believe Sarah Palin is more qualified to be president than Barack Obama? 53 14 33
Do you believe Barack Obama is a racist who hates white people? 31 36 33
Do you believe your state should secede from the United States? 23 58 19
Should openly gay men and women be allowed to teach in public schools? 8 73 19
Should contraceptive use be outlawed? 31 56 13
Do you believe the birth control pill is abortion? 34 48 18

*Flipping yes/no for the gay teacher question.

Survey details here.

The GOP fiscal plan

February 2nd, 2010

Or rather the lack of one. One after another, GOP statements on what they want in a budget hit the same points again and again. Republicans have decided this year that the federal budget deficit is terrible and must be curbed immediately. Ignore for a moment the Hooverism–that cutting federal spending today will prolong the recession and increase unemployment.

Look at the Republican plan–balance the budget by cutting taxes, increasing defense spending, and leaving Social Security and Medicare intact, and cutting other unspecified programs. The remaining budget, discretionary spending excluding defense only totals $5-600 billion and includes everything from road construction to federal courts to food stamps. With the permanent budget deficit about $600 billion (the 2008-9 bank bailouts and stimulus are one time costs), balancing the budget under the Republican plan doesn’t add up. Adding tax cuts and increased defense spending just make it extra impossible.

Sometimes the impossible can be done in small steps. The Senate voted this week on PAYGO, the deficit reduction measure that allowed Clinton to balance the federal budget in the 90’s. But no, every Republican voted against it.

Stan Collender sums it up in a blog post collecting GOP statements on the federal budget . Here are the bits:

Item 2. All Senate Republicans voted against re-establishing the pay-as-you go rules, which would have required that, with certain exceptions, any new mandatory spending or revenue legislation not increase the deficit. The rules were adopted with only Democratic support.

Item 4. Republican Chairman Michael Steele is saying so often that Republicans are against cuts in Medicare that it’s starting to sound like a mantra. Add to that their stated opposition to revenue increases (see #1 above), military spending reductions, homeland security reductions, and the extremely low possibility that, if Medicare is too hot to handle, they’ll go anywhere near Social Security, and the deficit reduction math becomes totally impossible.

There have been recent fantasy GOP budget proposals along these lines. See Tim Pawlenty’s (Gov. of MN and 2012 Presidential candidate) editorial in Politico. Or the budget proposal by Rep. Paul Ryan, ranking Republican on the House Budget Committee.

Even conservative economist Bruce Bartlett is unimpressed:

Like all Republicans these days, Pawlenty wants to have it every possible way: complain about the deficit while ignoring everything his party did to create it (Medicare Part D, two unfunded wars, TARP, earmarks galore, tax cuts up the wazoo, irresponsible regulatory and monetary policies that created the recession that created the deficit, etc.), illogically insisting that tax cuts are a necessary part of deficit reduction, and never proposing any specific spending cuts.

It would hardly be fair for me to fail the Republican proposals without offering my own. So here it is:
1) The federal government should spend an additional $600 billion a year until unemployment is down under 6%. Send at least half of it directly to states where it can be spent quickly, spend the rest on unemployment, food stamps, long neglected infrastructure, and a massive New Deal class jobs program.

2) Raise taxes. First, let the Bush tax cuts on income over $200K, capital gains, and large inheritances expire. Second, make the banks pay for their bailout with a combination of financial transaction taxes, an end the hedge fund income tax special treatment, etc, to total $150 billion a year. Third, add progressive tax brackets at the high end, and extra 1% for income over $1 million, $5 million, and $10 million. End a few of the large corporation tax breaks that leave many of them paying essentially no taxes. These modest tax increases are enough to put the budget in the green.

3) Cut total war/security/defense spending back so it equals what the entire rest of the world spends, about $500 billion a year–that would be a cut of $150 billion a year. End the Iraq and Afghanistan wars, saving $150 billion a year.

4) Whoa, now the federal budget has a $200 billion surplus!

Book review: Ever Since Darwin

January 28th, 2010

Ever Since Darwin cover
Ever Since Darwin is book of essays by Stephen Jay Gould, originally written as columns for Natural History magazine.

This is Gould’s first collection of essays, published in 1977. It’s a great introduction to Gould’s writing. The essays are shorter and the ideas are simpler than those in some of his later collections. There are great essays on the life and times Darwin worked in, and on how evolutionary and developmental biology got worked out through fits and starts. The last few essays on sociobiology are kind of weak. I guess 30 years on, it’s hard to really understand the ground that was being fought over.

Overall, a great book!

L-system Iterator

January 11th, 2010

I’ve put up a web site for exploring L-system images, L-system Iterator.

Well known L-systems

The snowflake shape is only one example of the pictures that can be drawn this way.

L-systems are simple iterated drawing rules. Simple rules for turning and drawing put together in this way make quite interesting and complicated patterns. The ones shown above are well known. From the the left, the Koch snowflake, the Sierpinski triangle, a kolam-like image, and a plant-like image. On the second row, the Heighway dragon, the Hilbert curve, and another plant.

The Heighway dragon has many interesting properties–for example, it can be tiled over the plane.

Some iterated objects are fractals–the Koch snowflake, Sierpinski triangle, and Hilbert curve are famous simple fractals.

L-systems can be quite complicated. The systems modeled on my web site use a single rotation angle and only one line width. More complicated models can make surprisingly realistic plants. Prusinkiewicz and Lindenmayer (the L in L-system) have developed detailed plant models.

The web site is based on the Perl code I wrote for my Biomorph evolution/selection web site. The images are generated using Postscript to draw the L-system, and then the ImageMagick convert program to change it to a PNG image. Images are given a file name that describes the L-system, effectively caching the image. The Prototype Javascript library is used to assist in making the popup boxes.

Each L-system variant has two changes from the current L-system. Some logic is used to keep the L-system in the same family–if there’s no Y equation, one isn’t added. Existing equations are grown or shrunk but not dropped. These images can take much longer to generate than the Biomorph images, so a number of limits are placed to keep the L-system from getting too complicated or taking too much CPU time.

The hardest part of the Postscript was getting the images scaled and centered appropriately. The images can extend in any direction and some are large, others small. The centering code generates the image twice, once to find out its dimensions and then a second time scaled and centered. Here’s the code to record the dimensions of each part of the image. It gets called before each stroke operation.

/max_path {
gsave initmatrix pathbbox grestore


ur_y false eq { /ur_y exch store } { dup ur_y gt { /ur_y exch store } { pop } ifelse } ifelse
ur_x false eq { /ur_x exch store } { dup ur_x gt { /ur_x exch store } { pop } ifelse } ifelse
ll_y false eq { /ll_y exch store } { dup ll_y lt { /ll_y exch store } { pop } ifelse } ifelse
ll_x false eq { /ll_x exch store } { dup ll_x lt { /ll_x exch store } { pop } ifelse } ifelse
} def

The ‘initmatrix’ command is required to reset things because of all the rotation operations.

The code for the site is linked on the L-system iterator home page.

Update: Added color variation as an option. And a reverse direction primitive.

Also, the code now runs under mod_perl.

Note for mod_perl users–mod_perl 2.0 has no way of handling alarms. select() doesn’t work either as a way of timing out pipes. The only usable method is prepending commands with ‘ulimit -t secs’ and letting the shell limit the system process.

To make the split color B&W images I used these ImageMagick commands:
convert -size 150x150 tile:color.png tile:bw.png ../temp/mask.png -composite split.png
using a half black, half white split image as the mask.

Then added the split line using:
convert -size 150x150 -fill white -stroke black -draw "line 0,0 150,150" split.png split_line.png

Creature matching game

December 13th, 2009

Here’s an idea for a game. It would be like the kid’s game Memory, where cards are turned over and matches are taken off the playing area. Instead of using identical pictures, images of different animals or plants would be used. Any pair could be matched by a player. The play would be quite similar to standard Memory.

The idea would be to match organisms by evolutionary similarity. So scoring would give maximum points for animals of the same species, next most for same genus, fewer points for animals in the same order, and no points for creatures in different phyla. The easiest implementation would be as a computer game with the computer dealing with scoring. Alternatively cards could be made the lineage described on the back. Each classification category could be displayed a different color or with a different symbol and the first/highest point matching lineage symbol give the points for the match.

This would make the play interesting as any pair could be matched but the player would have to decide if a pair was good enough to pick up or to wait for a better and higher scoring pair next turn.

The design aspect of picking a card set could make an easy set or a hard set, and two aspect of the choice would affect this. First, if animals fall into close pair groups that are distantly related (two parrots, two foxes) then the set would be easier. Having graduated and overlapping groups of cards make the set harder (dog, fox, skunk, weasel, otter, raccoon). Also, how much the player knows of these animals and their relationships can make a card set easier or harder. Some groups are obvious–birds, whales, bats–while other animals are either not as well known (i.e., coatis) or don’t have an obvious lineage (i.e., wolverine). And all these examples are mammals. Invertebrates would make a ridiculously hard game! So sets for kids could be easy and moderate to hard sets can be created.

Here are three game sets:
Mammals, butterflies, and marine invertebrates.

Preventing wisdom teeth

December 2nd, 2009

I have thought for years that it should be possible to regrow teeth. Teeth should be one of the easiest body parts to regrow. It seemed likely that the tooth bud, once formed, would receive signals from its local environment and grow into the correct type of tooth and emerge into place. That’s what happens during normal adult tooth development. So generating a tooth bud looks to be the key step. And indeed, in the past few years there have been reports of progress from research in this area. See this news article and this paper from the Yelick lab in São Paulo, Brazil.

But much easier than growing teeth should be killing tooth buds. Specifically, if the buds of wisdom teeth were killed then the painful, expensive surgery to remove wisdom teeth could be avoided.

Tooth buds form during fetal development. Wikipedia has a detailed overview. Wisdom teeth don’t begin to calcify until a person is 7 to 10 years of age. It should be fairly easy to kill the tooth bud at early stages. An injection into the tooth bud of a localized cytotoxin, either a general one or perhaps one specific to dividing cells would kill the stem cells that form of the core of the tooth bud. A toxin dose that kills cells within a 1-2 mm radius of the injection site should be effective. The gums will heal up and then the tooth bud will be gone. The dentist should be able to pick the injection location based on the expected eruption site. Inspection of x-rays may help pinpoint the bud location. A jig could be used to precisely position the needle tip.

Googling briefly I don’t see any other mention of this idea. It would be easy to test experimentally in animals if one can be found with late enough tooth development.

Science fiction stories for middle school

November 23rd, 2009

Here are sources for science fiction stories that I think would be suitable for middle school students. These are all freely available stories either out of copyright or made available by the author or publisher.

Most of these are very short stories or short stories. I think short stories are good because a few hard words won’t discourage a student–the stories read quickly. And if they don’t like one story they can try another.

At first I wasn’t optimistic that I would find stories available online as only stuff from the thirties or older is typically out of copyright. Here are a few good ones from Project Gutenberg:
http://www.gutenberg.org/wiki/Science_Fiction_%28Bookshelf%29

Then I looked around more and found that many fairly recent stories are available online at the author’s site or some other apparently authorized site. This site and this site both link to a lot of good free sf. So now that it looks like there’s a lot to choose from I’ll make some suggestions.

Very short stories would be a good choice, this page links to a bunch of them, some only a page or so long:
http://bestsciencefictionstories.com/category/very-short/

Mary Robinette Kowal, “Evil Robot Monkey”, (940 words)
Terry Bisson, “They’re Made Out of Meat”, (815 words)
Cory Doctorow, Printcrime, (688 words)
James Van Pelt, “Just Before Recess”, (782 words)
Nolan, William F, “Of Time and Texas”, (608 words)

Other great short stories:
Harlan Ellison, “Jeffty is Five”, (page 71, 8k words)
Kurt Vonnegut, “Harrison Bergeron”
Ray Bradbury, “A Sound of Thunder” (4k words)
Cory Doctorow, Anda’s game (10k words)
Neil Gaiman, A Study in Emerald (9 pages)
Isacc Asimov, The Feeling of Power (3k words)
Orson Scott Card, “Ender’s Game” (15k words)
Larry Niven, “Neutron Star” (7k words)

This site also has section of ‘kids’ stories: http://bestsciencefictionstories.com/category/good-for-kids/

I found these Project Gutenberg stories first but though they are good stories I wouldn’t put them at the top of my list:

H. Beam Piper, Omnilingual (16k words)
H. Beam Piper, Little Fuzzy (59k words)
Fritz Leiber, “Bread Overhead” (5K words)

End the US occupation of Afghanistan today

November 22nd, 2009

At the beginning of October, it was reported that eight US soldiers were killed in Nuristan province in Afghanistan. Hearing it at the time, I thought nothing in Nuristan can be worth the life of an American soldier, yet eight of them fought and died there. Afghanistan is literally half way around the world from the US, and Nuristan is the middle of nowhere even for Afghanistan. The US has occupied Afghanistan for eight years already and the current plan is for an ongoing, pointless occupation for at least another five or ten years. President Obama is even considering pouring more US troops into the country, a truly feckless plan.

Then this November the US installed ruler of Afghanistan, ‘President’ Karzai, finished stealing the national election and declared himself President. It was also reported that his brother runs a big piece of the heroin trade and has immunity from US anti-drug efforts because he works for the CIA. Why are US soldiers fighting and dying to support the Karzai family dictatorship?

And the US war effort is still febrile. Eight years into the occupation of Afghanistan, the Pentagon is still talking about ‘ramping up’ the training of translators. US translators who speak Dari or Pashto, the major languages of the country, are so few in number that the translators at NATO headquarters in Kabul are all Afghans. Translators are thin on the ground and the US relies mainly on Afghan locals. How is the US going to run a counterinsurgency and nation-building campaign in country where almost no US troops speak the language?

What is the US doing in Afghanistan? The few thousand Al Qaeda fighters that were in Afghanistan in 2001 were killed by the US or fled to Pakistan. Even the Taliban fighters in Afghanistan don’t want them back.

Nothing is accomplished by continuing the US occupation of Afghanistan. It’s costing the US the lives of our soldiers and $100-200 billion a year. End the US occupation today!

Update: President Obama announced today he will escalate the war in Afghanistan, sending an additional 30,000 troops, for a total escalation of 51,000 troops since he took office. What an incredibly foolhardy and poor decision, one that will kill thousands of people and waste hundreds of billions of dollars. In related news, Middle East scholar Juan Cole provides a thumbnail portrait of the corrupt and fragmentary nature of the Afghan government to which the US has pinned its plans.

PIC servo pot controlled

November 21st, 2009

Third PIC program, this one moves a hobby servo motor using a 10kΩ pot. The pot is read using the A/D converter function on the PIC. The four high bits of the value are used to control the servo to sixteen positions over its range. Two more bits could easily be added to give finer control.

It has a light that flips on/off with each jump of the servo, another light that is always on and a third that switches the servo on/off.

PIC12F683 servo motor movie:

Here are the code files: p12_servo2.asm and p12_servo2.hex.

It is wired as shown in the video.