Table of Contents generated with DocToc
CLEAN CODE (from https://github.com/avernois/prez-clean_code )
test unitaire (avec 1 test par comportement) ecrire code lisible (petite function bien nommée + niveau abstraction equivalent) code reflete le metier (nommage function et variable) ne pas commenter un mauvais code mais plutot le réecrire commentaire explique un choix de conception/ une obligation de conception / plus que la fonction réalisee a.getB().getC().doThing() -> a.doThing() (Loi demeter) utilisation librairie via une facade (impermeable / lib de mes reves) principe SOLID jamais retourner null if/switch -> polymorphisme
-
Declarative vs imperative, Imperative programming specifies how it is to be done (control flow) whereas declarative programming specifies what is to be done (logic of computation). While imperative system gives more control to the user, declarative system makes the repetitive processes better, i.e. easier automation and expansion of systems. declarative! Another definition of declaratve: we declare our logic before hand with everything that it needs to accommodate for the whole life cycle from start to end.
-
https://www.educative.io/blog/declarative-vs-imperative-programming