Reputation
17,029
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
2 33 67
Newest
 algorithms
Impact
~545k people reached

18h
comment Why use an opaque “handle” that requires casting in a public API rather than a typesafe struct pointer?
@JonathonReinhart and actually reading that link I see that for "totally opaque objects" it is allowed. (chapter 5 rule a)
18h
comment Why use an opaque “handle” that requires casting in a public API rather than a typesafe struct pointer?
@JonathonReinhart he's typedefing the pointer to struct not the struct itself.
1d
comment Why ? Constructors cannot be declared as final?
What do you expect from a final constructor vs. a non-final constructor?
Aug
24
comment How to make sure people call methods in the right order?
regex won't be enough to verify nesting (even if you get around the extra problem you will introduce).
Aug
23
comment Why do some programming language executables end in “w?”
javaw is for without console
Aug
21
comment How to calculate min/max values of floating point numbers?
anything wrong with a<b?a:b and a>b?a:b
Aug
21
comment Collections.sort question
You can replace LCTile::getCoordinate with any other function that will take a Tile and return it's matching Coordinate. This could be a function in Board. However it's more efficient to put it in Tile.
Aug
18
comment Using a distributed system as an alternative to disk storage
a roundtrip over network is slower than roundtrip to the local disk especially when congested. Also data density of a magnetic platter is higher than DRAM.
Aug
16
comment How does Luhn algorithm relate to cryptograpic hash functions?
on wikipedia: " It is not intended to be a cryptographically secure hash function; it was designed to protect against accidental errors, not malicious attacks."
Aug
12
comment Is there any practical way for a linked node structure to be immutable?
@Carcigenicate there is a doubly linked list implemented for java.util.LinkedList. but that uses mutable nodes.
Aug
12
comment Is there any practical way for a linked node structure to be immutable?
@Carcigenicate no I'm saying that it's a mistake to try and fit a singly linked list with immutable nodes into the mold of java.util.List
Aug
12
comment Is there any practical way for a linked node structure to be immutable?
Creating a class according to an interface that doesn't match the underlying data structure/algorithm is a invitation to pain and inefficiencies.
Aug
3
comment How to avoid circular patterns in Node?
The simple (X) fix is to just return the cleaned data and call doSomethingElse from module2
Jul
19
comment rand() gives same numbers again for a small range
rand() is a bad RNG
Jul
16
comment How do I prevent a long running SQL query from looking stuck?
optimize the query so it doesn't take 10 minutes
Jul
16
comment How to handle OSS license on GitHub with non-OSS pictures
This may be better handled on opensource.SE
Jul
15
comment Why use a unique hashkey for form submissions?
That article is unrelated to what your boss wants, he wants you to implement a session key of sorts.
Jul
15
comment Fast fixed-size (256 bit) integer modulo/division
find a existing bigInt divide and optimize for your case?
Jul
15
comment Why use a unique hashkey for form submissions?
that article is about the hashCode method in java to provide correct behavior in the hash based sets
Jul
15
comment Missing super class from dependencies could throw NullPointerException java
My gut says it should throw a ClassNotFound when trying to load the class with the missing parent.