Programming effectively in teams

From ETC Public Wiki
Jump to: navigation, search

Few Tips and Tricks to work effectively in teams(In Unity)

  1. Communication is key!
  2. DISCUSS before you start writing code. It takes some time initially but is worth it!
    • Break down your problem into smaller tasks
    • Work together to decide who will work on what
    • Try to work on different files to avoid commit conflicts
    • When a task is taking more time than necessary do not feel scared to ask for help
    • If 1 script’s function needs to be accessed by another. Discussing the input parameters required, output it produces and what happens inside the function with the other programmer before actually implementing it will reduce debugging overheads and keep each other informed
    • Let go of your ego! One programmer doing all the work will only let the team down
  3. Make your code readable, to ensure that others understand it without spending too much time
    • Following coding standards would help in readability: Coding standards
    • Comment code if needed. Using “///” before a function in C# generates a comment stub for the function: Code documentation
    • Using #region can help organize code within large source files: #region
  4. Useful programming tips to improve productivity
    • You might have many public variables in your script that you might not want to show up on the inspector. You can use [HideInInspector] before declaring the variable: HideInInspector
    • Make use of the singleton class to easily access scripts that are unique (i.e. requires only one script of its kind to be running): Singleton in Unity
    • Use inheritance to reuse similar code. Making use of virtual functions and overriding them in sub-classes to mix common and unique functionality: if-else heimer disease