Lou Montana/Sandbox – User
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Small update - WIP) |
m (linked indentation styles wiki page) |
||
Line 1: | Line 1: | ||
[[Category: Sandbox]] | [[Category: Sandbox]] | ||
[[:Category: Scripting Topics]] | |||
{{Informative | Future [[Code Best Practices]] page}} | {{Informative | Future [[Code Best Practices]] page}} | ||
---- | ---- | ||
;Best practices: | |||
* [[Code Optimisation#Make it readable|Make it readable]] | |||
** var names | |||
** format, indentation, no one-line, spacing, line returns | |||
** Be consistent (space/tab indentation, (camel)casing, K&R / Allman style indenting. See [https://en.wikipedia.org/wiki/Indentation_style#K&R_style Indentation Styles]) | |||
** | |||
** | |||
** Be consistent (space/tab indentation, (camel)casing, | |||
* Don't duplicate, make functions | * Don't duplicate, make functions | ||
* prefix your public variables with your tag | |||
* | |||
* PRIVATE (or params) your variables | * PRIVATE (or params) your variables | ||
;Also: | |||
* don't steal code and pretend it's yours | |||
* don't try to obfuscate your code: it's considered rude, especially since you learnt from others | |||
* have fun | |||
* | |||
* | |||
* |
Revision as of 17:42, 5 September 2019
- Best practices
- Make it readable
- var names
- format, indentation, no one-line, spacing, line returns
- Be consistent (space/tab indentation, (camel)casing, K&R / Allman style indenting. See Indentation Styles)
- Don't duplicate, make functions
- prefix your public variables with your tag
- PRIVATE (or params) your variables
- Also
- don't steal code and pretend it's yours
- don't try to obfuscate your code: it's considered rude, especially since you learnt from others
- have fun