

Finding the average of two integers in C: not as simple as you might think - henning
http://forums.xkcd.com/viewtopic.php?t=3648

======
makecheck
Concepts like integer overflow are definitely lost on some developers, which
is why I cringe when I see relatively new programmers toying with a language
like C++. They are probably better off using experimental side projects to
hone their C++, while doing production code in the relative safety of
scripting languages.

Sure, you could argue something like hitting INT_MAX isn't likely with many
data sets, but it's also a very difficult bug to find, so it shouldn't be
there in the first place.

I love scripting language bindings. They let you put programming wizards and
new programmers on the same team, where only some parts require extreme care
(e.g. a C++ core). The majority of the code, if bound to something like
Python, becomes relatively safe, so things that "sound simple" actually can be
simple.

