3 ms·
Along the same lines as the article, I've started thinking about internal code as ETL - all code. There is some faucet, transformation and then a sink. Only at
by irjustin 6y ago
Along the same lines as the article, I've started thinking about internal code as ETL - all code.
There is some faucet, transformation and then a sink. Only at the sink does external state get mutated.
It helps because transformations can be closer to pure functions and you know there is no state changes until you've hit the sink/loader.
Not sure yet, I haven't concluded it's the right way for me, as it has saved a few headaches here and there - but I'm sure I've unknowingly caused more else where just yet unseen.
Also for the author, my favorite word of idempotent - given the same inputs - always get the same output.
- justincredible 6y agoIdempotent means feeding the output back in as the input will result in the same output. It might require purity, but is conceptually distinct. For example, boolean negation is a pure function as it depends only its input and has no side-effects, but it's not idempotent since: not(not(var)) != not(var)