Posts
Node's (19.1) test runner, initial impressions and opinions
Node’s (19.1) test runner, initial impressions and opinions Photo by Nguyen Dang Hoang Nhu on Unsplash
Note: what I write could be wrong by the time that you read it At the time of writing (node 19.1), test APIs are to be considered experimental, so what I write could be out of date by the time a new node version will be out
Intro At the end of this blog post, you will know what I think about the “new” feature of node, of having a built-in test runner.
read morePosts
Is the iPad a laptop?
Why did I switched as a main machine to my iPad I switched since almost a year to the iPad as a main machine, this was due to the fact that I already had it, and I found myself using it way much more than my laptop, and I decided to invest some money in a keyboard and call it my main machine from that moment on.
What I discovered is that, for certain workload, it was actually helping me to focus, thanks to the different way of thinking about computing that the iPad has.
read morePosts
What are cookies anyway?
This is a bit of a technically lighter explanation meant for not technical people to try to understand what is a cookie and why should you even care about it.
Disclaimer for technical people, to boil it down, some stuff will be purposely slightly inaccurate, or more reflective of HTTP 1 instead of HTTP 2. But for the sake of understanding why cookie matters or not, it’s irrelevant.
A web server doesn’t necessarily remember you To understand the need for cookies, what you need to know at the beginning, is the fact that every time that you reload a page, the “website” doesn’t necessarily know if you reload three times, or you are three different people.
read morePosts
Communication between microservices
This article was written and published 2020–01–07 on my personal blog, this is a repost
The problem Let’s say that you’re developing a software in a monolithic approach and you need to create a new functionality. What you will probably do is to search or define a new “business identity” and from there create what you need. If you need to expose something, you will create appropriate APIs, and if you need something from somewhere else, you will just call that method on that class.
read morePosts
DIY React state manager
DIY React state manager This is a tutorial aim to demystify what libraries like react-redux does under the hood and learn about the new context apis
https://www.pexels.com/photo/woman-holding-white-string-lights-1366178/
Why even bother I think there are a couple of reasons why you should be interested in how state management works.
If you know how it works under the hood, a lot of problems that you might have will be more simple to debug, especially if you’re moving away from a consolidated library to a new library which is more edgy you could face some problems Global state is great but sometimes you don’t want to pollute it for ephemeral things, for example if you have a couple of components that needs to be rendered just in some occasions (loaders, small user stories) you may want to put it put of the global state use the internal state, this has pros (independency) and cons (multiple responsibilities of the component, not clear separation between data and view) Find new ways to avoid Prop Drilling when necessary, after playing around I found new ways to manage my dependencies What does a state manager even do then?
read morePosts
Genetic Algorithms, what are those and my impression
Genetic Algorithms, what are those and my impression What is a Genetic Algorithm (GA) and why use it Let’s pretend that you have a problem in which you have a set of constraints and you want to find the maximum [or minimum] acheivable, this is one option.
One of the main advantages is that is highly parallelizable, so you can start with random (or less random) points in which you think that your solutions are good enough to be considered and then you find the perfect combination.
read more