Thursday, December 24, 2009

Getting the most out of Python range()

I am doing a small data analysis project and figured it was a good time to learn a bit of Python. One of the requirements was that my data analysis range go from a start to a finish value in certain increments. The range() built in function was perfect for this, except that it stops prior to the last value. For example, for range(10, 25, 5), the values 10, 15, 20 would be produced. I needed 10, 15, 20, 25.

The obvious fix for this is to add the increment value to the stop value: range(start, finish+increment, increment). Unfortunately, this falls flat when the difference between your stop and start values is not a zero modulus of the increment value. For example, range(10, 23, 5) would produce the values 10, 15, 20, 25 based on the obvious fix, and that goes past the finish value.

The proper fix is the following (broken up into two lines for readability):

mod = increment - ((finish - start) % increment)
range(start, finish+mod, increment)

The astute will notice that all this "magic" really does is bumps up the finish value so that the difference between the finish and start is a zero modulus of the increment. For situations where the difference between the finish and start value is already a zero modulus of the increment, this solution effectively implements the "obvious fix" above.

The same thing could be done by simply adding the increment value to the finish value only when the difference between the finish and start value is a zero modulus, but that requires an "if" statement to detect that situation. My solution replaces multiple lines of code, or an awkward looking conditional (does python even do conditionals???), with a nice clean mathematical statement that works for all situations.

Tuesday, November 24, 2009

Theories and Laws...

I am amazed at the number of people who do not know what the word "theory" means... Maybe this will clear it up.

Hypothesis - educated guess that may or may not be backed up by facts. When most people say "in theory" they really mean "I hypothesize that...".

Theory - A way of explaining why something works the way it does, backed up observational/experimental results. The Chilton's guide for my car is the theory manual behind the operation of my car. The theory of gravity attempts to explain why gravity works the way it does. A book on computer science is the theory guide explaining how your computer works. And so on...

Law - A description of a phenomenon, but does not explain the "why". A train schedule is an example of a "law". It explains when the train will arrive but has no power to explain why the train got there on time. The "law" of gravity explains why your head hurts when someone drops a brick on it, but only the "theory" of gravity explains why the brick dropped downwards, instead of just floating there in space.

Last but not least, in case it is not obvious, theories are never promoted to "law" status. They are totally different things.

Theories explain "why", laws explain "what"...

Wednesday, October 28, 2009

A sed keeper...

For those of you who are shell scripters, you may find this one useful:

/bin/sed ':a;N;$!ba;s/\n\n\n*/\n\n/g'

This removes multiple blank spaces in a file and replaces them with only one blank space. There are other ways to do this, but this is one of them...

Source: http://linux.dsplabs.com.au/rmnl-remove-new-line-characters-tr-awk-perl-sed-c-cpp-bash-python-xargs-ghc-ghci-haskell-sam-ssam-p65/

Sunday, September 20, 2009

Mac Mini Upgrade and Adventures in Boot Camp

Now that Snow Leopard is out and I have some time off between classes, I am able to get Bailey's computer fully upgraded. I thought it was going to be a simple software upgrade, but as it turns out, his Mac Mini was only running on 512MB of RAM and a 80 GB hard drive. Since he is starting to use this machine for more than just games, I guess it is time to max out the RAM and get him a decently sized hard drive.

A quick trip to Best Buy and $200 later, we have 2 GB of PC2-5300 RAM and a nice Seagate 7200 RPM 320 GB hard drive. I considered going larger on the hard drive, but my time was too short to wait for something to be delivered and the 320 GB was the largest drive they had that was 7200 RPM. Also, now that we are going to have three people on the Time Capsule, I figured 320 GB was a good limiter to make sure he would not prematurely force me to upgrade the Time Capsule to 2TB.

I used the iFixIt instructions for opening up the Mac Mini. It was surprisingly easy. One thing they did not mention was to label each screw you remove. I used a sticky note and labeled where I removed each screw from. Most of the screws were identical, but I noticed one or two were specialized sizes, so I was glad I kept that organized. Another part I had to learn the hard way was the RAM insertion. I did not insert one of the sticks hard enough and when I booted up the machine only one stick registered. After re-seating the RAM, I was able to get both 1GB sticks to properly register. I might also add that the Mac Mini is a really impressive sample of engineering. Everything fits together amazingly well. Total hardware time would have been about an hour if I had seated the RAM correctly the first time. Given my mistake, it was around 2.5 hours (I tested each stick individually).

Now that the hardware was working properly, it was time to install Mac OSX 10.6 (Snow Leopard). The install was effectively effortless. There were only two hitches. The first was the basic install. No drives showed up to select as a target to install. I was able to go to one of the installer pull-down menus (I think it was Utilities) and select disk tools to partition and format the disk. Once that was done the installer showed the target disk and the install went through flawlessly.

The second hitch came after the installation was complete. I noticed that the "Macintosh HD" icon was missing from the desktop. After some help from TheGoogle, I figured out it was simply a default configuration option that is delivered with Snow Leopard. To add it back, just click on the desktop anywhere so you display the Finder menu. Select "Preferences" from the Finder menu and make sure "Hard Disks" is checked in the "General" menu. I also found it helpful to go to the "Sidebar" tab and and check the box next to "Hard Disks" and turn off the one for "iDisk" (I choose not to use Mobile Me, so iDisk is not useful to me).

Once all of that was complete I went to Software Update and installed all of the updates (at this point there were only three). Voila, fully working Snow Leopard system with 4x the RAM and 4X the Hard Drive space. Total "from scratch" OS X Snow Leopard install time with updates, 2-ish hours.

