Reputation
1,538
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
4 8 21
Newest
 Curious
Impact
~42k people reached

Jun
12
awarded  Curious
May
13
comment Does it always make sense to “program to an interface” in Java?
@MichaelT: I didn't look at the exact abstraction he needs in this specific scenario so I used TreeMap as an example. "Program to an interface" shouldn't be taken as literally an interface or an abstract class -- an implementation can also be considered an interface.
May
13
awarded  Enlightened
May
13
awarded  Nice Answer
May
12
awarded  Stellar Question
May
8
answered Does it always make sense to “program to an interface” in Java?
May
4
comment Should we define types for everything?
You might be interested in reading about Tiny Types. I played with it for a bit and wouldn't recommend it but it is a fun approach to think about. darrenhobbs.com/2007/04/11/tiny-types
Apr
23
asked Why does the EF query plan cache eviction algorithm reduce the cache to its cleanup trigger size, causing a perpetual cleanup?
Apr
16
comment How to unit test a top level method
It's unclear to me what's unclear to you. You inject a couple of teams and rankings, determine beforehand what result should be returned and verify that it is in fact returned. Then you write another test for two teams that result in an equal match and verify equality returns the correct result. Do this for each distinct scenario. Can you specify what you're having trouble with?
Apr
16
comment Confusion about Constructors and properties
Properties are not constructors. Public is not private. An explicit backing field is not (always) an implicit backing field. Do you know the differences between these concepts?
Apr
15
comment TDD Red-Green-Refactor and if/how to test methods that become private
I don't like TDD for exactly this reason: if you're in a new area then you'll be doing a lot of extra work while trying to find out how the architecture should be and how certain things work. On the other hand: if you're in an area you're already experienced with then there will be benefit to writing the tests first aside from annoying you because intellisense doesn't understand why you write non-compilable code. I'm a much bigger fan of thinking about the design, writing it and then unit testing it.
Apr
12
comment how are virtual methods slower in C#
Can you clarify how the machine code compiler can differentiate between virtual and non-virtual methods? I don't see any indication of a difference in the accepted answer's CIL.
Apr
8
awarded  Notable Question
Apr
2
comment Why are objects instantiated this way?
It's not really about advantages or disadvantages. I wouldn't even say that there are disadvantages, since all you do is restrict yourself to a contract and if that contract isn't enough then.. well.. it wasn't the right contract in the first place. Another post on the subject: stackoverflow.com/questions/1484445/…
Mar
30
comment Safest way to use and store User's third party credentials
For a native app you can use the Windows Credential Manager by calling into native code as described here. For Windows Store Apps you can use the Password Vault‌​.
Mar
15
revised Can I update an attached object using a detached but equal object?
added 1231 characters in body
Mar
15
revised Can I update an attached object using a detached but equal object?
added 1033 characters in body
Mar
11
accepted Can I update an attached object using a detached but equal object?
Mar
11
answered Can I update an attached object using a detached but equal object?
Mar
9
comment Can I update an attached object using a detached but equal object?
I don't follow the train of thought here. Can you expand? Note that the external API is entirely out of my control.