Talk:Coding conventions: Difference between revisions

Content deleted Content added
Ptrb (talk | contribs)
Cewbot (talk | contribs)
m Maintain {{WPBS}} and vital articles: 2 WikiProject templates. Create {{WPBS}}.
 
(21 intermediate revisions by 11 users not shown)
Line 1:
{{WikiProject banner shell|
{{WikiProject Computing|importance=}}
{{WikiProject Computer science|importance=}}
}}
 
== Code Conventions for the Java Programming Language==
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:
Line 9 ⟶ 15:
 
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.[[User:G7shihao|G7shihao]] ([[User talk:G7shihao|talk]]) 02:52, 20 February 2009 (UTC)
 
:Hi, this comment is from 2009. Meanwhile, several up-to-date Java-conventions are added to main article. Closing this comment is unspecific and has not seen further responses. If I missed anything, please re-open. KR {{done}} [[User:17387349L8764|17387349L8764]] ([[User talk:17387349L8764|talk]]) 09:34, 15 April 2021 (UTC)
 
== Trailing commas ==
Trailing commas redirect here, but the article does not mention them. <small class="autosigned">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/81.191.75.7|81.191.75.7]] ([[User talk:81.191.75.7|talk]]) 21:22, 29 July 2015 (UTC)</small><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
 
:It does not need to mention it specifically. TCs are part of coding guides, e. g. https://rules.sonarsource.com/c/RSPEC-878 KR {{done}} [[User:17387349L8764|17387349L8764]] ([[User talk:17387349L8764|talk]]) 09:39, 15 April 2021 (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.--[[User:Brf|Brf]] ([[User talk:Brf|talk]]) 15:46, 11 December 2009 (UTC)
 
:Hi, it looks messy yes. Programming style completely lacks references, which is inacceptable IMO. It was created 2003. Coding conventions was created 2006 and looks rather list-style. I think this. The best parts of Programming style should be merged into Coding conventions, into a sub-section "Style" or so WITH fresh referencing. Shocking that nobody answered this comment before or shows interest. If I find time, I come back to this. BR [[User:17387349L8764|17387349L8764]] ([[User talk:17387349L8764|talk]]) 09:43, 15 April 2021 (UTC)
 
== Refactoring coding conventions and programming style articles ==
Line 20 ⟶ 35:
Also here, any proposals/comments are welcome.
Thanks, [[User:Ptrb|Ptrb]] ([[User talk:Ptrb|talk]]) 07:09, 5 November 2010 (UTC).
 
:Hi, correct, both pages need merging and updating. See my comment above (Section Programming style). I close this comment which looks like a duplicated-call for action. KR {{done}} [[User:17387349L8764|17387349L8764]] ([[User talk:17387349L8764|talk]]) 09:44, 15 April 2021 (UTC)
 
=== Proposal 0 ===
Line 116 ⟶ 133:
# Executed/DONE [[Talk:Coding_conventions#Proposal_5]] &mdash; [[User:Ptrb|Ptrb]] ([[User talk:Ptrb|talk]]) 08:27, 19 November 2010 (UTC)
# Executed/DONE [[Talk:Coding_conventions#Proposal_6]] &mdash; [[User:Ptrb|Ptrb]] ([[User talk:Ptrb|talk]]) 08:27, 19 November 2010 (UTC)
# Executed/DONE [[Talk:Coding_conventions#Proposal_0]] &mdash; [[User:Ptrb|Ptrb]] ([[User talk:Ptrb|talk]]) 08:27, 19 November 2010 (UTC)
 
== Meaningfulness and Consistency ==
 
"If a for loop uses just a letter 'i' for the index this is not very meaningful . If , however , the word 'index' is used this is much more meaningful ."
 
They way I've always been taught is to use 'i' as an index. It's a pretty standard convention (as well as using j, k etc. for subsequent nested loops) and most people who see 'i = 0' in a line of code instantly associate it with an forthcoming loop.
 
