Reputation
55,118
Next tag badge:
228/100 score
19/20 answers
Badges
10 156 242
Newest
 c#
Impact
~1.7m people reached

2h
comment Add GPL to an existing application
@Rat2000: Edited.
2h
comment Add GPL to an existing application
One thing to be aware of: the GPL is often seen as the "default" open source license, but it carries a lot of political baggage with it. It's been deliberately designed for a very specific purpose: to proclaim that all proprietary software is inherently evil and to attempt to use the force of law to make the development of proprietary software more difficult. If you agree with this philosophy, go ahead and use the GPL. If you just want to publish your code as open-source so others can use (and help contribute to) it, I'd suggest looking at other options as well.
1d
comment Strategy to avoid running out of memory in memory intensive application
@John: Define "installation". There are a handful of RDBMSs that work just fine as "embedded databases", where it's just another project DLL and the database is just another data file your project accesses, with no installation or configuration needed and no server to set up. My personal favorite is Firebird, but there are several that can work this way. Would your boss be more amenable to that?
Aug
21
comment Is macros support in a programming language considered harmful?
What is the difference you are trying to draw here between "the language" and "the compiler"? C's macro system is defined in the language standard, Lisp's macros are, in fact, expanded by the Lisp compiler, and any language implementation is defined, when all is said and done, by the compiler and the standard libraries. Therefore, the phrase "separate from the language and built into the compiler" is nonsensical. Perhaps the distinction you're searching for is that C macros are implemented in the compiler front-end, and Lisp macros on the back-end?
Aug
21
comment In what situations would it be technically 'impossible' to release a system as open source?
@cmaster: Sure, I was just pointing out that punch cards had been around for a long time before either Hollerith or electrical machinery.
Aug
21
comment In what situations would it be technically 'impossible' to release a system as open source?
@DavidThornley Punch cards were invented in 1725 for the control of textile looms, as an improvement on existing, similar technology. They were first used for numerical processing in 1832, and Charles Babbage, in 1837, proposed using them in a hypothetical computing device that never actually got built. Hollerith, who used them for the 1890 US census, was more than a century and a half late to the party.
Aug
20
comment Clean Abstract Syntax Tree
How do you figure? I've never actually experienced pain with that; the "pain" comes from inherent complexity in the task being performed. In any given stage of the pipeline, either the processing can require that the current stage's processing already be complete on a different node, or it can't. In the latter case, mutability of the AST is irrelevant; in the former, you have to stop what you're doing, look up the other node, and process it either way. If the tree is mutable, you store your results in-place on the tree and return the value; with immutability, that task becomes more complex.
Aug
20
comment Clean Abstract Syntax Tree
-1, because 1) mutable state is not hard to reason about--programmers do it successfully all the time--and 2) your "alternative" is a distinction without a difference, except that the "replace the tree with an altered copy" version is even more complicated and has more moving parts. The only advantage it can even theoretically have over mutable state is if your AST processing is processing multiple subtrees in parallel, which is almost certainly a bad idea in a compiler backend for various reasons that should be intuitively obvious to anyone with experience in that area.
Aug
17
comment Is CType() ever the preferred option?
@Ampt: If metaprogramming is an "edge case", you're doing it wrong. :P
Aug
14
comment Why is there no WSDL type support for Web Api?
@RobertHarvey: SOAP isn't deprecated so much as discredited: it doesn't need to be officially Not Recommended by whoever created it for those in the know to know to recommend against it.
Aug
11
comment Why not just make non-parameterized queries return an error?
@Frisbee: Pride goeth before the fall. The reason why decades-old errors like SQL injection and buffer overruns keep getting exploited over and over and over is because they're way too easy of mistakes to make, even for "big boys" who do know better. (Just look at Heartbleed. It was caused by an amateur mistake, but the coder who made it was no amateur!)
Aug
11
comment Why not just make non-parameterized queries return an error?
@jwenting: That's exactly the use case where I specifically said there should be an opt-out for. Your interactive prompt (or SQL management tool) would set that so you can run ad-hoc queries in peace.
Aug
11
comment Why not just make non-parameterized queries return an error?
@amon: The whole point is not to allow that, because even if it's "OK" in its current form, how do we know that in the next update, the requirements won't change and allow the status value to come from user input?
Aug
11
comment Why not just make non-parameterized queries return an error?
If your solution for "it's all too easy to forget--or not know in the first place--to use parametrized queries" is "make everyone remember--and know in the first place--to use stored procs", then you're missing the entire point of the question.
Aug
11
comment Why not just make non-parameterized queries return an error?
@amon: Try to catch that? Easy: if (WhereClauses.OfType<BinaryExpression>().Any(be => !IsParameterized(be))) NeedParameterizedQueryError(); Why is that supposed to be difficult to catch?
Aug
7
comment What's the difference between stateful and stateless?
@jgauffin: Performant is the wrong word here. Stateless is less performant since you don't have the opportunity to cache state and have to look it up repeatedly. What it is is more scalable; that's where the load balancing comes in, and the gains from scalability can offset the losses in performance when your system gets big enough.
Aug
6
comment Is type safety worth the trade-offs?
Ugh. Whoever wrote that blog post has no idea what he's talking about half the time. When someone starts off with a ridiculous premise like "compilation is premature optimization," everything that builds upon that premise can almost certainly be safely ignored.
Aug
4
comment What was the reason for the creation of boolean variables?
@JörgWMittag: For the same reason C moved away from so many other things that Pascal got right before C got them wrong: it was created by a hack who cared more about painting a smiley-face over assembly and calling it a high-level language than about actual tested-and-true good language design.
Jul
26
comment Why does C# have both out and ref?
@Random832: As Robert posted under his answer, have a look at Eric Lippert (former C# compiler guy) discussing this at stackoverflow.com/q/2876315
Jul
26
comment Why does C# have both out and ref?
@Neo: Basically what I said in the answer: It communicates that you don't care about using this for input, and thus it's safe to pass an uninitialized value to an out param because the function receiving it isn't going to read from it.