Monday, February 25, 2008

Challenges of software as service: Spolsky's version

Amazon's S3 was down the other day. A lot of company's that use S3 were down too.

Such are the woes of 'software as service' -- what we used to call "application service provision".

Amazon didn't say much about the S3 outage, but when something similar happened to Joel Spolsky's product he had quite a few interesting comments:
Five whys - Joel on Software

..Most well-run online services will have two, maybe three outages a year. With so few data points, the length of the outage starts to become really significant, and that's one of those things that's wildly variable. Suddenly, you're talking about how long it takes a human to get to the equipment and swap out a broken part. To get really high uptime, you can't wait for a human to switch out failed parts. You can't even wait for a human to figure out what went wrong: you have to have previously thought of every possible thing that can possibly go wrong, which is vanishingly improbable. It's the unexpected unexpecteds, not the expected unexpecteds, that kill you.
...Think of it this way: If your six nines system goes down mysteriously just once and it takes you an hour to figure out the cause and fix it, well, you've just blown your downtime budget for the next century. Even the most notoriously reliable systems, like AT&T's long distance service, have had long outages (six hours in 1991) which put them at a rather embarrassing three nines ... and AT&;T's long distance service is considered "carrier grade," the gold standard for uptime.

Keeping internet services online suffers from the problem of black swans. Nassim Taleb, who invented the term, defines it thus: "A black swan is an outlier, an event that lies beyond the realm of normal expectations." Almost all internet outages are unexpected unexpecteds: extremely low-probability outlying surprises. They're the kind of things that happen so rarely it doesn't even make sense to use normal statistical methods like "mean time between failure."...
Spolsky cares deeply about customer service, his company's response is impeccable.

Others don't do nearly as well. I have trouble imaging large corporations caring enough to delivery truly reliable service, though the phone companies (for all their many ills) managed it for many years.

Even Nader's sympathizers are appalled

James Fallows turns out to have an unexpected history with Ralph Nader. So his judgment carries more than average weight: Ralph Nader: tragedy to farce.

Sunday, February 24, 2008

Saturday, February 23, 2008

Legislative review: Obama and Clinton

Daily Kos: State of the Nation is a well researched review of the Obama and Clinton legislative records. Obama gets the nod from the blogger, but Clinton doesn't do badly either.

Personally I think both records show Congress spends far too much time on micromanagement of peripheral issues, but I guess that's what American's want. If we wanted politicians to tackle the real problems we'd elect different people.

Thursday, February 21, 2008

Hey, we still have rabbit ears!

This was on a list of "obsolete skills":
Obsolete skills - Scobleizer — Tech geek blogger:

...10. Adjusting the rabbit ears on your TV set.
Huh?

Our sole source of television is a pair of rabbit ears on a 9" CRT. I still have rabbit tuning skills.

The power of video - the beef recall

This really is the video generation.

We're "pithed frogs" about lethally contaminated Chinese manufactured meds, but a video of "downer" (meaning prion-packed, example: CJD/mad cow disease) cattle being slaughtered raises the roof:

The Biggest Beef Recall Ever - New York Times

A nauseating video of cows stumbling on their way to a California slaughterhouse has finally prompted action: the largest recall of meat in American history.

Well, maybe it shakes the shingles for a day or two.

This is what you get after 8-12 years of the GOP taking apart American government (depending on how you measure GOP control during the hallowed Clinton years).

The video was supposedly done randomly, but even if it wasn't there's nothing in our system to suggest that this isn't routine. I suggest a prayer to George the II the next time you eat a hamburger, feed your pet, buy a child's toy, or give a medication to your child.

Or save your energy and use it to campaign for whoever gets the Democratic nomination.

I destroyed Facebook

I knew this would happen ...

BBC NEWS | Business | Facebook 'sees decline in users'

Social networking site Facebook has seen its first drop in UK users in January, new industry data indicates.