Using 'index' could be considered verbose.
 
[[Special:Contributions/41.133.164.39|41.133.164.39]] ([[User talk:41.133.164.39|talk]]) 20:53, 6 June 2013 (UTC)Dieter
 
 
== Meaningful Names? ==
 
Where do these "meaningful names" come from?
 
Any thoughts, rules, practices, do's, don'ts on "meaningful names?" [[User:DEddy|DEddy]] ([[User talk:DEddy|talk]]) 21:31, 12 July 2013 (UTC)
 
:Hi, searching article for "Meaningful names" finds 0 results. What do you mean? I close this, your comment wasn't answered for a while. Please open again if needed. KR {{done}} [[User:17387349L8764|17387349L8764]] ([[User talk:17387349L8764|talk]]) 09:48, 15 April 2021 (UTC)
 
:The name should describe the data in terms the user of the application can understand. For example ‘sample_size” or “median_age” instead of something like ”x”, “ss”, or “med.” Other than that there are a lot of thoughts on what the form of a name should be, for example “pszCustomerName” is Hungarian Notation for a pointer (p) to a null-terminated string (sz) containing a customer name. [[User:Peter Flass|Peter Flass]] ([[User talk:Peter Flass|talk]]) 19:14, 15 April 2021 (UTC)
 
== Broken link for reference 1 ==
 
The reference one lead to a page with broken llnk only, it should be updated. <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/199.243.65.6|199.243.65.6]] ([[User talk:199.243.65.6|talk]]) 21:37, 6 May 2014 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
 
:Please help and update it. Your comment is from 2014, this is too old. Ref 1 is currently working. BR {{done}} [[User:17387349L8764|17387349L8764]] ([[User talk:17387349L8764|talk]]) 09:46, 15 April 2021 (UTC)
 
== External links modified ==
 
Hello fellow Wikipedians,
 
I have just modified one external link on [[Coding conventions]]. Please take a moment to review [https://en.wikipedia.org/w/index.php?diff=prev&oldid=794810158 my edit]. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit [[User:Cyberpower678/FaQs#InternetArchiveBot|this simple FaQ]] for additional information. I made the following changes:
*Added {{tlx|dead link}} tag to http://www.dit.upm.es/ork/documents/adahis.pdf
*Added archive https://web.archive.org/web/20100527142102/http://software.gsfc.nasa.gov/AssetsApproved/PA2.4.1.1.1.pdf to http://software.gsfc.nasa.gov/AssetsApproved/PA2.4.1.1.1.pdf
*Added {{tlx|dead link}} tag to ftp://ftp.estec.esa.nl/pub/wm/wme/bssc/bssc983.pdf
 
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
 
{{sourcecheck|checked=false|needhelp=}}
 
Cheers.—[[User:InternetArchiveBot|'''<span style="color:darkgrey;font-family:monospace">InternetArchiveBot</span>''']] <span style="color:green;font-family:Rockwell">([[User talk:InternetArchiveBot|Report bug]])</span> 05:26, 10 August 2017 (UTC)
 
== External links modified ==
 
Hello fellow Wikipedians,
 
I have just modified one external link on [[Coding conventions]]. Please take a moment to review [https://en.wikipedia.org/w/index.php?diff=prev&oldid=801546470 my edit]. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit [[User:Cyberpower678/FaQs#InternetArchiveBot|this simple FaQ]] for additional information. I made the following changes:
*Added archive https://web.archive.org/web/20061215120657/http://www.xprogramming.com/xpmag/whatisxp.htm to http://www.xprogramming.com/xpmag/whatisxp.htm
 
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
 
{{sourcecheck|checked=false|needhelp=}}
 
Cheers.—[[User:InternetArchiveBot|'''<span style="color:darkgrey;font-family:monospace">InternetArchiveBot</span>''']] <span style="color:green;font-family:Rockwell">([[User talk:InternetArchiveBot|Report bug]])</span> 10:00, 20 September 2017 (UTC)