# Standards --- A good coding standard is ideally small, opinionated, automated where possible, and focused on things that have a measurable impact on maintainability, reliability and developer productivity. --- # Design smells : duplication A long time ago in a galaxy far, far away… ``` beautiful-monorepo appA appB common ``` --- # Design smells : duplication And now ``` repoA appA common repoB appB common ``` team A fixed a bug in common only in repoA, team B has the same error later --- - Effort duplicated at company/team level - Heterogenous stack : team A use an http library, team B use another one - Hard to switch from a repo to another (mental load) - LLM friendly impact : consistency, maintanibility, efficiency, velocity, resilience --- # Solutions - Convention over configuration (e.g. ghostty) > Ghostty is designed to work out of the box with no configuration for most users. Ghostty has sensible defaults. We are constantly challenging ourself as a project to eliminate any necessary configuration to use Ghostty. => Same spirit when working on shared components - Don't Repeat Yourself - Boy scout rules : it's the role of every engineer (not only L3+) > Leave the codebase cleaner that you found it --- # Already done To put the light on cool initiatives that you might have missed. --- # Done: sbt-swan plugin Zero Configuration Philosophy Standardize how Scala projects are built, tested and packaged at Swan - embeds code formatting config - embeds linters config --- # Done: workflow-templates : DRY harmonize CIs between repos --- # Done: lib-domain : DRY shared domain code (amount, country, …) - improve resilience : central place for closing days configuration - improve velocity : adding a new country in only one PR --- # Done: lib-kafka (scala) an error in the consumer code crashed the application. extract a lib that makes application code resilient by design. --- - Helper to write/test DB layer (BaseRepositoryImpl). Manually maintained list of fields (ordered ?). Remove surface for bugs. List of fieldsrepository fwk --- # Still to do - ser/deser for lib-domain (json, DB, …) - unify repr. of enum in DB - your ideas --- # Difficulty - Cross team coordination: e.g. duplicated code between cred and card (payment workflow fwk). - ownership of shared libraries --- # solution - platform team to provide a reliable “golden path”: paved roads for the most common use cases.