Reputation
24,816
Next tag badge:
84/100 score
33/20 answers
Badges
2 42 103
Newest
 Nice Answer
Impact
~1.0m people reached

1d
comment Are Interfaces with Java 8 Virtual Extension Methods the Same Thing as Mixins?
Since Java interfaces can't hold data, tasks commonly done with mix-ins in other languages can't be done via interface inheritance in Java. Ergo, to programmers used to writing mix-ins in other languages, Java does not support mix-ins.
Jul
10
comment Why is this long overflowing to -1, instead of the minimum value for the type?
So you want log_10(2^n -1) ? That's almost exactly n * log_10(2)
Jul
4
comment Clean Code: can private methods rely on member variables set by other private methods?
+1: "Only put things at the object level if they have the same lifetime as the object".
Jun
27
awarded  Nice Answer
Jun
23
comment Simple and clean way of comparing three numbers
Macros should be a tool of last resort. Definitely out of bounds for this problem.
Jun
22
answered Unit testing functions calling other tested functions
Jun
16
answered Are there any problems with defining a single-source “module” in C using conditional compilation to separate the “header” from “source”
Jun
12
comment Const and non-const methods, and possible mutable data member?
It's not necessary to explicitly cast a non-const reference or pointer to a const reference or pointer in order to call a const method.
Jun
11
comment How can I reinforce that security questions answers should not be the same and how to encrypt?
I don't have any "Security" questions on my FB or Yahoo accounts AFAIK. And I think they both are now capable of using a phone for password recovery. It's arguable whether Yahoo is still a serious company.
Jun
10
answered How can I reinforce that security questions answers should not be the same and how to encrypt?
Jun
9
comment Way to organize repetitive text in Java
N.B. "This exception throws" is incorrect. Exceptions are thrown by methods, they do not throw.
Jun
2
awarded  Enlightened
Jun
2
awarded  Nice Answer
Apr
2
comment Fixing class Hierarchy design mistakes due to incorrect inheritance
You have the tail wagging the dog. A dog's tail is Waggable. The dog is a Wagger.
Mar
22
awarded  Revival
Mar
20
awarded  Curious
Mar
8
comment Convert x and y velocity to x and y velocity relative to another point
you are over-thinking the problem. There are only two equations to apply: P' = P + V dt and V' = V + A dt. When P is moving away from G then its speed will decrease.
Mar
7
answered Convert x and y velocity to x and y velocity relative to another point
Mar
6
comment Can a Java Boolean be used for ternary (3-state) logic?
What about FILE_NOT_FOUND ?
Mar
6
comment Line intersection detection algorithm
Post an outline of what you are doing now