Readit News logoReadit News
adpreese commented on Better Java – Resources for Writing Modern Java   github.com/cxxr/better-ja... · Posted by u/networked
kilink · 10 years ago
I'm surprised he didn't mention AutoValue [1] or Lombok (using @Data and @Builder) in his section about data objects and builders. I prefer AutoValue, but both approaches cut down on a lot of the boilerplate (and they also generate sensible equals(), hashCode(), toString(), etc).

It's also kind of a nitpick, but I disagree with his preference for Guava's Maps.newHashMap() vs new HashMap<>(). I'm pretty sure the only reason those static methods exist is because pre-Java 7 didn't have the diamond operator.

[1] https://github.com/google/auto/tree/master/value

adpreese · 10 years ago
He mentions Lombok in the tools section.

And Guava's collection creation methods are part of an intense desire to not use the new key word anywhere in application code.

adpreese commented on CSV Challenge   gist.github.com/jorin-vog... · Posted by u/xatxat
adpreese · 10 years ago
I think it's usually better to do this with a reproducible script instead of manual editing in a text editor. There are too many times where the requirements change after the fact for "simple one-off" transformations.

u/adpreese

KarmaCake day104September 26, 2013View Original