Data Hiding in C

An incomplete type lets a C header expose an opaque pointer and a function interface while keeping implementation details inside a translation unit.

Read more »

After Watching Ai Weiwei’s 4851

Ai Weiwei’s 87-minute film works as a catalyst. The way viewers watch it becomes part of the work, prompting both rational and emotional reflection on the May 12 earthquake.

Read more »

The Logic of Animal Protection and the Politics of The Cove

A utilitarian argument for animal protection, from the human sentiments at stake in protecting animals like ourselves to the role of wildlife in sustaining ecosystems. I also consider how The Cove makes its case.

Read more »

When Should You Check Whether a Pointer Is NULL?

In C and C++, deleting a null pointer is safe, but passing one to a function such as strlen is not. This note looks at where to validate arguments and when to use assert.

Read more »