Reputation
1,171
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
10 12
Newest
 Nice Answer
Impact
~37k people reached

  • 0 posts edited
  • 0 helpful flags
  • 15 votes cast
Jul
9
awarded  Nice Answer
Jul
9
awarded  Good Answer
Apr
23
awarded  Nice Answer
Feb
4
awarded  Critic
Jan
27
comment What is a “side effect?”
@SLott: The definition in this answer (i.e. the first paragraph) includes the clause: "outside the intended usage". I think that my comment was fair.
Jan
26
awarded  Commentator
Jan
26
comment What is a “side effect?”
@ChaosPandion: Personally, I disagree. The original example was much simpler and clearer.
Jan
26
comment What is a “side effect?”
I think that @KristopherJohnson has the clearest definition. Anything that alters that state of the program or its environment or produces a real world effect such as generating output.
Jan
26
comment What is a “side effect?”
The fact that the expression x++ modifies the variable x is commonly considered to be a side effect. That value of the expression is the pre-increment value of x; this is the non-side effect part of the expression.
Jan
26
comment What is a “side effect?”
I don't think that this is a good universal definition. Many programmers intentionally use constructs specifically for their side effect.
Jan
16
comment The Singleton Pattern
You can still have lazy initialization with a "global" object using an accessor. Many people mistake "I only want one" with "only one should ever be allowed". There's no need to harm your not-a-singleton class' testability if you don't need to.
Dec
13
comment What is the best C++ interview question?
@Gary Rowe: It depends on the role, doesn't it? If the opportunity is joining a team as a journeyman developer and they already have a "guru" then it may indicate a difficult time ahead; if the opportunity is to join and technically lead a team who have lost / need a new guru then perhaps it's a good thing.
Dec
13
comment What is the best C++ interview question?
This is a really good interview question because it tells the candidate whether it's worth coming back for another interview ;-) . If the interview really thinks that the code does result in an infinite loop (and the interviewer is supposed to be technically competent) then the candidate can safely give the "opportunity" a miss.
Oct
4
awarded  Supporter
Oct
4
awarded  Teacher
Oct
4
answered Commented short fancy code vs. uncommented longer easy-to-understand code - which is preferred?
Aug
24
comment Is it ok if I don't know C but I am good with C++?
ECMA/ECMAScript?
Aug
24
answered Is it ok if I don't know C but I am good with C++?