Last but not least, it was time to get the WindowsXP partition up and running. Boot Camp has gotten incredibly easy to use since I originally played with the beta. I found the Boot Camp icon in Application/Utilities. It started up and allowed me to partition and format the disk, then it had me insert my WindowsXP Pro SP2 disk and rebooted into the XP installer. One of the biggest problems I encountered was that my keyboard would not work. After some searching, I found out that it was the Mighty Mouse that was confusing the XP installer. I removed the mouse and moved the keyboard to the USB port just below the audio port (the last one), and after rebooting, the XP installer worked just fine (I am not sure that moving the USB keyboard port helped, but I figured I would mention it). When it came time to select the partition to install to, it was easy to find the BOOTCAMP partition. I opted to change the format from FAT to NTFS (I have since verified that NTFS is still read-only from OS X, hopefully Apple fixes this some day). Once the graphical installer interface came up, I was able to plug the Mighty Mouse back in and it worked for the remainder of the install.

After the base XPSP2 install was complete, I inserted the Snow Leopard disk to install all of the Apple specific drivers. Once that was done, it was time to start applying XP updates. I made the mistake of attempting to install the SP3 update first. I kept on getting error messages about not being able to find files like "osloader.ntd". I figured this was because I did not apply the mountain of pre-SP3 updates first, which I then proceeded to do. It took so long I went to bed and resumed the next day. Even after that, SP3 still did not apply cleanly. After some searching, I was able to find this link that perfectly explained what was wrong and provided a solution that worked. After that, SP3 applied cleanly and then I was able to apply the final group of updates. Total time spent getting Windows XP installed and fully updated was probably 12 hours, nearly 3x what was required for a RAM, Hard Drive and OS X Snow Leopard install (4x if I had gotten the RAM installed correctly the first time).

I also spent some time getting FireFox 3.5 installed in each OS as it is one of the required browsers for Bailey's online Math class. The last thing I did was to get The Snow Leopard partition connected to the Time Capsule. This was the easiest part. I clicked the Time Capsule icon in the dock, slid the switch from "Off" to "On" and typed in the Time Capsule password. After that, I just left the machine alone while it did the initial backup of the OS (8.11GB). I should also mention that the first Time Capsule backup has to complete uninterrupted, so I turned off the power-saving settings in case the Mini went to sleep before it was done (I left myself a note to remember to turn it back on when it was done).

Friday, August 21, 2009

Epic Win

It is hard to get tired of watching this one... Too bad that woman does not understand the difference between Facism (ultra right) and Socialism (ultra left)...



Thursday, August 20, 2009

Chiropractic Therapy

(Note: this is the infamous article on chiropractic that got Simon Singh sued. It is being reposted all over the web by multiple blogs and online magazines.)

Some practitioners claim it is a cure-all, but the research suggests chiropractic therapy has mixed results - and can even be lethal, says Simon Singh.

You might be surprised to know that the founder of chiropractic therapy, Daniel David Palmer, wrote that "99% of all diseases are caused by displaced vertebrae". In the 1860s, Palmer began to develop his theory that the spine was involved in almost every illness because the spinal cord connects the brain to the rest of the body. Therefore any misalignment could cause a problem in distant parts of the body.

In fact, Palmer's first chiropractic intervention supposedly cured a man who had been profoundly deaf for 17 years. His second treatment was equally strange, because he claimed that he treated a patient with heart trouble by correcting a displaced vertebra.

You might think that modern chiropractors restrict themselves to treating back problems, but in fact some still possess quite wacky ideas. The fundamentalists argue that they can cure anything, including helping treat children with colic, sleeping and feeding problems, frequent ear infections, asthma and prolonged crying - even though there is not a jot of evidence.

I can confidently label these assertions as utter nonsense because I have co-authored a book about alternative medicine with the world's first professor of complementary medicine, Edzard Ernst. He learned chiropractic techniques himself and used them as a doctor. This is when he began to see the need for some critical evaluation. Among other projects, he examined the evidence from 70 trials exploring the benefits of chiropractic therapy in conditions unrelated to the back. He found no evidence to suggest that chiropractors could treat any such conditions.

But what about chiropractic in the context of treating back problems? Manipulating the spine can cure some problems, but results are mixed. To be fair, conventional approaches, such as physiotherapy, also struggle to treat back problems with any consistency. Nevertheless, conventional therapy is still preferable because of the serious dangers associated with chiropractic.

In 2001, a systematic review of five studies revealed that roughly half of all chiropractic patients experience temporary adverse effects, such as pain, numbness, stiffness, dizziness and headaches. These are relatively minor effects, but the frequency is very high, and this has to be weighed against the limited benefit offered by chiropractors.

More worryingly, the hallmark technique of the chiropractor, known as high-velocity, low-amplitude thrust, carries much more significant risks. This involves pushing joints beyond their natural range of motion by applying a short, sharp force. Although this is a safe procedure for most patients, others can suffer dislocations and fractures.

Worse still, manipulation of the neck can damage the vertebral arteries, which supply blood to the brain. So-called vertebral dissection can ultimately cut off the blood supply, which in turn can lead to a stroke and even death. Because there is usually a delay between the vertebral dissection and the blockage of blood to the brain, the link between chiropractic and strokes went unnoticed for many years. Recently, however, it has been possible to identify cases where spinal manipulation has certainly been the cause of vertebral dissection.

Laurie Mathiason was a 20-year-old Canadian waitress who visited a chiropractor 21 times between 1997 and 1998 to relieve her low-back pain. On her penultimate visit she complained of stiffness in her neck. That evening she began dropping plates at the restaurant, so she returned to the chiropractor. As the chiropractor manipulated her neck, Mathiason began to cry, her eyes started to roll, she foamed at the mouth and her body began to convulse. She was rushed to hospital, slipped into a coma and died three days later. At the inquest, the coroner declared: "Laurie died of a ruptured vertebral artery, which occurred in association with a chiropractic manipulation of the neck."

This case is not unique. In Canada alone there have been several other women who have died after receiving chiropractic therapy, and Edzard Ernst has identified about 700 cases of serious complications among the medical literature. This should be a major concern for health officials, particularly as under-reporting will mean that the actual number of cases is much higher.

