January 19, 2007
Prototype News!
Anyway...they've finally come out with a 1.5 release version. Oh, and they also have a shiny new website with official documentation...that last part just makes me feel all warm inside.
January 3, 2007
Be Judged...And Like It!
- You choose from a wide array of problems (think back to your computer science classes)
- You develop and upload a solution in the language of your choice
- Your code is run and judged against the time and memory constraints of the problem
- If you pass, you get a warm fuzzy feeling inside. If you fail, you get angry and vow upon the graves of your forefathers to spend every waking moment figuring out how to find all the prime numbers between two given numbers up to 1 billion in under 6 seconds...not that anything like that happened to me.
I think this is a great way to keep your programming skills sharp and have some fun too.
.NET Nuggets
String.IsNullOrEmpty(string value)
This method does exactly what it says, returns true if a given string is either null or empty. A quick look in reflector reveals that it does this by properly checking the length of the string as opposed to comparing it to String.Empty:
public static bool IsNullOrEmpty(string value)
{
if (value != null)
{
return (value.Length == 0);
}
return true;
}int.TryParse(string s, out int result)
This method takes a string and attempts to convert it to an integer, returning the result through an output parameter. If the conversion is successful, the result will be the appropriate integer, otherwise the result will be zero. The conversion will fail if the input parameter is null, not a properly formatted integer, or falls outside the range of an Int32 type.
I looked at this with Reflector, and it's a bit too complicated to post here, but the cool thing is that it does it's thing without ever using a try/catch. This method definitely comes in handy when you need to get integer values from an untrusted source like the querystring.