Reputation
2,177
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
1 7 13
Impact
~43k people reached

6h
accepted Name pattern for quickly find descendents with SQL (PATH column with [TopId]…[DirectAncestorId].[OwnId]) NO nested sets
2d
comment Is creating a new List to modify a collection in a for each loop a design flaw?
In Java there are Iterator (works as you described) and ListIterator (works as you desire). This would point that in order to provide iterator functionality over a wide range of collections types and implementations, Iterator is extremely restrictive (what happens if you delete a node in a balanced tree? Does next() make sense anymore), with ListIterator being more powerful due to having less use cases.
2d
comment Is creating a new List to modify a collection in a for each loop a design flaw?
@ElDuderino msdn.microsoft.com/en-us/library/dscyy5s0.aspx. Don't miss the You consume an iterator from client code by using a For Each…Next (Visual Basic) or foreach (C#) statement line
Aug
26
answered Explaining new or uncommon syntax in comments
Jul
26
comment ASP.NET MVC : How asp.net mvc view engine bind model and render data in html form in browser?
The framework "remembers" (or can "reconstruct") the fact that x.Name ended rendered as an input element whose id and name were "Name". When the form is submitted and the URL has a "Name" parameter, it gets assigned to x.Name. What is difficult with that?
Jul
26
revised ASP.NET MVC : How asp.net mvc view engine bind model and render data in html form in browser?
code formatting
Jul
21
comment Should client side have a log?
Only give users information about the errors/situations they may solve themselves ("your password is wrong", "You are not allowed to perform that operation"). "Connection is lost" is somewhat borderline, depending of which side has the issue. For all of the others, "Internal error" and send the log to support.
Jul
21
comment How to handle mismatched request body and content-type header?
Generic responses (without HTTP status codes) will not be understood by many clients; they will assume their message was ok and just fail to decode your answer. Worse yet, they can just send you a message and just ignore the answer ("Server answers status is 200: Ok, so my message was correctly processed; that is all I need to know")
Jul
12
comment Why can't I refer to an interface inside of generic brackets in a variable declaration?
IIRC the terms you should google are covariance and contravariance. In short words, List<String> is not an instance/subclass of List<Object> because if it were then issues arise from using the generic type instance as parameters or return types.
Jul
12
comment Is there a name for this pattern?
It is not a pattern, it is a consequence of evaluating an assignment expression with the value being assigned (instead of, say, void).
Jul
5
comment Why don't open source projects pay more attention to backward compatibility
Additionally, when I was in a business developing software for third party, testing compatibility with open source projects meant a lot of headaches because of the multitude of distros and forks. We ended settling for a policy (may it have been right or not) of just checking against the last version of several Linux versions, because "the customer can migrate to it for free"
Jul
2
awarded  Great Answer
Jul
2
awarded  Custodian
Jul
2
reviewed Approve What are the advantages of build scripts?
Jun
30
awarded  Guru
Jun
29
awarded  Good Answer
Jun
29
awarded  Mortarboard
Jun
29
awarded  Nice Answer
Jun
29
answered What are the advantages of build scripts?
Jun
27
comment Should you write your back-end as an API?
I have had to maintain a project where the logic was put in the UI layer, calling the same shared data structures. I have had to fix one bug thirty times because of that ("if we need to use the same logic again we will copy & paste! no need for an API"). Had been there a logic layer (now there is) it would have been enough with just one fix.