If spinal manipulation were a drug with such serious adverse effects and so little demonstrable benefit, then it would almost certainly have been taken off the market.


Simon Singh is a science writer in London and the co-author, with Edzard Ernst, of Trick or Treatment? Alternative Medicine on Trial. This is an edited version of an article published in The Guardian for which Singh is being personally sued for libel by the British Chiropractic Association.

Sunday, August 02, 2009

Palm Pre and a few warts...

I indulged in a Palm Pre a few days ago. I had been waiting to get an Android phone, but I figure it will be at least two years until we see anything Android from Sprint, so locking myself into a two year agreement with the Pre seems like a reasonable compromise.

So far, I really like it, it is beautiful and has a lot of potential. I am still getting used to how things work and I cannot wait to get an SSH client on it and figure out how to tether it.

One thing I did not notice in any of the reviews is that there are a few fairly glaring bugs and annoyances that I will try to detail here:
  • The biggest annoyance is migrating calendar and contacts with the migration tool (I used the Mac OSX version). I started from my old Treo 680 and sync'd it one last time to iCal and AddressBook. After running the sync tool to move things over to the Pre, none of the street addresses get migrated and fax numbers occasionally get mixed up and duplicated. I had to go through my entire address book and manually enter the street addresses. Although very time consuming, I feel that it was a good exercise because it gave me a chance to clean up my address book. Something that I have not done in years apparently... A lesser annoyance is that all day calendar events with no specific time (like an anniversary) show up on the Pre as timed events lasting the entire day. I had to go in and manually change the setting to "All Day".
  • When updating the calendar, it takes an unusual amount of time for the change to actually appear on the calendar. It feels like there is a refresh bug of some sort that keeps the old calendar information on the screen *JUST* until the point at which you are unsure if the change took, and then *poof* the screen updates. Rather strange...
  • The text messaging app does not show character count. This is rather a pain when twitting because there is a 140 character limit... less than the text messaging limit...
  • It would appear as if certain apps cannot be deleted unless I root my pre. I will be doing that eventually, but with the limit of three launcher pages, it would be nice to be able to tidy things up a bit.
  • Call me pathological, but I would like an easy way to migrate over my phone calling history. The Treo was great about keeping a permanent record that would follow you from phone to phone. This does not appear to be the case with the Pre.

I think there are a few other things, but this is all I have for now. For comparison, if I were to list everything I *LIKE* about the Pre, I would be typing all night long. Other than not knowing how many characters in a text message, the rest of the issues can be worked around or are simply not that important...

Friday, July 10, 2009

NASA 747 pilot tells of carrying the Space Shuttle


Reposted with permission. Fascinating story!

Triple Nickel - NASA Pilot

Well, it's been 48 hours since I landed the 747 with the shuttle Atlantis on top and I am still buzzing from the experience. I have to say that my whole mind, body and soul went into the professional mode just before engine start in Mississippi, and stayed there, where it all needed to be, until well after the flight...in fact, I am not sure if it is all back to normal as I type this email.

The experience was surreal.

Seeing that "thing" on top of an already overly huge aircraft boggles my mind. The whole mission from takeoff to engine shutdown was unlike anything I had ever done. It was like a dream...someone else's dream.

We took off from Columbus AFB on their 12,000 foot runway, of which I used 11,999 1/2 feet to get the wheels off the ground. We were at 3,500 feet left to go of the runway, throttles full power, nose wheels still hugging the ground, copilot calling out decision speeds, the weight of Atlantis now screaming through my fingers clinched tightly on the controls, tires heating up to their near maximum temperature from the speed and the weight, and not yet at rotation speed, the speed at which I would be pulling on the controls to get the nose to rise. I just could not wait, and I mean I COULD NOT WAIT, and started pulling early.

If I had waited until rotation speed, we would not have rotated enough to get airborne by the end of the runway. So I pulled on the controls early and started our rotation to the takeoff attitude. The wheels finally lifted off as we passed over the stripe marking the end of the runway and my next hurdle (physically) was a line of trees 1,000 feet off the departure end of Runway 16. All I knew was we were flying and so I directed the gear to be retracted and the flaps to be moved from Flaps 20 to Flaps 10 as I pulled even harder on the controls.

I must say, those trees were beginning to look a lot like those brushes in the drive through car washes so I pulled even harder yet! I think I saw a bird just fold its wings and fall out of a tree as if to say "Oh just take me". Okay, we cleared the trees

duh, but it was way too close for my laundry. As we started to actually climb, at only 100 feet per minute, I smelled something that reminded me of touring the Heineken Brewery in Europe...I said "is that a skunk I smell?" and the veterans of shuttle carrying looked at me and smiled and said "Tires"!

I said "TIRES??? OURS???" They smiled and shook their heads as if to call their Captain an amateur...okay, at that point I was. The tires were so hot you could smell them in the cockpit. My mind could not get over, from this point on, that this was something I had never experienced.

Where's your mom when you REALLY need her?

The flight down to Florida was an eternity. We cruised at 250 knots indicated, giving us about 315 knots of ground speed at 15,000'. The miles didn't click by like I am use to them clicking by in a fighter at MACH .94. We were burning fuel at a rate of 40,000 pounds per hour or 130 pounds per mile, or one gallon every length of the fuselage! The vibration in the cockpit was mild, compared to down below and to the rear of the fuselage where it reminded me of that football game I had as a child where you turned it on and the players vibrated around the board.

I felt like if I had plastic clips on my boots I could have vibrated to any spot in the fuselage I wanted to go without moving my legs...and the noise was deafening. The 747 flies with its nose 5 degrees up in the air to stay level, and when you bank, it feels like the shuttle is trying to say "hey, let's roll completely over on our back," not a good thing I kept telling myself. SO I limited my bank angle to 15 degrees and even though a 180 degree course change took a full zip code to complete, it was the safe way to turn this monster.

