Small code with powerful results, the occasional opinion … and beer.

16 Feb 2010
Old rounding errors never die, they just fade into images…

My friend Matt Owen posted a snapshot of the stock results on his Facebook wall today, which showed some interesting results on NASDAQ. It’s amusing to see little math slip ups appear from time to time like this on commercial web sites.  Seeing this error reminded me of other experiences I have had in coding […]

20 Jan 2009
When an empty string is really an empty string…

Sometimes clarity of thinking during late night programming is elusive… 1 (footerMessage.Trim().Length == 0 ? string.Empty : footerMessage + "\r\n\r\n")(footerMessage.Trim().Length == 0 ? string.Empty : footerMessage + "\r\n\r\n") There are two bloopers in this one line of code: a string with nothing but spaces really is an empty string (for practical reasons). it would be […]