Geeks With Blogs
Freestyle Coding Programming in the Real World September 2011 Entries
Project Unveiling: Card Roulette
The time has come to begin the project. I am pleased to announce Card Roulette. All posts on the topic will include the tag "Card Roulette". The concept is fairly simple. One day, I was watching a biography of the man that invented the theory of card counting in Black Jack. While I was impressed with the math, I always felt that it was misleading. You're not really counting card, just keeping a few simple statistics. This nagged on me for a few weeks until I came up with the concept of playing Roulette ......

Posted On Wednesday, September 28, 2011 11:12 PM

Hey guys. I need to take a moment, break the fourth wall, and address the readers. First, I have another speaking engagement. I will be giving a full 2 hour workshop on XNA at the Huntsville New Technology User's Group meeting on October 11 at 6PM. We'll take a little break at 7 and pizza will be provided. Full details and directions can be found at I have not forgotten about "the project." The design document is done. It got tied up with the corporate lawyer, who wanted to make sure ......

Posted On Tuesday, September 20, 2011 8:53 AM

Arrays of ValueTypes don't like object.Equals
This had me pulling my hair out for a couple days: byte[] _A = new byte[64]; // Fill _A with some meaningful, valid data. byte[] _B = new byte[_A.Length]; _A.CopyTo( _B, 0 ); if( !_A.Equals( _B ) ) { throw new WtfException( "It appears object.Equals doesn't work on arrays of value types..." ); } Yes, that throws the WtfException. It took me a few days to notice. byte is a ValueType. However, byte[] is a System.Array, which is a reference type. As per the .NET documenation: The default implementation ......

Posted On Thursday, September 15, 2011 1:51 PM

Copyright © Chris Gardner | Powered by: | Join free