Airliners and even a flight of two F-16s deviated from their flight plans to catch a glimpse of us along the way. We dodged what was in reality very few clouds and storms, despite what everyone thought, and arrived in Florida with 51,000 pounds of fuel too much to land with. We can't land heavier than 600,000 pounds total weight and so we had to do something with that fuel. I had an idea...let's fly low and slow and show this beast off to all the taxpayers in Florida lucky enough to be outside on that Tuesday afternoon.

So at Ormond Beach we let down to 1,000 feet above the ground/water and flew just east of the beach out over the water. Then, once we reached the NASA airspace of the Kennedy Space Center, we cut over to the Banana/Indian Rivers and flew down the middle of them to show the people of Titusville, Port St.Johns and Melbourne just what a 747 with a shuttle on it looked like. We stayed at 1,000 feet and since we were dragging our flaps at "Flaps 5", our speed was down to around 190 to 210 knots. We could see traffic stopping in the middle of roads to take a look. We heard later that a Little League Baseball game stop to look and everyone cheered as we became their 7th inning stretch. Oh say can you see...

After reaching Vero Beach, we turned north to follow the coast line back up to the Shuttle Landing Facility (SLF). There was not one person laying on the beach...they were all standing and waving! "What a sight" I thought...and figured they were thinking the same thing. All this time I was bugging the engineers, all three of them, to re-compute our fuel and tell me when it was time to land. They kept saying "Not yet Triple, keep showing this thing off" which was not a bad thing to be doing.

However, all this time the thought that the landing, the muscling of this 600,000 pound beast, was getting closer and closer to my reality. I was pumped up! We got back to the SLF and were still 10,000 pounds too heavy to land so I said I was going to do a low approach over the SLF going the opposite direction of landing traffic that day. So at 300 feet, we flew down the runway, rocking our wings like a whale rolling on its side to say "hello" to the people looking on! One turn out of traffic and back to the runway to land...still 3,000 pounds over gross weight limit.

But the engineers agreed that if the landing were smooth, there would be no problem. "Oh thanks guys, a little extra pressure is just what I needed!" So we landed at 603,000 pounds and very smoothly if I have to say so myself. The landing was so totally controlled and on speed, that it was fun.

There were a few surprises that I dealt with, like the 747 falls like a rock with the orbiter on it if you pull the throttles off at the "normal" point in a landing; and secondly, if you thought you could hold the nose off the ground after the mains touch down, think again...IT IS COMING DOWN!!!

So I "flew it down" to the ground and saved what I have seen in videos of a nose slap after landing. Bob's video supports this! Then I turned on my phone after coming to a full stop only to find 50 bazillion emails and phone messages from all of you who were so super to be watching and cheering us on! What a treat, I can't thank y'all enough. For those who watched, you wondered why we sat there so long.

Well, the shuttle had very hazardous chemicals on board and we had to be "sniffed" to determine if any had leaked or were leaking. They checked for Monomethylhydrazine (N2H4 for Charlie Hudson) and nitrogen tetroxide (N2O4). Even though we were "clean", it took way too long for them to tow us in to the mate-demate area. Sorry for those who stuck it out and even waited until we exited the jet.

I am sure I will wake up in the middle of the night here soon, screaming and standing straight up dripping wet with sweat from the realization of what had happened. It was a thrill of a lifetime. Again I want to thank everyone for your interest and support. It felt good to bring Atlantis home in one piece after she had worked so hard getting to the Hubble Space Telescope and back.


Tuesday, April 14, 2009

Matthias Rath - steal this chapter


Matthias Rath - steal this chapter

April 9th, 2009 by Ben Goldacre
 
This is the “missing chapter” about vitamin pill salesman Matthias Rath. Sadly I was unable to write about him at the time that book was initially published, as he was suing my ass in the High Court. The chapter is now available in the new paperback edition, and I’ve posted it here for free so that nobody loses out.

Although the publishers make a slightly melodramatic fuss about this in the promo material, it is a very serious story about the dangers of pseudoscience, as I hope you’ll see, and it was also a pretty unpleasant episode, not just for me, but also for the many other people he’s tried to sue, including Medecins Sans Frontieres and more. If you’re ever looking for a warning sign that you’re on the wrong side of an argument, suing Medecins Sans Frontieres is probably a pretty good clue.

Anyway, here it is, please steal it, print it, repost it, whatever, it’s free under a Creative Commons license, details at the end. If you prefer it is available as a PDF here, or as a word document here. Happy Easter!
THE DOCTOR WILL SUE YOU NOW

This is an extract from
BAD SCIENCE by Ben Goldacre
Published by Harper Perennial 2009.

You are free to copy it, paste it, bake it, reprint it, read it aloud, as long as you don’t change it – including this bit – so that people know that they can find more ideas for free at www.badscience.net

.

The Doctor Will Sue You Now

This chapter did not appear in the original edition of this book, because for fifteen months leading up to September 2008 the vitamin-pill entrepreneur Matthias Rath was suing me personally, and the Guardian, for libel. This strategy brought only mixed success. For all that nutritionists may fantasise in public that any critic is somehow a pawn of big pharma, in private they would do well to remember that, like many my age who work in the public sector, I don’t own a flat. The Guardian generously paid for the lawyers, and in September 2008 Rath dropped his case, which had cost in excess of £500,000 to defend. Rath has paid £220,000 already, and the rest will hopefully follow. Nobody will ever repay me for the endless meetings, the time off work, or the days spent poring over tables filled with endlessly cross-referenced court documents.

On this last point there is, however, one small consolation, and I will spell it out as a cautionary tale: I now know more about Matthias Rath than almost any other person alive. My notes, references and witness statements, boxed up in the room where I am sitting right now, make a pile as tall as the man himself, and what I will write here is only a tiny fraction of the fuller story that is waiting to be told about him. This chapter, I should also mention, is available free online for anyone who wishes to see it.

