nicolas lopes Profile picture
@xteam • former @pagarmetech react, typescript, go and rust
Dec 13, 2022 13 tweets 3 min read
I'm going to log here my journey learning more about distributed systems. #LearnInPublic

First of all, let's start with an introduction to that theme!

In a single-computer, concurrency is known as shared-memory concurrency as multiple threads can access the same memory space. In a distributed system, concurrency still exists as different computers can execute programs in parallel. However, shared memory is not typically present. Each computer in a distributed system has its own operating system and address space, and nodes communicate with each other.
Dec 11, 2022 7 tweets 1 min read
Sometimes when you're building a design system or generic components, it can be frustrating when you don't know what the default style/behavior should be. My advice: even if you're unsure, create the simplest possible version and try to find patterns as you use it. For example, I was building an app to track my diet/workout routine and I couldn't figure out what color the title, subtitle, and text should be. But as I continued building, I realized I had subconsciously created a pattern.
Oct 23, 2022 9 tweets 4 min read
let's suppose you're building a hook to use your forms easily and you've opted to receive an argument with their default state, i.e:

useForm(INITIAL_STATE)
then, you want to get their types and give handy type completion for your mutate method, what you would do?
cc @sseraphini you probably thought about using the `keyof` keyword, right?

so, let's try! it looks like it worked! we're getting exactly the keys of the object that we've passed!

forms aren't only objects...what if another developer on your team gives an array as the default value?
Oct 20, 2022 5 tweets 2 min read
do you know how to prove that EVERY truth table has 2ˆn lines?

you can prove that with a concept called `Weak Induction`.

first of all, you're maybe thinking that oh:

if I have 1 column, the table has 2 lines
T(1) = 2ˆ1 = 2
the same with two
T(2) = 2ˆ2 = 4

cc @sseraphini but you can't say this is applied to all the natural numbers just by looking at a small portion of them. actually with data and literal numbers you can't prove anything that is contained to the natural numbers set.
i.e (n e N)

so, how we can prove this for EVERY natural number?
Oct 19, 2022 5 tweets 2 min read
i'm getting an error while trying to set up a monorepo w/ @turborepo and @stitchesjs.

i'm trying to create my design-system package, but getting this error:
The type of this node cannot be serialized because its property '[$$PropertyValue]' cannot be serialized.
cc @sseraphini my tsconfig files
Mar 30, 2022 13 tweets 5 min read
[COMO CONSEGUIR O SEU PRIMEIRO EMPREGO COMO DEV BACKEND]
Masterize uma linguagem que seja usual para construir APIs, recomendo Javascript, por meio do Node conseguimos rodar ele no servidor e é bem versátil para caso você um dia também queira mexer no front ☞ Orienta os teus estudos a resolver o desafio de entrevista das empresas, isso vai fazer com que você ganhe um Ótimo portfólio, e tornará o seu estudo mais dinâmico. Comece pegando um desafio bem mais difícil do que você consegue resolver e comece a quebrar em passos menores ☞