Monthly Archives: January 2013

Detecting overflows, undefined behaviour and other nasties

You will remember that a previous post discussed what happens when you add one to an integer, and that the answer isn’t always obvious. Indeed, the answer isn’t always defined. As it happens, there are plenty of weird cases that … Continue reading

Posted in Uncategorized | Comments Off on Detecting overflows, undefined behaviour and other nasties

An open letter to Xcode

The post below has been filed verbatim as an Apple Developer Tools bug report with ID 13051064. Dear Xcode, imagine that you had a combine harvester. Only, this combine harvester, instead of having a hopper into which the winnowed wheat … Continue reading

Posted in Uncategorized | 1 Comment

Retiring the “Apple developers are insular” meme

There’s an old trope used in discussions of Mac and iOS developers, that says they’re too inward-looking. They only think about software in ways that have been “blessed” by Apple, their platform vendor. I’m pretty sure that I’ve used this … Continue reading

Posted in advancement of the self, code-level, Responsibility, software-engineering | Comments Off on Retiring the “Apple developers are insular” meme

What happens when you add one to an integer?

It depends. You saw in the previous post that there are plenty of different integer types, some with known sizes and some where the size is set by the implementation. Well for each size of integer type there are two … Continue reading

Posted in buffer-overflow, code-level | Comments Off on What happens when you add one to an integer?

How big is an integer?

In the beginning, when all was without form and void, Kernighan and Ritchie created char. And they said, “let it be of a size chosen by the compiler, guaranteed to be large enough to hold one character from the execution … Continue reading

Posted in Uncategorized | Comments Off on How big is an integer?