1,010 reputation
513
bio website
location
age
visits member for 2 years, 7 months
seen 4 mins ago

Mar
24
comment Immutable vs Read-only vs Unmodifiable naming difference
I like the Cocoa standard of classes being implicitly immutable and you would denote the mutable versions, for example NSArray vs NSMutableArray.
Mar
24
comment Sometimes, “programming to interfaces” introduces possible (and avoidable) runtime exceptions?
@ArturoTorresSánchez .net has its own goofiness like System.Array implementing IList
Mar
21
comment Domain names vs URL path for web services
Do these services need to be hosted on the same machine? You would lose a lot of scalability doing so.
Jan
31
comment What is a better design a light weight user or a heavy weight heavy user model?
Without qualifying what constitutes 'better', I must disagree with this answer as the decision on which fields to include in a model depends on the context(s) in which that model will be used.
Jan
24
comment Throw exception or let code fail
Doing the extra check can perhaps add a race condition if _Materials can be modified by more than one thread. I like the suggestion that @MarcvanLeeuwen gives.
Jan
8
comment Why do browsers clamp timeouts and intervals?
The important thing to note that usually things like setTimeout it means the minimum amount of time to wait. In practice, there's no guarantee that your callback will be called in the set amount of time, or at all.
Jan
8
comment Repository pattern without entity framework?
Repositories are a way to abstract what gets saved with how it gets saved. You could make an implementation that saves using EF, nHibernate, Ad-Hoc SQL, Stored Procedures, NoSQL databases, CSV files, binary blobs, In-Memory, etc.
Jan
6
accepted Unit testing a template class after refactoring
Jan
6
comment Unit testing a template class after refactoring
Thanks, this confirms what my presumptions were already. For testing the DoesPasswordMatch method, I would probably go with unsealing the implementation and creating a new derivative.
Jan
6
asked Unit testing a template class after refactoring
Jan
4
comment Two classes that behave identically yet are semantically different
Thanks for this answer, this solves the problem with a minimal amount of re-engineering.
Jan
4
accepted Two classes that behave identically yet are semantically different
Jan
1
asked Two classes that behave identically yet are semantically different
Dec
16
comment How to define “or” logically
You could use the ternary operator return arg1 ? arg1 : arg2;
Oct
31
comment Looking for encryption method
"This database contains some data I don't want the user to tamper with, so the idea is obvious - encrypt the data file", this sounds like you can use message authentication (MAC) instead of encryption, that is you don't care if people can read the data. Encryption doesn't mean that you can't tamper with data, it means you can't read it. If I flip some bits in the encryption data, and try to decrypt, it will likely decrypt but be incorrect.
Oct
31
revised Is this extension method any better than just casting to an int?
added 3 characters in body
Oct
31
answered Is this extension method any better than just casting to an int?
Oct
24
comment Is it a good practice to run unit tests in version control hooks?
I agree, this is what a build server is for. Your source control is for managing source code, not ensuring your application works.
Oct
23
comment Code that converts a value into a different representation, then converts it back to where it started is bad, but how?
decimal myValue = decimal.Parse(dataReader["myColumn"].ToString()) is a pet peeve of mine.
Oct
17
awarded  Notable Question