Jump to content

Lambda Support for Wait Conditions (Make your code cleaner!)


The Viking

Recommended Posts

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.

1dc30d92798e0920bc9cfb3f74b331af.png

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.

 

  • Like 1
Link to comment
Share on other sites

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.

:doge:

:doge:

Of course I do think consistency is most important, but here on OSBot we don't newline :kappa:

Edited by Explv
  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...