Servergeek
Mickey Williams' weblog


Powered by Blogger Pro™

Sunday, November 06, 2005

Richard Hale Shaw Fails the Blog Screen


As a practice manager, I usually spend a portion of my week interviewing candidates. Occasionally I'll get an incorrect answer delivered with such confidence that I wonder if the candidate has any real experience whatsoever. RHS recently gave some very bad advice about the using statement and is so incorrect that I frankly might immediately flip the no-hire bit if we were in an interview. In fact, he is so off the mark, I hardly know where to begin, but I'll just note that:

  • The Dispose pattern is about strong ownership, not shared ownership
  • The using statement is about easing a specific usage of the Dispose pattern
  • The fact that you're not required to allocate an object in the using statement is a red-herring
  • Anyone that even hints at suggesting the use of a finalizer instead of using/Dispose is just not qualified to touch code on a large dynamic system, let alone have a position of higher authority
  • using(){} is less complex than addref/release, malloc/free, and new/delete/delete[]
  • Most mere mortals have difficulty coding a proper substitute for using(){}. In fact, if they have trouble with using, I assert that there's no way that they'll be able to properly implement the required try/finally code in all cases.

Go, read -- it's really just scary in an entertaining way.

I'll try to post more later with code


Home