Matthias Rath takes us rudely outside the contained, almost academic distance of this book. For the most part we’ve been interested in the intellectual and cultural consequences of bad science, the made-up facts in national newspapers, dubious academic practices in universities, some foolish pill-peddling, and so on. But what happens if we take these sleights of hand, these pill-marketing techniques, and transplant them out of our decadent Western context into a situation where things really matter?

In an ideal world this would be only a thought experiment. AIDS is the opposite of anecdote. Twenty-five million people have died from it already, three million in the last year alone, and 500,000 of those deaths were children. In South Africa it kills 300,000 people every year: that’s eight hundred people every day, or one every two minutes. This one country has 6.3 million people who are HIV positive, including 30 per cent of all pregnant women. There are 1.2 million AIDS orphans under the age of seventeen. Most chillingly of all, this disaster has appeared suddenly, and while we were watching: in 1990, just 1 per cent of adults in South Africa were HIV positive. Ten years
later, the figure had risen to 25 per cent.

It’s hard to mount an emotional response to raw numbers, but on one thing I think we would agree. If you were to walk into a situation with that much death, misery and disease, you would be very careful to make sure that you knew what you were talking about. For the reasons you are about to read, I suspect that Matthias Rath missed the mark.

This man, we should be clear, is our responsibility. Born and raised in Germany, Rath was the head of Cardiovascular Research at the Linus Pauling Institute in Palo Alto in California, and even then he had a tendency towards grand gestures, publishing a paper in the Journal of Orthomolecular Medicine in 1992 titled “A Unified Theory of Human Cardiovascular Disease Leading the Way to the Abolition of this Disease as a Cause for Human Mortality”. The unified theory was high-dose vitamins.

He first developed a power base from sales in Europe, selling his pills with tactics that will be very familiar to you from the rest of this book, albeit slightly more aggressive. In the UK, his adverts claimed that “90 per cent of patients receiving chemotherapy for cancer die within months of starting treatment”, and suggested that three million lives could be saved if cancer patients stopped being treated by conventional medicine. The pharmaceutical industry was deliberately letting people die for financial gain, he explained. Cancer treatments were “poisonous compounds” with “not even one effective treatment”.

The decision to embark on treatment for cancer can be the most difficult that an individual or a family will ever take, representing a close balance between well-documented benefits and equally well-documented side-effects. Adverts like these might play especially strongly on your conscience if your mother has just lost all her hair to chemotherapy, for example, in the hope of staying alive just long enough to see your son speak.

There was some limited regulatory response in Europe, but it was generally as weak as that faced by the other characters in this book. The Advertising Standards Authority criticised one of his adverts in the UK, but that is essentially all they are able to do. Rath was ordered by a Berlin court to stop claiming that his vitamins could cure cancer, or face a €250,000 fine.

But sales were strong, and Matthias Rath still has many supporters in Europe, as you will shortly see. He walked into South Africa with all the acclaim, self-confidence and wealth he had amassed as a successful vitamin-pill entrepreneur in Europe and America, and began to take out full-page adverts in newspapers.

˜The answer to the AIDS epidemic is here,” he proclaimed. Anti-retroviral drugs were poisonous, and a conspiracy to kill patients and make money. “Stop AIDS Genocide by the Drugs Cartel said one headline. “Why should South Africans continue to be poisoned with AZT? There is a natural answer to AIDS.” The answer came in the form of vitamin pills. “Multivitamin treatment is more effective than any toxic AIDS drug. Multivitamins cut the risk of developing AIDS in half.”

Rath’s company ran clinics reflecting these ideas, and in 2005 he decided to run a trial of his vitamins in a township near Cape Town called Khayelitsha, giving his own formulation, VitaCell, to people with advanced AIDS. In 2008 this trial was declared illegal by the Cape High Court of South Africa. Although Rath says that none of his participants had been on anti-retroviral drugs, some relatives have given statements saying that they were, and were actively told to stop using them.

Tragically,Matthias Rath had taken these ideas to exactly the right place. Thabo Mbeki, the President of South Africa at the time, was well known as an “AIDS dissident”, and to international horror, while people died at the rate of one every two minutes in his country, he gave credence and support to the claims of a small band of campaigners who variously claim that AIDS does not exist, that it is not caused by HIV, that anti-retroviral medication does more harm than good, and so on.

At various times during the peak of the AIDS epidemic in South Africa their government argued that HIV is not the cause of AIDS, and that anti-retroviral drugs are not useful for patients. They refused to roll out proper treatment programmes, they refused to accept free donations of drugs, and they refused to accept grant money from the Global Fund to buy drugs. One study estimates that if the South African national government had used anti-retroviral drugs for prevention and treatment at the same rate as the Western Cape province (which defied national policy on the issue), around 171,000 new HIV infections and 343,000 deaths could have been prevented between 1999 and 2007. Another study estimates that between 2000 and 2005 there were 330,000 unnecessary deaths, 2.2 million person years lost, and 35,000 babies unnecessarily born with HIV because of the failure to implement a cheap and simple mother-to-child-transmission prevention program. Between one and three doses of an ARV drug can reduce transmission dramatically. The cost is negligible. It was not available.

Interestingly, Matthias Rath’s colleague and employee, a South African barrister named Anthony Brink, takes the credit for introducing Thabo Mbeki to many of these ideas. Brink stumbled on the “AIDS dissident” material in the mid-1990s, and after much surfing and reading, became convinced that it must be right. In 1999 he wrote an article about AZT in a Johannesburg newspaper titled “a medicine from hell”. This led to a public exchange with a leading virologist. Brink contacted Mbeki, sending him copies of the debate, and was welcomed as an expert.

This is a chilling testament to the danger of elevating cranks by engaging with them. In his initial letter of motivation for employment to Matthias Rath, Brink described himself as “South Africa’s leading AIDS dissident, best known for my whistle-blowing exposé of the toxicity and inefficacy of AIDS drugs, and for my political activism in this regard, which caused President Mbeki and Health Minister Dr Tshabalala-Msimang to repudiate the drugs in 1999″.

