845 reputation
415
bio website assylias.wordpress.com
location London, United Kingdom
age 37
visits member for 2 years, 10 months
seen Nov 28 at 12:10

My work combines statistics and programming.

  • I am the author of jBloomberg, a high level wrapper around the Bloomberg Desktop Java API
  • my blog is a combination of those passions.

Mar
7
comment What exactly is the Garbage Collector in Java?
@back2dos See for example programmers.stackexchange.com/a/149569/47845 - I did not say GC is the only option, only that it has become very efficient (BTW object pooling can actually perform worse in some cases). As for the blocking of the GC - it may or may not be an issue depending on your use case (and even that issue has been reduced significantly by modern concurrent GC algos) - if you need pure real time then yes, GC will be an issue. So I do believe that a modern GC will perform way better than what 99% developers could do by managing memory manually. There is the 1% of course.
Mar
4
comment What exactly is the Garbage Collector in Java?
Your answer maybe understates the power and performance of algorithms. Java's gc (probably other languages too) is extremely good at managing short lived objects making object allocation an extremely cheap operation. Not only does it prevent bugs but it can also improve performance vs a naive manual approach.
Feb
16
awarded  Yearling
Feb
11
comment Choosing value in SQL query vs (Java) code
If it is null final int id = rs.getInt("Id"); will throw an exception...
Feb
11
comment Thread safe GUI programming
weblogs.java.net/blog/kgh/archive/2004/10/multithreaded_t.html
Feb
10
comment equals and hashcode methods autogenerated, is it always a good practice?
Unless a class clearly documents what its equals and hashcode methods do, I would not assume anything about how instances of that class would behave in a hashset/hashmap.
Feb
9
comment Returning null or a empty value/throw exception?
See also stackoverflow.com/questions/271526/…
Feb
8
comment Whats the best way to parallel my problem using Java API
You would probably get more answer on stackoverflow or codereview.stackexchange.com
Jan
31
awarded  Enlightened
Jan
31
awarded  Nice Answer
Jan
30
comment Why are the Java 8 java.time classes missing a getMillis() method?
@AllonGuralnek Yes definitely - however the milliseconds component was important in the Date API because everything was based on a number of millis since the epoch. In the new API it is less relevant IMO. In most use cases, you either need a second precision or the best precision available (nanos). I may be wrong.
Jan
28
comment Why are the Java 8 java.time classes missing a getMillis() method?
"they can't possibly exist there because LocalDateTime is not tied to the UTC timeline" => a LocalDateTime could certainly have a getMillis method that would basically return getNanos()/1e6 - the fact that it is not an instant in time does not prevent it from having a millisecond component.
Jan
25
revised Why are the Java 8 java.time classes missing a getMillis() method?
deleted 10 characters in body
Jan
25
answered Why are the Java 8 java.time classes missing a getMillis() method?
Jan
25
comment Why are the Java 8 java.time classes missing a getMillis() method?
@RobertHarvey Most classes in the java.time package are immutable and can't be extended.
Jan
23
answered When using the Apache license, is there still a need for a Contributor License Agreement (CLA)?
Dec
12
revised Why did Java make package access default?
added 41 characters in body
Dec
2
answered Why did Java make package access default?
Dec
2
comment Why did Java make package access default?
stackoverflow.com/questions/6470556/…
Oct
16
comment Storing a value vs calling reference for repeated use in Java
@FaultyJuggler that toString() could be as simple as return someString; or it could be as terrible as String result = ""; for (String t: someHugeList) result += t;... Hence my answer: whether performance will be different or not depends. But using temporary local variables won't hurt performance - so if it is more readable too it is a no brainer.