Talk:Coding conventions
This Code Conventions for the Java Programming Language document contains the standard conventions that we at Sun follow and recommend that others follow. It covers filenames, file organization, indentation, comments, declarations, statements, white space, naming conventions, programming practices and includes a code example. Why have code conventions? Code conventions are important to programmers for a number of reasons:
* 80% of the lifetime cost of a piece of software goes to maintenance. * Hardly any software is maintained for its whole life by the original author. * Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.
The Code Conventions for the Java Programming Language document was revised and updated on April 20, 1999. [1]
One class per file is not necessary true. In Jave or C#, sometimes there is a need to declare private classes which have to share source files with some other public classes.G7shihao (talk) 02:52, 20 February 2009 (UTC)
Programming style
This article overlaps with Programming style and Coding standards and has no proper link to de:Programmierstil. I dare not change it, because I cannot decide which of the two articles could go to orcus or if both could get a clear different lemma.--Brf (talk) 15:46, 11 December 2009 (UTC)
Refactoring coding conventions and programming style articles
In case you should be watching this, please just give me some time to write down my concerns and suggestions.
Proposal 0
As a general direction for the refactoring of the following arcicles. I suggest to work towards the given focus for each of them.
- Coding conventions — Have this as the leading article on this topic
- Programming style — Limit this to style (read: layout, formatting) only, move other content to respective articles
- Need to double check, if there are other articles on layout, formatting, that would need to be involved in these considerations
- Naming convention (programming) — Limit to naming conventions, move all naming convention specific to here, and point to this article from the other articles
Ptrb (talk) 16:50, 3 November 2010 (UTC)
Proposal 1
The content provided here Programming_style#Appropriate_variable_names is more or less equivalent to the content provided here Naming_convention_(programming)#Business_value and here Naming_convention_(programming)#Length_of_identifiers. I suggest to
- delete the "get a b c" vs. "get hours minutes seconds" example here Programming_style#Appropriate_variable_names , and to stick to Naming_convention_(programming)#Business_value
- consider to migrate the statement on "In early programming languages" from Programming_style#Appropriate_variable_names to here Naming_convention_(programming)#Length_of_identifiers
Ptrb (talk) 14:52, 3 November 2010 (UTC)
Proposal 2
Move this section Coding_conventions#Common_conventions (which is only dealing with naming issues) to this article Naming convention (programming), and to turn it into a level 1 section called "Examples" (or so). The following leftovers would stay in Coding_conventions#Common_conventions for now:
- No more than 80 characters, including white space, should be in one line.
- Only one statement should be on each line.
- An extra character should go early in a comment block to delimit the beginning of externally published or processed documentation.
Ptrb (talk) 16:36, 3 November 2010 (UTC)
Refactoring coding conventions and programming style articles - Summary of preparations and changes made
In case you should be watching this, please just give me some time to write down my concerns and suggestions.
- Changed redirect on Coding standard to point to Coding conventions — Ptrb (talk) 16:15, 3 November 2010 (UTC)
- Changed redirect on Coding standards to point to Coding conventions — Ptrb (talk) 16:15, 3 November 2010 (UTC)
- Changed redirect on Code convention to point to Coding conventions — Ptrb (talk) 16:15, 3 November 2010 (UTC)
- Changed redirect on Code conventions to point to Coding conventions — Ptrb (talk) 16:15, 3 November 2010 (UTC)
- On Programming style Added merge-to codes for Coding conventions and Naming convention (programming) — Ptrb (talk) 16:15, 3 November 2010 (UTC)
- On Coding conventions Added merge-to code Naming convention (programming) — Ptrb (talk) 16:15, 3 November 2010 (UTC)
- On Coding conventions Added merge-from code Programming style — Ptrb (talk) 16:15, 3 November 2010 (UTC)
- On Naming convention (programming) Added merge-from codes for Coding conventions and Programming style — Ptrb (talk) 16:15, 3 November 2010 (UTC)