In 2000, the now infamous International AIDS Conference took place in Durban. Mbeki’s presidential advisory panel beforehand was packed with “AIDS dissidents”, including Peter Duesberg and David Rasnick. On the first day, Rasnick suggested that all HIV testing should be banned on principle, and that South Africa should stop screening supplies of blood for HIV. “If I had the power to outlaw the HIV antibody test,” he said, “I would do it across the board.” When African physicians gave testimony about the drastic change AIDS had caused in their clinics and hospitals, Rasnick said he had not seen “any evidence” of an AIDS catastrophe. The media were not allowed in, but one reporter from the Village Voice was present. Peter Duesberg, he said, “gave a presentation so removed from African medical reality that it left several local doctors shaking their heads”. It wasn’t AIDS that was killing babies and children, said the dissidents: it was the anti-retroviral medication.

President Mbeki sent a letter to world leaders comparing the struggle of the “AIDS dissidents” to the struggle against apartheid. The Washington Post described the reaction at the White House: “So stunned were some officials by the letter’s tone and timing during final preparations for July’s conference in Durban that at least two of them, according to diplomatic sources, felt obliged to check whether it was genuine. Hundreds of delegates walked out of Mbeki’s address to the conference in disgust, but many more described themselves as dazed and confused. Over 5,000 researchers and activists around the world signed up to the Durban Declaration, a document that specifically addressed and repudiated the claims and concerns–at least the more moderate ones–of the “AIDS dissidents”. Specifically, it addressed the charge that people were simply dying of poverty:

The evidence that AIDS is caused by HIV-1 or HIV-2 is clearcut, exhaustive and unambiguous… As with any other chronic infection, various co-factors play a role in determining the risk of disease. Persons who are malnourished, who already suffer other infections or who are older, tend to be more susceptible to the rapid development of AIDS following HIV infection. However, none of these factors weaken the scientific evidence that HIV is the sole cause of AIDS… Mother-to-child transmission can be reduced by half or more by short courses of antiviral drugs … What works best in one country may not be appropriate in another. But to tackle the disease, everyone must first understand that HIV is the enemy. Research, not myths, will lead to the development of more effective and cheaper treatments.

It did them no good. Until 2003 the South African government refused, as a matter of principle, to roll out proper antiretroviral medication programmes, and even then the process was half-hearted. This madness was only overturned after a massive campaign by grassroots organisations such as the Treatment Action Campaign, but even after the ANC cabinet voted to allow medication to be given, there was still resistance. In mid-2005, at least 85 per cent of HIV-positive people who needed anti-retroviral drugs were still refused them. That’s around a million people.

This resistance, of course, went deeper than just one man; much of it came from Mbeki’s Health Minister, Manto Tshabalala-Msimang. An ardent critic of medical drugs for HIV, she would cheerfully go on television to talk up their dangers, talk down their benefits, and became irritable and evasive when asked how many patients were receiving effective treatment. She declared in 2005 that she would not be “pressured” into meeting the target of three million patients on anti-retroviral medication, that people had ignored the importance of nutrition, and that she would continue to warn patients of the sideeffects of anti-retrovirals, saying: “We have been vindicated in
this regard. We are what we eat.”

It’s an eerily familiar catchphrase. Tshabalala-Msimang has also gone on record to praise the work of Matthias Rath, and refused to investigate his activities. Most joyfully of all, she is a staunch advocate of the kind of weekend glossy-magazine-style nutritionism that will by now be very familiar to you. The remedies she advocates for AIDS are beetroot, garlic, lemons and African potatoes. A fairly typical quote, from the Health Minister in a country where eight hundred people die every day from AIDS, is this: “Raw garlic and a skin of the lemon–not only do they give you a beautiful face and skin but they also protect you from disease.” South Africa’s stand at the 2006 World AIDS Conference in Toronto was described by delegates as the “salad stall”. It consisted of some garlic, some beetroot, the African potato, and assorted other vegetables. Some boxes of anti-retroviral drugs were added later, but they were reportedly borrowed at the last minute from other conference delegates.

Alternative therapists like to suggest that their treatments and ideas have not been sufficiently researched. As you now know, this is often untrue, and in the case of the Health Minister’s favoured vegetables, research had indeed been done, with results that were far from promising. Interviewed on SABC about this, Tshabalala-Msimang gave the kind of responses you’d expect to hear at any North London dinner-party discussion of alternative therapies.

First she was asked about work from the University of Stellenbosch which suggested that her chosen plant, the African potato, might be actively dangerous for people on AIDS drugs. One study on African potato in HIV had to be terminated prematurely, because the patients who received the plant extract developed severe bone-marrow suppression and a drop in their CD4 cell count–which is a bad thing–after eight weeks. On top of this, when extract from the same vegetable was given to cats with Feline Immunodeficiency Virus, they succumbed to full-blown Feline AIDS faster than their non-treated controls. African potato does not look like a good bet.

Tshabalala-Msimang disagreed: the researchers should go back to the drawing board, and “investigate properly”. Why? Because HIV-positive people who used African potato had shown improvement, and they had said so themselves. If a person says he or she is feeling better, should this be disputed, she demanded to know, merely because it had not been proved scientifically? “When a person says she or he is feeling better, I must say ‘No, I don’t think you are feeling better’? I must rather go and do science on you’?” Asked whether there should be a scientific basis to her views, she replied: “Whose science?”

And there, perhaps, is a clue, if not exoneration. This is a continent that has been brutally exploited by the developed world, first by empire, and then by globalised capital. Conspiracy theories about AIDS and Western medicine are not entirely absurd in this context. The pharmaceutical industry has indeed been caught performing drug trials in Africa which would be impossible anywhere in the developed world. Many find it suspicious that black Africans seem to be the biggest victims of AIDS, and point to the biological warfare programmes set up by the apartheid governments; there have also been suspicions that the scientific discourse of HIV/AIDS might be a device, a Trojan horse for spreading even more exploitative Western political and economic agendas around a problem that is simply one of poverty.

