In the root of the git tree is an eclipse-template that you can use to ensure all code is properly formatted.

Avoid application wide singletons

Singletons make testing and mocking hard. We also wish to be able to run N instances of Gossip inside the same JVM and singletons clash

Do not throw exceptions in constructor

This can be difficult with sockets and files, however best practice is to to work that might throw an exceptions inside an init() method called after the constructor

Avoid thread locals

Thread locals can be hard to trace and understand. Avoid them if possible.

 

  • No labels