A coworker and I have been trudging through a lot of code recently. .NET code written by a C programmer. Folks, these things should never mix, because when they do, you end up with:
byteArray = new Byte[hexString.Length >> 1];
That’s right. Don’t divide by 2. Bit shift. And nevermind that there is a builtin .Net function that does what this line of code came from. And nevermind yet again that there’s a good helping of HEX shit like this in an ASP.NET web app.