And these are new countries, for which independence and self-rule are recent developments, which are struggling to find their commercial feet and true cultural identity after centuries of colonisation. Traditional medicine represents an important link with an autonomous past; besides which, anti-retroviral medications have been unnecessarily – offensively, absurdly – expensive, and until moves to challenge this became partially successful, many Africans were effectively denied access to medical treatment as a result.

It’s very easy for us to feel smug, and to forget that we all have our own strange cultural idiosyncrasies which prevent us from taking up sensible public-health programmes. For examples, we don’t even have to look as far as MMR. There is a good evidence base, for example, to show that needle-exchange programmes reduce the spread of HIV, but this strategy has been rejected time and again in favour of “Just say no.” Development charities funded by US Christian groups refuse to engage with birth control, and any suggestion of abortion, even in countries where being in control of your own fertility could mean the difference between success and failure in life, is met with a cold, pious stare. These impractical moral principles are so deeply entrenched that Pepfar, the US Presidential Emergency Plan for AIDS Relief, has insisted that every recipient of international aid money must sign a declaration expressly promising not to have any involvement with sex workers.

We mustn’t appear insensitive to the Christian value system, but it seems to me that engaging sex workers is almost the cornerstone of any effective AIDS policy: commercial sex is frequently the “vector of transmission”, and sex workers a very high-risk population; but there are also more subtle issues at stake. If you secure the legal rights of prostitutes to be free from violence and discrimination, you empower them to demand universal condom use, and that way you can prevent HIV from being spread into the whole community. This is where science meets culture. But perhaps even to your own friends and neighbours, in whatever suburban idyll has become your home, the moral principle of abstinence from sex and drugs is more important than people dying of AIDS; and perhaps, then, they are no less irrational than Thabo Mbeki.

So this was the situation into which the vitamin-pill entrepreneur Matthias Rath inserted himself, prominently and expensively, with the wealth he had amassed from Europe and America, exploiting anti-colonial anxieties with no sense of irony, although he was a white man offering pills made in a factory abroad. His adverts and clinics were a tremendous success. He began to tout individual patients as evidence of the benefits that could come from vitamin pills – although in reality some of his most famous success stories have died of AIDS. When asked about the deaths of Rath’s star patients, Health Minister Tshabalala-Msimang replied: “It doesn’t necessarily mean that if I am taking antibiotics and I die, that I died of antibiotics.”

She is not alone: South Africa’s politicians have consistently refused to step in, Rath claims the support of the government, and its most senior figures have refused to distance themselves from his operations or to criticise his activities. Tshabalala-Msimang has gone on the record to state that the Rath Foundation “are not undermining the government’s position. If anything, they are supporting it.”

In 2005, exasperated by government inaction, a group of 199 leading medical practitioners in South Africa signed an open letter to the health authorities of the Western Cape, pleading for action on the Rath Foundation. “Our patients are being inundated with propaganda encouraging them to stop life-saving medicine,” it said. “Many of us have had experiences with HIV infected patients who have had their health compromised by stopping their anti-retrovirals due to the activities of this Foundation.” Rath’s adverts continue unabated. He even claimed that his activities were endorsed by huge lists of sponsors and affiliates including the World Health Organization, UNICEF and UNAIDS. All have issued statements flatly denouncing his claims and activities. The man certainly has chutzpah.

His adverts are also rich with detailed scientific claims. It would be wrong of us to neglect the science in this story, so we should follow some through, specifically those which focused on a Harvard study in Tanzania. He described this research in full-page advertisements, some of which have appeared in the New York Times and the Herald Tribune. He refers to these paid adverts, I should mention, as if he had received flattering news coverage in the same papers. Anyway, this research showed that multivitamin supplements can be beneficial in a developing world population with AIDS: there’s no problem with that result, and there are plenty of reasons to think that vitamins might have some benefit for a sick and frequently malnourished population.

The researchers enrolled 1,078 HIV-positive pregnant women and randomly assigned them to have either a vitamin supplement or placebo. Notice once again, if you will, that this is another large, well-conducted, publicly funded trial of vitamins, conducted by mainstream scientists, contrary to the claims of nutritionists that such studies do not exist. The women were followed up for several years, and at the end of the study, 25 per cent of those on vitamins were severely ill or dead, compared with 31 per cent of those on placebo. There was also a statistically significant benefit in CD4 cell count (a measure of HIV activity) and viral loads. These results were in no sense dramatic – and they cannot be compared to the demonstrable life-saving benefits of anti-retrovirals – but they did show that improved diet, or cheap generic vitamin pills, could represent a simple and relatively inexpensive way to marginally delay the need to start HIV medication in some patients.

In the hands of Rath, this study became evidence that vitamin pills are superior to medication in the treatment of HIV/AIDS, that anti-retroviral therapies “severely damage all cells in the body–including white blood cells”, and worse, that they were “thereby not improving but rather worsening immune deficiencies and expanding the AIDS epidemic”. The researchers from the Harvard School of Public Health were so horrified that they put together a press release setting out their support for medication, and stating starkly, with unambiguous clarity, that Matthias Rath had misrepresented their findings.

To outsiders the story is baffling and terrifying. The United Nations has condemned Rath’s adverts as “wrong and misleading”. “This guy is killing people by luring them with unrecognised treatment without any scientific evidence,” said Eric Goemaere, head of Médecins sans Frontières SA, a man who pioneered anti-retroviral therapy in South Africa. Rath sued him.

It’s not just MSF who Rath has gone after: he has also brought time-consuming, expensive, stalled or failed cases against a professor of AIDS research, critics in the media and others.

