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 09

May 2009

Jun 09 »

All Pain, No Gain

2009-05-27
"My company has very strict policy on direct access to the database," Steve writes, "no hand-built SQL in the front-end code and always use a stored procedure to access the data. The reasoning behind this was simple and sound: Avoid SQL injection attacks and increase database performance. "

Plain Old Regexs

2009-05-18
Unlike just about all of his friends, family, and coworkers, Jack doesn’t have a fancy cell phone. No streaming video, no Bluetooth, and certainly no “apps”. Heck, it doesn’t even have a camera. It’s just a plain old phone with plain old service that can only dial and receive plain old calls. And it’s exactly the type of phone that Jack wants.
For as long as he could remember, one Millan C's clients had always bragged about having their very own, in-house PHP Guru. "You could really learn something from this guy," they would often tell him, "he's brilliant, you know! And a guru!" Not being a particularly big fan of PHP, nor really interested in meeting the guru, Millan always put it off for "some day."