Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 1.49 KB

Tips.md

File metadata and controls

20 lines (14 loc) · 1.49 KB

Below are some brief notes I have written. For full style guides it is useful to see what actual companies are doing. Here is an example of code style conventions: http://google.github.io/styleguide/

Github conventions

  1. Commit your code changes to the repository often, this is best practice.
  2. Do not commit your .o file or your executable file to the repository, this is considered bad practice!
  3. On Functionality/Style
    1. You should have comments in your code to explain what is going on, and use good style (80 characters per line maximum for example, functions that are less than 50 lines, well named variables, well named functions etc.).

Code Style Guide

  1. Do not duplicate code (i.e. Use functions)
  2. Typically keep your functions to less than 50 lines.
  3. Name your functions and variables consistently. Meaning if you start them with uppercase letters, do so. If you use conventsion such as iMyVariable (the 'i' prefix indiciating an integer as the type), then do so consistently.
  4. Write comments liberall. Comments are more useful when they explain 'why' you are doing something. The 'what' is seen from the code.
  5. Indent your code for each nested block. This makes the code easier to follow.

When working on the server

If you accidently delete something you can navigate to cd .snapshot/ which will show files that have been periodically backed up for that current directory. This is yet anothe reason to make sure you are working within the CCIS systems which provide this backup service.