Don’t do this

A query that had been used to authenticate users to a website:

SELECT COUNT(PKID_Users) as 'c' FROM Users
WHERE UPPER(Username)='"+this.username.ToUpper()+ "' AND Password='"+this.password+"'
AND Active=1

As an added bonus, the code checked the count to make sure there weren’t multiple rows returned (was there was a chance more than one user could have the same user name?)
Thankfully, I replaced the authentication with something sane quite some time ago.

But geez.

American political stereotypes, in chess terms

If American political stereotypes played out on the chess board:

  • Democrats would be trying to ensure that every game ends in a draw.
  • Republicans would be denying that White starts out with an advantage.
  • Democrats would be giving away chess books to everyone, whether they care about chess or not.
  • Republicans would be paying GM’s to develop opening novelties, since this knowledge would “trickle-down” to the class D players.