This repository has been archived by the owner on Mar 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
My way of programming
Cyrielle edited this page Feb 27, 2020
·
8 revisions
I won't force you to follow it, but I write here my way of programming, so you will be able to understand some things in my code. Because I don't know the way of programming of many other programmers, I could have written some generalities. I hope you won't hold this against me.
- I use the "camelCase" convention. I never use underscores, except for defines or constants, or some other exceptions.
- I practically never use boolean setters. If I need to modify a boolean, I put in in public, because, in my opinion, the booleans don't need to be verified. For all other types of variables, I use setters if I need to modify them. (Less true now, but it still in the code)
- Some of the variables are in french, or a mix of French and English. They are old variables I forgot to translate. If there is a french variable, warn me (So I can fix the problem).
- All the objects-related comments are in the headers, and all the code-related comments are in the sources.
- I try to create macros for the repetitive creation of objects, like attacks or OpMons. It allows me to do it much more quickly. So I create A LOT of macros (Maybe too much). If you think it makes the code too difficult to understand or confused, warn me.