Skip to content

Development Flow & Recommendations

Thomas Lu edited this page Jan 13, 2025 · 1 revision

Recommended Workflow

Whenever you want to develop something, follow these steps:

  1. Fetch/Update your local repository
    In IntelliJ, press Ctrl + T to pull the latest changes from the master branch.

  2. Choose your branch

    • Either create a new branch from the latest commit on master.
      This ensures your code is in sync with the newest version.
    • Or continue working on your existing branch.

    image

  3. Happy Coding!

  4. Commit your changes

    image

  5. Push your commits to GitHub

    image

  6. Go to Sleep :)

Note

  • Your branch will be merged into master periodically. You can also create a Pull Request or let me (Thomas) know if you want it merged sooner.
  • You only need to handle merge conflicts if you merge the latest master into your own branch. Someone (me) will take care of merging your branch into master.

Branch Rules

We don't enforce strict branch rules. During early development, it's recommended to commit to your own branch. However, in some cases, there's no problem committing code to someone else's branch.


Developing Rules

Debugging

Before committing your code, ensure any temporary logging output is in the format:


Logger.log("[ServerConnection Warning/Debug/Error]: Example Logging Information", false);


instead of using System.out.println("something");


  • Logger.log("something");
    By using Logger, your logging will also be saved in asset/log/app.log, and it won’t clutter other developers’ output.
  • Logger.log("something", false);
    Adding the parameter false means the log will only be recorded in asset/log/app.log.

If you’re just testing something locally, feel free to use any temporary logging method you like.


Comments

  • When writing comments, any language is allowed. However, it’s recommended to provide English or German translations alongside other languages.
  • Beautifully written code sometimes doesn’t need comments, but if you’re not fully confident in your coding style, please add comments.
  • If a method or class is copied from an external source (e.g., the internet or ChatGPT), please include a reference to the original author.

Clone this wiki locally