Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Coding Guidelines

Marvin edited this page Aug 31, 2019 · 9 revisions

This is a small overview of guidelines regarding new and changed code.

Code style and conventions

All new and changed code must adhere to the Java Code Conventions from Oracle or the Google Java Style Guide.
We reserve to be lenient with existing code and arbitrary restrictions regarding row and column counts.

Use your IDE's formatter liberally and regularly. A code style file for IntelliJ exists and matches our preferred style.

Do's and Don'ts

Category Importance What Example
Modern Language Feature High Use lambdas instead of anonymous classes. This improves readability and maintainability Use () -> {} instead of new Runnable() { ... }
Modern Language Feature High Use functional built-in types for lambdas and functional expressions instead of custom counterparts. There are numerous classes that have direct built-in variants in Java Use Consumer<T> instead of Runnabled<T>