4 ms·
The Java team could use EditorConfig, CheckStyle, FindBugs, ErrorProne, or other tools to enforce team rules similar to how the Go team uses tools like gofmt.
by aphexairlines 7y ago
The Java team could use EditorConfig, CheckStyle, FindBugs, ErrorProne, or other tools to enforce team rules similar to how the Go team uses tools like gofmt.
- elithrar 7y agoI think the part here is that there aren’t tools “like” gofmt - there is only gofmt. Other tools wrap it, but there’s no choice (and bikeshedding) to make.
- icholy 7y agoAlso gofmt is not configurable.
- tigershark 7y agoThere is a much better formatting tool. It’s called F#.
- aphexairlines 7y agoIf the team puts in place a code formatter/linter tool there won't be bikeshedding for them either. If they're happy to let google format their Go code they can let google format their Java code too: https://github.com/google/google-java-format https://github.com/google/google-java-format
- themoat 7y agoWe had a "discussion" on which formatter/linter to use for a different language. There were 2 choices and I bet we spend 300 man hours on nonsense. Everyone had to have their say. You can decide TO use a linter, but then you just get to argue about which linter...
- aphexairlines 7y agoThe fact that there are multiple linter tools shouldn't paralyze a group of people for 300 man hours. The Go ecosystem will eventually have choices too. For instance, I think there are a couple of different protobuf implementations for Go already.
- malandrew 7y agoIt shouldn't but it does. See Wadler's Law: https://wiki.haskell.org/Wadler's_Law https://wiki.haskell.org/Wadler's_Law
- tigershark 7y agoSeriously? If something like this happened where I work probably everyone would be let go. Sometimes I kind of envy the freedom of wasting your work time just for nothing... But honestly I still prefer to do something that helps the users rather than measure each other “manhood” in this nonsense...
- tigershark 7y agoI think that a proper IDE had this features for more than 10 years. Honestly to me it seems a huge disadvantage to have to run a command line tool outside your work environment to get the same.
- Strom 7y agoThere's a big difference between standard styling and optional styling. Yes a single team could decide on a custom style, however when you need to cooperate with other teams, it takes a lot of wasted time in politics to agree upon a style. It's also harder to read random code written by others, e.g. open source libraries. You can't just glimpse at it in the browser, you have to download the code and run it through your custom style applier.
- katabatic 7y ago> There's a big difference between standard styling and optional styling. THIS. This is not stated enough in the value of gofmt - it's the standard formatting style for everything. I've worked in Java and C++ for a couple of decades, and while every team has had its own style guidelines, and occasionally tools to enforce them, even different teams in the same organization would have difficulty understanding each other's code. The value of gofmt is that it's the only formatting standard, thus I never have to learn a new formatting style when reading the code for an open-source library, or coming in to a new job. It's exactly the same as what I've been reading for the last 3 1/2 years of working in Go.
- owaislone 7y agoI proposed editorconf to them but I think were still discussions and debates. Not sure if they've settled on anything yet.