3,725 reputation
1334
bio website heinzi.at
location Vienna, Austria
age 34
visits member for 2 years, 8 months
seen 4 hours ago

4h
comment What is meant by a primitive data type?
...and the wink illustrates the (obvious) implication that his definition of a primitive type is not particularly in the context of C#.
4h
comment What is meant by a primitive data type?
@barlop: My comment starts with "Then...", so please read it in context: Josh said that by his definition, C#'s int is not a primitive type, and I replied that, in that case ("then"), none of C#'s types were primitive, since none meets his definition of primitive.
Jan
29
comment Are classes with only a single method a problem?
Related (almost a duplicate): programmers.stackexchange.com/q/175070/33843
Nov
21
comment Dictionary of objects
Due to floating-point inaccuracies, I'm not sure if double is a wise choice for a dictionary key.
Nov
12
comment In retrospect, has it been a good idea to use three-valued logic for SQL NULL comparisons?
@DanielB: That was exactly the point of my question: From a mathematical point of view, it all makes perfect sense. However, from a practical point of view, does it really make life easier for developers?
Nov
7
comment In retrospect, has it been a good idea to use three-valued logic for SQL NULL comparisons?
PS: I know that this borders on "too broad" and "opinion-based", but I've tried to make it as answerable as possible. It is not meant as a rant, but as a genuine question.
Oct
21
comment I've been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional?
Nice idea! One drawback: In your example, validation is actually performed twice: Once during Validate (returning False if invalid) and once during Save (throwing a specific, well-documented exception if invalid). Of course, the validation result could be cached inside the object, but that would add additional complexity, since the validation result would need to be invalidated on changes.
Sep
12
comment Hiding query strings logically?
@ratchetfreak: Please elaborate. I'm quite familiar with web.config, yet I do not see the relevance of your comment to the question.
Sep
12
comment What can multiple threads do that a single thread cannot?
@ColeJohnson: A deadlock is an implementation detail. The visible output is "not halting", which is easily doable with a single thread.
Jul
25
comment How to develop line-of-business tablet apps as a .NET developer?
@Jetti: It might interest you that, for performance reasons, your option 1.) was the one successfully used in the end (after trying a HTML-based solution).
Jul
20
comment Why do CSV file formats normally use quoting instead of escaping?
I'm not sure it would be easier: For example, in foo,bar,foo\\,bar, the last comma would be a field separator.
Jun
12
comment If the model is validating the data, shouldn't it throw exceptions on bad input?
+1, I'd much rather have a descriptive ValidationException than going back to the dark ages of having to check the return value of every method call. Simpler code = potentially less errors.
Jun
10
comment Responsibility to reproduce bugs
So if an app crashes "every now and then", without dicernible pattern for the user, then the developer does not have to fix it because the user cannot reproduce it on command? I strongly disagree here...
May
4
comment I should have used a factory method instead of a constructor. Can I change that and still be backwards-compatible?
+1, nice option. I still prefer option 2, though, since it allows me to access XmlDataSource-specific functionality by explicitly instantiating XmlDataSource.
Apr
29
comment I should have used a factory method instead of a constructor. Can I change that and still be backwards-compatible?
@pdr: 1. Every change to method signatures has to be made at one more place. 2. I can either make the Impl classes inner and private, which is inconvenient if a client wants to access specific functionality only available in, e.g., an Xml data source. Or I can make them public, which means that the clients now have two different ways of doing the same thing.
Apr
16
comment Why is String immutable in Java?
Technically, it's not a duplicate, but Eric Lippert gives a great answer to this question here: programmers.stackexchange.com/a/190913/33843
Apr
15
comment Do Windows mail clients actually care about the MIME type of binary attachments?
@Oded: Exactly, and that's the whole point of the question: Is there a Windows mail client out there in the wild that actually needs the correct MIME type?
Apr
15
comment Do Windows mail clients actually care about the MIME type of binary attachments?
Thanks, that's a valid point. I'll leave the question open for now, though, since I'm still curious whether there actually is "an implementation that it doesn't work on".
Apr
6
comment Why it is not possible to Instantiating Types with Wildcards in Java
What do you want to achieve? If you want a linked list that accepts any kind of object, new LinkedList<Object>() is the correct thing to do.
Apr
2
comment What to do when a client asks for something unreasonable (from my point of view)
@StephenOrr: Very good point. Ideally, one should not change the terms of the contract but clarify what was implicitly agreed upon when the contract was made. It will be neither "every browser ever made" nor "only brand-new browsers" -- this will need to be negotiated. In the end, the OP will probably have to support every browser with a significant market share.