July 04, 2009

The 3.6% Accident

On this July 4th, we should contemplate the fragile experiment of American Democracy. There is a very fine line between the likes of Lincoln, FDR, and Jefferson on one side, and democratically-elected calamities such as Ahmadinejad or Marcos or Mugabe on the other.

Our system is unlikely and precious, and its strength does not just come from the presence of democratic voting. Today we should all take a moment to wonder why America happens to be so successful.

Think about the huge difference between Obama and Palin. Imagine if Palin had been the one to steer us through negotiations at G8, in the Middle East, or in the banking crisis. Recall Obama's 284-word impromptu answer on American Exceptionalism or the way he responded to the Wright disaster with a landmark speech on race. Contrast that to Palin's thoughts on Putin rearing his head in the air over Alaska or yesterdays bizarre abandonment of the Alaskan governorship in response to rough political waters.

And think about this blunt instrument of governance called democracy. Remember that in the end, 45.7 percent of American voters believed that Palin was qualified to hold the nuclear codes, and only 52.9% decided to trust Obama. Our world hangs in the balance: if a mere 3.6% of voters had chosen the other way, a disastrous team would have controlled the most powerful office on earth.

Now ask yourself: what makes American Democracy possible?

What can we do to strengthen this fragile system of ours?

Posted by David at 07:36 AM | Comments (7)

July 07, 2009

The Small Government Paradox

I am struck by Palin's assertion that her resignation is "the right thing for Alaska".

It seems like an example of the Small Government Paradox:

Officials that believe in less government will do less governing.

G.W. Bush famously took more vacation days than any other president in history. Sure, smaller, more efficient government makes a lot of sense. But shrinking government requires a lot of hard work on the part of leadership. Doesn't it?

Posted by David at 09:08 AM | Comments (3)

July 08, 2009

Easy Math Typesetting

My brother, who is a math teacher, is switching from Word to OpenOffice / Google Docs and is looking for a free solution for mathematical typesetting.

We looked at a bunch of solutions, but then we realized that it is hard to beat the simplicity of a free and super-easy web-based solution: use Wolfram Alpha to produce typeset formulas as GIF files.

You can write very natural formula text like r = sqrt(x^2 + y^2) or a = integral(sin(x)^2, 0, 1) and Alpha will automatically produce a beautifully typeset GIF within the results. Voila:

Good enough for math homework!

Update Feb 2010: now that the Google Chart Server supports TeX typesetting, things are even easier. Try the Math Formula Editor here.

Posted by David at 04:23 PM | Comments (1)

July 13, 2009


With all the continuing talk about Sarah Palin, I can't help but wonder again if McCain might have won the presidency if he had run together with his own favorite choice for VP: Joe Lieberman.

What do you think?

Posted by David at 08:52 AM | Comments (1)

July 15, 2009

Dear Losers

Goldman Sachs current quarterly reads like a letter:

Dear Loser Investors:

Thank you for buying high and selling low. That lets us buy low and sell high.

Sincerely, Goldman "We Always Win" Sachs

Robert Reich doesn't like the fact that Goldman is sucking these billions out of the global economy using the same derivatives-trading techniques that shouldered much of the blame for the current catastrophe.

What do you think, my fellow Losers?

Posted by David at 01:39 PM | Comments (1)

July 25, 2009

Disorderly Conduct

An exercise in racial stereotypes. I'm Asian so I don't have a face that is police bait. Strangers who see me are more likely to think I don't speak English, or that I'll whip out a camera.

Black guys have more serious problems - it's not just the fact that police come in with biases. It's everybody, the news media included (including black reporters).

Watch this early story about the white woman who got arrested earlier this month while exiting the NYC subway, for disorderly conduct after getting in an argument with a Hacidic cop over her sick dog.

And watch this early story of the black professor who got arrested on a recent Cambridge afternoon, for disorderly conduct after getting into an argument with a white cop about a burglary report at his own home.

Do you respond differently to the two cases? Do you think the news reporters responded differently to the two cases?

It is striking that in one case, even though the citizen clearly did violate a statute, coverage was very critical of the police who were "way out of line" and needed more "training in how to deal with people."

It is also striking that in the other case, no crime was committed at all - just a report of a suspicion - and yet the coverage highlighted the citizen's mugshots, fingerprints and their "loud and tumultuous behavior."

If you're not paying attention to the racial issues, you can easily miss the bias.

But think about the (probably unconsciously) coded language. Police need to learn how to "deal with people" - Here "people" means "white women in distress."

Reports of a person being "loud and tumultuous" - Here "tumultuous" means "crazy old black guy."

The more carefully you look, the more nuts we all are.

Posted by David at 02:51 PM | Comments (1)

July 29, 2009

Where I Learned Programming

I spent some time tonight reading Mapping The Atari, a 1982 book that was the essential tool for programming the Atari 800. It was not a book about programming languages or algorithms. It was far more valuable that that: it was a list of useful memory locations within the 65536 addressable bytes in the computer's RAM.

I find it fascinating to read the book again now, 27 years later as a professional programmer. My adult self enjoys the fact that there were 29868 Atari 800 machine cycles available per screen refresh and 114 cycles of computation that could be done during a single TV scan line sweep.

I remember that as a sixth-grader, that type of high-speed programming was way over my head. What I was able to understand - and I remember this very distinctly - was this page about how to make tones with the Atari 800's sound chip. I played with sound quite a bit.

Reviewing the memory map reminded me of the specific memory location "PEEK(53770)" - that is the address of the Atari 800's random number generator. And I found that I also haven't forgotten "PEEK(764)" as the way to read the unbuffered state of the keyboard - far better than using BASIC's buffered "INPUT" statement.

I can still recall the sense of wonder at running the following program:

WINDOW = PEEK(88) + PEEK(89) * 256: POKE WINDOW,33

That code locates the start of graphics memory and puts the letter "A" on the screen in the upper-left corner. No cursor motion. No PRINT required. For a BASIC programmer, that feels very powerful.

I spent countless hours drawing sets of font glyphs as 8x8 matrices of pixels. A complete font was 1024 bytes: 128 symbols, each defined by 8 bytes. Fill up memory, point the font address pointer to your glyphs, and voila - Olde English Type.

I marveled at advanced programs that would form machine code into strings, and then execute the string using the magical incantation USR(ADR(CODE$)).

Sound is just data. Graphics is just data. Code is just data. That is a mind-bending lesson in Von Neumann architecture for an eleven-year-old.

Posted by David at 12:59 AM | Comments (1)

July 31, 2009

Weiner Goes to Washington

Anthony Weiner awesomely introduces an amendment to completely eliminate the biggest government-run healthcare program:

 (a) FINDINGs.-Congress finds that-
  (1) Medicare is socialized medicine; and
  (2) Medicare is a single payer system.
 (b) ELIMINATION OF MEDICARE ELIGIBILITY UNDER PARTS B, C, AND D.-Notwithstanding any other provision of law, effective for items and services furnished on or after January 1, 2010, no individual shall be eligible or entitled to benefits under part B or part D, or part C insofar as it relates to benefits under part B, of title XVIII of the Social Security Act.

Disappointingly, not a single member of the committee voted to eliminate socialized, single-payer healthcare.

Posted by David at 07:24 AM | Comments (10)

Law vs Power

Rule of law is being tested in China with the arrest of prominent legal scholar Xu Zhiyong.

This seems to be part of a wide-ranging crackdown on non-governmental civil society in China.

It would be as if the FBI jailed the leaders of the ACLU, Amnesty International, and the Red Cross because they were getting too nosy over Guantanamo.

China is not a really great place to live.

Posted by David at 04:35 PM | Comments (2)