Why Darwin?

Posted on January 26th, 2010

[Clearing out my drafts folder while I wait for my meeting to start and discovered this. Dunno if it's any good or why I wrote it.]

Splendid wrap up of the Darwin Anniversary last year in the London Review of Books (it’s not short).

The reviewer focuses on the question  Why Darwin? After all, there are plenty of people (ok…not plenty of people…a few people) who have made as big a contribution to science as Darwin - Einstein, Newton, Gallileo - why is Darwin such a big hero?

descent_manAccording to Dawkins, Darwin’s idea wasn’t just a great one (‘the most powerful, revolutionary idea ever put forward by an individual’), it is essentially the only idea you need to explain life and all its phenomena: ‘Charles Darwin really solved the problem of existence, the problem of the existence of all living things – humans, animals, plants, fungi, bacteria. Everything we know about life, Darwin essentially explained.’

After a roundabout tour that disses evolutionary psychology and the New Atheists, the reviewer settles on the idea that, even without Darwin, someone would’ve come up with Natural Selection [er...they did - ed] just as someone would’ve discovered oxygen without Priestley [er.... -ed] or  figured out calculus without *Newton [now you are just messing with me - ed]. But Darwin’s great contribution was not that he was one of the greatest scientists of all times. It was that he was a great writer.

You can still say, with perfect accuracy, that the Origin is much more than its ‘essential’ theory of natural selection: it is a book, a magnificent theatre of persuasion, ‘one long argument’ (as Darwin called it), supported by masses of arduously compiled evidence, ingeniously organised and vouched for by a special individual, with known special virtues and capacities.

It so happens that I am reading The Descent of Man at the Moment, so I have recent experience of Darwin’s writing. It really is magnificent. When you think that he was writing about cutting edge science - not a popularization - and that, in fact, he was the one doing the cutting… it just takes your breath away.

If you have tried reading The Origin and got stuck at the pigeon chapter like I did, give Descent a try. You won’t regret it.

* For all the received wisdom about the inevitability of discovery, it was surprisingly hard to come up with a third example to make my joke work.

Solar Flexus

Posted on January 1st, 2010

I’ve wanted to write a physics engine for years and messing with Squeak made me want to try it in Flex. It wasn’t quite as easy as Squeak but it wasn’t too hard.

(It probably needs flash 10 to work)

So far I have gravity and collisions for circular objects. Up next: drag.

Here’s the main loop:

    public function tick() :void {
      for each(var body :Body in bodies) {
        var force :Point = calculateForceOn(body);
        body.apply(force);
        body.move(1);

        checkForCollision(body);
      }
    }

Inverse Square Law to calculate gravity:

    public function calculateForceOn(body :Body) :Point {
      var force :Point= new Point(0, 0);

      for each(var other :Body in bodies) {
        if(body != other) {
          var distance :Number = Point.distance(body.position,other.position);

          var magnitude :Number = (body.mass+other.mass) /(distance*distance);

          var direction :Point = other.position.subtract(body.position);

          var additionalForce :Point = new Point(direction.x*magnitude/distance, direction.y*magnitude/distance);

          force = force.add(additionalForce);
        }
      }

      return force;
    }

Look for collisions and calculate the impulsive forces:

    public function checkForCollision(body :Body) :void {
      for each(var other :Body in bodies) {
        if(body != other && body.intersects(other)) {
          var normal :Point = body.findCollisionNormalTo(other);

          var relativeVelocity :Point= body.findVelocityRelativeTo(other);

          var relativeNormalVelocity :Number = dotProduct(relativeVelocity, normal);

          if(relativeNormalVelocity < 0) {
            var impulse :Number = -dotProduct(normal,relativeVelocity) *(coefficientOfRestitution+1) /(1/body.mass+1/other.mass); 

            body.applyImpulse(impulse, normal);
            other.applyImpulse(-impulse, normal);
          }
        }
      }
    }

And some heavenly bodies:

      var sun :Body = new Body("Sun", World.Origin);
      sun.radius = 60;
      sun.mass = 50000;
      sun.color = 0x26393D;

      var earth :Body = new Body("Earth", new Point(0,500));
      earth.radius = 40;
      earth.mass = 4;
      earth.velocity = new Point(5,0);
      earth.color = 0xE8E595;

      world.add(sun);
      world.add(earth);
      world.add(moon);
      world.add(mars);

I am still not sure whether I like Flex. The libraries are fantastic but the language - ActionScript - is super-annoying. It makes me wish for C#. It’s allegedly a dynamic language but the compiler makes you declare every type anyway in that wacky syntax that I can never quite remember. Simulating solar systems is fun though.

My Drawing Table Squeaks

Posted on December 30th, 2009

Took the kids to the Exploratorium today. It’s currently my favourite museum. Better even than OMSI (although they don’t serve beer at The Exploratorium. How come that hasn’t caught on outside Portland?)  I wish San Jose had a decent museum. The Tech sucks worse than possibly any museum in the world except Morwelham Quay.

I couldn’t find my favourite exhibit - Ladle Rat Rotten Hut. There are so many great exhibits that I have never actually seen them all.

Wan moaning, Rat Rotten Hut’s murder colder inset, “Ladle Rat Rotten Hut, heresy ladle basking winsome burden barter an shirker cockles. Tick disk ladle basking tutor cordage offer groin-murder hoe lifts honor udder site offer florist. Shaker lake! Dun stopper laundry wrote! An yonder nor sorghum-stenches, dun stopper torque wet strainers!”

Jazz fell in love with the drawing board and watched it for about 90 minutes. It’s basically a table hung from four ropes like a pendulum and a pen that draws patterns on a piece of paper as the table swings and twists.  There is a weight that makes it swing eccentrically to make the patterns more interesting.

I promised to make her a real one but I wanted to see if I could do it in Alan Kay’s excellent Squeak first. It was pretty easy and quite effective.

Here’s the program. I messed around with the constants to get different effects.

squeak program

and here’s a picture I made with it:

drawingtable

Today: simulation. Tomorrow: the real thing.

Wish us luck!

UPDATE:

I just downloaded the latest version of Squeak (now called etoys). It’s MUCH better than it used to be. All the bugs are gone and it doesn’t look like it was made in 1983 any more. Go get it from http://www.squeakland.org/ then you can play with my project - Squeak: Drawing Table

etoys

Maybe you could add damping for me.

Science is Weird

Posted on November 5th, 2009

John Derbyshire’s cuts to the chase in his commentary on D’Souza’s new book.

To judge from the extracts — and of course, if this is the kind of thing that interests you, you should read the whole book — D’Souza seems to lean heavily on arguments of the type:

  • Science currently has no explanation for X. (In the extracts, X = moral behavior).
  • Therefore we must go to religion for explanations.

The overall schema there is contrary to an empirical style of thinking, which would prefer:

  • Science currently has no explanation for X.
  • Therefore we must press on with our investigations in hope of finding an explanation.

The empirical style is, though, a minority taste.

Quoting from his own book

The ordinary modes of human thinking are magical, religious, social, and personal. We want our wishes to come true; we want the universe to care about us; we want the approval of those around us; we want to get even with that s.o.b who insulted us at the last tribal council. For most people, wanting to know the cold truth about the world is way, way down the list.

Scientific objectivity is a freakish, unnatural, and unpopular mode of thought, restricted to small cliques whom the generality of citizens regard with dislike and mistrust. Just as religious thinking emerges naturally and effortlessly from the everyday workings of the human brain, so scientific thinking has to struggle against the grain of our mental natures.

Imaginary Science

Posted on November 4th, 2009

Olivia Judson explains that science is not a succession of facts, facts facts and why Rosalind Franklin did not discover the structure of DNA.

She had the data. Why didn’t she reach the solution? There are several answers to this; but one is that she had a fixed idea about how the problem should be solved. Namely, she wanted to work out the structure using the methods she had been taught. These methods are intricate, abstract, and mathematical, and difficult to use on a molecule as complex as DNA. Watson and Crick, meanwhile, were building physical models of what the diagram suggested the structure should be like — an approach that Franklin scorned. What’s more, their first model was ludicrously wrong, something that Franklin spotted immediately. But they were willing to play; she wasn’t. In other words, she wouldn’t, or couldn’t, adopt a more intuitive, speculative approach.

Francis and Crick had what Einstein had. Franklin didn’t.

But there’s one way in which we should not be limited: imagination. As Einstein put it, “Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world.”

First, Kill All the Scientists

Posted on November 3rd, 2009

What should a government do if science shows that it’s policies are misguided? Why, fire the scientists of course!

Professor Nutt was the British government’s chief advisor on the harm caused by illegal drugs and he wrote a paper showing that the official ranking of the harm caused by various drugs - class A, class B or class C - is out of alignment with the actual harm caused by them.

The prof’s team rated drugs according to a bunch of factors relating to the harm they cause ranked them in this table. (The official ratings - which determine the severity of punishments for possession and distribution - are in parentheses).

1. Heroin (Class A)

2. Cocaine (Class A)

3. Barbiturates (Class B)

4. Street methadone (Class A)

5. Alcohol (Not controlled)

6. Ketamine (Class C)

7. Benzodiazepine (Class B)

8. Amphetamine (Class B)

9. Tobacco (No class)

10. Bupranorphine (Class C)

11. Cannabis (Class B)

12. Solvents (Not controlled)

13. 4-MTA (Class A)

14. LSD (Class A)

15. Methylphenidate (Class B)

16. Anabolic steroids (Class C)

17. GHB (Class C)

18. Ecstasy (Class A)

19. Alkylnitrates (Not controlled)

20. Khat (Not controlled)

He got fired and now many of the other scientists on his team are resigning in protest.

Read his speech. It’s very readable and quite fascinating. It covers a range of ideas like the fallacy of the precaution principle

To repeat what the former Home Secretary said, ‘We must err on the side of caution and protect the public.’

and gives some famous examples of where precaution resulted in additional harm.

The most interesting bit was the study of how the media distorts the reporting of drug deaths. This table shows the number of deaths in Scotland resulting from drug misuse over a period during the 90s.

0

Drug Toxicological statistics (n) Newspaper reports (n) Toxicology to newspaper ratio
All cases 2255 546 4:1
Asprin/Salicylate 12 -
Paracetamol 265 1 265:1
Diazepam 481 10 48:1
Morphine 431 6 72:1
Amphetamines 36 13 3:1
Cocaine 30 4 8:1
Heroin 42 75 5:1
Ecstasy/MDMA 28 26 1:1

Check out the number of deaths from cannabis…exactly.

Professor Nutt must have known that he would be fired for this speech - which makes it all the more admirable that he gave it.

Well done, prof.

No Conflict

Posted on September 9th, 2009

There a tiny storm in my corner of the interwebs. Bob Wright wrote a book - The Evolution of God - and Jerry Coyne wrote a review trashing it. Then Coyne and Jim Manzi got into a blogs ‘n’ handbags  fight over it.

From what I can gather, the gist of the argument was that Coyne claimed that the fact of evolution debunks religion’s claim of intelligent design. Manzi said “no it doesn’t”. Coyne said “yes it does” etc before they spiralled off into a discussion of what the world ‘random’ means.

Anyway, the whole tedious debate was worth it to read the round-up in The American Scene. It turns out that the whole thing turns on whether religion is making factual claims or hermeneutical claims (yep. new one for me too).

We have to distinguish between factual and hermeneutical claims. Factual claims are claims about the nature and operation of reality: “how” things work, not “why.” Darwin’s theory, which is the basis of all modern biology, makes factual claims: that the various forms of life we observe on earth today came to be via the operation of natural selection on populations of organisms that experience random variation. The question, “does life have a purpose” or “are we put here for a reason” is not really a factual question; it’s a hermeneutical one, an interpretive one. The same factual claims could, potentially, sustain different hermeneutical claims. Scientists do, sometimes, noodle about with hermeneutical claims because they turn out to have factual claims buried in them, in which case they may be investigated scientifically. But if there are no such claims buried in them, then the questions aren’t really scientific.

So, if I understood that right, if religion makes factual claims, they can be debunked by science. But religion’s hermeneutical claims can only be debunked if they are in conflict with science’s claims.  The claim the universe is designed is a hermeneutical claim and cannot be debunked by science. Any particular claim that attempts to describe how the universe was designed is a factual claim and collides with science.

Stephen Gould coined a phrase for this.

Non-overlapping magisteria.

Because science and religion answer different questions, there can be no conflict.

Burning Grandma

Posted on August 19th, 2009

Those people protesting the death panels that will be deciding whether your grandma will have to be put down should be thankful that they don’t live in socialist Denmark where your grandma’s body parts might be recycled or used to warm their relatives.

Burnt bodies leave knee or hip replacements that can be recycled as scrap metal, says Allan Vest, the association’s chairman. Since 2006 the country’s 31 crematoriums have earned DKr 77,762 ($15,000) from 4,810kg of salvaged metal sold to a Dutch recycler.

[snip]

The International Cremation Federation, a lobby group based in The Hague, advises against commercialising the products of cremation. But the Danish Council of Ethics, a group including scientists, clergy and philosophers that advises parliament, has found no ethical reason to oppose recycling heat. Although it thinks burning granny especially to warm radiators would be indecent and illegal, cremation is a respectful and hygienic disposal of bodies.

Body Heat - The Economist

I am altering my will to require that my body be recycled.

Plate Tectonics in under two minutes

Posted on July 16th, 2009


650 Million Years In 1:20 Min.
by xchristox

Let me count the ways

Posted on June 27th, 2009

Just how beautiful is everyone’s second favourite planet?

saturn

The BBC has the answer: a lot.