--- tags: Software Engineer, --- # Software Engineering Concepts Continuous Integration vs Continuous Deployment vs Continuous Delivery Staging meaning in software development Infrasturcture-as-a-service vs platform-as-a-service database per service mesaage queue. immediately consistent, eventual consistent SLA service level agreement SLO Service Level Objectives SLI Service Level Indicator https://www.atlassian.com/incident-management/kpis/sla-vs-slo-vs-sli ## writing code SOLID principles Single Responsibility make class methods unit testable. depend on, or use other components. if it does, we need to mock the subcomponent's return value. When current time is involved in the logic, we want the time to be given/determined in test cases. Or else we have different results whenenver the tests are executed. Optional can have anti-patterns https://www.baeldung.com/java-optional Spring backend barebone concepts authentication & authorization make use of some header. about POJOs - make use of `lombok` to generate setters & getters. - usually the API model will be different from the Domain model. So we want to have transformer classes to convert these models. We can use `mapstruct` to automatically generate transaformers. - separate the domain model from the JPA entity classes, since the domain model can also have different format from the DB table. for defining API endpoints Tip: whenever there is code change, think about testing them. Don't forget. when dealing with time, timezones in a global app, try to use Clock with in Instant.now(). that way the tests can stub in a fixed clock and not depend on the varying times