Users fell 5% to 8.5 million in January from 8.9 million in December, according to data from Nielsen Online....

...Nic Howell, deputy editor of industry magazine New Media Age, said the site was no longer as popular among its core audience of young people.

"Social networking is as much about who isn't on the site as who is - when Tory MPs and major corporations start profiles on Facebook, its brand is devalued, driving its core user base into the arms of newer and more credible alternatives," he said...

After all, I did this.

Imagine the horror of a 17 year old seeing a geezer's face.

Heh, heh.

I enjoyed doing them in.

So, who do I take out next?

Word file formats: the Nisus achievement and a gentle wish for .DOC

I use Nisus Writer Express for OS X, and one of these days I'll probably upgrade to Nisus Writer Pro. There are many fine features of this high quality product, including the fact that they don't emulate Microsoft Word. The key features for me [1], however, are that:

  • Nisus uses RTF as a native file format
  • Nisus can, optionally, use Word .DOC files as their native file format and do a pretty reasonable job of editing existing Word files without messing them up too much.

I've learned many times over many years that data mobility is a critical requirement of my digital world [2]. In 2008 RTF is the closest thing we have to a mobile word processing file format, .DOC is next, and the Oasis OpenDocument File format is a very distant third.

Recently Microsoft released the specification for Word's .DOC binary file format [3]. Joel Spolsky tells us a bit about that format:

Why are the Microsoft Office file formats so complicated? (And some workarounds) - Joel on Software

...The assumption, and a fairly reasonable one at the time, was that the Word file format only had to be read and written by Word. That means that whenever a programmer on the Word team had to make a decision about how to change the file format, the only thing they cared about was (a) what was fast and (b) what took the fewest lines of code in the Word code base. The idea of things like SGML and HTML—interchangeable, standardized file formats—didn’t really take hold until the Internet made it practical to interchange documents in the first place [jg - 4]; this was a decade later than the Office binary formats were first invented. There was always an assumption that you could use importers and exporters to exchange documents. In fact Word does have a format designed for easy interchange, called RTF, which has been there almost since the beginning. It’s still 100% supported.

...Every checkbox, every formatting option, and every feature in Microsoft Office has to be represented in file formats somewhere. That checkbox in Word’s paragraph menu called “Keep With Next” that causes a paragraph to be moved to the next page if necessary so that it’s on the same page as the paragraph after it? That has to be in the file format. And that means if you want to implement a perfect Word clone than can correctly read Word documents, you have to implement that feature. If you’re creating a competitive word processor that has to load Word documents, it may only take you a minute to write the code to load that bit from the file format, but it might take you weeks to change your page layout algorithm to accommodate it. If you don’t, customers will open their Word files in your clone and all the pages will be messed up.... [6]

Hats off to Nisus. Their ability to work with .DOC file formats [5] is a great achievement, and a testimony to coding excellence and true grit.

Beyond Nisus (buy it) this is another illustration of why we need to care about file formats. Is the Word 2007 .DOC binary file format really the a good way to carry our documents forward?

Today uber-geeks like Schneier seem to be discovering lock-in - decades after I put (small) audiences to sleep with it. A bit late, but it's a start.

Die .DOC die.

--

[1] Nisus doesn't really promote this as a feature. I think they should, but I'm a market of one.

[2] My biggest concession to data-lock is iPhoto. Even there I know that with AppleScript I could extract the majority of the data structures in my photo libraries - not easy, but doable. If I'm every lacking for work to do I might turn that into a product.

[3] A grudging effort to appease governments. I suspect China is a big driver.

[4] Spolsky used to be a Microsoft guy, which is probably why he doesn't remember that WordPerfect, Ami Pro, MacWrite and many other extinct applications used to read and write Word's .DOC format. It was "practical to interchange documents" eons before HTML/SGML - in fact it was a necessity as Microsoft rode its proprietary file formats and trade press control to victory.

[5] Not perfectly of course. Even Nisus Writer Pro can't read and represent an style-generated Word table of contents -- a feature I use extensively.

Wednesday, February 20, 2008

The trial of Khalid Mohammed - America's next opportunity for shame

Khalid Mohammed is alleged to have planned the 9/11 attacks. While being tortured, he is said to have confessed to many crimes.

So will his testimony under torture be used against him in a military tribunal?

Morris Davis, an Air Force colonel and chief prosecutor for the military commissions at Guantánamo Bay, Cuba, from 2005 to 2007, responds:
Unforgivable Behavior, Inadmissible Evidence - New York Times

...My policy as the chief prosecutor for the military commissions at Guantánamo was that evidence derived through waterboarding was off limits. That should still be our policy. To do otherwise is not only an affront to American justice, it will potentially put prosecutors at risk for using illegally obtained evidence.

Unfortunately, I was overruled on the question, and I resigned my position to call attention to the issue — efforts that were hampered by my being placed under a gag rule and ordered not to testify at a Senate hearing. While some high-level military and civilian officials have rightly expressed indignation on the issue, the current state can be described generally as indifference and inaction.

At a Senate hearing in December, the legal adviser for the military commissions, Brig. Gen. Thomas Hartmann, refused to rule out using evidence obtained by waterboarding. Afterward, Senator Lindsey Graham, who is also a lawyer in the Air Force Reserves, said that no military judge would allow the introduction of such evidence. I hope Senator Graham is right about military judges, and it is unfortunate that any might be put in a position where he has to make such a decision.

Regrettably, at a Pentagon press briefing last week announcing that Khalid Sheikh Mohammed, the alleged mastermind of the 9/11 attacks, and five others had been charged and faced the death penalty, General Hartmann again declined to rule out the use of evidence acquired through waterboarding. Military justice has a proud history; this was not one of its finer moments.

That is not to say those subjected to waterboarding get a free pass. If the prosecution can build a persuasive case without using the coerced “confession,” then whether a defendant endured waterboarding is immaterial in determining guilt or innocence.

There are some bad men at Guantánamo Bay and a few deserve death, but only after trials we can truthfully call full, fair and open. In that service, we must declare that evidence obtained by waterboarding be banned in every American system of justice. We must restore our reputation as the good guys who refuse to stoop to the level of our adversaries. We are Americans, and we should be able to state with conviction, “We don’t do stuff like that.”
This guy ended his military career to save America's honor, and nobody cared.

Meanwhile McCain is backpedaling away from what was once a principled stand against torture.  The Khalid trial may be a factor in his craven reversals.

Khalid Mohammed doesn't matter any more. What matters is that America has another chance to disgrace itself, or a chance to move away from the Bush legacy.

Catastrophic extinction in the Anthropocene: now for the sharks

Sharks were old when Dinosaurs pounded the ground. 100 million years ago they looked like those that live today.

Now they're headed for extinction.

Ocean's fiercest predators now vulnerable to extinction

Sharks are disappearing from the world’s oceans. The numbers of many large shark species have declined by more than half due to increased demand for shark fins and meat, recreational shark fisheries, as well as tuna and swordfish fisheries, where millions of sharks are taken as bycatch each year.

Now, the global status of large sharks has been assessed by the World Conservation Union (IUCN), which is widely recognized as the most comprehensive, scientific-based information source on the threat status of plants and animals...

...Research at Dalhousie University over the past five years, conducted by Baum and the late Ransom Myers, demonstrated the magnitude of shark declines in the northwest Atlantic Ocean. All species the team looked at had declined by over 50 per cent since the early 1970s. For many large coastal shark species, the declines were much greater: tiger, scalloped hammerhead, bull and dusky shark populations have all plummeted by more than 95 per cent.

A 50% decline in about 30 years. In the geologic record we use to track extinctions this is meteor-impact fast.

We truly live in the Anthropocene. Of course it may be a relatively brief geologic era; if so the sharks might squeak through ...

