576 reputation
27
bio website
location
age
visits member for 2 years, 2 months
seen Apr 16 at 18:19

Mar
23
comment How to create a Web app that “interacts” with email?
Do remember that anyone can spoof the from field, so you shouldn't design a system this way if there's any potential for benefit by third parties, or potential for serious harassment to your clients. If there is, you probably need something more secure than email.
Nov
18
comment Can you explain me why multiple threading need lock?
The quote looks much more applicable for threads to me (with the words/characters being printed out of order due to threading issues). But there's currently an extra "s" in the output, which suggests the code has three problems.
Nov
18
comment Can you explain me why multiple threading need lock?
I've updated my answer to address some of these concerns: yes, you can make the operation atomic, but no, even on architectures that support it, it won't be atomic by default, and there are situations where atomicity isn't enough and full serialization is needed. Locking is the only mechanism I'm aware of for achieving full serialization.
Sep
4
comment Should interfaces extend (and in doing so inherit methods of) other interfaces
The usual language is that an interface "extends" its parent, and (in doing so) "inherits" the methods of the parent interface, so I'd recommend using "extend" here.
May
13
comment What is meaning of a HINT when used in software engineering?
@AaronAnodide I'd say the answers you've gotten are good enough to justify keeping the question: it makes the internet better for anyone else that wonders whether "hint" has a special meaning in software engineering, and looks for a definition.
Apr
16
comment Strategies for avoiding SQL in your Controllers… or how many methods should I have in my Models?
-1 for "There's no correct way to do this". There are several correct ways. Doubling the number of methods when you add a feature as the OP was doing is an unscalable approach, and the alternative suggested here is equally unscalable, just with regard to database size rather than number of query features. Scalable approaches do exist, see the other answers.
Feb
22
comment When is it not appropriate to use the dependency injection pattern?
SRP = single responsibility principle, for anyone else wondering.
Feb
22
comment When is it not appropriate to use the dependency injection pattern?
There wouldn't be so much cost to having an extra constructor used for testing only that allows the dependencies to be injected. I'll try to revise what I said.
Feb
22
comment When is it not appropriate to use the dependency injection pattern?
You misunderstand, I'm not talking about when you inject a mock, I'm talking about the real code. Consider class A with dependency B, which in turn has dependency C, which in turn has dependency D. Without DI, A constructs B, B constructs C, C constructs D. With construction injection, to construct A, you must first construct B, to construct B you must first construct C, and to construct C you must first construct D. So class A now has to know about D, the dependency of a dependency of a dependency, in order to construct B. This leads to excessive coupling.
Feb
11
comment Why do variables need a type?
You're right, static/dynamic is what I should be using here, fixed.
Feb
11
comment Why do variables need a type?
I'm pretty sure the closest you can get is C#'s var, where the type is still determined statically, but you don't have to spell out what the type is. That said, for clarity reasons, it's usually better to say the type explicitly in C#, since it means you can easily see the type of the variable when you have to modify your code six months down the line.
Feb
11
comment Why do variables need a type?
In most languages that I'm aware of, whether statically or dynamically typed, 10 + "10" is valid code. It's valid in Java, C#, VB.net, JavaScript...only one I'm sure it's not valid in, off the top of my head, is C.
Feb
11
comment Why do variables need a type?
I've given an example above in which you can't know the types of the objects statically...depending on the path of execution, the type of object stored in a variable with no type information can be different. You can have a language like C# where the compile-time type information can be inferred, but, so far as I know, there's no language with both static type-checking and truly typeless variables, the computational complexity of the static analysis is likely too great.