GENERAL: The important small things

Here are some useful guidelines

  1. Coding format
    Although the comprehensive guideline is available in the official wiki, here is a high light for what to be mindful in this project, with my own interpretation:
    a. #ifdef USE_TTS and #endif should be aligned with column zero
    b. Operators should have a white space separating. Operators include % and =
    c. Curly brackets should come after an extra white space
    d. Give the statement that follows the if condition a brand new line with indentation, even if there is only one line (which in this case, one should avoid curly brackets)
  2. Share messages. Not screenshots.
    a. use git diff to indicate the code difference without having to commit every time (p.s. quit the git diff view by pressing q)

Here are useful settings/tools for people new to developing

  1. Multiple cursor editing
    Can be practiced in the playground provided in VScode
  2. Print the debug message in the terminal by using debug(“Message: %d”, variable) or warning(“Message: %d”, variable)
  3. Use the terminal to commit git messages
    git status – see the files you have made changes
    git add /path/to/file – to specify the files you want to commit, the path can be copied by the message from git status
    git commit -m “ENGINENAME: Commit message” – make sure all commit messages start with the same initials in all caps (e.g. GRIFFON: )
    git push: to finish the commit

Leave a Comment