I’ve been running into a good deal of bad computer code lately. Here’s an example from an actual tutorial. I’ve renamed the variable to protect the shameless:
if (count == 0) return false;
Why not this:
return (count != 0);
There are some god-forsaken languages in which returning the evaluation of a boolean expression is not valid (e.g. the creeping horror which goes by the name Open Office Basic). C and C++ are not among these. Yet, I’ve been running across a good dozen cases where the coders did not realize that.
In case someone would like to object: I know it is possible to just return count and let the compiler do an implicit conversion to bool but an explicit test makes the code clearer. The additional “if … then” does not.
OOHanzi 0.7 has been released.
As usual please refer to the documentation to know how to use it.
I have not been able to work on getting OOHanzi to work on OS X so I presume it still does not work.
List of changes:
* Updated packaging dependencies for Ubuntu 9.04.
* Performance improvements in “Mark Words Present In…”.
* Added support for variant readings when using “Mark Words Present In…/DDB”.
Vintage ads is on a roll:
Bloody… hell… In which universe is this a winning strategy?
Captain Morgan: the choice of horny creeps everywhere.
This ad just boggles the mind:
I like to look at old ads for fun. A good deal of our culturally based assumptions do not stand the test of time and so look ridiculous seen from the vantage point of a later age. I’ve seen the ad above many times on sites dedicated to old ads. Today, I ran across it again on vintage ads.
Now, the utter stupidity of this ad is nothing short of mind blowing. Blowing smoke in a woman’s face will win her over??? Really?!? But hey, what if she’s “playing” hard to get, eh? What then? Are there more advanced methods of “seduction”? Like spitting in her mouth? Or peeing on her?