Making Asynchronous Programming Easy

Great post by Somasegar about upcoming language support for async programming: I guess soon the idea hack of using C# iterators as poor-man’s language support (that caused me to start this blog :)) will finally be deprecated.


Random() is only random if you are using it right

I like the quote “With great power comes great responsibility” when used in regards to .NET – .NET gives one great powers, but use it wisely and know how this stuff works. Recently I saw code (it was written by a guy interviewing to our team) that demonstrated interesting problem with incorrect usage of Random…


Functional sort in C#

On an internal mailing list, we were discussing functional languages, and this Haskell sort code: qsort []     = []qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++ qsort (filter (>= x) xs) While trying to explain how this code works (which is very different from what it looks like to C++/C# programmers due to…


Don't run SSIS package using SQL/CLR

A recent commenter suggested running SSIS using SQL/CLR: Just an idea on how to do this that may be a bit easier than any of the methods covered.  IF you were to write a CLR procedure which accepts a string as its parameter.  The string passed in would be the xml definition of a package (either…


Using C# 2.0 iterators to simplify writing asynchronous code (part 2)

Previous article describes the idea of using C# 2.0 iterators to write asynchronous code, now it’s time to implement the utility class that “runs” the iterator. The utility turns out to be very light, I’m glad some readers reported they’ve already implemented their own version. Lets list requirements for the utility: The user code should…


Using C# 2.0 iterators to simplify writing asynchronous code

A neat idea how C# 2.0 iterators can simplify the task of writing code that uses .NET async pattern. I’ve recently attended Jeffrey Richter’s class dedicated to effective threading techniques, and that made me think about using the .NET async pattern. The typical usage of this pattern is the following: you start one or more asynchronous…