I stopped the data flow – on React best practices

Reading the interesting article from Dan Abramov:https://overreacted.io/writing-resilient-components/ I stopped at memoization. I did not know this technic before, but simply because nobody care so much about names before functional programming. And so I discovered how large is the cover of react hooks, useMemo() that does https://github.com/alexreardon/memoize-one In a cleaner way with the hook, in my […]

Read More…

git-merge: the github conference (Microsoft 2019)

Remembering those nice days in Brussels, where I visit le Grand Platz, having good lamb’s meals, visiting Van Gongh – The immersive experience, Atomium (my video). But mostly I attended the conference on github, updating my skills on managing code base, contribute code, sending PR, rollback error, inspecting … The conference happened in South of […]

Read More…

Docker in a Docker

Running a docker container from inside a docker container, I mean. Of course one can define an image that instanciate a container as its default command, and this would lead to an infinite loop of forks … let’s see The infinite containment docker run -v /var/run/docker.sock:/var/run/docker.sock -name whocare alwaysfork Ok, that is bad and I […]

Read More…

A matter of elegance

I need some moment to fully understand this: const compose = ( …fns ) => fns.reduce( ( f, g ) => ( …args ) => f( g( …args ) ) ); reduce method is trickly: when initialValue is not given, the first element of the array is taken as first argument of reduce’s callback parameter, […]

Read More…

Lo sporco lavoro del CI/CD e DevOps

Ora racconto una storia. Beh, la faccio breve, si è fatta una certa.   Da quando c’è bisogno di rilasciare il software in tempo reale sono stati scritti diversi software di supporto per fare lo sporco lavoro di: eseguire test, impacchettare, distribuire i pacchetti nei vari server di destinazioni. Uno di questi è Jenkins, scritto in […]

Read More…

E le Promise ritornano (risolvono in) function?

Stasera ero qui con un test (acceptance) cercando di accrocchiarlo alla meglio. In sostanza usando jsdom e jest ho del codice legacy che utilizza jquery (versione vecchissima) e il js è nella pagina. Lo incollo in un file separato, prepare.js. E visto che devo caricarlo tramite node lo metto dentro una funzione che chiamo con […]

Read More…