Monday, February 18, 2008

Science and the alternative

Eons ago, Emily and I wrote an editorial in the now defunct Journal of Family Practice [1] on the topic of alternative medicine. It was titled "Science and the Alternative" which sort of gives away our opinions (see also).

Oh, to be clear, it's not that I think herbal remedies can't work (for example), but rather that it's magical thinking to assume they're fundamentally safe because they're "natural".

Today CV tackles the topic, after discovering, to his horror, that his readership doesn't necessarily know what science is ...

Telekinesis and Quantum Field Theory | Cosmic Variance

...If we can show that psychic phenomena are incompatible with the laws of physics we currently understand, then our task is to balance the relative plausibility of “some folks have fallen prey to sloppy research, unreliable testimony, confirmation bias, and wishful thinking” against “the laws of physics that have been tested by an enormous number of rigorous and high-precision experiments over the course of many years are plain wrong in some tangible macroscopic way, and nobody ever noticed...

[1] The name lives on but the journal died.

PS. I love that Michael Crichton, the climate change denier, is also a spoon bender.

Sunday, February 17, 2008

Stealing ideas - a quote I like

My iGoogle page had this quote today:

Howard Aiken - The Quotations Page

Don't worry about people stealing an idea. If it's original, you will have to ram it down their throats.

It's not true of course, but there's enough truth there to make it amusing.

The Microsoft Word anti-fan club

I've been a longtime member of the Microsoft Word anti-fan club (the last good version came our @ 1995-97), but today I learned via ATPM that I have new company. Virginia Hefferman for the NYT and Steven Poole for The Guardian.

It must be admitted that I despise Word for different reasons than Hefferman and Poole, but still I welcome them to our little club.

BTW, Nisus Writer (I have the Express version) is a wonderful alternative to Word on OS X.

Friday, February 15, 2008

We really need to panic more - FDA inspection of Chinese drug suppliers

I remember the good old days. Back then, the public panicked about apple's sprayed with relatively harmless insecticides. In those days we panicked about everything.

Ok, so we still see insane full page ads in the NYT accusing immunization of inducing a plague of autism. On the other hand, where's the panic about our drug supplies?

The FDA would take 40-50 years at its current rate to inspect today's Chinese drug manufacturers?! Plants like the one producing defective Heparin?! ...
F.D.A. Broke Its Rules by Not Inspecting Chinese Plant With Problem Drug - New York Times

... Baxter International announced on Monday that it was suspending sales of its multidose vials of heparin after four patients died and 350 suffered complications, many of them serious. Baxter bought the active ingredient for this product from Scientific Protein Laboratories, which has plants in Waunakee, Wis., and Changzhou City, China...

... Ms. Gardiner said that recent tests by Baxter had found subtle chemical differences among the lots that Scientific Protein shipped to Baxter “but it is unclear what impact the differences would have” on Baxter’s heparin product.

Dr. Ajay Singh, director of dialysis at the Brigham and Women’s Hospital in Boston, said he was astonished by what he called the many failures to ensure a safe supply of heparin. There are 450,000 people in the United States on dialysis, and nearly all of them need copious doses of heparin, he said. Heparin is also used in cardiac surgery and among chronic care patients.

“We need to ensure that this country has access to the crucial medicines it needs,” Dr. Singh said. “This is a national security issue.”

The heparin scare comes at a particularly delicate time for the F.D.A. Over the past year, a wave of tainted goods from China, including deadly pet food ingredients and tainted fish, has prompted concern about whether regulators are adequately monitoring imports’ safety.

The Government Accountability Office released three reports in recent months that found that the drug agency provided little oversight of the increasing number of foreign plants that export food, drugs and devices to the United States.

Although the agency must inspect domestic drug plants once every two years, the investigators found that it inspected foreign drug plants at best once every 13 years. The agency’s record in China, now one of the biggest drug suppliers in the world, is even worse. Of the 700 approved Chinese drug plants, the agency has been able to inspect only 10 to 20 each year and would need 40 to 50 years to inspect them all.
Really, this would be a great time for panic.

