Geeks With Blogs
Alex's Blog-o-monium April 2012 Entries
What’s ‘default’ for?
Sometimes there's a need to communicate explicitly that value variable is yet to be "initialized" or in other words - we’ve never changed it from its' default value. Perhaps "initialized" is not the right word since a value type will always have some sort of value (even a nullable one) but it's just that - how do we tell? Of course an 'int' would be 0, an 'enum' would the first defined value of a given enum and so on – we sure can make this kind of check "by hand" but eventually it would get a bit ......

Posted On Friday, April 6, 2012 12:23 AM

Using ConcurrentQueue for thread-safe Performance Bookkeeping.
Just a small tidbit that's sprung up today. I had to book-keep and emit diagnostics for the average thread performance in a highly-threaded code over a period of last X number of calls and no more. Need of the day: a thread-safe, self-managing stats container. Since .NET 4.0 introduced new thread-safe 'Collections.Concurrent' objects and I've been using them frequently - the one in particular seemed like a good fit for storing each threads' performance data - ConcurrentQueue. But I wanted to store ......

Posted On Friday, April 6, 2012 12:03 AM

Moving, moving, moving.
I'm moving my blog content to who have graciously accepted my application to host here. Over a period of time I'll be putting up my older posts from original sources to here (after careful editing to fit new format). The dates and ordering might be odd but I'll do my best to minimize the confusion. Cheers!

Posted On Friday, April 6, 2012 12:00 AM

Copyright © Strenium | Powered by: