Find the bugAccidental code reviews
I was working with a client about a problem they had in integrating EF Prof to their application, when my caught the following code base (anonymized, obviously):
public static class ContextHelper { private static Acme.Entities.EntitiesObjectContext _context; public static Acme.Entities.EntitiesObjectContext CurrentContext { get { return _context ?? (_context = new Acme.Entities.EntitiesObjectContext()); } } }
That caused me to stop everything and focus the client’s attentions on the problem that this code can cause.
What were those problems?
More posts in "Find the bug" series:
- (29 Feb 2016) When you can't rely on your own identity
- (05 Jan 2016) The case of the degrading system–Answer
- (04 Jan 2016) The case of the degrading system
- (11 Sep 2015) The concurrent memory buster
- (20 Apr 2011) Why do I get a Null Reference Exception?
- (25 Nov 2010) A broken tree
- (13 Aug 2010) RavenDB HiLo implementation
- (25 Jul 2010) Accidental code reviews

Comments
Comment preview