Instead the American public behaves like a pithed frog -- a study in learned helplessness.

We really, really, need to get the GOP completely out of power.

Update 2/15/2008: If our medication supply is having quality issues, they would not all be as obvious as fatalities. They might only show up in large scale studies ...

Thursday, February 14, 2008

The Fibonnaci sequence, In Our Time and why digital cameras should adopt the 35 mm aspect ratio forever

Not to mention my old neglected web pages. All intimately connected through the 1/Golden Ratio of "1.6180339887". That's a smidgen more than 8/5.

How connected?

To begin with, here's a (slightly revised) discussion from an ancient web page of mine about photographic aspect ratios, long the bane of the art:

John's Digital Photography Page

I thought printing was a peculiar curse of digital photography, but "Socrates" corrected me:

Printing is the curse of ALL photography and has been for a hundred years. 35 mm. has been the most popular format for probably fifty years. Until very recently (with 4X6 paper), there was NO paper available that matched the 3X2 aspect ratio. We had a choice of 3.5X5 or 5X7 or 8X10. The 8X10 was perfect for a 4X5 view camera used by professional portrait photographers. The smaller sizes were "almost" the 4X5 aspect ratio ...

In the case of digital photography, consumer camera sensors follow the convention of monitors: 640:480 = 4:3; on the other hand 35 mm film has a ratio of 3:2. Digital SLRs most often go with the 35 mm ratio of 3:2 (width to height), and some oddball Panasonic cameras use the video ratio of 16:9.

Not quite the same. The most popular print size, 4x6, is a good match to 35mm film, but not to most digital sensors. (BUT, Apple's photo books expect the 4:3 ratio.) If you print to a 4x6 paper; either there's cropping (most common) or dark bands are seen (better really, but unsightly).

This list of aspect ratios helps clarify the problem (here I use height/width as it makes the ratio easier to compare):

4x5: 0.80 (view camera and 8x10 prints)
3x4: 0.75 (most digital cameras and Apple's PhotoBook)
5x7: 0.71 (print size)
3.5x5: 0.7 (print size)
2x3: 0.67 (35mm and 4x6 prints - 35 mm is the diagonal for the old netatives) 
5x8: 0.63 (Golden Ratio, more or less)
9x16: 0.56 (video ratio, widescreen monitors)..

So, we clearly see that the so-called 4x6 aspect ratio of 35 mm film and dSLRs is closest to the Golden Ratio. Which makes that the best choice for digital photography sensor size.

Huh? How did I make that leap? Well, it turns out the "Golden Ratio" is baked into the mathematics of the universe, and it has some odd aesthetic appeal to the human brain (Parthenon, art, architecture, music, etc).

The Golden Ratio is derived by looking at the convergence of the ratio of number pairs in the Fibonacci sequence. That sequence was introduced to Northern Europe in the early 13 century by Fibonacci (In Our Time: 11/29/2007), who might have come across them while learning about Arabic (Indian actually*) numbers when adventuring in Northern Africa. The sequence goes like this:

1, 1, 2, 3, 5, 8, 13, 21, 34 and so on (each digit is the sum of the preceding pair).

the ratios look like this (note the 3/2 -- the 35 mm negative size:

1/1, 2/1, 3/2, 8/5, 13/8, 21/13, 34/21 and so on ..

So we see that our familiar 4x6 photographs are the 3rd item in the ratio sequence, and not too far from the covergent value of the Golden Ratio: 1.6180339887.

There's no arguing with the fundamental structure of the universe, adjusting slightly for tradition.

The 4 x 6 printed image rules. Let no pretender emerge.

* I thought our digits were an Arabic invention. They turn out to be Indian, but they came to Europe via Arabia. This is an interesting example of wrong things I learned as a child that I have not since revisited, an increasingly common phenomena.