Reputation
23,363
Top tag
Next privilege 25,000 Rep.
Access to site analytics
Badges
11 52 81
Newest
 Nice Answer
Impact
~843k people reached

Feb
6
answered Encrypted content in games
Jan
13
comment Is it effective to review code in language I don't know?
You say you are being asked to do so. The person asking you thinks that you performing this task will add value to your organization. If you want to know what the nature of that value is ask that person, not strangers on the internet! We don't know what is going on inside that person's head. Perhaps the code is of such low quality that even novices can find problems. Perhaps the code is of such high quality that you will learn good habits from it. Who can say? Someone thinks it is of value; ask that person what the value is.
Jan
13
comment What does it mean to declare a volatile variable?
There are some subtle problems here. One subtle problem is that you've characterized volatile reads as a characteristic of the variable when in fact they are a characteristic of how the variable is accessed. If we have the variable i and the value pi = &i, then x = *pi does a read from i, but that read is not guaranteed to have volatile semantics.
Jan
8
comment Does this class design violate the single responsibility principle?
It's not so much whether this is a violation of the SRP as whether it is good modeling at all. Suppose I am an employee. When I ask my manager if it's OK with him if I take a long weekend to go skiing, my manager does not add holidays to me. The code here does not match the reality it intends to model, and therefore is suspicious.
Jan
6
comment Should I avoid using unsigned int in C#?
To address your specific example, I would not have a property called Age in the first place. I'd have a property called Birthday or CreationTime or whatever, and compute the age from it.
Dec
15
answered Should conditional logic be always coded via type system where possible?
Dec
15
comment In C#, what is the benefit of assigning a class variable to an interface variable before calling any methods?
C# has been cleverly designed so that the kind of implicit conversion you are describing is difficult or impossible. If an object is convertible implicitly to an interface, it implements that interface. The principle here is that reference conversions preserve referential identity.
Dec
15
comment Does a C# event have to have an object type as its first parameter?
@user2410532: You can do lots of things to objects without casting them. You can interrogate their types. You can put them in a collection of objects. You can turn them into strings. You can compare them for referential or value identity to other objects.
Dec
15
answered Does a C# event have to have an object type as its first parameter?
Dec
15
comment Does a C# event have to have an object type as its first parameter?
@user2410532: If you have a second question, your best bet is to post a second question.
Dec
15
revised Call base inside overriden method
added 8 characters in body
Dec
10
comment Does the usage of LINQ and Lambda Expressions lead to less readable code?
@Quandary: Your first point is well taken; there is a tradeoff between making scoping rules that encourage desired user behaviour and making the equality operator symmetric; the former won. I agree that it would be nice to have syntax for more kinds of joins, but I've always found the "left", "right" and so on nomenclature confusing. I think we could do better.
Dec
7
awarded  Nice Answer
Dec
7
comment Can someone give me a good definition of the term “business logic”?
@MikeNakis: Are you telling us that game developers are not in the business of writing games? "Business logic" doesn't mean papers and paycheques, it means the logic of the business that you are in.
Dec
4
revised I understand what a stack pointer is - but what is it used for?
added 3 characters in body
Dec
4
answered I understand what a stack pointer is - but what is it used for?
Dec
4
comment I understand what a stack pointer is - but what is it used for?
Your assertion that structured programming without a stack would be impossible is false. Programs compiled into continuation passing style consume no stack, but they are perfectly sensible programs.
Nov
25
awarded  Nice Answer
Nov
16
awarded  Great Answer
Nov
5
revised Why don't languages include implication as a logical operator?
added 186 characters in body