14,262 reputation
22556
bio website
location
age
visits member for 3 years, 8 months
seen 47 mins ago

1d
comment Software previously licensed under GPL now APL2, can I use it in a commercial application?
@BasileStarynkevitch edited to make clear it's about copying from old version
1d
comment When to fix something that is “wrong” but works fine
@durron597 I meant as the implementation of the synchonizedFormatter
2d
comment How to politely decline a pull request?
If it is totally useless just decline, otherwise change the pull to clarify what is needed and accept.
2d
comment Why Double.parseDouble(“ABC”) not returns Double.NaN?
add long, char, short, byte and boolean then it's 6v2
2d
comment Why Double.parseDouble(“ABC”) not returns Double.NaN?
Because ABC is not a valid format of number and it matches the behavior of the other boxed classes' parse* methods
Jan
27
comment How shall I handle event loop exceptions?
some would just let the application crash
Jan
26
comment Is it possible to make some methods invisible/non-usable to some classes in Java?
@paul but when it does go wrong you can then shout at the guilty party.
Jan
26
comment Is it possible to make some methods invisible/non-usable to some classes in Java?
it's called "trust in your team mates"
Jan
25
comment Should a lockfree queue use a condition variable?
@VF1 it lets the enqueuer skip signaling if the lock is already held at the danger of a missed signal for a dequeuer.
Jan
25
comment Should a lockfree queue use a condition variable?
@VF1 if there are items in the queue then they shouldn't even be touching the lock (or thread::yield).
Jan
25
comment Should a lockfree queue use a condition variable?
@RobertHarvey the consume_one implementation is very likely just T t; if(pop(t)){functor(t);return true;}return false;
Jan
25
comment Should a lockfree queue use a condition variable?
@RobertHarvey check the description, non-blocking and "returns true, if one element was consumed"
Jan
22
comment Using streams to connect programming languages
you just need to connect the right sockets together.
Jan
22
comment Mathematically correct A* heuristic / distance estimator for a latitude / longitude graph
I was taught that an acceptible estimator just needed to have d*(A,B) < d(A,B), There are some nicer properties for monotonic heuristics d*(A,F) < d(A,B)+d*(B,F) but non monotonic work just fine.
Jan
22
comment Mathematically correct A* heuristic / distance estimator for a latitude / longitude graph
@Ordous except on earth scale a second (1/3600 of a degree or 5*10^-6 radians) is ~30m , it all depends on the scale
Jan
20
comment Is address 0000000C a special address?
@ElderBug windows rounds up the page size to 64 kB (probably to make the page table smaller)
Jan
20
comment Insertion sorting Algorithm comparison
quicksort is actually O(n²) worst case, it does have O(n log n) average case with better (hidden) factors
Jan
18
comment sorting / merging hashtable
@delnan he didn't give a relation just "lots" per bucket; log m or log n is way better than his n² either way;
Jan
18
comment sorting / merging hashtable
no building the heap is O(m*log m) then popping and reheapifying is log(m) each time N times so total time will be O(n*log(m) + m*log(m))
Jan
13
comment How do you pronounce 'char' keyword?
I use a third option of using a ç