DEV Community

Lorenzo Tinfena
Lorenzo Tinfena

Posted on • Edited on

2 2

Code conventions

I'm thinking about this conventions, tell me what you think about that:
1) Use LBYL when you can, EAFP when you must.
2) In every function you can throw exceptions in order to explicit software bugs.
3) Error labels in the interface only to explicit user errors, included in the software working domain.
4) One or some optional very big try catch in order to save log data, and then crash.
5) Logs must be divided in two types: standard logs, and warning logs. (software errors are explicited only from exceptions)

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay