384 reputation
314
bio website
location
age
visits member for 3 years, 9 months
seen 12 hours ago

Jan
26
comment Throw exception or let code fail
I'd probably remove the guard and do the Add in a try catch, where I throw whatever exception with a good message, and use the Adds exception as my exceptions inner.
Jan
3
comment Why did memory-managed languages like Java, Javascript, and C# retain the `new` keyword?
@JeffO that's not always true blogs.msdn.com/b/ericlippert/archive/2009/04/27/…
Jan
3
comment What would be good factual arguments to convince high level management to consider functional programming?
Businesses are also concerned about hiring people, so if its harder to replace a functional dev i'd say that's a good reason for them to be involved in such decisions.
Jan
3
comment What would be good factual arguments to convince high level management to consider functional programming?
Except that many OOP languages support functional programming as well, so you can use the functional aspects with throwing the baby out with the bath water.
Jan
3
comment What would be good factual arguments to convince high level management to consider functional programming?
@Jules no need to work around that, just open a command prompt a do dir /x and use the 8.3 name in your path instead of the long form with a space.
Dec
31
comment Is there a constant for “end of time”?
@StephenC it depends heavily on the use case. A work order system would almost certainly never need to allow a date in the year 4000, and so using something like .nets DateTime.MaxValue would be appropriate and would not require any special coding except on the class that represents a work order, no custom comparer classes required. You can even let the db do the sorting with no special code. My point is that sometimes null is the right answer and sometimes a magic number is, and a blanket always do X is not good advice, it really depends on the use case.
Dec
30
comment Is there a constant for “end of time”?
@StephenC That's not a great argument for using null. What if you have something like completion date and when you sort you expect the items not completed to sort to the end, if you sort by completion asc? To do the sort you'll need to know if null should be considered greater or less than actual values; in the case choosing a magic number is an appropriate way to go.
Dec
25
comment How did OOP evolve to include the notion of Properties
@FrankHileman What is so hard to understand that the statement that "Properties in C# are nothing more than language-supported syntactic-sugar" is wrong? Seriously, where did I say anything about OOP? I'm just refuting that one statement which is clearly wrong.
Dec
24
comment How did OOP evolve to include the notion of Properties
@DeadMG Irrelevent; you can't databind fields in C#, and your answer isn't talking about java, its talking about C#, so your statement that "Properties in C# are nothing more than language-supported syntactic-sugar" is nonsense.
Dec
24
answered Clients connect to WCF or SQL Server
Dec
24
comment How did OOP evolve to include the notion of Properties
They are not just syntax sugar in C#, they exist in the assembly metadata as distinct members and you can do things with properties you can't with fields, such as databinding.
Dec
22
comment Is reinventing the wheel really all that bad?
Having full control also means paying the costs to maintain your custom wheel.
Dec
2
comment Should I avoid using 'break' during a coding interview?
Use of VI or emacs is a preference which in the end doesn't impact program behavior, likewise for single return or not; JS' SCI in fact does lead to changes in program behavior which surprise many (the return without a ; follow by the return value, which doesn't do what many expect). Lumping in the JS SCI is extremely misleading in you answer, and bringing it up in the context of other personal preference choices does NOT illustrate your point.
Nov
30
comment Should I avoid using 'break' during a coding interview?
Use of semicolon in JS is not just a matter of preference, incorrectly omitting them can cause your program be incorrect. inimino.org/~inimino/blog/javascript_semicolons
Nov
29
comment Should I accept empty collections in my methods that iterate over them?
@Craig I really dont get what people are missing here; all I said was this as a hard and fast rule isn't good, and there are cases were it might be appropriate to throw instead of return normally. I dont even get why the answerer threw in utility method and then when on from there. As far as pushing for patterns for the sake of it, that is a terrible idea, its actually an antipattern. Patterns should be used when they fit, and you should not force a pattern onto a problem that doesn't quite fit. In other words, this job requires THINKING.
Nov
27
comment Why is there no WSDL type support for Web Api?
This doesn't answer the question.
Nov
27
comment Efficient algorithm for Virtual Machine(VM) Consolidation in Cloud
This belongs on seeverfault
Nov
27
comment Should I accept empty collections in my methods that iterate over them?
@itsbruce You seem to think I dont understand that point, I do. But there are cases where the compositbility is less important than having no data, which is why I'm saying "it depends"
Nov
26
comment Should I accept empty collections in my methods that iterate over them?
@Telastyn Yes, and that's the only type of method the answer covers; it doesn't discuss at all any other option.
Nov
26
comment Should I accept empty collections in my methods that iterate over them?
@Telastyn Sorry, but where did the OP say he was writing a general utility method?