But his most heinous campaign has been against the Treatment Action Campaign. For many years this has been the key organisation campaigning for access to anti-retroviral medication in South Africa, and it has been fighting a war on four fronts. Firstly, TAC campaigns against its own government, trying to compel it to roll out treatment programmes for the population. Secondly, it fights against the pharmaceutical industry, which claims that it needs to charge full price for its products in developing countries in order to pay for research and development of new drugs – although, as we shall see, out of its $550 billion global annual revenue, the pharmaceutical industry spends twice as much on promotion and admin as it does on research and development. Thirdly, it is a grassroots organisation, made up largely of black women from townships who do important prevention and treatment-literacy work on the ground, ensuring that people know what is available, and how to protect themselves. Lastly, it fights against people who promote the type of information peddled by Matthias Rath and his ilk.

Rath has taken it upon himself to launch a massive campaign against this group. He distributes advertising material against them, saying “Treatment Action Campaign medicines are killing you” and “Stop AIDS genocide by the drug cartel”, claiming–as you will guess by now–that there is an international conspiracy by pharmaceutical companies intent on prolonging the AIDS crisis in the interests of their own profits by giving medication that makes people worse. TAC must be a part of this, goes the reasoning, because it criticises Matthias Rath. Just like me writing on Patrick Holford or Gillian McKeith, TAC is perfectly in favour of good diet and nutrition. But in Rath’s promotional literature it is a front for the pharmaceutical industry, a “Trojan horse” and a “running dog”. TAC has made a full disclosure of its funding and activities, showing no such connection: Rath presented no evidence to the contrary, and has even lost a court case over the issue, but will not let it lie. In fact he presents the loss of this court case as if it was a victory.

The founder of TAC is a man called Zackie Achmat, and he is the closest thing I have to a hero. He is South African, and coloured, by the nomenclature of the apartheid system in which he grew up. At the age of fourteen he tried to burn down his school, and you might have done the same in similar circumstances. He has been arrested and imprisoned under South Africa’s violent, brutal white regime, with all that entailed. He is also gay, and HIV-positive, and he refused to take anti-retroviral medication until it was widely available to all on the public health system, even when he was dying of AIDS, even when he was personally implored to save himself by Nelson Mandela, a public supporter of anti-retroviral medication and Achmat’s work.

And now, at last, we come to the lowest point of this whole story, not merely for Matthias Rath’s movement, but for the alternative therapy movement around the world as a whole. In 2007, with a huge public flourish, to great media coverage, Rath’s former employee Anthony Brink filed a formal complaint against Zackie Achmat, the head of the TAC. Bizarrely, he filed this complaint with the International Criminal
Court at The Hague, accusing Achmat of genocide for successfully campaigning to get access to HIV drugs for the people of South Africa.

It’s hard to explain just how influential the “AIDS dissidents” are in South Africa. Brink is a barrister, a man with important friends, and his accusations were reported in the national news media –and in some corners of the Western gay press–as a serious news story. I do not believe that any one of those journalists who reported on it can possibly have read Brink’s indictment to the end.

I have.

The first fifty-seven pages present familiar anti-medication and “AIDS-dissident” material. But then, on page fifty-eight, this “indictment” document suddenly deteriorates into something altogether more vicious and unhinged, as Brink sets out what he believes would be an appropriate punishment for Zackie. Because I do not wish to be accused of selective editing, I will now reproduce for you that entire section, unedited, so you can see and feel it for yourself.

Appropriate Criminal Sanctions
...the people of South Africa...

The document was described by the Rath Foundation as “entirely valid and long overdue”.

This story isn’t about Matthias Rath, or Anthony Brink, or Zackie Achmat, or even South Africa. It is about the culture of how ideas work, and how that can break down. Doctors criticise other doctors, academics criticise academics, politicians criticise politicians: that’s normal and healthy, it’s how ideas improve. Matthias Rath is an alternative therapist, made in Europe. He is every bit the same as the British operators that we have seen in this book. He is from their world.

Despite the extremes of this case, not one single alternative therapist or nutritionist, anywhere in the world, has stood up to criticise any single aspect of the activities of Matthias Rath and his colleagues. In fact, far from it: he continues to be fêted to this day. I have sat in true astonishment and watched leading figures of the UK’s alternative therapy movement applaud Matthias Rath at a public lecture (I have it on video, just in case there’s any doubt). Natural health organisations continue to defend Rath. Homeopaths’ mailouts continue to promote his work. The British Association of Nutritional Therapists has been invited to comment by bloggers, but declined. Most, when challenged, will dissemble.”Oh,” they say, “I don’t really know much about it.” Not one person will step forward and dissent.

The alternative therapy movement as a whole has demonstrated itself to be so dangerously, systemically incapable of critical self-appraisal that it cannot step up even in a case like that of Rath: in that count I include tens of thousands of practitioners, writers, administrators and more. This is how ideas go badly wrong. In the conclusion to this book, written before I was able to include this chapter, I will argue that the biggest dangers posed by the material we have covered are cultural and intellectual.

I may be mistaken.

/.

Please distribute

This work is licenced under the Creative Commons Attribution-Non-Commercial-No Derivative Works License described here, you are free to copy it wherever you like as long as you keep it whole, and do please point people back here to badscience.net so that if they like it, they know where to find more for free.

Sunday, January 25, 2009

Solving problems out in the open...

If I solve a problem out in the open, for anyone to see, the problem is solved forever.

If I solve a problem within a confined corporate environment, the problem is only solved for a short period of time.

A corporate veil, like a cell wall, ensures the inner workings are separated from the rest of the world so something unique can happen on the inside.

Solving problems within the corporate veil helps unique things happen inside.

One way to make unique things happen is if there is an uneven gradient of solutions to problems.

Prosperity traditionally follows from the homogenization of some aspect of the solution gradient.

Where does history explain the consequences of the extremes (all secret, all open)? Where does history explain the consequences of the homogenization of the solution gradient?