561 reputation
133
bio website codepark.blogspot.com
location
age
visits member for 3 years
seen Mar 17 at 22:53

Aug
11
comment Why the question “give five things you hate about C#” is so difficult to answer during an interview?
I guess many people simply really like C# and consider it to be the best mainstream language. If you compare C# to Java, C, C++, Python, PHP, VB, the number of useful language features is extraordinary. All the things you mentioned are only small flaws (or not flaws at all). "The lack of support for units of measure" - do you really hate c# for that?
May
6
comment Should one check for null if he does not expect null?
@MichaelEdenfield: I don't think that counts as real handling according to the given question (our goal is not to make your code work no matter what). To be honest, I often forget to write appropriate block that will throw if null is passed. However, I consider throwing NullArgumentException to be the best practice and the worst practice in my opinion is writing code that cannot handle null but instead of throwing exception returns e.g. another null as a method result (or empty string, or empty collection, or -1, or skips method execution if return type is void, etc.).
May
6
comment Should one check for null if he does not expect null?
I hope you meant: Fail early, fail fast, not often...