Spaces and Tabs

July 3, 2009

Like emacs vs. vi and what line you put your braces on, the issue of spaces versus tabs for indentation will always be a holy war among programmers. I’m from the always-use-spaces camp, but that’s not what this blog post is about. Pretty much any editor worth its weight in gold (which is not very […]

Comments Off on Spaces and Tabs

Beware of struct properties

January 1, 2009

Objective-C is an interesting programming language. Unlike C++, it’s a strict superset of C — every valid C program is a valid Objective-C program. While most C programs are valid C++ programs, there are certain incompatibilities such as the introduction of new keywords that make the relationship not strict. One of the many features that […]

Comments Off on Beware of struct properties

Underhanded C Contest

July 25, 2008

I recently discovered the Underhanded C Contest. It’s a contest where the goal is to write a C program which looks like it’s innocently doing something straightforward, and yet it slyly doing something innocuous which is not at all obvious from reading the source code. The shorter program, the better, since it’s a lot harder […]

Comments Off on Underhanded C Contest