Botre Posted July 18, 2017 Share Posted July 18, 2017 10 hours ago, The Viking said: Not only are your percentages completely anecdotal and have no actual proof to back them up, but the "example" you gave is a complete exaggeration and misrepresentation of my point. If you would bother to do some actual research, you would see that your claim is way off. Far cry from the "1%" number you gave. Source: https://github.com/outsideris/popularconvention (Somebody analyzed code conventions across commits on GitHub) You're once again off base with your statement that "you are introducing inconsistencies in other people's code base by not respecting the dominant code-style.". What about the 37% of people that use new line braces? Are you introducing inconsistencies into their code base if you release a snippet? No, because they should adjust it to fit with their own preference. I wouldn't consider that a difficult task. As long as they are consistent within their own code-base, it doesn't matter which style they use. This is even true at the corporate level, where conventions can vary from company to company. For example, brace placement, tabs vs spaces, line length, variable naming and exception catch clauses (empty catch blocks, swallowing exceptions) are just some of the nuances that can vary from company to company. It isn't a problem though, since their specific rules apply to their specific code base. The 1% was a dramatisation but I have to admit that I'm very surprised the number is that high. Kinda makes me want to see the details of these percentages (geographic distribution, which types of project use which convention, etc..). All the big Java frameworks, libraries, open source projects I have ever visited, oh and the Java library itself do not newline, hence why I'm so surprised. Of-course most of my points become invalid without the data to back them up Cheers. 1 Quote Link to comment Share on other sites More sharing options...
Explv Posted July 18, 2017 Share Posted July 18, 2017 (edited) 5 hours ago, Botre said: The 1% was a dramatisation but I have to admit that I'm very surprised the number is that high. Kinda makes me want to see the details of these percentages (geographic distribution, which types of project use which convention, etc..). All the big Java frameworks, libraries, open source projects I have ever visited, oh and the Java library itself do not newline, hence why I'm so surprised. Of-course most of my points become invalid without the data to back them up Cheers. It isn't very clear how he got to those percentages, and I can't be bothered to read his code. It says based on X commits, but I think X repositories would be a more accurate representation. All the Java style guides including Oracle's and Google's don't newline, I also have never seen a library that newlines. Although you can just auto format to clean up the disgraceful newlines, sometimes it can fuck up the formatting of other pieces of code. I would rather people just followed standard Java practice rather than trying to infect me with their .NET virus. More than anything, if I see someone using code conventions from a different language, it just makes me think they are a scrub. Of course I do think consistency is most important, but here on OSBot we don't newline Edited July 18, 2017 by Explv 2 Quote Link to comment Share on other sites More sharing options...