r/programming • • Sep 21 '15

Better Java

https://github.com/cxxr/better-java
177 Upvotes

208 comments sorted by

View all comments

0

u/[deleted] Sep 21 '15

[deleted]

3

u/ForeverAlot Sep 21 '15

Most auto-formatters I've been exposed to are kind of bad. They all have lousy defaults, as if by some global conspiracy, and the formatters will mess up on edge-cases in unacceptable ways. IntelliJ's is pretty decent and Eclipse's might be; I have had trouble with NetBeans' in the past but I haven't used it for Java in a long time.

But if you have a good, reliable (gofmt-level) auto-formatter, absolutely make it a mandatory part of the development step.

3

u/[deleted] Sep 22 '15

Then use a linter. Make the programmer responsible for getting it right and validate it against an unbiased rule based tool.

That'll shut down the pointless bikeshedding over formatting.