Update for 29-11-22 21:00
This commit is contained in:
parent
459a490ef0
commit
399a76446c
@ -3,6 +3,7 @@
|
||||
== Conceptual ==
|
||||
|
||||
* [[error_handling]]
|
||||
* [[names_in_code]]
|
||||
|
||||
== Libraries ==
|
||||
|
||||
|
21
tech/names_in_code.wiki
Normal file
21
tech/names_in_code.wiki
Normal file
@ -0,0 +1,21 @@
|
||||
= Names in Code =
|
||||
|
||||
Standards and conventions for naming stuff, in code
|
||||
|
||||
1) Dont abbreviate names
|
||||
* Abbreviation relies on context. Context you may not have re-reading your
|
||||
code
|
||||
2) Dont put types in variable names
|
||||
* Thats a Windows.h C99 moment
|
||||
3) Add units to variables unless the type tells you
|
||||
* IE a delay function takes a paramater _delaySeconds_, not just _delay_.
|
||||
* If you have a unit like `chronos::timespan`, however, you dont need that
|
||||
4) Dont put types in your types
|
||||
* IE AbstractX, BaseX, etc...
|
||||
* If you need to to this, maybe try renaming the child class instead to be
|
||||
more specific
|
||||
5) Refactor if you find yourself naming code "utils" or "helper"
|
||||
* 99% of the time those utils can be broken into their own classes
|
||||
* This is true even if you have a 'utils' type function just for Cookies,
|
||||
Math, etc
|
||||
|
Loading…
Reference in New Issue
Block a user