I just reached week 3, and I already got late writing this. It is my fault that I don’t write this daily, but instead I write it on the weekend at once. Anyway, here’s somethings that I learned within a week and more ago
- Last week the traffic was good. This week, it got bad (normal) again.
- There’s this idea in this video The Unicorn Hunter about creating invention ideas everyday. At some point, it’s inevitable at least one of those idea will become reality. Even better, you found that idea to be a very good idea, and decide to pursue it. Hence, I will also adopt that idea. I will add one random invention every week into this Homework. I won’t care if the idea is good or bad, it just is.
So here it is, idea of the week: Convertible pond at park. So Bali recently experiencing a very bad weather, harsh wind and rain. Renon Park, a place with no water whatsoever, now have pond
-
I found this weird syntax using binary OR operator in Supercluster NPM package codes. After doing some research (Asking ChatGPT), I ‘understand’ that this script is a faster way to truncate floating point number into integer (like floor, removing the decimal component of floating point). This is a consequences of how JS do bitwise operation, since bitwise OR can only be done to specific data type (integer), JS behind the scene convert this float into integer first before actually doing the bitwise OR. This is just weird for me. instead of the code doing the thing, it is actually a consequences of how it is implemented.

-
I was planning to migrate my personal server. I learned there are other PaaS tool for making Heroku like DX. Those are Coolify, Dokku, and Dokploy. This is the first time I came across Dokploy. I use Dokku previously, and decide to move into Coolify.
-
I found about Effect.TS, a (currently wannabe) standard library for JS. After learning about it for a few days, I do find it really insteresting, but it is too different of way to write JS code, and I found no real use case so far, for me at least.
-
I also learned about XState, a state machine library for JS (Not specifically for React), and I found it to be a very nice way to structure states. I also learned that I misuse React Context, where React Context should be used only as dependency management, where I use it also for state management. No wonder my React code got dirty very fast. It took me two days to understand XState, it is to be honest a very complicated library (compared to alternative like Zustand), but it give a very nice framework of thinking about state, and state transition. I already adopting it to some of my project.