Update for 29-11-22 21:00

This commit is contained in:
Tyler Perkins 2022-11-29 21:00:01 -05:00
parent 459a490ef0
commit 399a76446c
2 changed files with 22 additions and 0 deletions

View File

@ -3,6 +3,7 @@
== Conceptual == == Conceptual ==
* [[error_handling]] * [[error_handling]]
* [[names_in_code]]
== Libraries == == Libraries ==

21
tech/names_in_code.wiki Normal file
View 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