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

Aug
20
comment How does HashSet in Java remove the duplicate elements
The HashSet compares objects by calling Object.equals(Object). The method equals(Song) does not override equals(Object).
Aug
11
comment How to design a class for a fixed-length id?
Avoid throwing Exception. C# has ArgumentException and ArgumentOutOfRangeException. Avoid exclamation points in messages unless you want everyone who reads your code to know you are a college sophomore.
Aug
9
answered How to design a class for a fixed-length id?
Aug
9
comment How to design a class for a fixed-length id?
1. System.Numerics.BigInteger
Aug
7
awarded  Nice Answer
Aug
7
answered Code review lags behind the Deliver/Test Cycle
Aug
4
comment How can the containsKey() method of a Java Hash Table be O(1)?
did you even look at the Wikipedia article for hash table? If so, what didn't you understand?
Jul
29
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
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.