Reputation
3,284
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
2 9 23
Newest
 Nice Answer
Impact
~102k people reached

Nov
15
comment Is recursion a bad idea for large input sizes due to the limited call stack size?
Tail recursion only works in very specific cases, typically those where a loop would be just as readable (if not more) as recursion.
Nov
15
comment I'm graduating as a CS major from a bad CS program. How can I catch up? How can I get over it?
Do you want to be a compute scientist, or a programmer?
Nov
12
comment Is using for loop syntax for a “with(variable)” block an anti-pattern?
Why not simply a local variable in a nested scope?
Nov
12
comment why are iframe-s so useful in HTML5 WYSIWIG applications?
Since the editor has full control over the content of the iframe, no javascript or css defined by the website will interfere with its function. (It's probably possible to use Shadow DOM to achieve a similar effect, but that's rather newfangled.)
Nov
12
comment why are iframe-s so useful in HTML5 WYSIWIG applications?
Perhaps because it serves as a css reset.
Nov
10
comment Maintain hundreds of customized branches over master branch
Related question: Pre-processor usage to separate logic to different versions of product
Nov
9
comment How to deal with constructors in large data classes
"Optional values in data classes should not be passed in via the constructor" -- There isn't really an alternative to constructors, if you want immutability. Of course one can prettify the code by using builders, pseudo-mutators or compiler level syntax sugar, but all of these boil down to passing all independent properties to a constructor. The first point, that you should avoid too many properties in the first place, remains valid.
Nov
9
comment How can regular expression be ambiguous?
@JimThio No. * matches as many repetitions as possible. . and > are completely irrelevant for this.
Nov
9
comment How can regular expression be ambiguous?
* is greedy, i.e. it tries to match as much as possible. *? is lazy and tries to match as little as possible.
Oct
28
comment Why is the minus sign, '-', generally not overloaded in the same way as the plus sign?
For sets (and multi-sets) subtraction makes sense, because unlike sequences, the order of the element doesn't matter.
Oct
27
answered C# Abstract math classes from libraries
Oct
27
comment C# Abstract math classes from libraries
My first thought is to use Microsoft's implementation System.Numerics.Vectors and convert to the other representations as needed.
Oct
21
comment What's the best/most efficent way to create a semi-intelligent AI for a tic tac toe game?
You should include filling a winning line as first step in that algorithm.
Oct
17
comment Efficient way to store large number of image path per record into a database table?
Looping over 40k elements once per second is something I'd avoid. Once per day sounds completely harmless.
Oct
16
comment What is the best way to horizontally scale .Net back-end applications?
@PaulG I'd first try to asking about the concepts here. But perhaps that would still be considered too broad. Then after you figured out what you need, you could ask on Software Recommendations about existing tools matching your requirements.
Oct
16
comment What is the best way to horizontally scale .Net back-end applications?
@gnat While I agree that this is probably off-topic, I disagree that this specific rule applies here. This is a question about which technology will solve a particular problem, not a "what should I learn" question. If you interpret the question as asking which concepts to use for this scaling instead of which existing tools, it could even be on-topic here.
Oct
16
comment Generate a fixed length number hash from a number
What security goals do you have? Hashing to 6 decimal digits is easy, but I have severe doubts that what you're trying to do is secure. Such a short hash can be neither collision nor pre-image resistant.
Oct
15
comment When designing input interfaces for a library, when to use data class rather than data interface?
It'd either use interfaces or projection functions. Or possibly the interface as the default projection function. But that doesn't really work will if the object is supposed to be mutable.
Oct
15
comment When designing input interfaces for a library, when to use data class rather than data interface?
1) You can have more than one generic constraint, wheras C# doesn't support intersection types. 2) With ClusterByFeature(IDataTypeB, Func<IDataTypeB, double>) the user defined function gets passed the interface. It benefit from receiving the concrete type instead. But you didn't specify enough context to really analyze your problem.
Oct
15
comment Interface Implementation: A parameter I don't need
Why can't this method apply paging after it has retrieved all results? That might not be the most efficient approach, but it conforms to the interface.