CodeSOD

Code Snippet Of the Day (CodeSOD) features interesting and usually incorrect code snippets taken from actual production code in a commercial and/or open source software projects.
« Apr 13

May 2013

 

Habla Currency

2013-05-15
Adam worked for a company that sold check printing machines. It was not a particularly large company, but the machines were cutting edge when it came to the latest and greatest technologies to prevent check fraud. So while the company was doing well enough, until now the company was selling equipment solely in the United States. At least, that is, until one of the more enterprising sales people decided to ‘branch out’.

The Impossible Blob

2013-05-13
BlobConfig.config not found, said the error console of The Blob-- the "insane in every way" system Sep's company produced.
Ben sent in the following snippet from a PHP site. His description of the site as a whole is unpublishable in most countries, but among his frankly shocking profanity he pointed out a lack of error checking and comments, and an abundance of unreadable inline code and confusing, unnecessary functions.
Michael listened as his co-worker Draughon droned on at lunch. "I just don't trust hashes, man. I never understood any of the algorithms behind them, and I don't trust anything I don't understand."