Agree, also by reasoning from basic principles adding extra brackets ( ) should not change the output result - at least this is what our brain is programmed to believe, but in the case of chained operations it will.
I think static type inference can be a big win, considering that the typescript type is already a contract and defining the contract again for validation libraries (joi / zod) feels like an overkill.
The refactoring piece is a great advice. That is the only way to keep the codebase sane and relatively free from tech debt. And if it is not the part of the process, it would never get prioritised.
Yeah I definitely agree. Any time spent prototyping is easily worth it (and I mean real prototyping, not "prototype that you add features too until it's the product").
I once spent a few weeks protecting a project with different GUI toolkits. I think I spent a week each on Qt, AngularDart and Vue. I wanted to spend one more week trying React but my boss was just itching to "start" and couldn't wait one more week.
We went with Vue, which turned out to be a terrible decision (I'm not sure about Vue 3, but Vue 2 at least is shit compared to React). Guess what we spent 6 months doing later... all to save one week.
So we had a team with around 40 devs and we switched to a component library successfully. After 1.5 years there is now 10% legacy code still available, but mostly we are good.
Some of the steps that we undertook and are not mentioned in other comments.
- We had a migration team set up with 1 developer and the team lead from each team.
- Arranged weekly migration sessions for 2 hours where each team would pick some components and migrate it.
- Made sure that it is the joint responsibility of all the people to maintain the library and not sure a single platform team. This way the teams will at least have more affinity to the components that they have made.
Overall I found the cross team weekly migration sessions to be extremely effective, in such scenarios once people know that it is going to be done on regular basis and it is important, they start giving more weightage mentally.
Example
(a==b)==c would be different from a==b==c
reply