Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup proposal: blank lines that are really tabs, names of variables, missing headers, removing duplicates and others #6589

Closed
josephsl opened this issue Nov 24, 2016 · 14 comments

Comments

@josephsl
Copy link
Collaborator

Hi,

This was brought up by @derekriemer a few months ago somewhere (the dev list, Twitter, IRC, etc.):

When we look at NVDA source code, it appears to be a spider web of different coding styles that contribute to the mess we're seeing today. Some of the issues found were missing headers, blank lines that are really tabs, inconsistent variable names and others.

Thus I would like to propose that we spend at least two months just working on making NVDA source code look polished. In other words, I'd like to suggest that we look at files that constitute NVDA Core and make source code more consistent. This includes tackling the following issues:

  • Locating tabbed blank lines.
  • Removing duplicates.
  • Adding headers.
  • Tiding up names of variables, class inheritance declarations and so on.

These are just some of the things we can see in our source code (I'm sure there are more). As this is a huge project, I'd like to request many to help out with this task, with folks working on specific areas such as locating duplicates (I heard @derekriemer is interested in adding copyright headers and making source code docs clearer).

Thanks.

@josephsl
Copy link
Collaborator Author

Hi,

We should also take this time to truly deprecate code paths that ought to leave this world (for instance, config.save). Thanks.

@LeonarddeR
Copy link
Collaborator

LeonarddeR commented Nov 24, 2016 via email

@jcsteh
Copy link
Contributor

jcsteh commented Nov 24, 2016 via email

@josephsl
Copy link
Collaborator Author

josephsl commented Nov 24, 2016 via email

@jcsteh
Copy link
Contributor

jcsteh commented Nov 24, 2016 via email

@Brian1Gaff
Copy link

Brian1Gaff commented Nov 24, 2016 via email

@tsiegel
Copy link

tsiegel commented Nov 24, 2016

I don't know why blank lines that are really tabs is an issue, but those kinds of things are easily solved. A simple program that looks for lines with only tabs in it, and replacing them with cr/crlf pairs is trivially easy to write, and could be run on all of the source tree in a matter of seconds. No need for hand checking. Copyright headers for all files could be done in a similar manner.

@jcsteh
Copy link
Contributor

jcsteh commented Nov 24, 2016 via email

@tsiegel
Copy link

tsiegel commented Nov 24, 2016

I wasn't talking about copyright for each and every commit, I was talking about general copyright messages for each file. Each file should have the same copyright message stating the overall copyright for the project as a whole. Individual commiters can add their own copyright or not, but generally, for large projects, individual commits/individuals don't get their own copyright line, as they donate their code to the project as a whole.

@jcsteh
Copy link
Contributor

jcsteh commented Nov 24, 2016 via email

@feerrenrut
Copy link
Contributor

While it would be nice to have a very clean, tidy and consistent codebase I dont think this is a good idea. Its a moving target, which does not introduce benefit to end users. From my experience these kinds of changes only introduce problems for little benefit.

I vote that we close this issue.

@jcsteh
Copy link
Contributor

jcsteh commented Nov 27, 2016 via email

@tsiegel
Copy link

tsiegel commented Nov 27, 2016

Just one final comment on this as regards copyright. This is a GPL project, it should be under a copyleft license, and when someone donates code to the project, it should be understood that they may or may not be referenced in the general documentation as a contributor, but having dozens of copyrights for a single source file is just silly, and no other gpl project I've ever seen does this. Generally, it's understood by the contributors that copyright isn't an issue when contributing to an opensource GPL copyleft project. Those who have a problem with this sort of a policy need not contribute code to the project. I've seen serious problems arrise from trying to keep separate copyrights on code, and in one case, it forced the company to change their entire website and snippets collection to have a blanket mit license on all code posted on the site. Let's not open any sort of can of worms here, and just declare all code submitted to NVDA to be a simple copyleft license, and leave it at that.

@feerrenrut
Copy link
Contributor

I'm going to close this issue. However if working on an area of code, feel free to take the extra step to clean it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants