I'm not sure what benefit grading the code offers, unless you have a
rule that no code below C (or B or A, etc.) makes it into production. A
simple pass/fail scale is good enough for me (along with requisite
advice on getting from fail to pass, of course). 

In this case, though, it's not that the code is bad (though it does have
issues), it's that the *idea* is bad - which is a totally different
thing, I think. No matter how well you implement a singleton db
connection, it's still usually a Bad Idea in ADO. I think that those
"micro architecture" decisions should be evaluated separately from their
implementation.

--MB

> -----Original Message-----
> From: Discussion of advanced .NET topics. [mailto:ADVANCED-
> [EMAIL PROTECTED] On Behalf Of Abhijit Gadkari
> Sent: Wednesday, October 17, 2007 12:34 PM
> To: [email protected]
> Subject: Re: [ADVANCED-DOTNET] Singleton and Database Connection
> challange
> 
> Thanks for this excellent responses. I agree with Ben that code
> consistency
> is important and I am trying to enforce it in my team. Well, the
reason
> I
> posted this code is to see the dev reaction on this topic. Pattern
> beginners
> think that pattern is the panacea to all oops problems. This singleton
> code
> was written with great passion [I guess, little to much] and the idea
> was
> great - to optimize the resource utilization. But the dev who wrote
> this
> code was new to the patterns and could not foresee the threading /
> pooling
> problems.
> 
> 
> So this discussion was really educational for me.
> 
> And one more thing, I personally think that grading the code as A or D
> is
> not a good idea. We are not evaluating a person / dev but the code.
> What do
> you think? Well - I revised my code review comments to - Please check
> the
> discussion on this thread and do the needful.
> 
> 
> 
> Thanks.
> 
> Abhijit

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to